Version Description
Release Date: 14 April 2021
- NEW - WooCommerce optimizations: The "Special" tab is replaced with the "WooCommerce" tab with SEVEN WC-related optimizations, four of them brand new!
- NEW - Deactivation survey: An optional survey added to the "Deactivate" button to get feedback from users leaving us, so we can improve SBP even further.
- Improved: Added a shutdown hook so the plugin plays better with other plugins (like Really Simple SSL).
-
Improved: A few
if
s here and there to improve the performance of the plugin. - Improved: LiteSpeed cache users can now exclude cookies!
-
Improved: Improvements with the lazy load feature - GetWid videos and videos using
mediaelements.js
are now lazy loaded properly. - Improved: The placeholder image of lazy loaded images is also improved, using a transparent pixel instead of a gray one.
-
Improved: Improvements with the method which adds the
WP_CACHE
constant to thewp-config.php
file. - Updated: Updated Codestar Framework to v2.2.6.
- Updated: Updated lazyload.js to v17.7.0.
Download this release
Release Info
Developer | optimocha |
Plugin | Speed Booster Pack |
Version | 4.5.0 |
Comparing to | |
See all releases |
Code changes from version 4.4.1.1 to 4.5.0
- README.txt +21 -9
- admin/class-speed-booster-pack-admin.php +318 -329
- admin/css/deactivation-survey.css +52 -0
- admin/css/speed-booster-pack-admin.css +4 -1
- admin/js/deactivation-survey.js +85 -0
- admin/js/speed-booster-pack-admin.js +1 -1
- includes/class-speed-booster-pack.php +11 -5
- includes/classes/class-sbp-cache.php +21 -7
- includes/classes/class-sbp-database-optimizer.php +1 -1
- includes/classes/class-sbp-lazy-loader.php +11 -4
- includes/classes/class-sbp-litespeed-cache.php +10 -2
- includes/classes/class-sbp-migrator.php +8 -0
- includes/classes/class-sbp-special.php +0 -125
- includes/classes/class-sbp-utils.php +3 -10
- includes/classes/class-sbp-woocommerce.php +170 -0
- includes/classes/class-sbp-wp-admin.php +133 -23
- includes/sbp-helpers.php +11 -10
- public/class-speed-booster-pack-public.php +7 -0
- public/js/lazyload.js +2 -2
- speed-booster-pack.php +3 -3
- vendor/announce4wp/announce4wp-client.php +0 -168
- vendor/codestar-framework/assets/css/style.css +5171 -5176
- vendor/codestar-framework/assets/css/style.min.css +1 -1
- vendor/codestar-framework/assets/js/gutenberg.js +2 -2
- vendor/codestar-framework/assets/js/main.js +3478 -3455
- vendor/codestar-framework/assets/js/main.min.js +3 -3
- vendor/codestar-framework/assets/js/plugins.js +679 -4765
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: speed, pagespeed, optimization, core web vitals, cache
|
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -35,15 +35,14 @@ With our huge set of features, of course!
|
|
35 |
🌟 **Caching**: Cache your pages into static HTML files, reduce database queries, get a faster website almost immediately. What's not to love about caching?
|
36 |
⭐ **Optimize Google Fonts**: Did you know that there are better ways to load Google fonts? We like to brag about finding one of the best ways.
|
37 |
🌟 **Lazy Load**: It's a disheartening issue that page speed tools encourage laziness... Just kidding, we love being lazy. And search engines will love your pages when you enable lazy loading for images, videos and iframes (except for the above-the-fold stuff, trust us).
|
38 |
-
⭐ **Custom Code Manager**: Hey, you know that huge live chat widget, or the weird script that you really, *really* have to load? Well, you can probably delay them so the rest of the page can load first.
|
39 |
🌟 **Optimize JavaScript**: You know that totally-not-cryptic "Remove Render-Blocking JavaScript" recommendation? Speed Booster Pack can help defer them all until after the whole HTML is rendered, or at least move all scripts to footer. Works like a charm.
|
40 |
🌟 **Optimize CSS**: Who needs all those different CSS files when you can inline them all into your page source? Especially when your CSS footprint is so small? Moreover, you can use the "[Critical CSS](https://web.dev/extract-critical-css/)" feature to essentially lazy-load all your CSS except for the CSS for above-the-fold.
|
41 |
🌟 **Preload Assets**: Have some fonts that load in all your pages, or a script, or some CSS files? Preloading them will help modern browsers serve your pages way faster!
|
|
|
|
|
42 |
⭐ **Localize Google Analytics & Tag Manager**: Tracker scripts aren't the worst things that'll slow your pages down, but they cause the most "recommendations". Localizing Google Analytics and/or Google Tag Manager is a good idea to speed up your website then, right? Right?
|
43 |
⭐ **Enable CDN**: Integrate your content delivery network to your website by rewriting all static asset URLs with your CDN domain.
|
44 |
-
⭐ **Cloudflare Integration**: Connect to your Cloudflare account so you can clear your cache every time your page cache is cleared.
|
45 |
-
🌟 **Plugin-specific Optimizations**: Disable WooCommerce cart fragments, dequeue Jetpack's devicepx script, and more to come!
|
46 |
-
🌟 **Dequeue Core Scripts/Styles**: Dashicons, jQuery Migrate, emoji script, post embed script... If you don't need them, you can now choose to prevent them from loading in the first place... which can get you to the first place on your Google SERPs.
|
47 |
⭐ **Declutter HEAD**: Do you think all that useless junk in your <head> should be gone? Us too! You know what they say: A clear <head> works faster.
|
48 |
⭐ **Other Features**: Minify HTML, enable instant.page, trim query strings, disable self pingbacks, optimize the Heartbeat API, set a limit for post revisions, change autosave interval... Did we forget anything?
|
49 |
|
@@ -104,6 +103,22 @@ All the time! We're always looking for new ways to get this plugin to a better s
|
|
104 |
|
105 |
== Changelog ==
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
= 4.4.1 =
|
108 |
|
109 |
*Release Date: 12 March 2021*
|
@@ -112,14 +127,11 @@ All the time! We're always looking for new ways to get this plugin to a better s
|
|
112 |
* **Improved**: Better onboarding with titles.
|
113 |
* **Improved**: The CDN feature is now enabled with a toggle.
|
114 |
* **Improved**: Code improvements in the "LiteSpeed cache" feature.
|
115 |
-
* **Improved**:
|
116 |
* **Fixed**: Fixed an issue when there were no fonts found inside page sources.
|
117 |
* **Fixed**: The "set image dimensions" feature now correctly detects image URLs that start with `http://` while the site URL starts with `https://` (and vice versa).
|
118 |
-
* **Fixed**:
|
119 |
* **Updated**: Updated Codestar Framework to v2.2.6.
|
120 |
* **Updated**: Updated intro.js to v5.0.0.
|
121 |
-
* **Removed**: Custom Code Manager is now removed. Users who added custom codes will get a notice to copy their code to somewhere else
|
122 |
-
* **Removed**:
|
123 |
|
124 |
= 4.4.0 =
|
125 |
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.5.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
35 |
🌟 **Caching**: Cache your pages into static HTML files, reduce database queries, get a faster website almost immediately. What's not to love about caching?
|
36 |
⭐ **Optimize Google Fonts**: Did you know that there are better ways to load Google fonts? We like to brag about finding one of the best ways.
|
37 |
🌟 **Lazy Load**: It's a disheartening issue that page speed tools encourage laziness... Just kidding, we love being lazy. And search engines will love your pages when you enable lazy loading for images, videos and iframes (except for the above-the-fold stuff, trust us).
|
|
|
38 |
🌟 **Optimize JavaScript**: You know that totally-not-cryptic "Remove Render-Blocking JavaScript" recommendation? Speed Booster Pack can help defer them all until after the whole HTML is rendered, or at least move all scripts to footer. Works like a charm.
|
39 |
🌟 **Optimize CSS**: Who needs all those different CSS files when you can inline them all into your page source? Especially when your CSS footprint is so small? Moreover, you can use the "[Critical CSS](https://web.dev/extract-critical-css/)" feature to essentially lazy-load all your CSS except for the CSS for above-the-fold.
|
40 |
🌟 **Preload Assets**: Have some fonts that load in all your pages, or a script, or some CSS files? Preloading them will help modern browsers serve your pages way faster!
|
41 |
+
🌟 **WooCommerce Optimizations**: Disable cart fragments, change Action Scheduler's retention period, disable things like WooCommerce Marketing and WooCommerce Analytics... and more to come!
|
42 |
+
🌟 **Dequeue Core Scripts/Styles**: Dashicons, jQuery Migrate, emoji script, post embed script... If you don't need them, you can now choose to prevent them from loading in the first place... which can get you to the first place on your Google SERPs.
|
43 |
⭐ **Localize Google Analytics & Tag Manager**: Tracker scripts aren't the worst things that'll slow your pages down, but they cause the most "recommendations". Localizing Google Analytics and/or Google Tag Manager is a good idea to speed up your website then, right? Right?
|
44 |
⭐ **Enable CDN**: Integrate your content delivery network to your website by rewriting all static asset URLs with your CDN domain.
|
45 |
+
⭐ **Cloudflare & Sucuri Integration**: Connect to your Cloudflare or Sucuri account so you can clear your cache every time your page cache is cleared.
|
|
|
|
|
46 |
⭐ **Declutter HEAD**: Do you think all that useless junk in your <head> should be gone? Us too! You know what they say: A clear <head> works faster.
|
47 |
⭐ **Other Features**: Minify HTML, enable instant.page, trim query strings, disable self pingbacks, optimize the Heartbeat API, set a limit for post revisions, change autosave interval... Did we forget anything?
|
48 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 4.5.0 =
|
107 |
+
|
108 |
+
*Release Date: 14 April 2021*
|
109 |
+
|
110 |
+
* **NEW - WooCommerce optimizations**: The "Special" tab is replaced with the "WooCommerce" tab with SEVEN WC-related optimizations, four of them brand new!
|
111 |
+
* **NEW - Deactivation survey**: An optional survey added to the "Deactivate" button to get feedback from users leaving us, so we can improve SBP even further.
|
112 |
+
* **Improved**: Added a shutdown hook so the plugin plays better with other plugins (like Really Simple SSL).
|
113 |
+
* **Improved**: A few `if`s here and there to improve the performance of the plugin.
|
114 |
+
* **Improved**: LiteSpeed cache users can now exclude cookies!
|
115 |
+
* **Improved**: Improvements with the lazy load feature - GetWid videos and videos using `mediaelements.js` are now lazy loaded properly.
|
116 |
+
* **Improved**: The placeholder image of lazy loaded images is also improved, using a transparent pixel instead of a gray one.
|
117 |
+
* **Improved**: Improvements with the method which adds the `WP_CACHE` constant to the `wp-config.php` file.
|
118 |
+
* **Updated**: Updated Codestar Framework to v2.2.6.
|
119 |
+
* **Updated**: Updated lazyload.js to v17.7.0.
|
120 |
+
|
121 |
+
|
122 |
= 4.4.1 =
|
123 |
|
124 |
*Release Date: 12 March 2021*
|
127 |
* **Improved**: Better onboarding with titles.
|
128 |
* **Improved**: The CDN feature is now enabled with a toggle.
|
129 |
* **Improved**: Code improvements in the "LiteSpeed cache" feature.
|
|
|
130 |
* **Fixed**: Fixed an issue when there were no fonts found inside page sources.
|
131 |
* **Fixed**: The "set image dimensions" feature now correctly detects image URLs that start with `http://` while the site URL starts with `https://` (and vice versa).
|
|
|
132 |
* **Updated**: Updated Codestar Framework to v2.2.6.
|
133 |
* **Updated**: Updated intro.js to v5.0.0.
|
134 |
+
* **Removed**: Custom Code Manager is now removed. Users who added custom codes will get a notice to copy their code to somewhere else.
|
|
|
135 |
|
136 |
= 4.4.0 =
|
137 |
|
admin/class-speed-booster-pack-admin.php
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
|
13 |
// If this file is called directly, abort.
|
14 |
use SpeedBooster\SBP_Notice_Manager;
|
|
|
15 |
|
16 |
if ( ! defined( 'WPINC' ) ) {
|
17 |
die;
|
@@ -47,6 +48,24 @@ class Speed_Booster_Pack_Admin {
|
|
47 |
*/
|
48 |
private $version;
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* Initialize the class and set its properties.
|
52 |
*
|
@@ -59,15 +78,24 @@ class Speed_Booster_Pack_Admin {
|
|
59 |
|
60 |
$this->plugin_name = $plugin_name;
|
61 |
$this->version = $version;
|
|
|
|
|
|
|
62 |
|
63 |
$this->load_dependencies();
|
64 |
|
65 |
-
|
|
|
|
|
66 |
|
67 |
add_action( 'csf_sbp_options_save_before', '\SpeedBooster\SBP_Cache::options_saved_listener' );
|
68 |
|
69 |
add_action( 'csf_sbp_options_save_before', '\SpeedBooster\SBP_Cloudflare::update_cloudflare_settings' );
|
70 |
|
|
|
|
|
|
|
|
|
71 |
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Cache::clear_total_cache' );
|
72 |
|
73 |
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Cache::generate_htaccess' );
|
@@ -80,9 +108,9 @@ class Speed_Booster_Pack_Admin {
|
|
80 |
|
81 |
add_action( 'admin_print_footer_scripts', [ $this, 'modify_menu_title' ] );
|
82 |
|
83 |
-
add_action( '
|
84 |
|
85 |
-
add_action( '
|
86 |
}
|
87 |
|
88 |
/**
|
@@ -97,7 +125,7 @@ class Speed_Booster_Pack_Admin {
|
|
97 |
( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
|
98 |
current_user_can( 'manage_options' )
|
99 |
) {
|
100 |
-
wp_enqueue_style( 'sbp_intro_css', SBP_URL . 'admin/css/intro.min.css', [], '
|
101 |
}
|
102 |
}
|
103 |
|
@@ -112,8 +140,8 @@ class Speed_Booster_Pack_Admin {
|
|
112 |
( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
|
113 |
current_user_can( 'manage_options' )
|
114 |
) {
|
115 |
-
wp_enqueue_script( 'sbp_intro_js', SBP_URL . 'admin/js/intro.min.js', [ 'jquery' ], '
|
116 |
-
wp_enqueue_script( 'sbp_init_intro', SBP_URL . 'admin/js/init-intro.js', [ 'jquery' ], '
|
117 |
wp_localize_script( 'sbp_intro_js',
|
118 |
'sbp_intro_translations',
|
119 |
[
|
@@ -166,6 +194,14 @@ class Speed_Booster_Pack_Admin {
|
|
166 |
] );
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
public function load_dependencies() {
|
170 |
require_once SBP_LIB_PATH . 'codestar-framework/codestar-framework.php';
|
171 |
}
|
@@ -245,10 +281,12 @@ class Speed_Booster_Pack_Admin {
|
|
245 |
'type' => 'content',
|
246 |
/* translators: %s = Speed Booster Pack */
|
247 |
'content' => '<p>' . __( 'Each module of this plugin has different sets of really cool features that can help speed up your website:', 'speed-booster-pack' ) . '</p>' . '<ul><li>' .
|
|
|
248 |
'<strong>' . __( 'Caching', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module caches your pages into static HTML files, greatly reducing database queries. It also helps browsers cache static assets more efficiently.', 'speed-booster-pack' ) . '</li><li>' .
|
249 |
-
'<strong>' . __( '
|
250 |
-
'<strong>' . __( '
|
251 |
-
'<strong>' . __( '
|
|
|
252 |
'<p>' . __( 'Feel free to experiment, and don\'t forget to create exclude rules when necessary!', 'speed-booster-pack' ) . '</p>',
|
253 |
],
|
254 |
[
|
@@ -490,7 +528,7 @@ class Speed_Booster_Pack_Admin {
|
|
490 |
);
|
491 |
/* END Section: General */
|
492 |
|
493 |
-
$is_litespeed =
|
494 |
$page_caching_class = $is_litespeed ? ' sbp-hidden ' : '';
|
495 |
$ls_caching_class = $is_litespeed ? '' : ' sbp-hidden ';
|
496 |
|
@@ -646,6 +684,7 @@ class Speed_Booster_Pack_Admin {
|
|
646 |
'id' => 'module_caching_ls',
|
647 |
'class' => 'module-caching' . $ls_caching_class,
|
648 |
'type' => 'switcher',
|
|
|
649 |
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' ' . __( 'LiteSpeed Cache', 'speed-booster-pack' ),
|
650 |
'label' => __( 'Enables or disables the whole module without resetting its settings.', 'speed-booster-pack' ),
|
651 |
'sanitize' => 'sbp_sanitize_boolean',
|
@@ -688,15 +727,15 @@ class Speed_Booster_Pack_Admin {
|
|
688 |
'dependency' => [ 'module_caching_ls', '==', '1', '', 'visible' ],
|
689 |
'sanitize' => 'sbp_sanitize_caching_urls',
|
690 |
],
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
[
|
701 |
'id' => 'caching_ls_include_query_strings',
|
702 |
'class' => 'caching-include-query-strings' . $ls_caching_class,
|
@@ -752,7 +791,7 @@ class Speed_Booster_Pack_Admin {
|
|
752 |
[
|
753 |
'id' => 'is_front_page',
|
754 |
'type' => 'code_editor',
|
755 |
-
'desc' =>
|
756 |
'settings' => [ 'lineWrapping' => true ],
|
757 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
758 |
],
|
@@ -764,7 +803,7 @@ class Speed_Booster_Pack_Admin {
|
|
764 |
[
|
765 |
'id' => 'is_home',
|
766 |
'type' => 'code_editor',
|
767 |
-
'desc' =>
|
768 |
'settings' => [ 'lineWrapping' => true ],
|
769 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
770 |
],
|
@@ -776,7 +815,7 @@ class Speed_Booster_Pack_Admin {
|
|
776 |
[
|
777 |
'id' => 'is_single',
|
778 |
'type' => 'code_editor',
|
779 |
-
'desc' =>
|
780 |
'settings' => [ 'lineWrapping' => true ],
|
781 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
782 |
],
|
@@ -788,7 +827,7 @@ class Speed_Booster_Pack_Admin {
|
|
788 |
[
|
789 |
'id' => 'is_page',
|
790 |
'type' => 'code_editor',
|
791 |
-
'desc' =>
|
792 |
'settings' => [ 'lineWrapping' => true ],
|
793 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
794 |
],
|
@@ -800,7 +839,7 @@ class Speed_Booster_Pack_Admin {
|
|
800 |
[
|
801 |
'id' => 'is_category',
|
802 |
'type' => 'code_editor',
|
803 |
-
'desc' =>
|
804 |
'settings' => [ 'lineWrapping' => true ],
|
805 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
806 |
],
|
@@ -812,7 +851,7 @@ class Speed_Booster_Pack_Admin {
|
|
812 |
[
|
813 |
'id' => 'is_tag',
|
814 |
'type' => 'code_editor',
|
815 |
-
'desc' =>
|
816 |
'settings' => [ 'lineWrapping' => true ],
|
817 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
818 |
],
|
@@ -824,7 +863,7 @@ class Speed_Booster_Pack_Admin {
|
|
824 |
[
|
825 |
'id' => 'is_archive',
|
826 |
'type' => 'code_editor',
|
827 |
-
'desc' =>
|
828 |
'settings' => [ 'lineWrapping' => true ],
|
829 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
830 |
],
|
@@ -833,14 +872,14 @@ class Speed_Booster_Pack_Admin {
|
|
833 |
];
|
834 |
|
835 |
// Check if WooCommerce active or not
|
836 |
-
if (
|
837 |
$critical_css_fields[] = [
|
838 |
'title' => 'is_shop',
|
839 |
'fields' => [
|
840 |
[
|
841 |
'id' => 'is_shop',
|
842 |
'type' => 'code_editor',
|
843 |
-
'desc' =>
|
844 |
'settings' => [ 'lineWrapping' => true ],
|
845 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
846 |
],
|
@@ -852,7 +891,7 @@ class Speed_Booster_Pack_Admin {
|
|
852 |
[
|
853 |
'id' => 'is_product',
|
854 |
'type' => 'code_editor',
|
855 |
-
'desc' =>
|
856 |
'settings' => [ 'lineWrapping' => true ],
|
857 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
858 |
],
|
@@ -864,7 +903,7 @@ class Speed_Booster_Pack_Admin {
|
|
864 |
[
|
865 |
'id' => 'is_product_category',
|
866 |
'type' => 'code_editor',
|
867 |
-
'desc' =>
|
868 |
'settings' => [ 'lineWrapping' => true ],
|
869 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
870 |
],
|
@@ -896,10 +935,10 @@ class Speed_Booster_Pack_Admin {
|
|
896 |
],
|
897 |
[
|
898 |
'id' => 'enable_criticalcss',
|
899 |
-
'title' => __( 'Enable
|
900 |
'type' => 'switcher',
|
901 |
'default' => false,
|
902 |
-
'desc' => sprintf( __( 'Critical CSS is a method to optimize CSS delivery, %1$srecommended by Google%2$s. It allows you to defer all your CSS files and inline the styles of your content above the fold. You can generate critical CSS needed for your website %3$susing a tool like this%4$s and paste them below.', 'speed-booster-pack' ), '<a href="https://web.dev/extract-critical-css/" rel="external noopener" target="_blank">', '</a>', '<a href="https://
|
903 |
'dependency' => [ 'module_css', '==', '1', '', 'visible' ],
|
904 |
'sanitize' => 'sbp_sanitize_boolean',
|
905 |
],
|
@@ -1010,7 +1049,7 @@ class Speed_Booster_Pack_Admin {
|
|
1010 |
'title' => __( 'Set missing image dimensions', 'speed-booster-pack' ),
|
1011 |
'id' => 'missing_image_dimensions',
|
1012 |
'type' => 'switcher',
|
1013 |
-
'desc' => __( 'Automatically sets missing image width and height
|
1014 |
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1015 |
'sanitize' => 'sbp_sanitize_boolean',
|
1016 |
],
|
@@ -1022,212 +1061,110 @@ class Speed_Booster_Pack_Admin {
|
|
1022 |
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1023 |
'sanitize' => 'sbp_sanitize_boolean',
|
1024 |
],
|
1025 |
-
];
|
1026 |
-
|
1027 |
-
$should_disable_lazyload = sbp_should_disable_feature( 'lazyload' );
|
1028 |
-
if ( $should_disable_lazyload ) {
|
1029 |
-
$asset_fields = array_merge( $asset_fields,
|
1030 |
-
[
|
1031 |
-
[
|
1032 |
-
'type' => 'submessage',
|
1033 |
-
'style' => 'success',
|
1034 |
-
'class' => 'hosting-warning',
|
1035 |
-
'content' => sprintf( __( 'Since you\'re using %s, lazyload feature is completely disabled to ensure compatibility with internal lazyload system of %s.' ), $should_disable_lazyload, $should_disable_lazyload ),
|
1036 |
-
],
|
1037 |
-
] );
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
$asset_fields = array_merge( $asset_fields,
|
1041 |
[
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
'
|
1066 |
-
|
1067 |
-
|
1068 |
-
'custom' => __( 'Custom', 'speed-booster-pack' ),
|
1069 |
-
],
|
1070 |
-
'default' => 'off',
|
1071 |
-
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1072 |
-
],
|
1073 |
-
[
|
1074 |
-
'title' => __( 'JavaScript to exclude from deferring', 'speed-booster-pack' ),
|
1075 |
-
'id' => 'js_exclude',
|
1076 |
-
'class' => 'js-exclude',
|
1077 |
-
'type' => 'code_editor',
|
1078 |
-
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to exclude from deferring.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1079 |
-
'default' => 'js/jquery/jquery.js' . PHP_EOL . 'js/jquery/jquery.min.js',
|
1080 |
-
'dependency' => [ 'module_assets|js_optimize', '==|==', '1|everything', '', 'visible|visible' ],
|
1081 |
-
'sanitize' => 'sbp_sanitize_strip_tags',
|
1082 |
-
],
|
1083 |
-
[
|
1084 |
-
'title' => __( 'JavaScript to defer', 'speed-booster-pack' ),
|
1085 |
-
'id' => 'js_include',
|
1086 |
-
'class' => 'js-include',
|
1087 |
-
'type' => 'code_editor',
|
1088 |
-
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to defer.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1089 |
-
'default' => '',
|
1090 |
-
'dependency' => [ 'module_assets|js_optimize', '==|==', '1|custom', '', 'visible|visible' ],
|
1091 |
-
'sanitize' => 'sbp_sanitize_strip_tags',
|
1092 |
-
],
|
1093 |
-
[
|
1094 |
-
'title' => __( 'Move JavaScript to footer', 'speed-booster-pack' ),
|
1095 |
-
'id' => 'js_footer',
|
1096 |
-
'class' => 'js-footer',
|
1097 |
-
'desc' => __( 'Moves all JS files and inline JS to the bottom of your page sources. Has a high chance to break your website, so be sure to exclude things! If you\'re using the defer setting, you probably don\'t need to enable this.', 'speed-booster-pack' ),
|
1098 |
-
'type' => 'switcher',
|
1099 |
-
'default' => '',
|
1100 |
-
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1101 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1102 |
-
],
|
1103 |
-
[
|
1104 |
-
'title' => __( 'JavaScript to exclude from moving to footer', 'speed-booster-pack' ),
|
1105 |
-
'id' => 'js_footer_exclude',
|
1106 |
-
'class' => 'js-footer-exclude',
|
1107 |
-
'type' => 'code_editor',
|
1108 |
-
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to exclude from moving to footer.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1109 |
-
'default' => 'js/jquery/jquery.js' . PHP_EOL . 'js/jquery/jquery.min.js',
|
1110 |
-
'dependency' => [ 'module_assets|js_footer', '==|==', '1|1', '', 'visible|visible' ],
|
1111 |
-
'sanitize' => 'sbp_sanitize_strip_tags',
|
1112 |
-
],
|
1113 |
-
[
|
1114 |
-
'title' => __( 'Preload assets', 'speed-booster-pack' ),
|
1115 |
-
'id' => 'preboost',
|
1116 |
-
'class' => 'preboost',
|
1117 |
-
'type' => 'fieldset',
|
1118 |
-
'sanitize' => 'sbp_sanitize_strip_tags',
|
1119 |
-
'fields' => [
|
1120 |
-
[
|
1121 |
-
'id' => 'preboost_enable',
|
1122 |
-
'type' => 'switcher',
|
1123 |
-
'label' => __( 'Enable preloading of the assets specified below.', 'speed-booster-pack' ),
|
1124 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1125 |
-
],
|
1126 |
-
[
|
1127 |
-
'id' => 'preboost_include',
|
1128 |
-
'type' => 'code_editor',
|
1129 |
-
'desc' => __( 'Enter full URLs of the assets you want to preload. One URL per line.', 'speed-booster-pack' ),
|
1130 |
-
'dependency' => [ 'preboost_enable', '==', '1', '', 'visible' ],
|
1131 |
-
'settings' => [ 'lineWrapping' => true ],
|
1132 |
-
'sanitize' => 'sbp_sanitize_strip_tags',
|
1133 |
-
],
|
1134 |
-
[
|
1135 |
-
'id' => 'preboost_featured_image',
|
1136 |
-
'type' => 'switcher',
|
1137 |
-
'label' => __( 'Preload featured images.', 'speed-booster-pack' ),
|
1138 |
-
'desc' => __( 'Enable this if you want featured images to be preloaded.', 'speed-booster-pack' ),
|
1139 |
-
'dependency' => [ 'preboost_enable', '==', '1', '', 'visible' ],
|
1140 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1141 |
-
],
|
1142 |
-
],
|
1143 |
-
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1144 |
],
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
'
|
1153 |
-
'
|
1154 |
-
'
|
1155 |
-
|
1156 |
-
'
|
1157 |
-
|
1158 |
-
|
1159 |
-
'
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1173 |
[
|
1174 |
-
'id' => '
|
1175 |
-
'type' => '
|
1176 |
-
'
|
1177 |
-
'
|
1178 |
-
/* translators: %s = script tag */
|
1179 |
-
'desc' => sprintf( __( 'Paste the inline JavaScript here. DON\'T include the %s tags or else you might break it!', 'speed-booster-pack' ), '<code><script></code>' ),
|
1180 |
-
'settings' => [ 'lineWrapping' => true ],
|
1181 |
],
|
1182 |
[
|
1183 |
-
'
|
1184 |
-
'
|
1185 |
-
'desc'
|
1186 |
-
'
|
1187 |
-
'
|
1188 |
-
|
1189 |
-
'header' => __( 'Header', 'speed-booster-pack' ),
|
1190 |
-
],
|
1191 |
-
'default' => 'footer',
|
1192 |
],
|
1193 |
[
|
1194 |
-
'
|
1195 |
-
'
|
1196 |
-
'
|
1197 |
-
'
|
1198 |
-
'
|
1199 |
-
|
1200 |
-
'onload' => __( 'onload', 'speed-booster-pack' ),
|
1201 |
-
'delayed' => __( '4-second delay', 'speed-booster-pack' ),
|
1202 |
-
],
|
1203 |
-
'default' => 'normal',
|
1204 |
],
|
1205 |
],
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
$custom_code_manager_backup = '';
|
1211 |
-
|
1212 |
-
$i = 1;
|
1213 |
-
foreach ( sbp_get_option( 'custom_codes', [] ) as $code ) {
|
1214 |
-
$custom_code_manager_backup .= '<!-- Custom code #' . $i . ' (' . $code['custom_codes_place'] . ') -->' . PHP_EOL;
|
1215 |
-
$custom_code_manager_backup .= '<script>' . PHP_EOL;
|
1216 |
-
$custom_code_manager_backup .= $code['custom_codes_item'] . PHP_EOL;
|
1217 |
-
$custom_code_manager_backup .= '</script>' . PHP_EOL . PHP_EOL;
|
1218 |
-
$i ++;
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
SBP_Notice_Manager::display_notice(
|
1222 |
-
'custom_code_manager_backup',
|
1223 |
-
'<p>' . __( 'Speed Booster Pack: We have removed the Custom Code Manager feature from our plugin because it\'s not totally related to performance. Since you were using this feature, here\'s a backup of your custom codes:', 'speed-booster-pack' ) . '</p>' .
|
1224 |
-
'<textarea style="max-width: 100%; width: 600px; min-height: 150px;" readonly>' . $custom_code_manager_backup . '</textarea>' .
|
1225 |
-
'<p>' . sprintf( __( 'You can use any plugin you want to add these custom codes (%s is a decent alternative). Better yet, you can use your theme if it has a custom code feature.', 'speed-booster-pack' ), '<a href="https://wordpress.org/plugins/insert-headers-and-footers/" target="_blank" rel="external nofollow">Insert Headers and Footers</a>' ) . '</p>' .
|
1226 |
-
'<p><button class="button button-primary sbp-dismiss-ccm-notice notice-dismiss-button" data-notice-id="custom_code_manager_backup" data-notice-action="sbp_dismiss_notice">' . __( 'I copied the code, dismiss this notice', 'speed-booster-pack' ) . '</button></p>',
|
1227 |
-
'warning',
|
1228 |
-
false
|
1229 |
-
);
|
1230 |
-
}
|
1231 |
|
1232 |
CSF::createSection(
|
1233 |
$prefix,
|
@@ -1241,10 +1178,11 @@ class Speed_Booster_Pack_Admin {
|
|
1241 |
/* END Section: Assets */
|
1242 |
|
1243 |
/* BEGIN Section: CDN & Proxy */
|
1244 |
-
|
|
|
1245 |
$cloudflare_fields = [
|
1246 |
[
|
1247 |
-
'title' =>
|
1248 |
'type' => 'subheading',
|
1249 |
],
|
1250 |
[
|
@@ -1275,7 +1213,7 @@ class Speed_Booster_Pack_Admin {
|
|
1275 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1276 |
],
|
1277 |
[
|
1278 |
-
'title' =>
|
1279 |
'id' => 'cf_rocket_loader_enable',
|
1280 |
'class' => 'with-preloader',
|
1281 |
'type' => 'switcher',
|
@@ -1283,7 +1221,7 @@ class Speed_Booster_Pack_Admin {
|
|
1283 |
'sanitize' => 'sbp_sanitize_boolean',
|
1284 |
],
|
1285 |
[
|
1286 |
-
'title' =>
|
1287 |
'id' => 'cf_dev_mode_enable',
|
1288 |
'class' => 'with-preloader',
|
1289 |
'type' => 'switcher',
|
@@ -1291,7 +1229,7 @@ class Speed_Booster_Pack_Admin {
|
|
1291 |
'sanitize' => 'sbp_sanitize_boolean',
|
1292 |
],
|
1293 |
[
|
1294 |
-
'title' =>
|
1295 |
'id' => 'cf_css_minify_enable',
|
1296 |
'class' => 'with-preloader',
|
1297 |
'type' => 'switcher',
|
@@ -1299,7 +1237,7 @@ class Speed_Booster_Pack_Admin {
|
|
1299 |
'sanitize' => 'sbp_sanitize_boolean',
|
1300 |
],
|
1301 |
[
|
1302 |
-
'title' =>
|
1303 |
'id' => 'cf_html_minify_enable',
|
1304 |
'class' => 'with-preloader',
|
1305 |
'type' => 'switcher',
|
@@ -1307,7 +1245,7 @@ class Speed_Booster_Pack_Admin {
|
|
1307 |
'sanitize' => 'sbp_sanitize_boolean',
|
1308 |
],
|
1309 |
[
|
1310 |
-
'title' =>
|
1311 |
'id' => 'cf_js_minify_enable',
|
1312 |
'class' => 'with-preloader',
|
1313 |
'type' => 'switcher',
|
@@ -1315,7 +1253,7 @@ class Speed_Booster_Pack_Admin {
|
|
1315 |
'sanitize' => 'sbp_sanitize_boolean',
|
1316 |
],
|
1317 |
[
|
1318 |
-
'title' =>
|
1319 |
'id' => 'cf_apo_enable',
|
1320 |
'desc' => __( 'You need to be a paying Cloudflare user to enable this setting, otherwise it will get disabled again.', 'speed-booster-pack' ),
|
1321 |
'class' => 'with-preloader',
|
@@ -1324,7 +1262,7 @@ class Speed_Booster_Pack_Admin {
|
|
1324 |
'sanitize' => 'sbp_sanitize_boolean',
|
1325 |
],
|
1326 |
[
|
1327 |
-
'title' =>
|
1328 |
'id' => 'cf_apo_device_type',
|
1329 |
'class' => 'with-preloader',
|
1330 |
'type' => 'switcher',
|
@@ -1332,34 +1270,34 @@ class Speed_Booster_Pack_Admin {
|
|
1332 |
'sanitize' => 'sbp_sanitize_boolean',
|
1333 |
],
|
1334 |
[
|
1335 |
-
'title' =>
|
1336 |
'id' => 'cf_browser_cache_ttl',
|
1337 |
'class' => 'with-preloader',
|
1338 |
'type' => 'select',
|
1339 |
'options' => [
|
1340 |
-
0 =>
|
1341 |
-
1800 =>
|
1342 |
-
3600 =>
|
1343 |
-
7200 =>
|
1344 |
-
10800 =>
|
1345 |
-
14400 =>
|
1346 |
-
18000 =>
|
1347 |
-
28800 =>
|
1348 |
-
43200 =>
|
1349 |
-
57600 =>
|
1350 |
-
72000 =>
|
1351 |
-
86400 =>
|
1352 |
-
172800 =>
|
1353 |
-
259200 =>
|
1354 |
-
345600 =>
|
1355 |
-
432000 =>
|
1356 |
-
691200 =>
|
1357 |
-
1382400 =>
|
1358 |
-
2073600 =>
|
1359 |
-
2678400 =>
|
1360 |
-
5356800 =>
|
1361 |
-
16070400 =>
|
1362 |
-
31536000 =>
|
1363 |
],
|
1364 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1365 |
],
|
@@ -1378,19 +1316,19 @@ class Speed_Booster_Pack_Admin {
|
|
1378 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1379 |
],
|
1380 |
];
|
1381 |
-
/* End
|
1382 |
|
1383 |
-
/* Begin
|
1384 |
$sucuri_fields = [
|
1385 |
[
|
1386 |
-
'title' =>
|
1387 |
'type' => 'subheading',
|
1388 |
],
|
1389 |
[
|
1390 |
'title' => __( 'Connect to Sucuri', 'speed-booster-pack' ),
|
1391 |
'id' => 'sucuri_enable',
|
1392 |
'type' => 'switcher',
|
1393 |
-
'desc' => sprintf( __( 'When you connect your Sucuri account, you\'ll be able to clear your Sucuri cache via your admin bar. Plus, every time %1$s
|
1394 |
'sanitize' => 'sbp_sanitize_boolean',
|
1395 |
],
|
1396 |
[
|
@@ -1417,8 +1355,6 @@ class Speed_Booster_Pack_Admin {
|
|
1417 |
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' ' . __( 'CDN', 'speed-booster-pack' ),
|
1418 |
'id' => 'cdn_enable',
|
1419 |
'type' => 'switcher',
|
1420 |
-
// B_TODO: Description text needed.
|
1421 |
-
'desc' => __( '', 'speed-booster-pack' ),
|
1422 |
'sanitize' => 'sbp_sanitize_boolean',
|
1423 |
],
|
1424 |
[
|
@@ -1462,60 +1398,120 @@ class Speed_Booster_Pack_Admin {
|
|
1462 |
);
|
1463 |
/* END Section: CDN & Proxy */
|
1464 |
|
1465 |
-
/* BEGIN Section:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1466 |
CSF::createSection(
|
1467 |
$prefix,
|
1468 |
[
|
1469 |
-
'title' =>
|
1470 |
-
'id' => '
|
1471 |
-
'icon' => 'fa fa-
|
1472 |
-
'fields' =>
|
1473 |
-
|
1474 |
-
[
|
1475 |
-
/* translators: used like "Enable/Disable XXX" where "XXX" is the module name. */
|
1476 |
-
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' ' . __( 'Special', 'speed-booster-pack' ),
|
1477 |
-
'id' => 'module_special',
|
1478 |
-
'class' => 'module-special',
|
1479 |
-
'type' => 'switcher',
|
1480 |
-
'label' => __( 'Enables or disables the whole module without resetting its settings.', 'speed-booster-pack' ),
|
1481 |
-
'default' => true,
|
1482 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1483 |
-
],
|
1484 |
-
[
|
1485 |
-
'title' => 'WooCommerce: ' . __( 'Disable cart fragments', 'speed-booster-pack' ),
|
1486 |
-
'id' => 'woocommerce_disable_cart_fragments',
|
1487 |
-
'type' => 'switcher',
|
1488 |
-
/* translators: %s = cart-fragments.js */
|
1489 |
-
'desc' => sprintf( __( 'Dequeues the %s file if the visitor\'s cart is empty, preventing an unnecessary and slow AJAX request.', 'speed-booster-pack' ), '<code>cart-fragments.js</code>' ),
|
1490 |
-
'dependency' => [ 'module_special', '==', '1', '', 'visible' ],
|
1491 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1492 |
-
],
|
1493 |
-
[
|
1494 |
-
'title' => 'WooCommerce: ' . __( 'Optimize non-WooCommerce pages', 'speed-booster-pack' ),
|
1495 |
-
'id' => 'woocommerce_optimize_nonwc_pages',
|
1496 |
-
'type' => 'switcher',
|
1497 |
-
'desc' => __( 'Prevents loading of WooCommerce-related scripts and styles on non-WooCommerce pages.', 'speed-booster-pack' ),
|
1498 |
-
'dependency' => [ 'module_special', '==', '1', '', 'visible' ],
|
1499 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1500 |
-
],
|
1501 |
-
[
|
1502 |
-
'title' => 'WooCommerce: ' . __( 'Disable password strength meter', 'speed-booster-pack' ),
|
1503 |
-
'id' => 'woocommerce_disable_password_meter',
|
1504 |
-
'type' => 'switcher',
|
1505 |
-
'desc' => __( 'Disables the password strength meter for password inputs during a WooCommerce checkout.', 'speed-booster-pack' ),
|
1506 |
-
'dependency' => [ 'module_special', '==', '1', '', 'visible' ],
|
1507 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1508 |
-
],
|
1509 |
-
],
|
1510 |
]
|
1511 |
);
|
1512 |
-
/* END Section:
|
1513 |
|
1514 |
/** BEGIN Section: Database Optimization */
|
1515 |
CSF::createSection(
|
1516 |
$prefix,
|
1517 |
[
|
1518 |
-
'title' => __( 'Database', 'speed-booster-pack' ),
|
1519 |
'id' => 'database_optimization',
|
1520 |
'icon' => 'fa fa-database',
|
1521 |
'fields' => [
|
@@ -1601,21 +1597,14 @@ class Speed_Booster_Pack_Admin {
|
|
1601 |
'type' => 'content',
|
1602 |
/* translators: 1. Speed Booster Pack 2. link to the speedboosterpack.com contact form 3. link to the GitHub page */
|
1603 |
'content' => __( 'We made use of the following libraries and frameworks in Speed Booster Pack, so we\'d like to give them a shout out and thank them:', 'speed-booster-pack' ) .
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
'
|
1612 |
-
'id' => 'enable_external_notices',
|
1613 |
-
'type' => 'switcher',
|
1614 |
-
'label' => __( '', 'speed-booster-pack' ),
|
1615 |
-
/* translators: %s = hyperlink to speedboosterpack.com */
|
1616 |
-
'desc' => sprintf( __( 'Fetches notices from %s, and shows them in a non-obtrusive manner. We intend to send essential notices only, and we hate spam as much as you do, but if you don\'t want to get them, you can disable this setting.', 'speed-booster-pack' ), '<a href="https://speedboosterpack.com/" rel="external noopener" target="_blank">speedboosterpack.com</a>' ),
|
1617 |
-
'default' => true,
|
1618 |
-
'sanitize' => 'sbp_sanitize_boolean',
|
1619 |
],
|
1620 |
],
|
1621 |
]
|
@@ -1647,7 +1636,7 @@ class Speed_Booster_Pack_Admin {
|
|
1647 |
[
|
1648 |
'id' => 'sbp_preload',
|
1649 |
'type' => 'code_editor',
|
1650 |
-
'title' => __( 'Preload
|
1651 |
'desc' => __( 'Enter full URLs of files to preload only for this content.', 'speed-booster-pack' ),
|
1652 |
'settings' => [ 'lineWrapping' => true ],
|
1653 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
12 |
|
13 |
// If this file is called directly, abort.
|
14 |
use SpeedBooster\SBP_Notice_Manager;
|
15 |
+
use SpeedBooster\SBP_Utils;
|
16 |
|
17 |
if ( ! defined( 'WPINC' ) ) {
|
18 |
die;
|
48 |
*/
|
49 |
private $version;
|
50 |
|
51 |
+
/**
|
52 |
+
* WooCommerce Tracking setting.
|
53 |
+
*
|
54 |
+
* @since 4.5.0
|
55 |
+
* @access private
|
56 |
+
* @var string $woocommerce_tracking WooCommerce Tracking setting.
|
57 |
+
*/
|
58 |
+
private $woocommerce_tracking;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* WooCommerce Analytics setting.
|
62 |
+
*
|
63 |
+
* @since 4.5.0
|
64 |
+
* @access private
|
65 |
+
* @var string $woocommerce_analytics WooCommerce Analytics setting.
|
66 |
+
*/
|
67 |
+
private $woocommerce_analytics;
|
68 |
+
|
69 |
/**
|
70 |
* Initialize the class and set its properties.
|
71 |
*
|
78 |
|
79 |
$this->plugin_name = $plugin_name;
|
80 |
$this->version = $version;
|
81 |
+
$this->woocommerce_analytics = 1;
|
82 |
+
$this->woocommerce_tracking = 1;
|
83 |
+
|
84 |
|
85 |
$this->load_dependencies();
|
86 |
|
87 |
+
add_action( 'woocommerce_loaded', [ $this, 'get_woocommerce_options' ] );
|
88 |
+
|
89 |
+
add_filter( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Cache::options_saved_filter' );
|
90 |
|
91 |
add_action( 'csf_sbp_options_save_before', '\SpeedBooster\SBP_Cache::options_saved_listener' );
|
92 |
|
93 |
add_action( 'csf_sbp_options_save_before', '\SpeedBooster\SBP_Cloudflare::update_cloudflare_settings' );
|
94 |
|
95 |
+
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Woocommerce::set_woocommerce_option_tracking' );
|
96 |
+
|
97 |
+
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Woocommerce::set_woocommerce_option_analytics' );
|
98 |
+
|
99 |
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Cache::clear_total_cache' );
|
100 |
|
101 |
add_action( 'csf_sbp_options_saved', '\SpeedBooster\SBP_Cache::generate_htaccess' );
|
108 |
|
109 |
add_action( 'admin_print_footer_scripts', [ $this, 'modify_menu_title' ] );
|
110 |
|
111 |
+
add_action( 'csf_loaded', [ $this, 'create_settings_page' ] );
|
112 |
|
113 |
+
add_action( 'csf_loaded', [ $this, 'create_metaboxes' ] );
|
114 |
}
|
115 |
|
116 |
/**
|
125 |
( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
|
126 |
current_user_can( 'manage_options' )
|
127 |
) {
|
128 |
+
wp_enqueue_style( 'sbp_intro_css', SBP_URL . 'admin/css/intro.min.css', [], '5.0.0' );
|
129 |
}
|
130 |
}
|
131 |
|
140 |
( get_current_screen() && get_current_screen()->id == 'toplevel_page_sbp-settings' ) &&
|
141 |
current_user_can( 'manage_options' )
|
142 |
) {
|
143 |
+
wp_enqueue_script( 'sbp_intro_js', SBP_URL . 'admin/js/intro.min.js', [ 'jquery' ], '5.0.0' );
|
144 |
+
wp_enqueue_script( 'sbp_init_intro', SBP_URL . 'admin/js/init-intro.js', [ 'jquery' ], '5.0.0' );
|
145 |
wp_localize_script( 'sbp_intro_js',
|
146 |
'sbp_intro_translations',
|
147 |
[
|
194 |
] );
|
195 |
}
|
196 |
|
197 |
+
public function get_woocommerce_options() {
|
198 |
+
|
199 |
+
$this->woocommerce_analytics = \SpeedBooster\SBP_Woocommerce::get_woocommerce_option( 'woocommerce_analytics_enabled' );
|
200 |
+
|
201 |
+
$this->woocommerce_tracking = \SpeedBooster\SBP_Woocommerce::get_woocommerce_option( 'woocommerce_allow_tracking' );
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
public function load_dependencies() {
|
206 |
require_once SBP_LIB_PATH . 'codestar-framework/codestar-framework.php';
|
207 |
}
|
281 |
'type' => 'content',
|
282 |
/* translators: %s = Speed Booster Pack */
|
283 |
'content' => '<p>' . __( 'Each module of this plugin has different sets of really cool features that can help speed up your website:', 'speed-booster-pack' ) . '</p>' . '<ul><li>' .
|
284 |
+
'<strong>' . __( 'General', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module lets you tweak the WordPress core and your page sources by dequeueing core scripts/styles, decluttering <head>, optimizing revisions and the Heartbeat API and so on.', 'speed-booster-pack' ) . '</li><li>' .
|
285 |
'<strong>' . __( 'Caching', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module caches your pages into static HTML files, greatly reducing database queries. It also helps browsers cache static assets more efficiently.', 'speed-booster-pack' ) . '</li><li>' .
|
286 |
+
'<strong>' . __( 'Optimize CSS', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module allows you to delay loading of your CSS files while injecting "critical CSS" to your pages, which will definitely improve your PageSpeed metrics.', 'speed-booster-pack' ) . '</li><li>' .
|
287 |
+
'<strong>' . __( 'Assets', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module helps you optimize the static assets in your pages by minifying HTML, lazy loading media (images, videos and iframes), deferring JavaScript, optimizing Google fonts and preloading any asset you want.', 'speed-booster-pack' ) . '</li><li>' .
|
288 |
+
'<strong>' . __( 'WooCommerce', 'speed-booster-pack' ) . '</strong>: ' . __( 'This module has optimizations specific to WooCommerce, speeding up your users\' shopping experience.', 'speed-booster-pack' ) . '</li><li>' .
|
289 |
+
'<strong>' . __( 'And many more', 'speed-booster-pack' ) . '</strong>: ' . __( 'Lots and lots of other features (like Cloudflare integration and database cleanups) for you to get your website faster than ever!', 'speed-booster-pack' ) . '</li></ul>' .
|
290 |
'<p>' . __( 'Feel free to experiment, and don\'t forget to create exclude rules when necessary!', 'speed-booster-pack' ) . '</p>',
|
291 |
],
|
292 |
[
|
528 |
);
|
529 |
/* END Section: General */
|
530 |
|
531 |
+
$is_litespeed = SBP_Utils::is_litespeed();
|
532 |
$page_caching_class = $is_litespeed ? ' sbp-hidden ' : '';
|
533 |
$ls_caching_class = $is_litespeed ? '' : ' sbp-hidden ';
|
534 |
|
684 |
'id' => 'module_caching_ls',
|
685 |
'class' => 'module-caching' . $ls_caching_class,
|
686 |
'type' => 'switcher',
|
687 |
+
/* translators: used like "Enable/Disable XXX" where "XXX" is the module name. */
|
688 |
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' ' . __( 'LiteSpeed Cache', 'speed-booster-pack' ),
|
689 |
'label' => __( 'Enables or disables the whole module without resetting its settings.', 'speed-booster-pack' ),
|
690 |
'sanitize' => 'sbp_sanitize_boolean',
|
727 |
'dependency' => [ 'module_caching_ls', '==', '1', '', 'visible' ],
|
728 |
'sanitize' => 'sbp_sanitize_caching_urls',
|
729 |
],
|
730 |
+
[
|
731 |
+
'id' => 'caching_ls_exclude_cookies',
|
732 |
+
'class' => 'caching-exclude-cookies' . $ls_caching_class,
|
733 |
+
'type' => 'code_editor',
|
734 |
+
'title' => __( 'Exclude Cookies', 'speed-booster-pack' ),
|
735 |
+
'desc' => __( 'Enter one cookie per line to exclude them from caching.', 'speed-booster-pack' ),
|
736 |
+
'dependency' => [ 'module_caching_ls', '==', '1', '', 'visible' ],
|
737 |
+
'sanitize' => 'sbp_sanitize_caching_cookies',
|
738 |
+
],
|
739 |
[
|
740 |
'id' => 'caching_ls_include_query_strings',
|
741 |
'class' => 'caching-include-query-strings' . $ls_caching_class,
|
791 |
[
|
792 |
'id' => 'is_front_page',
|
793 |
'type' => 'code_editor',
|
794 |
+
'desc' => __( 'This CSS block will be injected into the front page of your website.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_front_page/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_front_page()</code>' ) . '</a>',
|
795 |
'settings' => [ 'lineWrapping' => true ],
|
796 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
797 |
],
|
803 |
[
|
804 |
'id' => 'is_home',
|
805 |
'type' => 'code_editor',
|
806 |
+
'desc' => __( 'This CSS block will be injected into the blog homepage of your website.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_home/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_home()</code>' ) . '</a>',
|
807 |
'settings' => [ 'lineWrapping' => true ],
|
808 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
809 |
],
|
815 |
[
|
816 |
'id' => 'is_single',
|
817 |
'type' => 'code_editor',
|
818 |
+
'desc' => __( 'This CSS block will be injected into all single posts.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_single/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_single()</code>' ) . '</a>',
|
819 |
'settings' => [ 'lineWrapping' => true ],
|
820 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
821 |
],
|
827 |
[
|
828 |
'id' => 'is_page',
|
829 |
'type' => 'code_editor',
|
830 |
+
'desc' => __( 'This CSS block will be injected into all static pages.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_page/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_page()</code>' ) . '</a>',
|
831 |
'settings' => [ 'lineWrapping' => true ],
|
832 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
833 |
],
|
839 |
[
|
840 |
'id' => 'is_category',
|
841 |
'type' => 'code_editor',
|
842 |
+
'desc' => __( 'This CSS block will be injected into all category archive pages.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_category/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_category()</code>' ) . '</a>',
|
843 |
'settings' => [ 'lineWrapping' => true ],
|
844 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
845 |
],
|
851 |
[
|
852 |
'id' => 'is_tag',
|
853 |
'type' => 'code_editor',
|
854 |
+
'desc' => __( 'This CSS block will be injected into all tag archive pages.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_tag/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_tag()</code>' ) . '</a>',
|
855 |
'settings' => [ 'lineWrapping' => true ],
|
856 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
857 |
],
|
863 |
[
|
864 |
'id' => 'is_archive',
|
865 |
'type' => 'code_editor',
|
866 |
+
'desc' => __( 'This CSS block will be injected into all archive pages.', 'speed-booster-pack' ) . ' <a href="https://developer.wordpress.org/reference/functions/is_archive/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_archive()</code>' ) . '</a>',
|
867 |
'settings' => [ 'lineWrapping' => true ],
|
868 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
869 |
],
|
872 |
];
|
873 |
|
874 |
// Check if WooCommerce active or not
|
875 |
+
if ( SBP_Utils::is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
876 |
$critical_css_fields[] = [
|
877 |
'title' => 'is_shop',
|
878 |
'fields' => [
|
879 |
[
|
880 |
'id' => 'is_shop',
|
881 |
'type' => 'code_editor',
|
882 |
+
'desc' => __( 'This CSS block will be injected into the shop page of your website.', 'speed-booster-pack' ) . ' <a href="https://woocommerce.com/document/conditional-tags/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_shop()</code>' ) . '</a>',
|
883 |
'settings' => [ 'lineWrapping' => true ],
|
884 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
885 |
],
|
891 |
[
|
892 |
'id' => 'is_product',
|
893 |
'type' => 'code_editor',
|
894 |
+
'desc' => __( 'This CSS block will be injected into all single product pages.', 'speed-booster-pack' ) . ' <a href="https://woocommerce.com/document/conditional-tags/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_product()</code>' ) . '</a>',
|
895 |
'settings' => [ 'lineWrapping' => true ],
|
896 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
897 |
],
|
903 |
[
|
904 |
'id' => 'is_product_category',
|
905 |
'type' => 'code_editor',
|
906 |
+
'desc' => __( 'This CSS block will be injected into all product category pages.', 'speed-booster-pack' ) . ' <a href="https://woocommerce.com/document/conditional-tags/" rel="external noopener" target="_blank">' . sprintf( __( 'Learn more about %s.', 'speed-booster-pack' ), '<code>is_product_category()</code>' ) . '</a>',
|
907 |
'settings' => [ 'lineWrapping' => true ],
|
908 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
909 |
],
|
935 |
],
|
936 |
[
|
937 |
'id' => 'enable_criticalcss',
|
938 |
+
'title' => __( 'Enable Critical CSS', 'speed-booster-pack' ),
|
939 |
'type' => 'switcher',
|
940 |
'default' => false,
|
941 |
+
'desc' => sprintf( __( 'Critical CSS is a method to optimize CSS delivery, %1$srecommended by Google%2$s. It allows you to defer all your CSS files and inline the styles of your content above the fold. You can generate critical CSS needed for your website %3$susing a tool like this%4$s and paste them below.', 'speed-booster-pack' ), '<a href="https://web.dev/extract-critical-css/" rel="external noopener" target="_blank">', '</a>', '<a href="https://speedboosterpack.com/go/criticalcss" rel="external noopener" target="_blank">', '</a>' ),
|
942 |
'dependency' => [ 'module_css', '==', '1', '', 'visible' ],
|
943 |
'sanitize' => 'sbp_sanitize_boolean',
|
944 |
],
|
1049 |
'title' => __( 'Set missing image dimensions', 'speed-booster-pack' ),
|
1050 |
'id' => 'missing_image_dimensions',
|
1051 |
'type' => 'switcher',
|
1052 |
+
'desc' => __( 'Automatically sets missing image width and height attributes to improve the Cumulative Layout Shift (CLS) and Largest Contentful Paint (LCP) metrics.', 'speed-booster-pack' ),
|
1053 |
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1054 |
'sanitize' => 'sbp_sanitize_boolean',
|
1055 |
],
|
1061 |
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1062 |
'sanitize' => 'sbp_sanitize_boolean',
|
1063 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
[
|
1065 |
+
'title' => __( 'Lazy load media', 'speed-booster-pack' ),
|
1066 |
+
'id' => 'lazyload',
|
1067 |
+
'type' => 'switcher',
|
1068 |
+
'desc' => __( 'Defers loading of images, videos and iframes to page onload.', 'speed-booster-pack' ) . ' <a href="https://web.dev/lazy-loading/" rel="external noopener" target="_blank">' . __( 'Learn more about lazy loading.', 'speed-booster-pack' ) . '</a>',
|
1069 |
+
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1070 |
+
'class' => 'lazyload-media ',
|
1071 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1072 |
+
],
|
1073 |
+
[
|
1074 |
+
'title' => __( 'Lazy load exclusions', 'speed-booster-pack' ),
|
1075 |
+
'id' => 'lazyload_exclude',
|
1076 |
+
'class' => 'lazyload-exclude',
|
1077 |
+
'type' => 'code_editor',
|
1078 |
+
'desc' => __( 'Excluding important images at the top of your pages (like your logo and such) is a good idea. One URL per line.', 'speed-booster-pack' ),
|
1079 |
+
'dependency' => [ 'module_assets|lazyload', '==|==', '1|1', '', 'visible|visible' ],
|
1080 |
+
'sanitize' => 'sbp_clear_http',
|
1081 |
+
],
|
1082 |
+
[
|
1083 |
+
'title' => __( 'Optimize JavaScript', 'speed-booster-pack' ),
|
1084 |
+
'id' => 'js_optimize',
|
1085 |
+
'desc' => __( 'Improves JavaScript loading by deferring all JS files and inline JS, avoiding render blocking issues. You can either defer everything and exclude some JS, or only defer some JS with the Custom option. Be sure what you\'re doing and use the exclude/include lists, or you might break your front-end JavaScript!', 'speed-booster-pack' ),
|
1086 |
+
'type' => 'button_set',
|
1087 |
+
'options' => [
|
1088 |
+
'off' => __( 'Off', 'speed-booster-pack' ),
|
1089 |
+
'everything' => __( 'Everything', 'speed-booster-pack' ),
|
1090 |
+
'custom' => __( 'Custom', 'speed-booster-pack' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1091 |
],
|
1092 |
+
'default' => 'off',
|
1093 |
+
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1094 |
+
],
|
1095 |
+
[
|
1096 |
+
'title' => __( 'JavaScript to exclude from deferring', 'speed-booster-pack' ),
|
1097 |
+
'id' => 'js_exclude',
|
1098 |
+
'class' => 'js-exclude',
|
1099 |
+
'type' => 'code_editor',
|
1100 |
+
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to exclude from deferring.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1101 |
+
'default' => 'js/jquery/jquery.js' . PHP_EOL . 'js/jquery/jquery.min.js',
|
1102 |
+
'dependency' => [ 'module_assets|js_optimize', '==|==', '1|everything', '', 'visible|visible' ],
|
1103 |
+
'sanitize' => 'sbp_sanitize_strip_tags',
|
1104 |
+
],
|
1105 |
+
[
|
1106 |
+
'title' => __( 'JavaScript to defer', 'speed-booster-pack' ),
|
1107 |
+
'id' => 'js_include',
|
1108 |
+
'class' => 'js-include',
|
1109 |
+
'type' => 'code_editor',
|
1110 |
+
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to defer.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1111 |
+
'default' => '',
|
1112 |
+
'dependency' => [ 'module_assets|js_optimize', '==|==', '1|custom', '', 'visible|visible' ],
|
1113 |
+
'sanitize' => 'sbp_sanitize_strip_tags',
|
1114 |
+
],
|
1115 |
+
[
|
1116 |
+
'title' => __( 'Move JavaScript to footer', 'speed-booster-pack' ),
|
1117 |
+
'id' => 'js_footer',
|
1118 |
+
'class' => 'js-footer',
|
1119 |
+
'desc' => __( 'Moves all JS files and inline JS to the bottom of your page sources. Has a high chance to break your website, so be sure to exclude things! If you\'re using the defer setting, you probably don\'t need to enable this.', 'speed-booster-pack' ),
|
1120 |
+
'type' => 'switcher',
|
1121 |
+
'default' => '',
|
1122 |
+
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1123 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1124 |
+
],
|
1125 |
+
[
|
1126 |
+
'title' => __( 'JavaScript to exclude from moving to footer', 'speed-booster-pack' ),
|
1127 |
+
'id' => 'js_footer_exclude',
|
1128 |
+
'class' => 'js-footer-exclude',
|
1129 |
+
'type' => 'code_editor',
|
1130 |
+
'desc' => __( 'Enter JS filenames/URLs or parts of inline JS to exclude from moving to footer.', 'speed-booster-pack' ) . ' ' . __( 'One rule per line. Each line will be taken as a separate rule, so don\'t paste entire blocks of inline JS!', 'speed-booster-pack' ),
|
1131 |
+
'default' => 'js/jquery/jquery.js' . PHP_EOL . 'js/jquery/jquery.min.js',
|
1132 |
+
'dependency' => [ 'module_assets|js_footer', '==|==', '1|1', '', 'visible|visible' ],
|
1133 |
+
'sanitize' => 'sbp_sanitize_strip_tags',
|
1134 |
+
],
|
1135 |
+
[
|
1136 |
+
'title' => __( 'Preload assets', 'speed-booster-pack' ),
|
1137 |
+
'id' => 'preboost',
|
1138 |
+
'class' => 'preboost',
|
1139 |
+
'type' => 'fieldset',
|
1140 |
+
'sanitize' => 'sbp_sanitize_strip_tags',
|
1141 |
+
'fields' => [
|
1142 |
[
|
1143 |
+
'id' => 'preboost_enable',
|
1144 |
+
'type' => 'switcher',
|
1145 |
+
'label' => __( 'Enable preloading of the assets specified below.', 'speed-booster-pack' ),
|
1146 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
|
|
|
|
|
|
1147 |
],
|
1148 |
[
|
1149 |
+
'id' => 'preboost_include',
|
1150 |
+
'type' => 'code_editor',
|
1151 |
+
'desc' => __( 'Enter full URLs of the assets you want to preload. One URL per line.', 'speed-booster-pack' ),
|
1152 |
+
'dependency' => [ 'preboost_enable', '==', '1', '', 'visible' ],
|
1153 |
+
'settings' => [ 'lineWrapping' => true ],
|
1154 |
+
'sanitize' => 'sbp_sanitize_strip_tags',
|
|
|
|
|
|
|
1155 |
],
|
1156 |
[
|
1157 |
+
'id' => 'preboost_featured_image',
|
1158 |
+
'type' => 'switcher',
|
1159 |
+
'label' => __( 'Preload featured images.', 'speed-booster-pack' ),
|
1160 |
+
'desc' => __( 'Enable this if you want featured images to be preloaded.', 'speed-booster-pack' ),
|
1161 |
+
'dependency' => [ 'preboost_enable', '==', '1', '', 'visible' ],
|
1162 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
|
|
|
|
|
|
|
|
1163 |
],
|
1164 |
],
|
1165 |
+
'dependency' => [ 'module_assets', '==', '1', '', 'visible' ],
|
1166 |
+
],
|
1167 |
+
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1168 |
|
1169 |
CSF::createSection(
|
1170 |
$prefix,
|
1178 |
/* END Section: Assets */
|
1179 |
|
1180 |
/* BEGIN Section: CDN & Proxy */
|
1181 |
+
|
1182 |
+
/* Begin Cloudflare Fields */
|
1183 |
$cloudflare_fields = [
|
1184 |
[
|
1185 |
+
'title' => 'Cloudflare',
|
1186 |
'type' => 'subheading',
|
1187 |
],
|
1188 |
[
|
1213 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1214 |
],
|
1215 |
[
|
1216 |
+
'title' => 'Rocket Loader',
|
1217 |
'id' => 'cf_rocket_loader_enable',
|
1218 |
'class' => 'with-preloader',
|
1219 |
'type' => 'switcher',
|
1221 |
'sanitize' => 'sbp_sanitize_boolean',
|
1222 |
],
|
1223 |
[
|
1224 |
+
'title' => 'Development Mode',
|
1225 |
'id' => 'cf_dev_mode_enable',
|
1226 |
'class' => 'with-preloader',
|
1227 |
'type' => 'switcher',
|
1229 |
'sanitize' => 'sbp_sanitize_boolean',
|
1230 |
],
|
1231 |
[
|
1232 |
+
'title' => 'Minify CSS',
|
1233 |
'id' => 'cf_css_minify_enable',
|
1234 |
'class' => 'with-preloader',
|
1235 |
'type' => 'switcher',
|
1237 |
'sanitize' => 'sbp_sanitize_boolean',
|
1238 |
],
|
1239 |
[
|
1240 |
+
'title' => 'Minify HTML',
|
1241 |
'id' => 'cf_html_minify_enable',
|
1242 |
'class' => 'with-preloader',
|
1243 |
'type' => 'switcher',
|
1245 |
'sanitize' => 'sbp_sanitize_boolean',
|
1246 |
],
|
1247 |
[
|
1248 |
+
'title' => 'Minify JS',
|
1249 |
'id' => 'cf_js_minify_enable',
|
1250 |
'class' => 'with-preloader',
|
1251 |
'type' => 'switcher',
|
1253 |
'sanitize' => 'sbp_sanitize_boolean',
|
1254 |
],
|
1255 |
[
|
1256 |
+
'title' => 'Automatic Platform Optimization',
|
1257 |
'id' => 'cf_apo_enable',
|
1258 |
'desc' => __( 'You need to be a paying Cloudflare user to enable this setting, otherwise it will get disabled again.', 'speed-booster-pack' ),
|
1259 |
'class' => 'with-preloader',
|
1262 |
'sanitize' => 'sbp_sanitize_boolean',
|
1263 |
],
|
1264 |
[
|
1265 |
+
'title' => 'APO: Cache By Device Type',
|
1266 |
'id' => 'cf_apo_device_type',
|
1267 |
'class' => 'with-preloader',
|
1268 |
'type' => 'switcher',
|
1270 |
'sanitize' => 'sbp_sanitize_boolean',
|
1271 |
],
|
1272 |
[
|
1273 |
+
'title' => 'Browser Cache TTL',
|
1274 |
'id' => 'cf_browser_cache_ttl',
|
1275 |
'class' => 'with-preloader',
|
1276 |
'type' => 'select',
|
1277 |
'options' => [
|
1278 |
+
0 => 'Respect Existing Headers',
|
1279 |
+
1800 => '30 minutes',
|
1280 |
+
3600 => '1 hour',
|
1281 |
+
7200 => '2 hours',
|
1282 |
+
10800 => '3 hours',
|
1283 |
+
14400 => '4 hours',
|
1284 |
+
18000 => '5 hours',
|
1285 |
+
28800 => '8 hours',
|
1286 |
+
43200 => '12 hours',
|
1287 |
+
57600 => '16 hours',
|
1288 |
+
72000 => '20 hours',
|
1289 |
+
86400 => '1 day',
|
1290 |
+
172800 => '2 days',
|
1291 |
+
259200 => '3 days',
|
1292 |
+
345600 => '4 days',
|
1293 |
+
432000 => '5 days',
|
1294 |
+
691200 => '8 days',
|
1295 |
+
1382400 => '16 days',
|
1296 |
+
2073600 => '24 days',
|
1297 |
+
2678400 => '1 month',
|
1298 |
+
5356800 => '2 months',
|
1299 |
+
16070400 => '6 months',
|
1300 |
+
31536000 => '1 year',
|
1301 |
],
|
1302 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1303 |
],
|
1316 |
'dependency' => [ 'cloudflare_enable', '==', '1', '', 'visible' ],
|
1317 |
],
|
1318 |
];
|
1319 |
+
/* End Cloudflare Fields */
|
1320 |
|
1321 |
+
/* Begin Sucuri Fields */
|
1322 |
$sucuri_fields = [
|
1323 |
[
|
1324 |
+
'title' => 'Sucuri',
|
1325 |
'type' => 'subheading',
|
1326 |
],
|
1327 |
[
|
1328 |
'title' => __( 'Connect to Sucuri', 'speed-booster-pack' ),
|
1329 |
'id' => 'sucuri_enable',
|
1330 |
'type' => 'switcher',
|
1331 |
+
'desc' => sprintf( __( 'When you connect your Sucuri account, you\'ll be able to clear your Sucuri cache via your admin bar. Plus, every time %1$s\'s cache is cleared, Sucuri\'s cache will be cleared as well.', 'speed-booster-pack' ), SBP_PLUGIN_NAME ),
|
1332 |
'sanitize' => 'sbp_sanitize_boolean',
|
1333 |
],
|
1334 |
[
|
1355 |
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' ' . __( 'CDN', 'speed-booster-pack' ),
|
1356 |
'id' => 'cdn_enable',
|
1357 |
'type' => 'switcher',
|
|
|
|
|
1358 |
'sanitize' => 'sbp_sanitize_boolean',
|
1359 |
],
|
1360 |
[
|
1398 |
);
|
1399 |
/* END Section: CDN & Proxy */
|
1400 |
|
1401 |
+
/* BEGIN Section: Woocommerce */
|
1402 |
+
$woocommerce_fields = [];
|
1403 |
+
|
1404 |
+
if ( ! SBP_Utils::is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
1405 |
+
$woocommerce_fields = [
|
1406 |
+
[
|
1407 |
+
'id' => 'sbp_csp_warning',
|
1408 |
+
'type' => 'submessage',
|
1409 |
+
'style' => 'warning',
|
1410 |
+
'content' => __( 'WooCommerce is not active right now, but you can still change the settings below.', 'speed-booster-pack' ),
|
1411 |
+
]
|
1412 |
+
];
|
1413 |
+
}
|
1414 |
+
|
1415 |
+
$woocommerce_fields = array_merge( $woocommerce_fields, [
|
1416 |
+
[
|
1417 |
+
/* translators: used like "Enable/Disable XXX" where "XXX" is the module name. */
|
1418 |
+
'title' => __( 'Enable/Disable', 'speed-booster-pack' ) . ' WooCommerce',
|
1419 |
+
'id' => 'module_woocommerce',
|
1420 |
+
'class' => 'module-woocommerce',
|
1421 |
+
'type' => 'switcher',
|
1422 |
+
'label' => __( 'Enables or disables the whole module without resetting its settings.', 'speed-booster-pack' ),
|
1423 |
+
'default' => true,
|
1424 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1425 |
+
],
|
1426 |
+
[
|
1427 |
+
'title' => __( 'Disable cart fragments', 'speed-booster-pack' ),
|
1428 |
+
'id' => 'woocommerce_disable_cart_fragments',
|
1429 |
+
'type' => 'switcher',
|
1430 |
+
/* translators: %s = cart-fragments.js */
|
1431 |
+
'desc' => sprintf( __( 'Dequeues the %s file if the visitor\'s cart is empty, preventing an unnecessary and slow AJAX request.', 'speed-booster-pack' ), '<code>cart-fragments.js</code>' ),
|
1432 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1433 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1434 |
+
],
|
1435 |
+
[
|
1436 |
+
'title' => __( 'Optimize non-WooCommerce pages', 'speed-booster-pack' ),
|
1437 |
+
'id' => 'woocommerce_optimize_nonwc_pages',
|
1438 |
+
'type' => 'switcher',
|
1439 |
+
'desc' => __( 'Prevents loading of WooCommerce-related scripts and styles on non-WooCommerce pages.', 'speed-booster-pack' ),
|
1440 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1441 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1442 |
+
],
|
1443 |
+
[
|
1444 |
+
'title' => __( 'Disable password strength meter', 'speed-booster-pack' ),
|
1445 |
+
'id' => 'woocommerce_disable_password_meter',
|
1446 |
+
'type' => 'switcher',
|
1447 |
+
'desc' => __( 'Disables the password strength meter for password inputs during a WooCommerce checkout.', 'speed-booster-pack' ),
|
1448 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1449 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1450 |
+
],
|
1451 |
+
[
|
1452 |
+
'title' => __( 'Action Scheduler retention period', 'speed-booster-pack' ),
|
1453 |
+
'id' => 'woocommerce_action_scheduler_period',
|
1454 |
+
'type' => 'spinner',
|
1455 |
+
'default' => 30,
|
1456 |
+
'desc' => __( 'The "Action Scheduler" of WooCommerce has a default retention period of 30 days. Change it here, if you know what you are doing.', 'speed-booster-pack' ),
|
1457 |
+
'unit' => __( 'days', 'speed-booster-pack' ),
|
1458 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1459 |
+
'sanitize' => 'absint',
|
1460 |
+
],
|
1461 |
+
[
|
1462 |
+
'title' => __( 'WooCommerce Marketing', 'speed-booster-pack' ),
|
1463 |
+
'id' => 'woocommerce_marketing',
|
1464 |
+
'type' => 'switcher',
|
1465 |
+
'desc' => __( 'Enable or disable WooCommerce marketing. Note that this will also disable coupons.', 'speed-booster-pack' ),
|
1466 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1467 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1468 |
+
'text_on' => 'Enabled',
|
1469 |
+
'text_off' => 'Disabled',
|
1470 |
+
'text_width' => 100,
|
1471 |
+
'default' => '1',
|
1472 |
+
],
|
1473 |
+
[
|
1474 |
+
'title' => __( 'WooCommerce Analytics', 'speed-booster-pack' ),
|
1475 |
+
'id' => 'woocommerce_analytics',
|
1476 |
+
'type' => 'switcher',
|
1477 |
+
'desc' => __( 'Enable or disable WooCommerce analytics.', 'speed-booster-pack' ),
|
1478 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1479 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1480 |
+
'text_on' => 'Enabled',
|
1481 |
+
'text_off' => 'Disabled',
|
1482 |
+
'text_width' => 100,
|
1483 |
+
'default' => $this->woocommerce_analytics,
|
1484 |
+
],
|
1485 |
+
[
|
1486 |
+
'title' => __( 'WooCommerce Tracking', 'speed-booster-pack' ),
|
1487 |
+
'id' => 'woocommerce_tracking',
|
1488 |
+
'type' => 'switcher',
|
1489 |
+
'desc' => __( 'Enable or disable WooCommerce tracking.', 'speed-booster-pack' ),
|
1490 |
+
'dependency' => [ 'module_woocommerce', '==', '1', '', 'visible' ],
|
1491 |
+
'sanitize' => 'sbp_sanitize_boolean',
|
1492 |
+
'text_on' => 'Enabled',
|
1493 |
+
'text_off' => 'Disabled',
|
1494 |
+
'text_width' => 100,
|
1495 |
+
'default' => $this->woocommerce_tracking,
|
1496 |
+
],
|
1497 |
+
] );
|
1498 |
+
|
1499 |
CSF::createSection(
|
1500 |
$prefix,
|
1501 |
[
|
1502 |
+
'title' => 'WooCommerce',
|
1503 |
+
'id' => 'woocommerce',
|
1504 |
+
'icon' => 'fa fa-shopping-cart',
|
1505 |
+
'fields' => $woocommerce_fields,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
]
|
1507 |
);
|
1508 |
+
/* END Section: WooCommerce */
|
1509 |
|
1510 |
/** BEGIN Section: Database Optimization */
|
1511 |
CSF::createSection(
|
1512 |
$prefix,
|
1513 |
[
|
1514 |
+
'title' => __( 'Optimize Database', 'speed-booster-pack' ),
|
1515 |
'id' => 'database_optimization',
|
1516 |
'icon' => 'fa fa-database',
|
1517 |
'fields' => [
|
1597 |
'type' => 'content',
|
1598 |
/* translators: 1. Speed Booster Pack 2. link to the speedboosterpack.com contact form 3. link to the GitHub page */
|
1599 |
'content' => __( 'We made use of the following libraries and frameworks in Speed Booster Pack, so we\'d like to give them a shout out and thank them:', 'speed-booster-pack' ) .
|
1600 |
+
'<ul>
|
1601 |
+
<li><a href="https://codestarframework.com/" rel="external noopener" target="_blank">CodeStar Framework</a></li>
|
1602 |
+
<li><a href="http://sourceforge.net/projects/simplehtmldom/" rel="external noopener" target="_blank">PHP Simple HTML DOM Parser</a></li>
|
1603 |
+
<li><a href="https://github.com/verlok/vanilla-lazyload" rel="external noopener" target="_blank">LazyLoad by Andrea Verlicchi</a></li>
|
1604 |
+
<li><a href="https://github.com/deliciousbrains/wp-background-processing" rel="external noopener" target="_blank">WP Background Processing by Delicious Brains</a></li>
|
1605 |
+
<li><a href="https://instant.page/" rel="external noopener" target="_blank">instant.page</a></li>
|
1606 |
+
<li><a href="https://introjs.com/" rel="external noopener" target="_blank">intro.js</a></li>
|
1607 |
+
</ul>',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
],
|
1609 |
],
|
1610 |
]
|
1636 |
[
|
1637 |
'id' => 'sbp_preload',
|
1638 |
'type' => 'code_editor',
|
1639 |
+
'title' => __( 'Preload rules for this content', 'speed-booster-pack' ),
|
1640 |
'desc' => __( 'Enter full URLs of files to preload only for this content.', 'speed-booster-pack' ),
|
1641 |
'settings' => [ 'lineWrapping' => true ],
|
1642 |
'sanitize' => 'sbp_sanitize_strip_tags',
|
admin/css/deactivation-survey.css
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.sbp-deactivation-survey {
|
2 |
+
position: fixed;
|
3 |
+
display: flex;
|
4 |
+
align-items: center;
|
5 |
+
justify-content: center;
|
6 |
+
background: rgba(0, 0, 0, .7);
|
7 |
+
width: 100%;
|
8 |
+
height: 100vh;
|
9 |
+
z-index: 999999;
|
10 |
+
top: 0;
|
11 |
+
left: 0;
|
12 |
+
visibility: hidden;
|
13 |
+
opacity: 0;
|
14 |
+
transition: opacity 350ms;
|
15 |
+
}
|
16 |
+
|
17 |
+
.sbp-deactivation-survey .sbp-survey-inner {
|
18 |
+
max-width: 100%;
|
19 |
+
width: 600px;
|
20 |
+
padding: 20px;
|
21 |
+
background: #f1f1f1;
|
22 |
+
}
|
23 |
+
|
24 |
+
.sbp-deactivation-survey .sbp-survey-inner h4 {
|
25 |
+
margin: 0;
|
26 |
+
padding: 0;
|
27 |
+
margin-bottom: 15px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.sbp-deactivation-survey .sbp-survey-inner label {
|
31 |
+
display: block;
|
32 |
+
margin-bottom: 10px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.sbp-deactivation-survey .sbp-survey-inner .sbp-deactivate-buttons-wrapper {
|
36 |
+
display: flex;
|
37 |
+
justify-content: flex-start;
|
38 |
+
}
|
39 |
+
|
40 |
+
.sbp-deactivation-survey .sbp-survey-inner .sbp-deactivate-buttons-wrapper button {
|
41 |
+
margin-right: 10px;
|
42 |
+
}
|
43 |
+
|
44 |
+
@media all and (max-width: 420px) {
|
45 |
+
.sbp-deactivation-survey .sbp-survey-inner .sbp-deactivate-buttons-wrapper {
|
46 |
+
flex-direction: column;
|
47 |
+
}
|
48 |
+
|
49 |
+
.sbp-deactivation-survey .sbp-survey-inner .sbp-deactivate-buttons-wrapper button {
|
50 |
+
margin-right: 0;
|
51 |
+
}
|
52 |
+
}
|
admin/css/speed-booster-pack-admin.css
CHANGED
@@ -197,4 +197,7 @@
|
|
197 |
|
198 |
.sbp-hidden {
|
199 |
display: none!important;
|
200 |
-
}
|
|
|
|
|
|
197 |
|
198 |
.sbp-hidden {
|
199 |
display: none!important;
|
200 |
+
}
|
201 |
+
|
202 |
+
.sbp-survey-inner {border-radius: 5px;}
|
203 |
+
.sbp-survey-inner > h3 {margin-top: 0;}
|
admin/js/deactivation-survey.js
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
$(document).ready(function () {
|
3 |
+
var targetElement = 'tr[data-slug="speed-booster-pack"] span.deactivate a';
|
4 |
+
var redirectUrl = $(targetElement).attr('href');
|
5 |
+
|
6 |
+
$(document).on('click', targetElement, function(e) {
|
7 |
+
e.preventDefault();
|
8 |
+
$('.sbp-deactivation-survey').stop().css({opacity: 1, visibility: 'visible'});
|
9 |
+
});
|
10 |
+
|
11 |
+
$(document).on('click', '.cancel-deactivation-survey', function(e) {
|
12 |
+
e.preventDefault();
|
13 |
+
$('.sbp-deactivation-survey').stop().css({opacity: 0});
|
14 |
+
setTimeout(function() {
|
15 |
+
$('.sbp-deactivation-survey').stop().css({visibility: 'hidden'});
|
16 |
+
}, 350)
|
17 |
+
$('.sbp-deactivation-survey form input[type=radio]').prop('checked', false);
|
18 |
+
})
|
19 |
+
|
20 |
+
$(document).on('click', '.deactivate-plugin', function(e) {
|
21 |
+
e.preventDefault();
|
22 |
+
window.location.href = redirectUrl;
|
23 |
+
})
|
24 |
+
|
25 |
+
$(document).on('change', 'input[name=sbp_reason]', function(e) {
|
26 |
+
if (e.target.value !== 'other' && e.target.value) {
|
27 |
+
$('.submit-and-deactivate').removeAttr('disabled');
|
28 |
+
} else {
|
29 |
+
$('.submit-and-deactivate').attr('disabled', 'disabled');
|
30 |
+
}
|
31 |
+
|
32 |
+
if (e.target.value === 'other') {
|
33 |
+
$('[name=sbp_deactivation_description]').stop().slideDown();
|
34 |
+
} else {
|
35 |
+
$('[name=sbp_deactivation_description]').stop().slideUp();
|
36 |
+
}
|
37 |
+
})
|
38 |
+
|
39 |
+
$(document).on('keyup', '[name=sbp_deactivation_description]', function(e) {
|
40 |
+
if (e.target.value !== '') {
|
41 |
+
$('.submit-and-deactivate').removeAttr('disabled');
|
42 |
+
} else {
|
43 |
+
$('.submit-and-deactivate').attr('disabled', 'disabled');
|
44 |
+
}
|
45 |
+
})
|
46 |
+
|
47 |
+
$(document).on('click', '.submit-and-deactivate', function(e) {
|
48 |
+
e.preventDefault();
|
49 |
+
var reason = $.trim($('input[name=sbp_reason]:checked').val());
|
50 |
+
var description = $.trim($('textarea[name=sbp_deactivation_description]').val());
|
51 |
+
var share_email = $('[name=sbp_reply]').prop('checked');
|
52 |
+
var email = $('[name=sbp_reply_email]').val();
|
53 |
+
var version = $('[name=sbp_version]').val();
|
54 |
+
|
55 |
+
if (reason === 'other' && !description) {
|
56 |
+
alert('Please fill the description.');
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
$.ajax({
|
61 |
+
type: 'POST',
|
62 |
+
url: 'https://speedboosterpack.com/wp-json/sbp_survey/v1/vote',
|
63 |
+
data: {
|
64 |
+
reason: reason,
|
65 |
+
description: description,
|
66 |
+
site_url: $('input[name=sbp_site_url]').val(),
|
67 |
+
email: share_email ? email : '',
|
68 |
+
version: version,
|
69 |
+
},
|
70 |
+
success: function (response) {
|
71 |
+
console.log('RESPONSE', response);
|
72 |
+
},
|
73 |
+
complete: function() {
|
74 |
+
window.location.href = redirectUrl;
|
75 |
+
}
|
76 |
+
})
|
77 |
+
})
|
78 |
+
|
79 |
+
$(document).on('change', '[name=sbp_reply]', function() {
|
80 |
+
var $target = $('[name=sbp_reply]');
|
81 |
+
|
82 |
+
$('[name=sbp_reply_email]').fadeToggle('100');
|
83 |
+
})
|
84 |
+
});
|
85 |
+
})(jQuery);
|
admin/js/speed-booster-pack-admin.js
CHANGED
@@ -286,7 +286,7 @@
|
|
286 |
$.ajax({
|
287 |
type: 'GET',
|
288 |
url: ajaxurl,
|
289 |
-
data: {action: '
|
290 |
success: function(response) {
|
291 |
// Nothing?
|
292 |
}
|
286 |
$.ajax({
|
287 |
type: 'GET',
|
288 |
url: ajaxurl,
|
289 |
+
data: {action: 'sbp_dismiss_ccm_backup', 'nonce': sbp_ajax_vars.nonce},
|
290 |
success: function(response) {
|
291 |
// Nothing?
|
292 |
}
|
includes/class-speed-booster-pack.php
CHANGED
@@ -38,8 +38,7 @@ use SpeedBooster\SBP_Migrator;
|
|
38 |
use SpeedBooster\SBP_Newsletter;
|
39 |
use SpeedBooster\SBP_Notice_Manager;
|
40 |
use SpeedBooster\SBP_Preboost;
|
41 |
-
|
42 |
-
use SpeedBooster\SBP_Special;
|
43 |
use SpeedBooster\SBP_Cloudflare;
|
44 |
use SpeedBooster\SBP_Sucuri;
|
45 |
use SpeedBooster\SBP_Tweaks;
|
@@ -178,8 +177,7 @@ class Speed_Booster_Pack {
|
|
178 |
new SBP_Image_Dimensions();
|
179 |
new SBP_HTML_Minifier();
|
180 |
new SBP_Localize_Tracker();
|
181 |
-
|
182 |
-
new SBP_Special();
|
183 |
// Z_TODO: Remove instance
|
184 |
new SBP_Custom_Code_Manager();
|
185 |
new SBP_Cloudflare();
|
@@ -268,6 +266,9 @@ class Speed_Booster_Pack {
|
|
268 |
* @access private
|
269 |
*/
|
270 |
private function define_admin_hooks() {
|
|
|
|
|
|
|
271 |
$plugin_admin = new Speed_Booster_Pack_Admin( $this->get_plugin_name(), $this->get_version() );
|
272 |
|
273 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
@@ -282,9 +283,14 @@ class Speed_Booster_Pack {
|
|
282 |
* @access private
|
283 |
*/
|
284 |
private function define_public_hooks() {
|
|
|
|
|
|
|
285 |
$plugin_public = new Speed_Booster_Pack_Public( $this->get_plugin_name(), $this->get_version() );
|
286 |
|
287 |
-
$this->loader->add_action( 'template_redirect', $plugin_public, 'template_redirect',
|
|
|
|
|
288 |
|
289 |
$this->loader->add_filter( 'wp_headers', $plugin_public, 'sbp_headers' );
|
290 |
}
|
38 |
use SpeedBooster\SBP_Newsletter;
|
39 |
use SpeedBooster\SBP_Notice_Manager;
|
40 |
use SpeedBooster\SBP_Preboost;
|
41 |
+
use SpeedBooster\SBP_Woocommerce;
|
|
|
42 |
use SpeedBooster\SBP_Cloudflare;
|
43 |
use SpeedBooster\SBP_Sucuri;
|
44 |
use SpeedBooster\SBP_Tweaks;
|
177 |
new SBP_Image_Dimensions();
|
178 |
new SBP_HTML_Minifier();
|
179 |
new SBP_Localize_Tracker();
|
180 |
+
new SBP_Woocommerce();
|
|
|
181 |
// Z_TODO: Remove instance
|
182 |
new SBP_Custom_Code_Manager();
|
183 |
new SBP_Cloudflare();
|
266 |
* @access private
|
267 |
*/
|
268 |
private function define_admin_hooks() {
|
269 |
+
|
270 |
+
if ( ! is_admin() ) { return; }
|
271 |
+
|
272 |
$plugin_admin = new Speed_Booster_Pack_Admin( $this->get_plugin_name(), $this->get_version() );
|
273 |
|
274 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
283 |
* @access private
|
284 |
*/
|
285 |
private function define_public_hooks() {
|
286 |
+
|
287 |
+
if ( is_admin() || wp_doing_cron() || wp_doing_ajax() ) { return; }
|
288 |
+
|
289 |
$plugin_public = new Speed_Booster_Pack_Public( $this->get_plugin_name(), $this->get_version() );
|
290 |
|
291 |
+
$this->loader->add_action( 'template_redirect', $plugin_public, 'template_redirect', 0 );
|
292 |
+
|
293 |
+
$this->loader->add_action( 'shutdown', $plugin_public, 'shutdown', PHP_INT_MAX );
|
294 |
|
295 |
$this->loader->add_filter( 'wp_headers', $plugin_public, 'sbp_headers' );
|
296 |
}
|
includes/classes/class-sbp-cache.php
CHANGED
@@ -156,27 +156,41 @@ class SBP_Cache extends SBP_Base_Cache {
|
|
156 |
* @param bool $wp_cache
|
157 |
*/
|
158 |
public static function set_wp_cache_constant( $wp_cache = true ) {
|
|
|
|
|
|
|
|
|
159 |
if ( sbp_is_wp_config_writable() ) {
|
160 |
// get wp config as array
|
161 |
$wp_config_file = sbp_get_wp_config_path();
|
162 |
|
163 |
-
|
|
|
164 |
|
165 |
if ( $wp_cache ) {
|
166 |
-
$append_line = PHP_EOL . "define('WP_CACHE', true); // Added by Speed Booster Pack"
|
167 |
} else {
|
168 |
$append_line = '';
|
169 |
}
|
170 |
|
171 |
-
$
|
|
|
|
|
172 |
|
173 |
-
|
174 |
-
|
|
|
|
|
|
|
175 |
}
|
|
|
176 |
|
177 |
-
$
|
|
|
|
|
|
|
178 |
|
179 |
-
file_put_contents( $wp_config_file, $
|
180 |
}
|
181 |
}
|
182 |
|
156 |
* @param bool $wp_cache
|
157 |
*/
|
158 |
public static function set_wp_cache_constant( $wp_cache = true ) {
|
159 |
+
if ( $wp_cache === true && defined( 'WP_CACHE' ) && WP_CACHE === true ) {
|
160 |
+
return;
|
161 |
+
}
|
162 |
+
|
163 |
if ( sbp_is_wp_config_writable() ) {
|
164 |
// get wp config as array
|
165 |
$wp_config_file = sbp_get_wp_config_path();
|
166 |
|
167 |
+
// Get content of the config file.
|
168 |
+
$config_file = file( $wp_config_file );
|
169 |
|
170 |
if ( $wp_cache ) {
|
171 |
+
$append_line = PHP_EOL . "define( 'WP_CACHE', true ); // Added by Speed Booster Pack";
|
172 |
} else {
|
173 |
$append_line = '';
|
174 |
}
|
175 |
|
176 |
+
$config_file_content = '';
|
177 |
+
foreach ( $config_file as &$line ) {
|
178 |
+
preg_match( '/^define\(\s*\'([A-Z_]+)\',(.*)\)/', trim($line), $match );
|
179 |
|
180 |
+
if ( isset( $match[1] ) && 'WP_CACHE' === $match[1] ) {
|
181 |
+
$line = '';
|
182 |
+
}
|
183 |
+
|
184 |
+
$config_file_content .= $line;
|
185 |
}
|
186 |
+
unset( $line );
|
187 |
|
188 |
+
$pos = strpos($config_file_content, '<?php');
|
189 |
+
if ($pos !== false) {
|
190 |
+
$config_file_content = substr_replace($config_file_content, '<?php' . $append_line, $pos, strlen('<?php'));
|
191 |
+
}
|
192 |
|
193 |
+
file_put_contents( $wp_config_file, $config_file_content );
|
194 |
}
|
195 |
}
|
196 |
|
includes/classes/class-sbp-database-optimizer.php
CHANGED
@@ -57,7 +57,7 @@ class SBP_Database_Optimizer extends SBP_Abstract_Module {
|
|
57 |
if ( $wpdb->last_error ) {
|
58 |
echo wp_json_encode( [
|
59 |
'status' => 'failure',
|
60 |
-
'message' => __( 'Error occurred while converting. Error details:
|
61 |
] );
|
62 |
} else {
|
63 |
echo wp_json_encode( [
|
57 |
if ( $wpdb->last_error ) {
|
58 |
echo wp_json_encode( [
|
59 |
'status' => 'failure',
|
60 |
+
'message' => __( 'Error occurred while converting. Error details:', 'speed-booster-pack' ) . ' ' . $wpdb->last_error,
|
61 |
] );
|
62 |
} else {
|
63 |
echo wp_json_encode( [
|
includes/classes/class-sbp-lazy-loader.php
CHANGED
@@ -19,6 +19,7 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
|
|
19 |
}
|
20 |
|
21 |
add_action( 'set_current_user', [ $this, 'run_class' ] );
|
|
|
22 |
}
|
23 |
|
24 |
public function run_class() {
|
@@ -33,7 +34,7 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
|
|
33 |
}
|
34 |
|
35 |
function add_lazy_load_script() {
|
36 |
-
wp_enqueue_script( 'sbp-lazy-load', SBP_URL . 'public/js/lazyload.js', false, '17.
|
37 |
$lazy_loader_script = 'window.lazyLoadOptions = {
|
38 |
elements_selector: "[loading=lazy]"
|
39 |
};
|
@@ -74,6 +75,12 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
|
|
74 |
wp_add_inline_script( 'sbp-lazy-load', $lazy_loader_script );
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
function lazy_load_handler( $html ) {
|
78 |
if ( is_embed() != false ) {
|
79 |
return $html;
|
@@ -96,10 +103,10 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
|
|
96 |
'images.dmca.com/Badges/',
|
97 |
];
|
98 |
$lazyload_exclusions = apply_filters( 'sbp_lazyload_exclusions', array_merge( $lazyload_exclusions, $default_lazyload_exclusions ) );
|
99 |
-
$placeholder = 'data:image/gif;base64,
|
100 |
|
101 |
// Find all images
|
102 |
-
preg_match_all( '/<(img|source|iframe)(.*?) (src=)[\'|"](.*?)[\'|"](.*?)>/is', $html, $resource_elements );
|
103 |
|
104 |
$elements_to_be_changed = [];
|
105 |
|
@@ -143,7 +150,7 @@ class SBP_Lazy_Loader extends SBP_Abstract_Module {
|
|
143 |
// add loading attribute, but only if the tag doesn't have one
|
144 |
if ( ! strpos( $newElement, 'loading=' ) ) {
|
145 |
$newElement = preg_replace(
|
146 |
-
"/<(img|source|iframe)(.*?) ?(\/?)>/is",
|
147 |
'<$1$2 loading="lazy" $3>',
|
148 |
$newElement
|
149 |
);
|
19 |
}
|
20 |
|
21 |
add_action( 'set_current_user', [ $this, 'run_class' ] );
|
22 |
+
add_action('wp_enqueue_scripts',[ $this, 'deregister_media_elements' ]);
|
23 |
}
|
24 |
|
25 |
public function run_class() {
|
34 |
}
|
35 |
|
36 |
function add_lazy_load_script() {
|
37 |
+
wp_enqueue_script( 'sbp-lazy-load', SBP_URL . 'public/js/lazyload.js', false, '17.7.0', true );
|
38 |
$lazy_loader_script = 'window.lazyLoadOptions = {
|
39 |
elements_selector: "[loading=lazy]"
|
40 |
};
|
75 |
wp_add_inline_script( 'sbp-lazy-load', $lazy_loader_script );
|
76 |
}
|
77 |
|
78 |
+
function deregister_media_elements(){
|
79 |
+
wp_deregister_script('wp-mediaelement');
|
80 |
+
wp_deregister_style('wp-mediaelement');
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
function lazy_load_handler( $html ) {
|
85 |
if ( is_embed() != false ) {
|
86 |
return $html;
|
103 |
'images.dmca.com/Badges/',
|
104 |
];
|
105 |
$lazyload_exclusions = apply_filters( 'sbp_lazyload_exclusions', array_merge( $lazyload_exclusions, $default_lazyload_exclusions ) );
|
106 |
+
$placeholder = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
107 |
|
108 |
// Find all images
|
109 |
+
preg_match_all( '/<(img|source|video|iframe)(.*?) (src=)[\'|"](.*?)[\'|"](.*?)>/is', $html, $resource_elements );
|
110 |
|
111 |
$elements_to_be_changed = [];
|
112 |
|
150 |
// add loading attribute, but only if the tag doesn't have one
|
151 |
if ( ! strpos( $newElement, 'loading=' ) ) {
|
152 |
$newElement = preg_replace(
|
153 |
+
"/<(img|source|video|iframe)(.*?) ?(\/?)>/is",
|
154 |
'<$1$2 loading="lazy" $3>',
|
155 |
$newElement
|
156 |
);
|
includes/classes/class-sbp-litespeed-cache.php
CHANGED
@@ -79,7 +79,15 @@ class SBP_LiteSpeed_Cache extends SBP_Base_Cache {
|
|
79 |
$lines[] = '## END Cache vary for mobile browsers' . PHP_EOL;
|
80 |
}
|
81 |
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
if ( $query_strings = sbp_get_option( 'caching_ls_include_query_strings' ) ) {
|
85 |
$keys = explode( PHP_EOL, $query_strings );
|
@@ -140,7 +148,7 @@ class SBP_LiteSpeed_Cache extends SBP_Base_Cache {
|
|
140 |
$cache_expire_time = sbp_get_option( 'caching_ls_expiry', 10 ) * HOUR_IN_SECONDS;
|
141 |
|
142 |
// Check for all exclusions
|
143 |
-
if ( true === $this->should_bypass_cache( [ 'is_logged_in', 'include_query_strings'
|
144 |
$this->headers['X-LiteSpeed-Cache-Control'] = 'no-cache';
|
145 |
} else {
|
146 |
if ( ! sbp_get_option( 'caching_ls_cache_logged_in_users' ) && is_user_logged_in() ) {
|
79 |
$lines[] = '## END Cache vary for mobile browsers' . PHP_EOL;
|
80 |
}
|
81 |
|
82 |
+
if ( $query_strings = sbp_get_option( 'caching_ls_exclude_cookies' ) ) {
|
83 |
+
$keys = explode( PHP_EOL, $query_strings );
|
84 |
+
if ( $keys ) {
|
85 |
+
$lines[] = '## BEGIN Exclude Cookies';
|
86 |
+
$lines[] = 'RewriteCond %{HTTP_COOKIE} ' . implode( '|', $keys );
|
87 |
+
$lines[] = 'RewriteRule .* - [E=Cache-Control:no-cache]';
|
88 |
+
$lines[] = '## END Exclude Cookies' . PHP_EOL;
|
89 |
+
}
|
90 |
+
}
|
91 |
|
92 |
if ( $query_strings = sbp_get_option( 'caching_ls_include_query_strings' ) ) {
|
93 |
$keys = explode( PHP_EOL, $query_strings );
|
148 |
$cache_expire_time = sbp_get_option( 'caching_ls_expiry', 10 ) * HOUR_IN_SECONDS;
|
149 |
|
150 |
// Check for all exclusions
|
151 |
+
if ( true === $this->should_bypass_cache( [ 'is_logged_in', 'include_query_strings' ] ) ) {
|
152 |
$this->headers['X-LiteSpeed-Cache-Control'] = 'no-cache';
|
153 |
} else {
|
154 |
if ( ! sbp_get_option( 'caching_ls_cache_logged_in_users' ) && is_user_logged_in() ) {
|
includes/classes/class-sbp-migrator.php
CHANGED
@@ -47,6 +47,7 @@ class SBP_Migrator {
|
|
47 |
$this->update_js_optimize_options();
|
48 |
$this->apply_cache_settings();
|
49 |
$this->migrate_cdn_toggle();
|
|
|
50 |
update_option( 'sbp_migrator_version', SBP_MIGRATOR_VERSION );
|
51 |
}
|
52 |
|
@@ -143,6 +144,13 @@ ga('send', 'pageview');";
|
|
143 |
}
|
144 |
}
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
private function enable_external_notices() {
|
147 |
$this->sbp_options['enable_external_notices'] = '1';
|
148 |
}
|
47 |
$this->update_js_optimize_options();
|
48 |
$this->apply_cache_settings();
|
49 |
$this->migrate_cdn_toggle();
|
50 |
+
$this->migrate_special_to_woocommerce();
|
51 |
update_option( 'sbp_migrator_version', SBP_MIGRATOR_VERSION );
|
52 |
}
|
53 |
|
144 |
}
|
145 |
}
|
146 |
|
147 |
+
private function migrate_special_to_woocommerce() {
|
148 |
+
if ( isset( $this->sbp_options['module_special'] ) && $this->sbp_options['module_special'] ) {
|
149 |
+
$this->sbp_options['module_woocommerce'] = 1;
|
150 |
+
update_option( 'sbp_options', $this->sbp_options );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
private function enable_external_notices() {
|
155 |
$this->sbp_options['enable_external_notices'] = '1';
|
156 |
}
|
includes/classes/class-sbp-special.php
DELETED
@@ -1,125 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace SpeedBooster;
|
4 |
-
|
5 |
-
use SpeedBooster\SBP_Utils;
|
6 |
-
|
7 |
-
// If this file is called directly, abort.
|
8 |
-
if ( ! defined( 'WPINC' ) ) {
|
9 |
-
die;
|
10 |
-
}
|
11 |
-
|
12 |
-
// Z_TODO: Remove class in version 4.5
|
13 |
-
class SBP_Special extends SBP_Abstract_Module {
|
14 |
-
public function __construct() {
|
15 |
-
parent::__construct();
|
16 |
-
|
17 |
-
if ( ! sbp_get_option( 'module_special' ) ) {
|
18 |
-
return;
|
19 |
-
}
|
20 |
-
|
21 |
-
add_action( 'set_current_user', [ $this, 'run_class' ] );
|
22 |
-
}
|
23 |
-
|
24 |
-
public function run_class() {
|
25 |
-
if ( $this->should_sbp_run ) {
|
26 |
-
$this->woocommerce_disable_cart_fragments();
|
27 |
-
$this->optimize_nonwc_pages();
|
28 |
-
$this->remove_wc_password_strength_meter();
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Removes WooCommerce scripts from non-woocommerce pages
|
34 |
-
*/
|
35 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
36 |
-
private function optimize_nonwc_pages() {
|
37 |
-
if ( function_exists( 'is_woocommerce' ) && sbp_get_option( 'woocommerce_optimize_nonwc_pages' ) ) {
|
38 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'optimize_nonwc_pages_handle' ] );
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
43 |
-
public function optimize_nonwc_pages_handle() {
|
44 |
-
if ( SBP_Utils::is_plugin_active( 'woocommerce/woocommerce.php' ) && sbp_get_option( 'woocommerce_optimize_nonwc_pages' ) ) {
|
45 |
-
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
|
46 |
-
// dequeue WooCommerce styles
|
47 |
-
wp_dequeue_style( 'woocommerce_chosen_styles' );
|
48 |
-
wp_dequeue_style( 'woocommerce_fancybox_styles' );
|
49 |
-
wp_dequeue_style( 'woocommerce_frontend_styles' );
|
50 |
-
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
51 |
-
|
52 |
-
// dequeue WooCommerce scripts
|
53 |
-
wp_dequeue_script( 'wc-add-to-cart' );
|
54 |
-
wp_dequeue_script( 'wc-add-to-cart-variation' );
|
55 |
-
wp_dequeue_script( 'wc-cart' );
|
56 |
-
wp_dequeue_script( 'wc-cart-fragments' );
|
57 |
-
wp_dequeue_script( 'wc-checkout' );
|
58 |
-
wp_dequeue_script( 'wc-chosen' );
|
59 |
-
wp_dequeue_script( 'wc-single-product' );
|
60 |
-
wp_dequeue_script( 'wc-single-product' );
|
61 |
-
wp_dequeue_script( 'wc_price_slider' );
|
62 |
-
wp_dequeue_script( 'woocommerce' );
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
68 |
-
private function woocommerce_disable_cart_fragments() {
|
69 |
-
if ( sbp_get_option( 'woocommerce_disable_cart_fragments' ) ) {
|
70 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'woocommerce_disable_cart_fragments_handle' ], 999 );
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Removes cart-fragments.js
|
76 |
-
*/
|
77 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
78 |
-
public function woocommerce_disable_cart_fragments_handle() {
|
79 |
-
if ( SBP_Utils::is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
80 |
-
global $wp_scripts;
|
81 |
-
$handle = 'wc-cart-fragments';
|
82 |
-
if ( isset( $wp_scripts->registered[ $handle ] ) && $wp_scripts->registered[ $handle ]->src ) {
|
83 |
-
$load_cart_fragments_path = $wp_scripts->registered[ $handle ]->src;
|
84 |
-
$wp_scripts->registered[ $handle ]->src = null;
|
85 |
-
wp_add_inline_script(
|
86 |
-
'jquery',
|
87 |
-
'function sbp_getCookie(c){var e=document.cookie.match("(^|;) ?"+c+"=([^;]*)(;|$)");return e?e[2]:null}function sbp_check_wc_cart_script(){var c="sbp_loaded_wc_cart_fragments";if(null!==document.getElementById(c))return!1;if(sbp_getCookie("woocommerce_cart_hash")){var e=document.createElement("script");e.id=c,e.src="' . $load_cart_fragments_path . '",e.async=!0,document.head.appendChild(e)}}sbp_check_wc_cart_script(),document.addEventListener("click",function(){setTimeout(sbp_check_wc_cart_script,1e3)});'
|
88 |
-
);
|
89 |
-
}
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Removes password strength meter in WooCommerce checkout process
|
95 |
-
*/
|
96 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
97 |
-
private function remove_wc_password_strength_meter() {
|
98 |
-
if ( function_exists( 'is_account_page' ) && sbp_get_option( 'woocommerce_disable_password_meter' ) ) {
|
99 |
-
add_action( 'wp_print_scripts', [ $this, 'remove_wc_password_strength_meter_handle' ], 100 );
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
// Z_TODO: Move this method to WooCommerce class in version 4.5
|
104 |
-
public function remove_wc_password_strength_meter_handle() {
|
105 |
-
global $wp;
|
106 |
-
|
107 |
-
$wp_check = isset( $wp->query_vars['lost-password'] ) || ( isset( $_GET['action'] ) && $_GET['action'] === 'lostpassword' ) || is_page( 'lost_password' );
|
108 |
-
|
109 |
-
$wc_check = ( ( is_account_page() || is_checkout() ) );
|
110 |
-
|
111 |
-
if ( ! $wp_check && ! $wc_check ) {
|
112 |
-
if ( wp_script_is( 'zxcvbn-async', 'enqueued' ) ) {
|
113 |
-
wp_dequeue_script( 'zxcvbn-async' );
|
114 |
-
}
|
115 |
-
|
116 |
-
if ( wp_script_is( 'password-strength-meter', 'enqueued' ) ) {
|
117 |
-
wp_dequeue_script( 'password-strength-meter' );
|
118 |
-
}
|
119 |
-
|
120 |
-
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
|
121 |
-
wp_dequeue_script( 'wc-password-strength-meter' );
|
122 |
-
}
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/class-sbp-utils.php
CHANGED
@@ -62,16 +62,9 @@ class SBP_Utils extends SBP_Abstract_Module {
|
|
62 |
$htaccess_file_path = get_home_path() . '/.htaccess';
|
63 |
|
64 |
if ( $wp_filesystem->exists( $htaccess_file_path ) ) {
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
if ( $content ) {
|
69 |
-
$current_htaccess = str_replace( "# BEGIN WordPress", '## BEGIN ' . $marker_name . PHP_EOL . $content . PHP_EOL . '## END ' . $marker_name . PHP_EOL . PHP_EOL . "# BEGIN WordPress", $current_htaccess );
|
70 |
-
}
|
71 |
-
|
72 |
-
$put_files = $wp_filesystem->put_contents( $htaccess_file_path, $current_htaccess );
|
73 |
-
|
74 |
-
return (bool) $put_files;
|
75 |
}
|
76 |
|
77 |
return false;
|
62 |
$htaccess_file_path = get_home_path() . '/.htaccess';
|
63 |
|
64 |
if ( $wp_filesystem->exists( $htaccess_file_path ) ) {
|
65 |
+
add_action( 'admin_init', function() use ( $htaccess_file_path, $marker_name, $content ) {
|
66 |
+
insert_with_markers( $htaccess_file_path, $marker_name, $content );
|
67 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
return false;
|
includes/classes/class-sbp-woocommerce.php
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace SpeedBooster;
|
4 |
+
|
5 |
+
// If this file is called directly, abort.
|
6 |
+
if ( ! defined( 'WPINC' ) ) {
|
7 |
+
die;
|
8 |
+
}
|
9 |
+
|
10 |
+
class SBP_Woocommerce extends SBP_Abstract_Module {
|
11 |
+
public function __construct() {
|
12 |
+
parent::__construct();
|
13 |
+
|
14 |
+
if ( ! sbp_get_option( 'module_woocommerce' ) ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
add_action( 'set_current_user', [ $this, 'run_class' ] );
|
19 |
+
}
|
20 |
+
|
21 |
+
public function run_class() {
|
22 |
+
|
23 |
+
if ( ! $this->should_sbp_run || ! SBP_Utils::is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
24 |
+
return;
|
25 |
+
}
|
26 |
+
|
27 |
+
$this->woocommerce_disable_cart_fragments();
|
28 |
+
$this->optimize_nonwc_pages();
|
29 |
+
$this->remove_wc_password_strength_meter();
|
30 |
+
$this->set_action_scheduler_period();
|
31 |
+
$this->remove_marketing();
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Removes WooCommerce scripts from non-woocommerce pages
|
37 |
+
*/
|
38 |
+
private function optimize_nonwc_pages() {
|
39 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'optimize_nonwc_pages_handle' ] );
|
40 |
+
}
|
41 |
+
|
42 |
+
public function optimize_nonwc_pages_handle() {
|
43 |
+
if ( sbp_get_option( 'woocommerce_optimize_nonwc_pages' ) ) {
|
44 |
+
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
|
45 |
+
// dequeue WooCommerce styles
|
46 |
+
wp_dequeue_style( 'woocommerce_chosen_styles' );
|
47 |
+
wp_dequeue_style( 'woocommerce_fancybox_styles' );
|
48 |
+
wp_dequeue_style( 'woocommerce_frontend_styles' );
|
49 |
+
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
50 |
+
|
51 |
+
// dequeue WooCommerce scripts
|
52 |
+
wp_dequeue_script( 'wc-add-to-cart' );
|
53 |
+
wp_dequeue_script( 'wc-add-to-cart-variation' );
|
54 |
+
wp_dequeue_script( 'wc-cart' );
|
55 |
+
wp_dequeue_script( 'wc-checkout' );
|
56 |
+
wp_dequeue_script( 'wc-chosen' );
|
57 |
+
wp_dequeue_script( 'wc-single-product' );
|
58 |
+
wp_dequeue_script( 'wc_price_slider' );
|
59 |
+
wp_dequeue_script( 'woocommerce' );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
private function woocommerce_disable_cart_fragments() {
|
65 |
+
if ( sbp_get_option( 'woocommerce_disable_cart_fragments' ) ) {
|
66 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'woocommerce_disable_cart_fragments_handle' ], 999 );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Removes cart-fragments.js
|
72 |
+
*/
|
73 |
+
public function woocommerce_disable_cart_fragments_handle() {
|
74 |
+
|
75 |
+
global $wp_scripts;
|
76 |
+
$handle = 'wc-cart-fragments';
|
77 |
+
if ( isset( $wp_scripts->registered[ $handle ] ) && $wp_scripts->registered[ $handle ]->src ) {
|
78 |
+
$load_cart_fragments_path = $wp_scripts->registered[ $handle ]->src;
|
79 |
+
$wp_scripts->registered[ $handle ]->src = null;
|
80 |
+
wp_add_inline_script(
|
81 |
+
'jquery',
|
82 |
+
'function sbp_getCookie(c){var e=document.cookie.match("(^|;) ?"+c+"=([^;]*)(;|$)");return e?e[2]:null}function sbp_check_wc_cart_script(){var c="sbp_loaded_wc_cart_fragments";if(null!==document.getElementById(c))return!1;if(sbp_getCookie("woocommerce_cart_hash")){var e=document.createElement("script");e.id=c,e.src="' . $load_cart_fragments_path . '",e.async=!0,document.head.appendChild(e)}}sbp_check_wc_cart_script(),document.addEventListener("click",function(){setTimeout(sbp_check_wc_cart_script,1e3)});'
|
83 |
+
);
|
84 |
+
}
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Removes password strength meter in WooCommerce checkout process
|
90 |
+
*/
|
91 |
+
private function remove_wc_password_strength_meter() {
|
92 |
+
if ( function_exists( 'is_account_page' ) && sbp_get_option( 'woocommerce_disable_password_meter' ) ) {
|
93 |
+
add_action( 'wp_print_scripts', [ $this, 'remove_wc_password_strength_meter_handle' ], 100 );
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
public function remove_wc_password_strength_meter_handle() {
|
98 |
+
global $wp;
|
99 |
+
|
100 |
+
$wp_check = isset( $wp->query_vars['lost-password'] ) || ( isset( $_GET['action'] ) && $_GET['action'] === 'lostpassword' ) || is_page( 'lost_password' );
|
101 |
+
|
102 |
+
$wc_check = ( ( is_account_page() || is_checkout() ) );
|
103 |
+
|
104 |
+
if ( ! $wp_check && ! $wc_check ) {
|
105 |
+
if ( wp_script_is( 'zxcvbn-async', 'enqueued' ) ) {
|
106 |
+
wp_dequeue_script( 'zxcvbn-async' );
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( wp_script_is( 'password-strength-meter', 'enqueued' ) ) {
|
110 |
+
wp_dequeue_script( 'password-strength-meter' );
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
|
114 |
+
wp_dequeue_script( 'wc-password-strength-meter' );
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
public function remove_marketing() {
|
120 |
+
if ( ! sbp_get_option( 'woocommerce_marketing' ) ) {
|
121 |
+
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );
|
122 |
+
|
123 |
+
add_filter( 'woocommerce_admin_features', function ( $features ) {
|
124 |
+
return array_values(
|
125 |
+
array_filter( $features, function ( $feature ) {
|
126 |
+
return $feature !== 'marketing';
|
127 |
+
} )
|
128 |
+
);
|
129 |
+
} );
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
private function set_action_scheduler_period() {
|
134 |
+
add_filter( 'action_scheduler_retention_period', function () {
|
135 |
+
return DAY_IN_SECONDS * sbp_get_option( 'woocommerce_action_scheduler_period', 7 );
|
136 |
+
} );
|
137 |
+
}
|
138 |
+
|
139 |
+
public static function get_woocommerce_option( $option_name ) {
|
140 |
+
|
141 |
+
if ( get_option( $option_name ) === 'yes' ) {
|
142 |
+
return 1;
|
143 |
+
}
|
144 |
+
|
145 |
+
return 0;
|
146 |
+
|
147 |
+
}
|
148 |
+
public static function set_woocommerce_option_analytics( $saved_data ) {
|
149 |
+
|
150 |
+
if ( ! sbp_get_option( 'module_woocommerce' ) ) {
|
151 |
+
return;
|
152 |
+
}
|
153 |
+
|
154 |
+
$woocommerce_analytics = $saved_data[ 'woocommerce_analytics' ] == '1' ? 'yes' : 'no';
|
155 |
+
update_option( 'woocommerce_analytics_enabled', $woocommerce_analytics );
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
public static function set_woocommerce_option_tracking( $saved_data ) {
|
160 |
+
|
161 |
+
if ( ! sbp_get_option( 'module_woocommerce' ) ) {
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
|
165 |
+
$woocommerce_tracking = $saved_data[ 'woocommerce_tracking' ] == '1' ? 'yes' : 'no';
|
166 |
+
update_option( 'woocommerce_allow_tracking', $woocommerce_tracking );
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
}
|
includes/classes/class-sbp-wp-admin.php
CHANGED
@@ -11,15 +11,17 @@ class SBP_WP_Admin {
|
|
11 |
public function __construct() {
|
12 |
add_action( 'admin_bar_menu', [ $this, 'add_admin_bar_links' ], 90 );
|
13 |
if ( is_admin() ) {
|
14 |
-
require_once SBP_LIB_PATH . 'announce4wp/announce4wp-client.php';
|
15 |
add_action( 'admin_init', [ $this, 'set_notices' ] );
|
16 |
-
// $this->initialize_announce4wp();
|
17 |
|
18 |
add_action( 'admin_init', [ $this, 'timed_notifications' ] );
|
19 |
add_action( 'admin_init', [ $this, 'welcome_notice' ] );
|
|
|
20 |
add_action( 'admin_head', [ $this, 'check_required_file_permissions' ] );
|
21 |
|
22 |
add_action( 'wp_ajax_sbp_dismiss_intro', [ $this, 'dismiss_intro' ] );
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
add_filter( 'plugin_row_meta', [ $this, 'plugin_meta_links' ], 10, 2 );
|
@@ -132,12 +134,10 @@ class SBP_WP_Admin {
|
|
132 |
public function set_notices() {
|
133 |
// Set Sucuri Notice
|
134 |
if ( $transient_value = get_transient( 'sbp_clear_sucuri_cache' ) ) {
|
135 |
-
$notice_message = $transient_value == '1' ? __( 'Sucuri cache cleared.',
|
136 |
-
'speed-booster-pack' ) : __( 'Error occured while clearing Sucuri cache. ',
|
137 |
-
'speed-booster-pack' ) . get_transient( 'sbp_sucuri_error' );
|
138 |
$notice_type = $transient_value == '1' ? 'success' : 'error';
|
139 |
SBP_Notice_Manager::display_notice( 'sbp_clear_sucuri_cache',
|
140 |
-
'<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' .
|
141 |
$notice_type,
|
142 |
true,
|
143 |
'flash' );
|
@@ -156,7 +156,7 @@ class SBP_WP_Admin {
|
|
156 |
$notice_type = '';
|
157 |
}
|
158 |
SBP_Notice_Manager::display_notice( 'sbp_notice_cloudflare',
|
159 |
-
'<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' .
|
160 |
$notice_type,
|
161 |
true,
|
162 |
'flash' );
|
@@ -206,13 +206,7 @@ class SBP_WP_Admin {
|
|
206 |
}
|
207 |
|
208 |
public function timed_notifications() {
|
209 |
-
$tweet_link = "https://twitter.com/intent/tweet?hashtags=SpeedBoosterPack&text=I've been using Speed Booster Pack for a couple of weeks and I love it!&tw_p=tweetbutton&url=https://wordpress.org/plugins/speed-booster-pack/";
|
210 |
$notices = [
|
211 |
-
'sbp_tweet' => [
|
212 |
-
'show_after' => '+7 days',
|
213 |
-
'text' => '<b>' . SBP_PLUGIN_NAME . ':</b> ' . sprintf( __( 'If you\'re enjoying using our plugin, can you %1$ssend a tweet to support us%2$s?', 'speed-booster-pack' ), '<a href="' . $tweet_link . '" rel="noopener" target="_blank">', '</a>' ),
|
214 |
-
'depends_on' => 'sbp_rate_wp_org',
|
215 |
-
],
|
216 |
'sbp_rate_wp_org' => [
|
217 |
'show_after' => '+7 days',
|
218 |
'text' => '<b>' . SBP_PLUGIN_NAME . ':</b> ' . sprintf( __( 'If you like our plugin, we would be so grateful if you could %1$sgive us a fair rating on wordpress.org%2$s.', 'speed-booster-pack' ), '<a href="https://wordpress.org/support/plugin/speed-booster-pack/reviews/?rate=5#new-post" rel="noopener" target="_blank">', '</a>' ),
|
@@ -247,16 +241,6 @@ class SBP_WP_Admin {
|
|
247 |
return $links;
|
248 |
}
|
249 |
|
250 |
-
private function initialize_announce4wp() {
|
251 |
-
if ( sbp_get_option( 'enable_external_notices' ) ) {
|
252 |
-
new \Announce4WP_Client( 'speed-booster-pack.php',
|
253 |
-
SBP_PLUGIN_NAME,
|
254 |
-
"sbp",
|
255 |
-
"https://speedboosterpack.com/wp-json/a4wp/v1/" . SBP_VERSION . "/news.json",
|
256 |
-
"toplevel_page_sbp-settings" );
|
257 |
-
}
|
258 |
-
}
|
259 |
-
|
260 |
public function check_required_file_permissions() {
|
261 |
if ( get_current_screen()->id !== 'toplevel_page_sbp-settings' ) {
|
262 |
return;
|
@@ -319,4 +303,130 @@ class SBP_WP_Admin {
|
|
319 |
public function dismiss_intro() {
|
320 |
update_user_meta( get_current_user_id(), 'sbp_intro', true );
|
321 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
}
|
11 |
public function __construct() {
|
12 |
add_action( 'admin_bar_menu', [ $this, 'add_admin_bar_links' ], 90 );
|
13 |
if ( is_admin() ) {
|
|
|
14 |
add_action( 'admin_init', [ $this, 'set_notices' ] );
|
|
|
15 |
|
16 |
add_action( 'admin_init', [ $this, 'timed_notifications' ] );
|
17 |
add_action( 'admin_init', [ $this, 'welcome_notice' ] );
|
18 |
+
add_action( 'admin_init', [ $this, 'clear_custom_code_manager' ] );
|
19 |
add_action( 'admin_head', [ $this, 'check_required_file_permissions' ] );
|
20 |
|
21 |
add_action( 'wp_ajax_sbp_dismiss_intro', [ $this, 'dismiss_intro' ] );
|
22 |
+
add_action( 'wp_ajax_sbp_dismiss_ccm_backup', [ $this, 'dismiss_custom_code_manager_backup' ] );
|
23 |
+
|
24 |
+
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_deactivation_survey_scripts' ] );
|
25 |
}
|
26 |
|
27 |
add_filter( 'plugin_row_meta', [ $this, 'plugin_meta_links' ], 10, 2 );
|
134 |
public function set_notices() {
|
135 |
// Set Sucuri Notice
|
136 |
if ( $transient_value = get_transient( 'sbp_clear_sucuri_cache' ) ) {
|
137 |
+
$notice_message = $transient_value == '1' ? __( 'Sucuri cache cleared.', 'speed-booster-pack' ) : __( 'Error occured while clearing Sucuri cache. ', 'speed-booster-pack' ) . get_transient( 'sbp_sucuri_error' );
|
|
|
|
|
138 |
$notice_type = $transient_value == '1' ? 'success' : 'error';
|
139 |
SBP_Notice_Manager::display_notice( 'sbp_clear_sucuri_cache',
|
140 |
+
'<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' . $notice_message . '</p>',
|
141 |
$notice_type,
|
142 |
true,
|
143 |
'flash' );
|
156 |
$notice_type = '';
|
157 |
}
|
158 |
SBP_Notice_Manager::display_notice( 'sbp_notice_cloudflare',
|
159 |
+
'<p><strong>' . SBP_PLUGIN_NAME . ':</strong> ' . $notice_message . '</p>',
|
160 |
$notice_type,
|
161 |
true,
|
162 |
'flash' );
|
206 |
}
|
207 |
|
208 |
public function timed_notifications() {
|
|
|
209 |
$notices = [
|
|
|
|
|
|
|
|
|
|
|
210 |
'sbp_rate_wp_org' => [
|
211 |
'show_after' => '+7 days',
|
212 |
'text' => '<b>' . SBP_PLUGIN_NAME . ':</b> ' . sprintf( __( 'If you like our plugin, we would be so grateful if you could %1$sgive us a fair rating on wordpress.org%2$s.', 'speed-booster-pack' ), '<a href="https://wordpress.org/support/plugin/speed-booster-pack/reviews/?rate=5#new-post" rel="noopener" target="_blank">', '</a>' ),
|
241 |
return $links;
|
242 |
}
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
public function check_required_file_permissions() {
|
245 |
if ( get_current_screen()->id !== 'toplevel_page_sbp-settings' ) {
|
246 |
return;
|
303 |
public function dismiss_intro() {
|
304 |
update_user_meta( get_current_user_id(), 'sbp_intro', true );
|
305 |
}
|
306 |
+
|
307 |
+
public function enqueue_deactivation_survey_scripts() {
|
308 |
+
if ( get_current_screen()->id === 'plugins' ) {
|
309 |
+
wp_enqueue_script( 'sbp_deactivation_survey', SBP_URL . '/admin/js/deactivation-survey.js', array(
|
310 |
+
'jquery'
|
311 |
+
), SBP_VERSION );
|
312 |
+
|
313 |
+
wp_enqueue_style( 'sbp_deactivation_survey', SBP_URL . '/admin/css/deactivation-survey.css', null, SBP_VERSION );
|
314 |
+
|
315 |
+
add_action( 'admin_footer', [ $this, 'deactivation_survey_modal' ] );
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
public function deactivation_survey_modal() {
|
320 |
+
$current_user = wp_get_current_user();
|
321 |
+
|
322 |
+
$email = (string) $current_user->user_email;
|
323 |
+
|
324 |
+
echo '
|
325 |
+
<div class="sbp-deactivation-survey">
|
326 |
+
<div class="sbp-survey-inner">
|
327 |
+
<h3>' . __( 'Sorry to see you go!', 'speed-booster-pack' ) . '</h3>
|
328 |
+
<h4>' . sprintf( __( 'We would appreciate if you let us know why you\'re deactivating %s.', 'speed-booster-pack' ), SBP_PLUGIN_NAME ) . '</h4>
|
329 |
+
<form action="" method="POST">
|
330 |
+
<label>
|
331 |
+
<input type="radio" name="sbp_reason" value="I don\'t see any performance improvement." />
|
332 |
+
' . __( 'I don\'t see any performance improvement.', 'speed-booster-pack' ) . '
|
333 |
+
</label>
|
334 |
+
<label>
|
335 |
+
<input type="radio" name="sbp_reason" value="It broke my site." />
|
336 |
+
' . __( 'It broke my site.', 'speed-booster-pack' ) . '
|
337 |
+
</label>
|
338 |
+
<label>
|
339 |
+
<input type="radio" name="sbp_reason" value="I found a better solution." />
|
340 |
+
' . __( 'I found a better solution.', 'speed-booster-pack' ) . '
|
341 |
+
</label>
|
342 |
+
<label>
|
343 |
+
<input type="radio" name="sbp_reason" value="I\'m just disabling temporarily." />
|
344 |
+
' . __( 'I\'m just disabling temporarily.', 'speed-booster-pack' ) . '
|
345 |
+
</label>
|
346 |
+
<label>
|
347 |
+
<input type="radio" name="sbp_reason" value="Other." />
|
348 |
+
' . __( 'Other (please specify below)', 'speed-booster-pack' ) . '
|
349 |
+
</label>
|
350 |
+
<label>
|
351 |
+
<textarea name="sbp_deactivation_description" class="widefat" style="display: none;"></textarea>
|
352 |
+
</label>
|
353 |
+
<input type="hidden" name="sbp_site_url" value="' . site_url() . '" />
|
354 |
+
<input type="hidden" name="sbp_version" value="' . SBP_VERSION . '" />
|
355 |
+
<hr>
|
356 |
+
<label>
|
357 |
+
<input type="checkbox" name="sbp_reply" />
|
358 |
+
' . __( 'I would like to get a response to my submission.', 'speed-booster-pack' ) . '
|
359 |
+
</label>
|
360 |
+
<label>
|
361 |
+
<input name="sbp_reply_email" type="email" class="widefat" value="' . $email . '" style="padding: 3px 5px; display: none;" />
|
362 |
+
</label>
|
363 |
+
<div class="sbp-deactivate-buttons-wrapper">
|
364 |
+
<button class="button button-primary submit-and-deactivate" disabled="disabled">' . __( 'Submit & Deactivate', 'speed-booster-pack' ) . '</button>
|
365 |
+
<button class="button button-secondary deactivate-plugin" type="button">' . __( 'Just Deactivate', 'speed-booster-pack' ) . '</button>
|
366 |
+
<button class="button button-secondary cancel-deactivation-survey" type="button">' . __( 'Cancel', 'speed-booster-pack' ) . '</button>
|
367 |
+
</div>
|
368 |
+
</form>
|
369 |
+
</div>
|
370 |
+
</div>
|
371 |
+
';
|
372 |
+
}
|
373 |
+
|
374 |
+
public function clear_custom_code_manager() {
|
375 |
+
|
376 |
+
$custom_code_manager_original = sbp_get_option( 'custom_codes', []);
|
377 |
+
if( sbp_get_option( 'custom_codes', []) ) {
|
378 |
+
|
379 |
+
$custom_code_manager_backup = '';
|
380 |
+
|
381 |
+
for( $i = 0; $i < count( $custom_code_manager_original ); $i++ ) {
|
382 |
+
$custom_code_manager_backup .= '<!-- Custom code #' . $i . ' (' . $custom_code_manager_original[$i]['custom_codes_place'] . ') -->' . PHP_EOL;
|
383 |
+
$custom_code_manager_backup .= '<script>' . PHP_EOL;
|
384 |
+
$custom_code_manager_backup .= $custom_code_manager_original[$i]['custom_codes_item'] . PHP_EOL;
|
385 |
+
$custom_code_manager_backup .= '</script>' . PHP_EOL . PHP_EOL;
|
386 |
+
}
|
387 |
+
|
388 |
+
update_option( 'sbp_custom_code_manager_backup', $custom_code_manager_backup );
|
389 |
+
|
390 |
+
$sbp_options = get_option( 'sbp_options' );
|
391 |
+
|
392 |
+
if ( $sbp_options ) {
|
393 |
+
unset( $sbp_options['custom_codes'] );
|
394 |
+
update_option( 'sbp_options', $sbp_options );
|
395 |
+
}
|
396 |
+
|
397 |
+
}
|
398 |
+
|
399 |
+
if( ! get_option( 'sbp_custom_code_manager_backup' ) ) { return; }
|
400 |
+
|
401 |
+
SBP_Notice_Manager::display_notice(
|
402 |
+
'custom_code_manager_backup',
|
403 |
+
'<p>' . __( 'Speed Booster Pack: We have removed the Custom Code Manager feature from our plugin because it\'s not totally related to performance. Since you were using this feature, here\'s a backup of your custom codes:', 'speed-booster-pack' ) . '</p>' .
|
404 |
+
'<textarea style="max-width: 100%; width: 600px; min-height: 150px;" readonly>' . get_option( 'sbp_custom_code_manager_backup' ) . '</textarea>' .
|
405 |
+
'<p>' . sprintf( __( 'You can use any plugin you want to add these custom codes (%s is a decent alternative). Better yet, you can use your theme if it has a custom code feature.', 'speed-booster-pack' ), '<a href="https://wordpress.org/plugins/insert-headers-and-footers/" target="_blank" rel="external nofollow">Insert Headers and Footers</a>' ) . '</p>' .
|
406 |
+
'<p><button class="button button-primary sbp-dismiss-ccm-notice notice-dismiss-button" data-notice-id="custom_code_manager_backup" data-notice-action="sbp_dismiss_notice">' . __( 'I copied the code, dismiss this notice', 'speed-booster-pack' ) . '</button></p>',
|
407 |
+
'warning',
|
408 |
+
false
|
409 |
+
);
|
410 |
+
|
411 |
+
}
|
412 |
+
|
413 |
+
public function dismiss_custom_code_manager_backup() {
|
414 |
+
|
415 |
+
if ( ! current_user_can( 'manage_options' ) || ! isset( $_GET['action'] ) || ! $_GET['action'] === 'sbp_dismiss_ccm_backup' ) { return; }
|
416 |
+
|
417 |
+
if ( ! wp_verify_nonce( $_GET['nonce'], 'sbp_ajax_nonce' ) ) {
|
418 |
+
echo wp_json_encode( [
|
419 |
+
'status' => 'failure',
|
420 |
+
'message' => __( 'Invalid nonce.', 'speed-booster-pack' ),
|
421 |
+
] );
|
422 |
+
wp_die();
|
423 |
+
}
|
424 |
+
|
425 |
+
delete_option( 'sbp_custom_code_manager_backup' );
|
426 |
+
|
427 |
+
echo wp_json_encode( [ 'status' => 'success', 'message' => 'Custom codes successfully removed.' ] );
|
428 |
+
wp_die();
|
429 |
+
|
430 |
+
}
|
431 |
+
|
432 |
}
|
includes/sbp-helpers.php
CHANGED
@@ -55,7 +55,8 @@ if ( ! function_exists( 'sbp_get_hosting_restrictions' ) ) {
|
|
55 |
return [
|
56 |
'name' => 'Kinsta',
|
57 |
'disabled_features' => [ 'caching' ],
|
58 |
-
|
|
|
59 |
];
|
60 |
}
|
61 |
|
@@ -63,7 +64,7 @@ if ( ! function_exists( 'sbp_get_hosting_restrictions' ) ) {
|
|
63 |
return [
|
64 |
'name' => 'WP Engine',
|
65 |
'disabled_features' => [],
|
66 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'WP Engine', 'WP Engine' ),
|
67 |
];
|
68 |
}
|
69 |
|
@@ -71,42 +72,42 @@ if ( ! function_exists( 'sbp_get_hosting_restrictions' ) ) {
|
|
71 |
'GD_SYSTEM_PLUGIN_DIR' => [
|
72 |
'name' => 'GoDaddy',
|
73 |
'disabled_features' => [],
|
74 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'GoDaddy', 'GoDaddy' ),
|
75 |
],
|
76 |
'MM_BASE_DIR' => [
|
77 |
'name' => 'Bluehost',
|
78 |
'disabled_features' => [],
|
79 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Bluehost', 'Bluehost' ),
|
80 |
],
|
81 |
'PAGELYBIN' => [
|
82 |
'name' => 'Pagely',
|
83 |
'disabled_features' => [],
|
84 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Pagely', 'Pagely' ),
|
85 |
],
|
86 |
'KINSTAMU_VERSION' => [
|
87 |
'name' => 'Kinsta',
|
88 |
'disabled_features' => [],
|
89 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Kinsta', 'Kinsta' ),
|
90 |
],
|
91 |
'FLYWHEEL_CONFIG_DIR' => [
|
92 |
'name' => 'Flywheel',
|
93 |
'disabled_features' => [],
|
94 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Flywheel', 'Flywheel' ),
|
95 |
],
|
96 |
'IS_PRESSABLE' => [
|
97 |
'name' => 'Pressable',
|
98 |
'disabled_features' => [],
|
99 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Pressable', 'Pressable' ),
|
100 |
],
|
101 |
'VIP_GO_ENV' => [
|
102 |
'name' => 'WordPress VIP',
|
103 |
'disabled_features' => [],
|
104 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'WordPress VIP', 'WordPress VIP' ),
|
105 |
],
|
106 |
'KINSTA_CACHE_ZONE' => [
|
107 |
'name' => 'Kinsta',
|
108 |
'disabled_features' => [ 'caching' ],
|
109 |
-
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.' ), 'Kinsta', 'Kinsta' ),
|
110 |
],
|
111 |
];
|
112 |
|
55 |
return [
|
56 |
'name' => 'Kinsta',
|
57 |
'disabled_features' => [ 'caching' ],
|
58 |
+
/* translators: both %s instances are the names of the hosting company. */
|
59 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Kinsta', 'Kinsta' ),
|
60 |
];
|
61 |
}
|
62 |
|
64 |
return [
|
65 |
'name' => 'WP Engine',
|
66 |
'disabled_features' => [],
|
67 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'WP Engine', 'WP Engine' ),
|
68 |
];
|
69 |
}
|
70 |
|
72 |
'GD_SYSTEM_PLUGIN_DIR' => [
|
73 |
'name' => 'GoDaddy',
|
74 |
'disabled_features' => [],
|
75 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'GoDaddy', 'GoDaddy' ),
|
76 |
],
|
77 |
'MM_BASE_DIR' => [
|
78 |
'name' => 'Bluehost',
|
79 |
'disabled_features' => [],
|
80 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Bluehost', 'Bluehost' ),
|
81 |
],
|
82 |
'PAGELYBIN' => [
|
83 |
'name' => 'Pagely',
|
84 |
'disabled_features' => [],
|
85 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Pagely', 'Pagely' ),
|
86 |
],
|
87 |
'KINSTAMU_VERSION' => [
|
88 |
'name' => 'Kinsta',
|
89 |
'disabled_features' => [],
|
90 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Kinsta', 'Kinsta' ),
|
91 |
],
|
92 |
'FLYWHEEL_CONFIG_DIR' => [
|
93 |
'name' => 'Flywheel',
|
94 |
'disabled_features' => [],
|
95 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Flywheel', 'Flywheel' ),
|
96 |
],
|
97 |
'IS_PRESSABLE' => [
|
98 |
'name' => 'Pressable',
|
99 |
'disabled_features' => [],
|
100 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Pressable', 'Pressable' ),
|
101 |
],
|
102 |
'VIP_GO_ENV' => [
|
103 |
'name' => 'WordPress VIP',
|
104 |
'disabled_features' => [],
|
105 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'WordPress VIP', 'WordPress VIP' ),
|
106 |
],
|
107 |
'KINSTA_CACHE_ZONE' => [
|
108 |
'name' => 'Kinsta',
|
109 |
'disabled_features' => [ 'caching' ],
|
110 |
+
'error_message' => sprintf( __( 'Since you\'re using %s, cache feature is completely disabled to ensure compatibility with internal caching system of %s.', 'speed-booster-pack' ), 'Kinsta', 'Kinsta' ),
|
111 |
],
|
112 |
];
|
113 |
|
public/class-speed-booster-pack-public.php
CHANGED
@@ -57,6 +57,7 @@ class Speed_Booster_Pack_Public {
|
|
57 |
* Basically a hook for functions which use output buffer
|
58 |
*/
|
59 |
public function template_redirect() {
|
|
|
60 |
ob_start( [ $this, 'output_buffer' ] );
|
61 |
}
|
62 |
|
@@ -67,6 +68,12 @@ class Speed_Booster_Pack_Public {
|
|
67 |
return $html;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
public function sbp_headers( $headers ) {
|
71 |
$headers['X-Powered-By'] = SBP_PLUGIN_NAME . ' v' . SBP_VERSION;
|
72 |
|
57 |
* Basically a hook for functions which use output buffer
|
58 |
*/
|
59 |
public function template_redirect() {
|
60 |
+
if ( is_admin() || wp_doing_cron() || wp_doing_ajax() ) { return; }
|
61 |
ob_start( [ $this, 'output_buffer' ] );
|
62 |
}
|
63 |
|
68 |
return $html;
|
69 |
}
|
70 |
|
71 |
+
public function shutdown() {
|
72 |
+
if ( ob_get_length() != false ) {
|
73 |
+
ob_end_flush();
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
public function sbp_headers( $headers ) {
|
78 |
$headers['X-Powered-By'] = SBP_PLUGIN_NAME . ' v' . SBP_VERSION;
|
79 |
|
public/js/lazyload.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/* lazyload.js - v17.
|
2 |
* https://github.com/verlok/vanilla-lazyload
|
3 |
* Copyright (c) 2020 Andrea Verlicchi; Licensed MIT */
|
4 |
-
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).LazyLoad=t()}(this,(function(){"use strict";function n(){return n=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var
|
1 |
+
/* lazyload.js - v17.7.0
|
2 |
* https://github.com/verlok/vanilla-lazyload
|
3 |
* Copyright (c) 2020 Andrea Verlicchi; Licensed MIT */
|
4 |
+
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).LazyLoad=t()}(this,(function(){"use strict";function n(){return n=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},n.apply(this,arguments)}var t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),o=t&&"IntersectionObserver"in window,i=t&&"classList"in document.createElement("p"),a=t&&window.devicePixelRatio>1,r={elements_selector:".lazy",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},c=function(t){return n({},r,t)},u=function(n,t){var e,o="LazyLoad::Initialized",i=new n(t);try{e=new CustomEvent(o,{detail:{instance:i}})}catch(n){(e=document.createEvent("CustomEvent")).initCustomEvent(o,!1,!1,{instance:i})}window.dispatchEvent(e)},l="src",s="srcset",f="sizes",d="poster",_="llOriginalAttrs",g="data",v="loading",b="loaded",p="applied",h="error",m="native",E="data-",I="ll-status",y=function(n,t){return n.getAttribute(E+t)},A=function(n){return y(n,I)},k=function(n,t){return function(n,t,e){var o="data-ll-status";null!==e?n.setAttribute(o,e):n.removeAttribute(o)}(n,0,t)},L=function(n){return k(n,null)},w=function(n){return null===A(n)},O=function(n){return A(n)===m},x=[v,b,p,h],C=function(n,t,e,o){n&&(void 0===o?void 0===e?n(t):n(t,e):n(t,e,o))},N=function(n,t){i?n.classList.add(t):n.className+=(n.className?" ":"")+t},M=function(n,t){i?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},z=function(n){return n.llTempImage},T=function(n,t){if(t){var e=t._observer;e&&e.unobserve(n)}},R=function(n,t){n&&(n.loadingCount+=t)},G=function(n,t){n&&(n.toLoadCount=t)},D=function(n){for(var t,e=[],o=0;t=n.children[o];o+=1)"SOURCE"===t.tagName&&e.push(t);return e},V=function(n,t){var e=n.parentNode;e&&"PICTURE"===e.tagName&&D(e).forEach(t)},F=function(n,t){D(n).forEach(t)},j=[l],B=[l,d],J=[l,s,f],P=[g],S=function(n){return!!n[_]},U=function(n){return n[_]},$=function(n){return delete n[_]},q=function(n,t){if(!S(n)){var e={};t.forEach((function(t){e[t]=n.getAttribute(t)})),n[_]=e}},H=function(n,t){if(S(n)){var e=U(n);t.forEach((function(t){!function(n,t,e){e?n.setAttribute(t,e):n.removeAttribute(t)}(n,t,e[t])}))}},K=function(n,t,e){N(n,t.class_loading),k(n,v),e&&(R(e,1),C(t.callback_loading,n,e))},Q=function(n,t,e){e&&n.setAttribute(t,e)},W=function(n,t){Q(n,f,y(n,t.data_sizes)),Q(n,s,y(n,t.data_srcset)),Q(n,l,y(n,t.data_src))},X={IMG:function(n,t){V(n,(function(n){q(n,J),W(n,t)})),q(n,J),W(n,t)},IFRAME:function(n,t){q(n,j),Q(n,l,y(n,t.data_src))},VIDEO:function(n,t){F(n,(function(n){q(n,j),Q(n,l,y(n,t.data_src))})),q(n,B),Q(n,d,y(n,t.data_poster)),Q(n,l,y(n,t.data_src)),n.load()},OBJECT:function(n,t){q(n,P),Q(n,g,y(n,t.data_src))}},Y=["IMG","IFRAME","VIDEO","OBJECT"],Z=function(n,t){!t||function(n){return n.loadingCount>0}(t)||function(n){return n.toLoadCount>0}(t)||C(n.callback_finish,t)},nn=function(n,t,e){n.addEventListener(t,e),n.llEvLisnrs[t]=e},tn=function(n,t,e){n.removeEventListener(t,e)},en=function(n){return!!n.llEvLisnrs},on=function(n){if(en(n)){var t=n.llEvLisnrs;for(var e in t){var o=t[e];tn(n,e,o)}delete n.llEvLisnrs}},an=function(n,t,e){!function(n){delete n.llTempImage}(n),R(e,-1),function(n){n&&(n.toLoadCount-=1)}(e),M(n,t.class_loading),t.unobserve_completed&&T(n,e)},rn=function(n,t,e){var o=z(n)||n;en(o)||function(n,t,e){en(n)||(n.llEvLisnrs={});var o="VIDEO"===n.tagName?"loadeddata":"load";nn(n,o,t),nn(n,"error",e)}(o,(function(i){!function(n,t,e,o){var i=O(t);an(t,e,o),N(t,e.class_loaded),k(t,b),C(e.callback_loaded,t,o),i||Z(e,o)}(0,n,t,e),on(o)}),(function(i){!function(n,t,e,o){var i=O(t);an(t,e,o),N(t,e.class_error),k(t,h),C(e.callback_error,t,o),e.restore_on_error&&H(t,J),i||Z(e,o)}(0,n,t,e),on(o)}))},cn=function(n,t,e){!function(n){n.llTempImage=document.createElement("IMG")}(n),rn(n,t,e),function(n){S(n)||(n[_]={backgroundImage:n.style.backgroundImage})}(n),function(n,t,e){var o=y(n,t.data_bg),i=y(n,t.data_bg_hidpi),r=a&&i?i:o;r&&(n.style.backgroundImage='url("'.concat(r,'")'),z(n).setAttribute(l,r),K(n,t,e))}(n,t,e),function(n,t,e){var o=y(n,t.data_bg_multi),i=y(n,t.data_bg_multi_hidpi),r=a&&i?i:o;r&&(n.style.backgroundImage=r,function(n,t,e){N(n,t.class_applied),k(n,p),e&&(t.unobserve_completed&&T(n,t),C(t.callback_applied,n,e))}(n,t,e))}(n,t,e)},un=function(n,t,e){!function(n){return Y.indexOf(n.tagName)>-1}(n)?cn(n,t,e):function(n,t,e){rn(n,t,e),function(n,t,e){var o=X[n.tagName];o&&(o(n,t),K(n,t,e))}(n,t,e)}(n,t,e)},ln=function(n){n.removeAttribute(l),n.removeAttribute(s),n.removeAttribute(f)},sn=function(n){V(n,(function(n){H(n,J)})),H(n,J)},fn={IMG:sn,IFRAME:function(n){H(n,j)},VIDEO:function(n){F(n,(function(n){H(n,j)})),H(n,B),n.load()},OBJECT:function(n){H(n,P)}},dn=function(n,t){(function(n){var t=fn[n.tagName];t?t(n):function(n){if(S(n)){var t=U(n);n.style.backgroundImage=t.backgroundImage}}(n)})(n),function(n,t){w(n)||O(n)||(M(n,t.class_entered),M(n,t.class_exited),M(n,t.class_applied),M(n,t.class_loading),M(n,t.class_loaded),M(n,t.class_error))}(n,t),L(n),$(n)},_n=["IMG","IFRAME","VIDEO"],gn=function(n){return n.use_native&&"loading"in HTMLImageElement.prototype},vn=function(n,t,e){n.forEach((function(n){return function(n){return n.isIntersecting||n.intersectionRatio>0}(n)?function(n,t,e,o){var i=function(n){return x.indexOf(A(n))>=0}(n);k(n,"entered"),N(n,e.class_entered),M(n,e.class_exited),function(n,t,e){t.unobserve_entered&&T(n,e)}(n,e,o),C(e.callback_enter,n,t,o),i||un(n,e,o)}(n.target,n,t,e):function(n,t,e,o){w(n)||(N(n,e.class_exited),function(n,t,e,o){e.cancel_on_exit&&function(n){return A(n)===v}(n)&&"IMG"===n.tagName&&(on(n),function(n){V(n,(function(n){ln(n)})),ln(n)}(n),sn(n),M(n,e.class_loading),R(o,-1),L(n),C(e.callback_cancel,n,t,o))}(n,t,e,o),C(e.callback_exit,n,t,o))}(n.target,n,t,e)}))},bn=function(n){return Array.prototype.slice.call(n)},pn=function(n){return n.container.querySelectorAll(n.elements_selector)},hn=function(n){return function(n){return A(n)===h}(n)},mn=function(n,t){return function(n){return bn(n).filter(w)}(n||pn(t))},En=function(n,e){var i=c(n);this._settings=i,this.loadingCount=0,function(n,t){o&&!gn(n)&&(t._observer=new IntersectionObserver((function(e){vn(e,n,t)}),function(n){return{root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}}(n)))}(i,this),function(n,e){t&&window.addEventListener("online",(function(){!function(n,t){var e;(e=pn(n),bn(e).filter(hn)).forEach((function(t){M(t,n.class_error),L(t)})),t.update()}(n,e)}))}(i,this),this.update(e)};return En.prototype={update:function(n){var t,i,a=this._settings,r=mn(n,a);G(this,r.length),!e&&o?gn(a)?function(n,t,e){n.forEach((function(n){-1!==_n.indexOf(n.tagName)&&function(n,t,e){n.setAttribute("loading","lazy"),rn(n,t,e),function(n,t){var e=X[n.tagName];e&&e(n,t)}(n,t),k(n,m)}(n,t,e)})),G(e,0)}(r,a,this):(i=r,function(n){n.disconnect()}(t=this._observer),function(n,t){t.forEach((function(t){n.observe(t)}))}(t,i)):this.loadAll(r)},destroy:function(){this._observer&&this._observer.disconnect(),pn(this._settings).forEach((function(n){$(n)})),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(n){var t=this,e=this._settings;mn(n,e).forEach((function(n){T(n,t),un(n,e,t)}))},restoreAll:function(){var n=this._settings;pn(n).forEach((function(t){dn(t,n)}))}},En.load=function(n,t){var e=c(t);un(n,e)},En.resetStatus=function(n){L(n)},t&&function(n,t){if(t)if(t.length)for(var e,o=0;e=t[o];o+=1)u(n,e);else u(n,t)}(En,window.lazyLoadOptions),En}));
|
speed-booster-pack.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Plugin Name: Speed Booster Pack
|
7 |
* Plugin URI: https://speedboosterpack.com
|
8 |
* Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
|
9 |
-
* Version: 4.
|
10 |
* Author: Optimocha
|
11 |
* Author URI: https://optimocha.com
|
12 |
* License: GPLv3 or later
|
@@ -32,7 +32,7 @@ define( 'SBP_PLUGIN_NAME', 'Speed Booster Pack' );
|
|
32 |
/**
|
33 |
* Current plugin version.
|
34 |
*/
|
35 |
-
define( 'SBP_VERSION', '4.
|
36 |
|
37 |
/**
|
38 |
* Plugin website URL.
|
@@ -97,7 +97,7 @@ define( 'SBP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
|
97 |
/**
|
98 |
* Migrator script version.
|
99 |
*/
|
100 |
-
define( 'SBP_MIGRATOR_VERSION', '
|
101 |
|
102 |
/**
|
103 |
* Load all plugin options
|
6 |
* Plugin Name: Speed Booster Pack
|
7 |
* Plugin URI: https://speedboosterpack.com
|
8 |
* Description: PageSpeed optimization is vital for SEO: A faster website equals better conversions. Optimize & cache your site with this smart plugin!
|
9 |
+
* Version: 4.5.0
|
10 |
* Author: Optimocha
|
11 |
* Author URI: https://optimocha.com
|
12 |
* License: GPLv3 or later
|
32 |
/**
|
33 |
* Current plugin version.
|
34 |
*/
|
35 |
+
define( 'SBP_VERSION', '4.5.0' );
|
36 |
|
37 |
/**
|
38 |
* Plugin website URL.
|
97 |
/**
|
98 |
* Migrator script version.
|
99 |
*/
|
100 |
+
define( 'SBP_MIGRATOR_VERSION', '45000' );
|
101 |
|
102 |
/**
|
103 |
* Load all plugin options
|
vendor/announce4wp/announce4wp-client.php
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! class_exists( "Announce4WP_Client" ) ) {
|
4 |
-
class Announce4WP_Client {
|
5 |
-
private $api_endpoint_url = '';
|
6 |
-
private $service_id = '';
|
7 |
-
private $settings_screen = '';
|
8 |
-
private $plugin_name = '';
|
9 |
-
private $plugin_file_name = '';
|
10 |
-
private $option_name = '';
|
11 |
-
|
12 |
-
public function __construct( $plugin_file_name, $plugin_name, $service_id, $api_endpoint_url, $settings_screen ) {
|
13 |
-
$this->service_id = $service_id;
|
14 |
-
$this->api_endpoint_url = $api_endpoint_url;
|
15 |
-
$this->settings_screen = $settings_screen;
|
16 |
-
$this->plugin_file_name = $plugin_file_name;
|
17 |
-
$this->plugin_name = $plugin_name;
|
18 |
-
$this->option_name = $this->service_id . '_announcements';
|
19 |
-
|
20 |
-
add_action( 'admin_init', [ $this, 'get_notices' ] );
|
21 |
-
|
22 |
-
// Enqueue Dismiss Script
|
23 |
-
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
|
24 |
-
|
25 |
-
// Admin Notices
|
26 |
-
add_action( 'admin_notices', [ $this, 'display_notices' ] );
|
27 |
-
|
28 |
-
// Dismiss Notice Action
|
29 |
-
add_action( 'wp_ajax_a4wp_dismiss_notice', [ $this, 'dismiss_notice' ] );
|
30 |
-
}
|
31 |
-
|
32 |
-
public function get_notices() {
|
33 |
-
|
34 |
-
if( ! current_user_can( 'manage_options' ) || wp_doing_ajax() ) {
|
35 |
-
return;
|
36 |
-
}
|
37 |
-
|
38 |
-
$notices = get_option( $this->option_name );
|
39 |
-
|
40 |
-
if( $notices && time() < $notices['expiry'] ) {
|
41 |
-
return;
|
42 |
-
}
|
43 |
-
|
44 |
-
$notices_expiry = 24 * 3600;
|
45 |
-
$error_expiry = 3600;
|
46 |
-
|
47 |
-
$data = wp_remote_get( $this->api_endpoint_url );
|
48 |
-
|
49 |
-
if ( is_array( $data ) && ! is_wp_error( $data ) ) {
|
50 |
-
|
51 |
-
update_option( $this->option_name, [
|
52 |
-
'data' => json_decode( $data['body'], true ),
|
53 |
-
'expiry' => time() + $notices_expiry
|
54 |
-
] );
|
55 |
-
|
56 |
-
} else {
|
57 |
-
|
58 |
-
update_option( $this->option_name, [
|
59 |
-
'data' => 'error',
|
60 |
-
'expiry' => time() + $error_expiry
|
61 |
-
] );
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
return;
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
public function enqueue_scripts() {
|
70 |
-
wp_add_inline_script( 'jquery',
|
71 |
-
'jQuery(document).on(\'click\', \'.a4wp-notice .notice-dismiss\', function() {
|
72 |
-
var $notice = jQuery(this).parent();
|
73 |
-
var notice_id = $notice.data(\'notice-id\');
|
74 |
-
var service_id = $notice.data(\'service-id\');
|
75 |
-
var data = {action: \'a4wp_dismiss_notice\', notice_id: notice_id, service_id: service_id};
|
76 |
-
jQuery.get(ajaxurl, data);
|
77 |
-
});' );
|
78 |
-
}
|
79 |
-
|
80 |
-
public function dismiss_notice() {
|
81 |
-
if ( current_user_can( 'manage_options' ) && isset( $_GET['action'] ) && $_GET['action'] == 'a4wp_dismiss_notice' ) {
|
82 |
-
$id = $_GET['notice_id'];
|
83 |
-
$service_id = $_GET['service_id'];
|
84 |
-
if ( ! $service_id || $service_id != $this->service_id ) {
|
85 |
-
return;
|
86 |
-
}
|
87 |
-
$last_ids = get_user_meta( get_current_user_id(), $this->service_id . '_dismissed_notices', true );
|
88 |
-
$last_ids = $last_ids == '' ? [] : $last_ids;
|
89 |
-
$last_ids[ $this->service_id ][] = $id;
|
90 |
-
$last_ids[ $this->service_id ] = array_unique( $last_ids[ $this->service_id ] );
|
91 |
-
update_user_meta( get_current_user_id(), $this->service_id . '_dismissed_notices', $last_ids );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
private function parse_attributes( $rules ) {
|
96 |
-
if ( ! $rules ) {
|
97 |
-
return [];
|
98 |
-
}
|
99 |
-
|
100 |
-
$attributes = [];
|
101 |
-
foreach ( $rules as $rule ) {
|
102 |
-
if ( strpos( $rule, ":" ) !== false ) {
|
103 |
-
list( $type, $rule ) = explode( ":", $rule );
|
104 |
-
$attributes[ $type ] = $rule;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
return $attributes;
|
109 |
-
}
|
110 |
-
|
111 |
-
public function display_notices() {
|
112 |
-
$announcements = get_option( $this->option_name );
|
113 |
-
if ( is_array( $announcements['data'] ) && isset( $announcements['data']['normal_notices'] ) ) {
|
114 |
-
foreach ( $announcements['data']['normal_notices'] as $notice ) {
|
115 |
-
$attributes = $this->parse_attributes( $notice['rules'] );
|
116 |
-
$this->print_notice( $attributes, $notice );
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
if ( is_array( $announcements['data'] ) && isset( $announcements['data']["important_notices"] ) ) {
|
121 |
-
foreach ( $announcements['data']["important_notices"] as $notice ) {
|
122 |
-
$attributes = $this->parse_attributes( $notice['rules'] );
|
123 |
-
$this->print_notice( $attributes, $notice, true );
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
private function print_notice( $attributes, $notice, $is_important = false ) {
|
129 |
-
$type = isset( $attributes['type'] ) ? $attributes['type'] : 'notice-info';
|
130 |
-
if ( true === $is_important ) {
|
131 |
-
$should_display = $this->should_display( $attributes );
|
132 |
-
} else {
|
133 |
-
$should_display = $this->should_display( $attributes, $notice );
|
134 |
-
}
|
135 |
-
if ( $should_display ) {
|
136 |
-
echo '<div class="notice a4wp-notice ' . $type . ' ' . ( ! $is_important ? 'is-dismissible' : null ) . '" data-service-id="' . $this->service_id . '" data-notice-id="' . $notice['id'] . '">';
|
137 |
-
echo ( $notice['title'] ) ? '<p style="font-size:120%;font-weight:700;">' . $notice['title'] . '</p>' : null;
|
138 |
-
echo ( $notice['content'] ) ? '<p>' . $notice['content'] . '</p>' : null;
|
139 |
-
echo '</div>';
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @param $attributes
|
145 |
-
* @param null $notice required for notices
|
146 |
-
*
|
147 |
-
* @return bool
|
148 |
-
*/
|
149 |
-
private function should_display( $attributes, $notice = null ) {
|
150 |
-
// Check Page
|
151 |
-
$page = isset( $attributes['page'] ) ? $attributes['page'] : $this->settings_screen;
|
152 |
-
if ( $page != "all" && $page != get_current_screen()->id ) {
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
if ( null !== $notice ) {
|
157 |
-
$dismissed_ids = get_user_meta( get_current_user_id(), $this->service_id . '_dismissed_notices', true );
|
158 |
-
if ( is_array( $dismissed_ids ) ) {
|
159 |
-
if ( isset( $dismissed_ids[ $this->service_id ] ) && in_array( $notice['id'], $dismissed_ids[ $this->service_id ] ) ) {
|
160 |
-
return false;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
return true;
|
166 |
-
}
|
167 |
-
}
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codestar-framework/assets/css/style.css
CHANGED
@@ -1,5176 +1,5171 @@
|
|
1 |
-
/**
|
2 |
-
*
|
3 |
-
* ---------------------------------------------------------
|
4 |
-
* CODESTAR FRAMEWORK CSS MAP
|
5 |
-
* ---------------------------------------------------------
|
6 |
-
*
|
7 |
-
* 01. Base
|
8 |
-
* 01. 01. Header
|
9 |
-
* 01. 02. Sticky
|
10 |
-
* 01. 03. Header Buttons
|
11 |
-
* 01. 04. Navigation
|
12 |
-
* 01. 05. Wrapper
|
13 |
-
* 01. 06. Content
|
14 |
-
* 01. 07. Section
|
15 |
-
* 01. 08. Footer
|
16 |
-
* 01. 09. Copyright
|
17 |
-
* 01. 10. Show All Settings
|
18 |
-
* 01. 11. Search Input
|
19 |
-
* 01. 12. Metabox
|
20 |
-
* 01. 13. Comment Metabox
|
21 |
-
* 01. 14. Help Tooltip
|
22 |
-
* 02. Themes
|
23 |
-
* 02. 01. Theme Dark
|
24 |
-
* 02. 02. Theme Light
|
25 |
-
* 03. Fields
|
26 |
-
* 03. 01. Field
|
27 |
-
* 03. 02. Field: accordion
|
28 |
-
* 03. 03. Field: background
|
29 |
-
* 03. 04. Field: backup
|
30 |
-
* 03. 05. Field: border, spacing, dimensions
|
31 |
-
* 03. 06. Field: button_set
|
32 |
-
* 03. 07. Field: checkbox, radio
|
33 |
-
* 03. 08. Field: code_editor
|
34 |
-
* 03. 09. Field: color
|
35 |
-
* 03. 10. Field: color_group
|
36 |
-
* 03. 11. Field: fieldset
|
37 |
-
* 03. 12. Field: date
|
38 |
-
* 03. 13. Field: datetime
|
39 |
-
* 03. 14. Field: gallery
|
40 |
-
* 03. 15. Field: group
|
41 |
-
* 03. 16. Field: icon
|
42 |
-
* 03. 17. Field: image_select
|
43 |
-
* 03. 18. Field: link_color
|
44 |
-
* 03. 19. Field: map
|
45 |
-
* 03. 20. Field: media
|
46 |
-
* 03. 21. Field: palette
|
47 |
-
* 03. 22. Field: repeater
|
48 |
-
* 03. 23. Field: select
|
49 |
-
* 03. 24. Field: slider
|
50 |
-
* 03. 25. Field: sortable
|
51 |
-
* 03. 26. Field: sorter
|
52 |
-
* 03. 27. Field: spinner
|
53 |
-
* 03. 28. Field: switcher
|
54 |
-
* 03. 29. Field: tabbed
|
55 |
-
* 03. 30. Field: text
|
56 |
-
* 03. 31. Field: textarea
|
57 |
-
* 03. 32. Field: typography
|
58 |
-
* 03. 33. Field: upload
|
59 |
-
* 03. 34. Field: wp_editor
|
60 |
-
* 03. 35. Field: heading
|
61 |
-
* 03. 36. Field: subheading
|
62 |
-
* 03. 37. Field: submessage
|
63 |
-
* 03. 38. Field: notice
|
64 |
-
* 03. 39. Field: number
|
65 |
-
* 03. 40. Field: link
|
66 |
-
* 03. 41. Field: others
|
67 |
-
* 04. Widget
|
68 |
-
* 05. Customizer
|
69 |
-
* 06. Taxonomy
|
70 |
-
* 07. Profile
|
71 |
-
* 08. Nav Menu
|
72 |
-
* 09. Modal
|
73 |
-
* 09. 01. Shortcode Modal
|
74 |
-
* 09. 02. Gutenberg Modal
|
75 |
-
* 09. 03. Icon Modal
|
76 |
-
* 10. Helper
|
77 |
-
* 11. Welcome Page
|
78 |
-
* 12. Responsive
|
79 |
-
* 13. Others
|
80 |
-
*
|
81 |
-
* ---------------------------------------------------------
|
82 |
-
*
|
83 |
-
*/
|
84 |
-
/**
|
85 |
-
* 01. Base
|
86 |
-
*/
|
87 |
-
.csf {
|
88 |
-
position: relative;
|
89 |
-
}
|
90 |
-
.csf label {
|
91 |
-
padding: 0;
|
92 |
-
margin: 0;
|
93 |
-
display: inline-block;
|
94 |
-
}
|
95 |
-
|
96 |
-
.csf-ab-icon {
|
97 |
-
top: 2px;
|
98 |
-
}
|
99 |
-
|
100 |
-
#screen-meta-links + .csf-options {
|
101 |
-
margin-top: 40px;
|
102 |
-
}
|
103 |
-
|
104 |
-
.csf-options {
|
105 |
-
margin-top: 20px;
|
106 |
-
margin-right: 20px;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* 01. 01. Header
|
111 |
-
*/
|
112 |
-
.csf-header {
|
113 |
-
position: relative;
|
114 |
-
}
|
115 |
-
|
116 |
-
.csf-header-inner {
|
117 |
-
padding: 25px;
|
118 |
-
transition: box-shadow .3s ease;
|
119 |
-
}
|
120 |
-
.csf-header-inner h1 {
|
121 |
-
float: left;
|
122 |
-
font-size: 1.5em;
|
123 |
-
line-height: 26px;
|
124 |
-
font-weight: 400;
|
125 |
-
margin: 0;
|
126 |
-
}
|
127 |
-
.csf-header-inner h1 small {
|
128 |
-
font-size: 11px;
|
129 |
-
font-weight: 500;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* 01. 02. Sticky
|
134 |
-
*/
|
135 |
-
.csf-sticky .csf-header-inner {
|
136 |
-
position: fixed;
|
137 |
-
z-index: 99;
|
138 |
-
top: 32px;
|
139 |
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* 01. 03. Header Buttons
|
144 |
-
*/
|
145 |
-
.csf-buttons {
|
146 |
-
float: right;
|
147 |
-
}
|
148 |
-
.csf-buttons .button {
|
149 |
-
margin: 0 2px;
|
150 |
-
line-height: 26px;
|
151 |
-
}
|
152 |
-
.csf-buttons .button:focus {
|
153 |
-
outline: none !important;
|
154 |
-
box-shadow: none !important;
|
155 |
-
}
|
156 |
-
.csf-buttons .csf-save {
|
157 |
-
min-width: 72px;
|
158 |
-
}
|
159 |
-
|
160 |
-
.csf-header-left {
|
161 |
-
float: left;
|
162 |
-
}
|
163 |
-
|
164 |
-
.csf-header-right {
|
165 |
-
float: right;
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* 01. 04. Navigation
|
170 |
-
*/
|
171 |
-
.csf-nav {
|
172 |
-
display: block;
|
173 |
-
position: relative;
|
174 |
-
z-index: 10;
|
175 |
-
float: left;
|
176 |
-
}
|
177 |
-
.csf-nav ul {
|
178 |
-
clear: left;
|
179 |
-
margin: 0;
|
180 |
-
list-style-type: none;
|
181 |
-
}
|
182 |
-
.csf-nav ul li {
|
183 |
-
margin-bottom: 0;
|
184 |
-
}
|
185 |
-
.csf-nav ul li a {
|
186 |
-
font-size: 13px;
|
187 |
-
position: relative;
|
188 |
-
display: block;
|
189 |
-
padding: 14px 12px;
|
190 |
-
text-decoration: none;
|
191 |
-
transition-property: color, background;
|
192 |
-
transition-duration: 0.2s;
|
193 |
-
transition-timing-function: ease;
|
194 |
-
}
|
195 |
-
.csf-nav ul li a:focus {
|
196 |
-
outline: none;
|
197 |
-
box-shadow: none;
|
198 |
-
}
|
199 |
-
.csf-nav ul li .csf-arrow:after {
|
200 |
-
content: "\f054";
|
201 |
-
display: inline-block;
|
202 |
-
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
203 |
-
font-weight: 900;
|
204 |
-
font-size: 9px;
|
205 |
-
line-height: 1;
|
206 |
-
position: absolute;
|
207 |
-
right: 10px;
|
208 |
-
top: 50%;
|
209 |
-
margin-top: -4px;
|
210 |
-
}
|
211 |
-
.csf-nav ul li.csf-tab-expanded .csf-arrow:after {
|
212 |
-
transform: rotate(90deg);
|
213 |
-
}
|
214 |
-
.csf-nav ul li.csf-tab-expanded ul {
|
215 |
-
display: block;
|
216 |
-
}
|
217 |
-
.csf-nav ul ul {
|
218 |
-
display: none;
|
219 |
-
position: relative;
|
220 |
-
}
|
221 |
-
.csf-nav ul ul li a {
|
222 |
-
font-size: 12px;
|
223 |
-
padding: 12px 14px 12px 24px;
|
224 |
-
}
|
225 |
-
.csf-nav .csf-tab-icon {
|
226 |
-
width: 20px;
|
227 |
-
margin-right: 5px;
|
228 |
-
font-size: 13px;
|
229 |
-
text-align: center;
|
230 |
-
}
|
231 |
-
.csf-nav .csf-label-error {
|
232 |
-
margin-left: 4px;
|
233 |
-
vertical-align: top;
|
234 |
-
}
|
235 |
-
|
236 |
-
.csf-nav-normal {
|
237 |
-
width: 225px;
|
238 |
-
}
|
239 |
-
.csf-nav-normal + .csf-content {
|
240 |
-
margin-left: 225px;
|
241 |
-
}
|
242 |
-
|
243 |
-
.csf-nav-inline {
|
244 |
-
width: 100%;
|
245 |
-
}
|
246 |
-
.csf-nav-inline ul li {
|
247 |
-
display: inline-block;
|
248 |
-
vertical-align: top;
|
249 |
-
}
|
250 |
-
|
251 |
-
.csf-nav-background {
|
252 |
-
position: absolute;
|
253 |
-
top: 0;
|
254 |
-
left: 0;
|
255 |
-
bottom: 0;
|
256 |
-
z-index: 9;
|
257 |
-
width: 225px;
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* 01. 05. Wrapper
|
262 |
-
*/
|
263 |
-
.csf-wrapper {
|
264 |
-
position: relative;
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* 01. 06. Content
|
269 |
-
*/
|
270 |
-
.csf-content {
|
271 |
-
position: relative;
|
272 |
-
background-color: #fff;
|
273 |
-
}
|
274 |
-
|
275 |
-
/**
|
276 |
-
* 01. 07. Section
|
277 |
-
*/
|
278 |
-
.csf-sections {
|
279 |
-
float: left;
|
280 |
-
width: 100%;
|
281 |
-
}
|
282 |
-
|
283 |
-
.csf-section-title {
|
284 |
-
display: none;
|
285 |
-
padding: 20px 30px;
|
286 |
-
background-color: #f5f5f5;
|
287 |
-
border-top: 1px solid #eee;
|
288 |
-
border-bottom: 1px solid #eee;
|
289 |
-
}
|
290 |
-
.csf-section-title h3 {
|
291 |
-
margin: 0;
|
292 |
-
padding: 0;
|
293 |
-
font-size: 13px;
|
294 |
-
font-weight: bold;
|
295 |
-
text-transform: uppercase;
|
296 |
-
}
|
297 |
-
.csf-section-title .csf-section-icon {
|
298 |
-
margin-right: 5px;
|
299 |
-
}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* 01. 08. Footer
|
303 |
-
*/
|
304 |
-
.csf-footer {
|
305 |
-
padding: 20px;
|
306 |
-
font-size: 11px;
|
307 |
-
}
|
308 |
-
|
309 |
-
/**
|
310 |
-
* 01. 09. Copyright
|
311 |
-
*/
|
312 |
-
.csf-copyright {
|
313 |
-
float: left;
|
314 |
-
margin-top: 5px;
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* 01. 10. Show All Settings
|
319 |
-
*/
|
320 |
-
.csf-search-all .csf-nav-background,
|
321 |
-
.csf-search-all .csf-nav,
|
322 |
-
.csf-show-all .csf-nav-background,
|
323 |
-
.csf-show-all .csf-nav {
|
324 |
-
display: none;
|
325 |
-
}
|
326 |
-
.csf-search-all .csf-content,
|
327 |
-
.csf-show-all .csf-content {
|
328 |
-
margin-left: 0;
|
329 |
-
}
|
330 |
-
.csf-search-all .csf-section-title,
|
331 |
-
.csf-search-all .csf-section,
|
332 |
-
.csf-show-all .csf-section-title,
|
333 |
-
.csf-show-all .csf-section {
|
334 |
-
display: block !important;
|
335 |
-
}
|
336 |
-
|
337 |
-
.csf-search-all .csf-section-title {
|
338 |
-
display: none !important;
|
339 |
-
}
|
340 |
-
|
341 |
-
.csf-expand-all {
|
342 |
-
float: left;
|
343 |
-
padding: 0 8px;
|
344 |
-
margin-right: 4px;
|
345 |
-
z-index: 1;
|
346 |
-
font-size: 13px;
|
347 |
-
line-height: 30px;
|
348 |
-
cursor: pointer;
|
349 |
-
user-select: none;
|
350 |
-
border-radius: 2px;
|
351 |
-
transition: all .2s;
|
352 |
-
}
|
353 |
-
.csf-expand-all span {
|
354 |
-
font-size: 11px;
|
355 |
-
vertical-align: middle;
|
356 |
-
}
|
357 |
-
|
358 |
-
/**
|
359 |
-
* 01. 11. Search Input
|
360 |
-
*/
|
361 |
-
.csf-search {
|
362 |
-
float: left;
|
363 |
-
}
|
364 |
-
.csf-search input {
|
365 |
-
margin: 0 2px 0 0;
|
366 |
-
border: none;
|
367 |
-
font-size: 12px;
|
368 |
-
line-height: 30px;
|
369 |
-
min-height: 30px;
|
370 |
-
text-align: inherit;
|
371 |
-
padding: 0 10px;
|
372 |
-
border-radius: 2px;
|
373 |
-
box-shadow: none;
|
374 |
-
}
|
375 |
-
.csf-search input:focus {
|
376 |
-
box-shadow: none;
|
377 |
-
}
|
378 |
-
|
379 |
-
.csf-saving .csf-buttons,
|
380 |
-
.csf-saving .csf-content {
|
381 |
-
cursor: default;
|
382 |
-
pointer-events: none;
|
383 |
-
opacity: 0.5;
|
384 |
-
}
|
385 |
-
|
386 |
-
/**
|
387 |
-
* 01. 12. Metabox
|
388 |
-
*/
|
389 |
-
.csf-metabox {
|
390 |
-
margin: -6px -12px -12px -12px;
|
391 |
-
}
|
392 |
-
.csf-metabox .csf-field {
|
393 |
-
padding: 20px;
|
394 |
-
}
|
395 |
-
.csf-metabox .csf-section-title {
|
396 |
-
padding: 20px;
|
397 |
-
}
|
398 |
-
|
399 |
-
.block-editor-page .csf-metabox {
|
400 |
-
margin: -6px -14px -14px -14px;
|
401 |
-
}
|
402 |
-
|
403 |
-
.block-editor-editor-skeleton__content .csf-metabox {
|
404 |
-
border-left: 1px solid #e2e4e7;
|
405 |
-
border-right: 1px solid #e2e4e7;
|
406 |
-
}
|
407 |
-
|
408 |
-
.csf-sections-reset {
|
409 |
-
float: left;
|
410 |
-
width: 100%;
|
411 |
-
text-align: right;
|
412 |
-
border-top: 1px solid #eee;
|
413 |
-
}
|
414 |
-
.csf-sections-reset .csf-button-cancel,
|
415 |
-
.csf-sections-reset input {
|
416 |
-
display: none;
|
417 |
-
}
|
418 |
-
.csf-sections-reset label {
|
419 |
-
padding: 10px;
|
420 |
-
}
|
421 |
-
.csf-sections-reset span {
|
422 |
-
-webkit-user-select: none;
|
423 |
-
user-select: none;
|
424 |
-
}
|
425 |
-
.csf-sections-reset input:checked ~ .csf-button-reset {
|
426 |
-
display: none;
|
427 |
-
}
|
428 |
-
.csf-sections-reset input:checked ~ .csf-button-cancel {
|
429 |
-
display: inline-block;
|
430 |
-
}
|
431 |
-
|
432 |
-
#side-sortables .csf-section-title {
|
433 |
-
padding: 12px;
|
434 |
-
}
|
435 |
-
#side-sortables .csf-field {
|
436 |
-
padding: 10px 15px;
|
437 |
-
}
|
438 |
-
#side-sortables .csf-field .csf-title {
|
439 |
-
float: none;
|
440 |
-
width: 100%;
|
441 |
-
margin-bottom: 6px;
|
442 |
-
}
|
443 |
-
#side-sortables .csf-field .csf-fieldset {
|
444 |
-
float: none;
|
445 |
-
width: 100%;
|
446 |
-
}
|
447 |
-
#side-sortables .csf-field-text input {
|
448 |
-
width: 100%;
|
449 |
-
}
|
450 |
-
#side-sortables .csf-notice {
|
451 |
-
padding: 10px 15px;
|
452 |
-
}
|
453 |
-
|
454 |
-
/**
|
455 |
-
* 01. 13. Comment Metabox
|
456 |
-
*/
|
457 |
-
.csf-comment-metabox {
|
458 |
-
margin: -6px -12px -12px -12px;
|
459 |
-
}
|
460 |
-
.csf-comment-metabox .csf-field {
|
461 |
-
padding: 20px;
|
462 |
-
}
|
463 |
-
.csf-comment-metabox .csf-section-title {
|
464 |
-
padding: 20px;
|
465 |
-
}
|
466 |
-
|
467 |
-
/**
|
468 |
-
* 01. 14. Help Tooltip
|
469 |
-
*/
|
470 |
-
.csf-tooltip {
|
471 |
-
position: absolute;
|
472 |
-
z-index: 5000001;
|
473 |
-
font-size: 12px;
|
474 |
-
line-height: 1.4;
|
475 |
-
text-align: center;
|
476 |
-
text-decoration: none;
|
477 |
-
padding: 6px 12px;
|
478 |
-
max-width: 200px;
|
479 |
-
color: #fff;
|
480 |
-
background-color: #000;
|
481 |
-
background-color: rgba(0, 0, 0, 0.85);
|
482 |
-
border-radius: 4px;
|
483 |
-
}
|
484 |
-
|
485 |
-
/**
|
486 |
-
* 02. Themes
|
487 |
-
*/
|
488 |
-
/**
|
489 |
-
* 02. 01. Theme Dark
|
490 |
-
*/
|
491 |
-
.csf-theme-dark .csf-header-inner {
|
492 |
-
background-color: #050505;
|
493 |
-
}
|
494 |
-
.csf-theme-dark .csf-header-inner h1 {
|
495 |
-
color: #fff;
|
496 |
-
}
|
497 |
-
.csf-theme-dark .csf-header-inner h1 small {
|
498 |
-
color: #555;
|
499 |
-
}
|
500 |
-
.csf-theme-dark .csf-expand-all {
|
501 |
-
color: #999;
|
502 |
-
background-color: #222;
|
503 |
-
}
|
504 |
-
.csf-theme-dark .csf-expand-all:hover {
|
505 |
-
color: #fff;
|
506 |
-
background-color: #333;
|
507 |
-
}
|
508 |
-
.csf-theme-dark .csf-search input {
|
509 |
-
color: #fff;
|
510 |
-
background-color: #222;
|
511 |
-
}
|
512 |
-
.csf-theme-dark .csf-search:focus {
|
513 |
-
background-color: #444;
|
514 |
-
}
|
515 |
-
.csf-theme-dark .csf-search::-webkit-input-placeholder {
|
516 |
-
color: #666;
|
517 |
-
}
|
518 |
-
.csf-theme-dark .csf-nav ul li a {
|
519 |
-
color: #999;
|
520 |
-
border-color: #2f2f2f;
|
521 |
-
background-color: #222;
|
522 |
-
}
|
523 |
-
.csf-theme-dark .csf-nav ul li a:hover {
|
524 |
-
color: #fff;
|
525 |
-
}
|
526 |
-
.csf-theme-dark .csf-nav ul li .csf-active {
|
527 |
-
color: #fff;
|
528 |
-
background-color: #111;
|
529 |
-
}
|
530 |
-
.csf-theme-dark .csf-nav ul ul li a {
|
531 |
-
border-color: #2f2f2f;
|
532 |
-
background-color: #191919;
|
533 |
-
}
|
534 |
-
.csf-theme-dark .csf-nav ul ul li .csf-active {
|
535 |
-
background-color: #101010;
|
536 |
-
}
|
537 |
-
.csf-theme-dark .csf-nav ul ul:before {
|
538 |
-
background-color: rgba(34, 34, 34, 0.75);
|
539 |
-
}
|
540 |
-
.csf-theme-dark .csf-nav > ul > li:last-child > a {
|
541 |
-
border: none;
|
542 |
-
}
|
543 |
-
.csf-theme-dark .csf-nav-normal ul li a {
|
544 |
-
border-bottom-width: 1px;
|
545 |
-
border-bottom-style: solid;
|
546 |
-
}
|
547 |
-
.csf-theme-dark .csf-nav-normal ul li .csf-active:after {
|
548 |
-
content: " ";
|
549 |
-
position: absolute;
|
550 |
-
right: 0;
|
551 |
-
top: 50%;
|
552 |
-
height: 0;
|
553 |
-
width: 0;
|
554 |
-
pointer-events: none;
|
555 |
-
border: solid transparent;
|
556 |
-
border-right-color: #fff;
|
557 |
-
border-width: 4px;
|
558 |
-
margin-top: -4px;
|
559 |
-
}
|
560 |
-
.csf-theme-dark .csf-nav-inline {
|
561 |
-
background-color: #222;
|
562 |
-
}
|
563 |
-
.csf-theme-dark .csf-nav-inline ul li a {
|
564 |
-
text-align: center;
|
565 |
-
border-right-width: 1px;
|
566 |
-
border-right-style: solid;
|
567 |
-
}
|
568 |
-
.csf-theme-dark .csf-nav-inline ul li .csf-active:after {
|
569 |
-
content: " ";
|
570 |
-
position: absolute;
|
571 |
-
left: 50%;
|
572 |
-
bottom: 0;
|
573 |
-
height: 0;
|
574 |
-
width: 0;
|
575 |
-
pointer-events: none;
|
576 |
-
border: solid transparent;
|
577 |
-
border-bottom-color: #fff;
|
578 |
-
border-width: 4px;
|
579 |
-
margin-left: -4px;
|
580 |
-
}
|
581 |
-
.csf-theme-dark .csf-nav-background {
|
582 |
-
background-color: #222;
|
583 |
-
}
|
584 |
-
.csf-theme-dark .csf-footer {
|
585 |
-
color: #555;
|
586 |
-
background-color: #050505;
|
587 |
-
}
|
588 |
-
|
589 |
-
/**
|
590 |
-
* 02. 02. Theme Light
|
591 |
-
*/
|
592 |
-
.csf-theme-light .csf-container {
|
593 |
-
border: 1px solid #ccd0d4;
|
594 |
-
box-shadow: 0 0 15 rgba(0, 0, 0, 0.04);
|
595 |
-
}
|
596 |
-
.csf-theme-light .csf-header-inner {
|
597 |
-
border-bottom: 1px solid #ccd0d4;
|
598 |
-
background-color: #f5f5f5;
|
599 |
-
background: linear-gradient(#fefefe, #f5f5f5);
|
600 |
-
}
|
601 |
-
.csf-theme-light .csf-header-inner h1 small {
|
602 |
-
color: #999;
|
603 |
-
}
|
604 |
-
.csf-theme-light .csf-expand-all {
|
605 |
-
color: #999;
|
606 |
-
background-color: #eee;
|
607 |
-
}
|
608 |
-
.csf-theme-light .csf-expand-all:hover {
|
609 |
-
color: #555;
|
610 |
-
}
|
611 |
-
.csf-theme-light .csf-search input {
|
612 |
-
color: #555;
|
613 |
-
background-color: #eee;
|
614 |
-
}
|
615 |
-
.csf-theme-light .csf-search input::-webkit-input-placeholder {
|
616 |
-
color: #999;
|
617 |
-
}
|
618 |
-
.csf-theme-light .csf-nav ul li a {
|
619 |
-
font-weight: 500;
|
620 |
-
color: #444;
|
621 |
-
background-color: #f5f5f5;
|
622 |
-
}
|
623 |
-
.csf-theme-light .csf-nav ul li a:hover {
|
624 |
-
color: #111;
|
625 |
-
background-color: #fff;
|
626 |
-
}
|
627 |
-
.csf-theme-light .csf-nav ul li .csf-active {
|
628 |
-
color: #111;
|
629 |
-
background-color: #fff;
|
630 |
-
}
|
631 |
-
.csf-theme-light .csf-nav ul ul li a {
|
632 |
-
background-color: #eee;
|
633 |
-
}
|
634 |
-
.csf-theme-light .csf-nav-normal > ul {
|
635 |
-
margin-right: -1px;
|
636 |
-
margin-bottom: -1px;
|
637 |
-
}
|
638 |
-
.csf-theme-light .csf-nav-normal > ul li a {
|
639 |
-
border-bottom: 1px solid #ccd0d4;
|
640 |
-
border-right: 1px solid #ccd0d4;
|
641 |
-
}
|
642 |
-
.csf-theme-light .csf-nav-normal > ul li .csf-active {
|
643 |
-
border-right-color: #fff;
|
644 |
-
}
|
645 |
-
.csf-theme-light .csf-nav-inline {
|
646 |
-
background-color: #f5f5f5;
|
647 |
-
border-bottom: 1px solid #ccd0d4;
|
648 |
-
}
|
649 |
-
.csf-theme-light .csf-nav-inline > ul {
|
650 |
-
margin-bottom: -1px;
|
651 |
-
}
|
652 |
-
.csf-theme-light .csf-nav-inline > ul li a {
|
653 |
-
text-align: center;
|
654 |
-
border-right: 1px solid #ccd0d4;
|
655 |
-
border-bottom: 1px solid #ccd0d4;
|
656 |
-
}
|
657 |
-
.csf-theme-light .csf-nav-inline > ul li .csf-active {
|
658 |
-
border-bottom-color: #fff;
|
659 |
-
}
|
660 |
-
.csf-theme-light .csf-nav-inline > ul ul {
|
661 |
-
display: none !important;
|
662 |
-
}
|
663 |
-
.csf-theme-light .csf-nav-inline .csf-arrow:after {
|
664 |
-
display: none;
|
665 |
-
}
|
666 |
-
.csf-theme-light .csf-nav-background {
|
667 |
-
background-color: #f5f5f5;
|
668 |
-
border-right: 1px solid #ccd0d4;
|
669 |
-
}
|
670 |
-
.csf-theme-light .csf-footer {
|
671 |
-
color: #555;
|
672 |
-
border-top: 1px solid #ccd0d4;
|
673 |
-
background-color: #f5f5f5;
|
674 |
-
background: linear-gradient(#fafafa, #f5f5f5);
|
675 |
-
}
|
676 |
-
|
677 |
-
/**
|
678 |
-
* 03. Fields
|
679 |
-
*/
|
680 |
-
.csf-field {
|
681 |
-
position: relative;
|
682 |
-
padding: 30px;
|
683 |
-
}
|
684 |
-
.csf-field + .csf-field {
|
685 |
-
border-top: 1px solid #eee;
|
686 |
-
}
|
687 |
-
.csf-field p:first-child {
|
688 |
-
margin-top: 0;
|
689 |
-
}
|
690 |
-
.csf-field p:last-child {
|
691 |
-
margin-bottom: 0;
|
692 |
-
}
|
693 |
-
.csf-field:after, .csf-field:before {
|
694 |
-
content: " ";
|
695 |
-
display: table;
|
696 |
-
}
|
697 |
-
.csf-field:after {
|
698 |
-
clear: both;
|
699 |
-
}
|
700 |
-
.csf-field h4 {
|
701 |
-
margin-top: 0;
|
702 |
-
}
|
703 |
-
.csf-field .csf-title {
|
704 |
-
position: relative;
|
705 |
-
width: 20%;
|
706 |
-
float: left;
|
707 |
-
}
|
708 |
-
.csf-field .csf-title h4 {
|
709 |
-
margin: 0;
|
710 |
-
color: #23282d;
|
711 |
-
}
|
712 |
-
.csf-field .csf-fieldset {
|
713 |
-
float: right;
|
714 |
-
width: calc(80% - 20px);
|
715 |
-
}
|
716 |
-
|
717 |
-
.csf-pseudo-field {
|
718 |
-
padding: 0 5px 0 0 !important;
|
719 |
-
display: inline-block;
|
720 |
-
}
|
721 |
-
.csf-pseudo-field + .csf-pseudo-field {
|
722 |
-
border: 0;
|
723 |
-
}
|
724 |
-
.csf-pseudo-field pre {
|
725 |
-
display: none;
|
726 |
-
}
|
727 |
-
|
728 |
-
/**
|
729 |
-
* 03. 02. Field: accordion
|
730 |
-
*/
|
731 |
-
.csf-field-accordion .csf-accordion-item {
|
732 |
-
position: relative;
|
733 |
-
margin-bottom: 5px;
|
734 |
-
}
|
735 |
-
.csf-field-accordion .csf-accordion-item:last-child {
|
736 |
-
margin-bottom: 0;
|
737 |
-
}
|
738 |
-
.csf-field-accordion .csf-accordion-item h4 {
|
739 |
-
font-size: 1em;
|
740 |
-
}
|
741 |
-
.csf-field-accordion .csf-accordion-title {
|
742 |
-
display: block;
|
743 |
-
cursor: pointer;
|
744 |
-
position: relative;
|
745 |
-
margin: 0;
|
746 |
-
padding: 15px;
|
747 |
-
min-height: 0;
|
748 |
-
font-size: 100%;
|
749 |
-
user-select: none;
|
750 |
-
border: 1px solid #ccd0d4;
|
751 |
-
background-color: #fafafa;
|
752 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
753 |
-
transition: border-color .15s;
|
754 |
-
}
|
755 |
-
.csf-field-accordion .csf-accordion-title:active, .csf-field-accordion .csf-accordion-title:hover, .csf-field-accordion .csf-accordion-title:focus {
|
756 |
-
outline: none;
|
757 |
-
border-color: #999;
|
758 |
-
}
|
759 |
-
.csf-field-accordion .csf-accordion-title .csf--icon {
|
760 |
-
width: 20px;
|
761 |
-
text-align: center;
|
762 |
-
margin-right: 2px;
|
763 |
-
}
|
764 |
-
.csf-field-accordion .csf-accordion-icon {
|
765 |
-
width: 16px;
|
766 |
-
text-align: center;
|
767 |
-
}
|
768 |
-
.csf-field-accordion .csf-accordion-content {
|
769 |
-
display: none;
|
770 |
-
padding: 0;
|
771 |
-
border: 1px solid #ccd0d4;
|
772 |
-
border-top: none;
|
773 |
-
background-color: #fff;
|
774 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
775 |
-
}
|
776 |
-
.csf-field-accordion .csf-accordion-content > .csf-field {
|
777 |
-
padding: 15px;
|
778 |
-
}
|
779 |
-
.csf-field-accordion .csf-accordion-open {
|
780 |
-
display: block;
|
781 |
-
}
|
782 |
-
|
783 |
-
/**
|
784 |
-
* 03. 03. Field: background
|
785 |
-
*/
|
786 |
-
.csf-field-background .csf-field {
|
787 |
-
border: 0 !important;
|
788 |
-
padding: 0;
|
789 |
-
margin-bottom: 6px;
|
790 |
-
margin-right: 6px;
|
791 |
-
}
|
792 |
-
.csf-field-background .csf--title {
|
793 |
-
color: #777;
|
794 |
-
font-size: 12px;
|
795 |
-
}
|
796 |
-
.csf-field-background .csf--background-colors {
|
797 |
-
display: flex;
|
798 |
-
flex-wrap: wrap;
|
799 |
-
}
|
800 |
-
.csf-field-background .csf--background-attributes {
|
801 |
-
display: flex;
|
802 |
-
flex-wrap: wrap;
|
803 |
-
}
|
804 |
-
.csf-field-background .csf--background-attributes select {
|
805 |
-
min-width: 100%;
|
806 |
-
margin: 0;
|
807 |
-
}
|
808 |
-
.csf-field-background .csf--background-attributes .csf-field {
|
809 |
-
flex: 1;
|
810 |
-
}
|
811 |
-
.csf-field-background .csf--attributes-hidden {
|
812 |
-
display: none;
|
813 |
-
}
|
814 |
-
|
815 |
-
/**
|
816 |
-
* 03. 04. Field: backup
|
817 |
-
*/
|
818 |
-
.csf-field-backup textarea {
|
819 |
-
width: 100%;
|
820 |
-
min-height: 200px;
|
821 |
-
margin-bottom: 5px;
|
822 |
-
}
|
823 |
-
.csf-field-backup small {
|
824 |
-
display: inline-block;
|
825 |
-
margin: 5px;
|
826 |
-
}
|
827 |
-
.csf-field-backup hr {
|
828 |
-
margin: 20px 0;
|
829 |
-
border: none;
|
830 |
-
border-bottom: 1px solid #e5e5e5;
|
831 |
-
}
|
832 |
-
|
833 |
-
/**
|
834 |
-
* 03. 05. Field: border, spacing, dimensions
|
835 |
-
*/
|
836 |
-
.csf-field-border .csf--inputs,
|
837 |
-
.csf-field-spacing .csf--inputs,
|
838 |
-
.csf-field-dimensions .csf--inputs {
|
839 |
-
float: left;
|
840 |
-
display: flex;
|
841 |
-
flex-wrap: wrap;
|
842 |
-
}
|
843 |
-
.csf-field-border .csf--input,
|
844 |
-
.csf-field-spacing .csf--input,
|
845 |
-
.csf-field-dimensions .csf--input {
|
846 |
-
display: flex;
|
847 |
-
padding-right: 6px;
|
848 |
-
padding-bottom: 4px;
|
849 |
-
box-sizing: border-box;
|
850 |
-
}
|
851 |
-
.csf-field-border .csf--input select,
|
852 |
-
.csf-field-spacing .csf--input select,
|
853 |
-
.csf-field-dimensions .csf--input select {
|
854 |
-
margin: 0;
|
855 |
-
}
|
856 |
-
.csf-field-border .csf--input input,
|
857 |
-
.csf-field-spacing .csf--input input,
|
858 |
-
.csf-field-dimensions .csf--input input {
|
859 |
-
position: relative;
|
860 |
-
z-index: 1;
|
861 |
-
margin: 0;
|
862 |
-
width: 65px;
|
863 |
-
max-width: 100%;
|
864 |
-
text-align: center;
|
865 |
-
}
|
866 |
-
.csf-field-border .csf--color,
|
867 |
-
.csf-field-spacing .csf--color,
|
868 |
-
.csf-field-dimensions .csf--color {
|
869 |
-
float: left;
|
870 |
-
}
|
871 |
-
.csf-field-border .csf--label,
|
872 |
-
.csf-field-spacing .csf--label,
|
873 |
-
.csf-field-dimensions .csf--label {
|
874 |
-
display: flex;
|
875 |
-
flex-direction: column;
|
876 |
-
justify-content: center;
|
877 |
-
user-select: none;
|
878 |
-
min-width: 20px;
|
879 |
-
max-width: 100%;
|
880 |
-
padding: 0 4px;
|
881 |
-
font-size: 12px;
|
882 |
-
text-align: center;
|
883 |
-
color: #555;
|
884 |
-
border: 1px solid #7B776C;
|
885 |
-
background-color: #f5f5f5;
|
886 |
-
}
|
887 |
-
.csf-field-border .csf--icon,
|
888 |
-
.csf-field-spacing .csf--icon,
|
889 |
-
.csf-field-dimensions .csf--icon {
|
890 |
-
border-right: 0;
|
891 |
-
border-radius: 4px 0 0 4px;
|
892 |
-
}
|
893 |
-
.csf-field-border .csf--icon + input,
|
894 |
-
.csf-field-spacing .csf--icon + input,
|
895 |
-
.csf-field-dimensions .csf--icon + input {
|
896 |
-
border-top-left-radius: 0 !important;
|
897 |
-
border-bottom-left-radius: 0 !important;
|
898 |
-
}
|
899 |
-
.csf-field-border .csf--unit,
|
900 |
-
.csf-field-spacing .csf--unit,
|
901 |
-
.csf-field-dimensions .csf--unit {
|
902 |
-
border-left: 0;
|
903 |
-
border-radius: 0 4px 4px 0;
|
904 |
-
}
|
905 |
-
.csf-field-border .csf--is-unit,
|
906 |
-
.csf-field-spacing .csf--is-unit,
|
907 |
-
.csf-field-dimensions .csf--is-unit {
|
908 |
-
border-top-right-radius: 0 !important;
|
909 |
-
border-bottom-right-radius: 0 !important;
|
910 |
-
}
|
911 |
-
|
912 |
-
/**
|
913 |
-
* 03. 06. Field: button_set
|
914 |
-
*/
|
915 |
-
.csf-field-button_set .csf--buttons {
|
916 |
-
display: inline-block;
|
917 |
-
}
|
918 |
-
.csf-field-button_set .csf--button {
|
919 |
-
position: relative;
|
920 |
-
z-index: 1;
|
921 |
-
float: left;
|
922 |
-
cursor: pointer;
|
923 |
-
padding: 7px 14px;
|
924 |
-
min-width: 16px;
|
925 |
-
text-align: center;
|
926 |
-
color: #555;
|
927 |
-
border: 1px solid #cccccc;
|
928 |
-
background-color: #f7f7f7;
|
929 |
-
user-select: none;
|
930 |
-
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
931 |
-
}
|
932 |
-
.csf-field-button_set .csf--button:first-child {
|
933 |
-
border-radius: 4px 0 0 4px;
|
934 |
-
}
|
935 |
-
.csf-field-button_set .csf--button:last-child {
|
936 |
-
border-radius: 0 4px 4px 0;
|
937 |
-
}
|
938 |
-
.csf-field-button_set .csf--button:not(:first-child) {
|
939 |
-
margin-left: -1px;
|
940 |
-
}
|
941 |
-
.csf-field-button_set .csf--button:hover {
|
942 |
-
background-color: #eee;
|
943 |
-
}
|
944 |
-
.csf-field-button_set .csf--active:hover,
|
945 |
-
.csf-field-button_set .csf--active {
|
946 |
-
z-index: 2;
|
947 |
-
color: #fff;
|
948 |
-
border-color: #006799;
|
949 |
-
background-color: #0085ba;
|
950 |
-
}
|
951 |
-
.csf-field-button_set input {
|
952 |
-
display: none;
|
953 |
-
}
|
954 |
-
|
955 |
-
/**
|
956 |
-
* 03. 07. Field: checkbox, radio
|
957 |
-
*/
|
958 |
-
.csf-field-checkbox ul,
|
959 |
-
.csf-field-radio ul {
|
960 |
-
margin: 0;
|
961 |
-
padding: 0;
|
962 |
-
list-style-type: none;
|
963 |
-
overflow-y: auto;
|
964 |
-
max-height: 305px;
|
965 |
-
}
|
966 |
-
.csf-field-checkbox ul li,
|
967 |
-
.csf-field-radio ul li {
|
968 |
-
margin-bottom: 6px;
|
969 |
-
}
|
970 |
-
.csf-field-checkbox ul ul,
|
971 |
-
.csf-field-radio ul ul {
|
972 |
-
max-height: none;
|
973 |
-
}
|
974 |
-
.csf-field-checkbox ul ul li,
|
975 |
-
.csf-field-radio ul ul li {
|
976 |
-
margin-left: 8px;
|
977 |
-
}
|
978 |
-
.csf-field-checkbox ul ul li:first-child,
|
979 |
-
.csf-field-radio ul ul li:first-child {
|
980 |
-
margin-left: 0;
|
981 |
-
}
|
982 |
-
.csf-field-checkbox input,
|
983 |
-
.csf-field-radio input {
|
984 |
-
margin: 0 1px;
|
985 |
-
}
|
986 |
-
.csf-field-checkbox .csf--inline-list li,
|
987 |
-
.csf-field-radio .csf--inline-list li {
|
988 |
-
display: inline-block;
|
989 |
-
margin-right: 15px;
|
990 |
-
}
|
991 |
-
.csf-field-checkbox .csf--text,
|
992 |
-
.csf-field-radio .csf--text {
|
993 |
-
margin-left: 5px;
|
994 |
-
vertical-align: middle;
|
995 |
-
}
|
996 |
-
.csf-field-checkbox .csf-checker,
|
997 |
-
.csf-field-radio .csf-checker {
|
998 |
-
cursor: pointer;
|
999 |
-
}
|
1000 |
-
|
1001 |
-
/**
|
1002 |
-
* 03. 08. Field: code_editor
|
1003 |
-
*/
|
1004 |
-
.csf-field-code_editor .CodeMirror {
|
1005 |
-
width: 100%;
|
1006 |
-
height: 400px;
|
1007 |
-
}
|
1008 |
-
.csf-field-code_editor .cm-s-default {
|
1009 |
-
border: 1px solid #ccd0d4;
|
1010 |
-
}
|
1011 |
-
.csf-field-code_editor textarea {
|
1012 |
-
width: 100%;
|
1013 |
-
height: 400px;
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
/**
|
1017 |
-
* 03. 09. Field: color
|
1018 |
-
*/
|
1019 |
-
.csf-field-color > input {
|
1020 |
-
opacity: 0.75;
|
1021 |
-
width: 115px;
|
1022 |
-
max-width: 100%;
|
1023 |
-
}
|
1024 |
-
.csf-field-color .button.wp-picker-clear {
|
1025 |
-
padding: 0 8px;
|
1026 |
-
margin-left: 6px;
|
1027 |
-
line-height: 2.54545455;
|
1028 |
-
min-height: 30px;
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
/**
|
1032 |
-
* 03. 10. Field: color_group
|
1033 |
-
*/
|
1034 |
-
.csf-field-color_group .csf--left {
|
1035 |
-
float: left;
|
1036 |
-
margin-right: 10px;
|
1037 |
-
margin-bottom: 5px;
|
1038 |
-
}
|
1039 |
-
.csf-field-color_group .csf--title {
|
1040 |
-
color: #999;
|
1041 |
-
margin-bottom: 5px;
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
/**
|
1045 |
-
* 03. 11. Field: fieldset
|
1046 |
-
*/
|
1047 |
-
.csf-field-fieldset .csf-fieldset-content {
|
1048 |
-
border: 1px solid #ccd0d4;
|
1049 |
-
background-color: #fff;
|
1050 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1051 |
-
}
|
1052 |
-
.csf-field-fieldset .csf-fieldset-content > .csf-field {
|
1053 |
-
padding: 15px;
|
1054 |
-
}
|
1055 |
-
.csf-field-fieldset .csf-field-subheading {
|
1056 |
-
font-size: 13px;
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
/**
|
1060 |
-
* 03. 12. Field: date
|
1061 |
-
*/
|
1062 |
-
.csf-field-date input {
|
1063 |
-
margin: 0;
|
1064 |
-
}
|
1065 |
-
.csf-field-date .csf--to {
|
1066 |
-
margin-left: 7px;
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
.csf-datepicker-wrapper {
|
1070 |
-
margin-top: 5px;
|
1071 |
-
width: auto;
|
1072 |
-
background-color: #fff;
|
1073 |
-
z-index: 9999999 !important;
|
1074 |
-
box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
|
1075 |
-
}
|
1076 |
-
.csf-datepicker-wrapper * {
|
1077 |
-
float: none;
|
1078 |
-
margin: 0;
|
1079 |
-
padding: 0;
|
1080 |
-
font-family: inherit;
|
1081 |
-
font-weight: normal;
|
1082 |
-
font-style: normal;
|
1083 |
-
text-decoration: none;
|
1084 |
-
border: 0;
|
1085 |
-
border-radius: 0;
|
1086 |
-
box-shadow: none;
|
1087 |
-
}
|
1088 |
-
.csf-datepicker-wrapper .ui-widget-header,
|
1089 |
-
.csf-datepicker-wrapper .ui-datepicker-header {
|
1090 |
-
color: #fff;
|
1091 |
-
background: #00a0d2;
|
1092 |
-
}
|
1093 |
-
.csf-datepicker-wrapper .ui-datepicker-header .ui-state-hover {
|
1094 |
-
cursor: pointer;
|
1095 |
-
}
|
1096 |
-
.csf-datepicker-wrapper .ui-datepicker-title {
|
1097 |
-
font-size: 14px;
|
1098 |
-
line-height: 40px;
|
1099 |
-
text-align: center;
|
1100 |
-
}
|
1101 |
-
.csf-datepicker-wrapper .ui-datepicker-prev,
|
1102 |
-
.csf-datepicker-wrapper .ui-datepicker-next {
|
1103 |
-
position: static;
|
1104 |
-
top: auto;
|
1105 |
-
left: auto;
|
1106 |
-
right: auto;
|
1107 |
-
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
1108 |
-
font-weight: 900;
|
1109 |
-
font-size: 12px;
|
1110 |
-
text-align: center;
|
1111 |
-
width: 41px;
|
1112 |
-
height: 40px;
|
1113 |
-
line-height: 40px;
|
1114 |
-
color: #fff;
|
1115 |
-
background-color: rgba(255, 255, 255, 0.1);
|
1116 |
-
text-rendering: auto;
|
1117 |
-
-webkit-font-smoothing: antialiased;
|
1118 |
-
-moz-osx-font-smoothing: grayscale;
|
1119 |
-
}
|
1120 |
-
.csf-datepicker-wrapper .ui-datepicker-next span,
|
1121 |
-
.csf-datepicker-wrapper .ui-datepicker-prev span {
|
1122 |
-
display: none;
|
1123 |
-
}
|
1124 |
-
.csf-datepicker-wrapper .ui-datepicker-prev {
|
1125 |
-
float: left;
|
1126 |
-
}
|
1127 |
-
.csf-datepicker-wrapper .ui-datepicker-next {
|
1128 |
-
float: right;
|
1129 |
-
}
|
1130 |
-
.csf-datepicker-wrapper .ui-datepicker-prev:before {
|
1131 |
-
content: '\f053';
|
1132 |
-
}
|
1133 |
-
.csf-datepicker-wrapper .ui-datepicker-next:before {
|
1134 |
-
content: '\f054';
|
1135 |
-
}
|
1136 |
-
.csf-datepicker-wrapper .ui-datepicker-prev-hover,
|
1137 |
-
.csf-datepicker-wrapper .ui-datepicker-next-hover {
|
1138 |
-
opacity: 0.75;
|
1139 |
-
}
|
1140 |
-
.csf-datepicker-wrapper tbody .ui-datepicker-week-col {
|
1141 |
-
background-color: #f7f7f7;
|
1142 |
-
}
|
1143 |
-
.csf-datepicker-wrapper .ui-datepicker-buttonpane {
|
1144 |
-
padding: 10px;
|
1145 |
-
text-align: center;
|
1146 |
-
background-color: #f7f7f7;
|
1147 |
-
}
|
1148 |
-
.csf-datepicker-wrapper .ui-datepicker-buttonpane button {
|
1149 |
-
cursor: pointer;
|
1150 |
-
margin: 0 5px;
|
1151 |
-
padding: 7px 14px;
|
1152 |
-
border: 1px solid #eee;
|
1153 |
-
background-color: #fff;
|
1154 |
-
}
|
1155 |
-
.csf-datepicker-wrapper select {
|
1156 |
-
margin: 0 4px;
|
1157 |
-
}
|
1158 |
-
.csf-datepicker-wrapper select option {
|
1159 |
-
color: #555;
|
1160 |
-
}
|
1161 |
-
.csf-datepicker-wrapper table {
|
1162 |
-
font-size: 13px;
|
1163 |
-
border-collapse: collapse;
|
1164 |
-
width: 100%;
|
1165 |
-
}
|
1166 |
-
.csf-datepicker-wrapper thead {
|
1167 |
-
color: #fff;
|
1168 |
-
background: #32373c;
|
1169 |
-
}
|
1170 |
-
.csf-datepicker-wrapper th {
|
1171 |
-
text-align: center;
|
1172 |
-
padding: 7px;
|
1173 |
-
border: 1px solid #444;
|
1174 |
-
}
|
1175 |
-
.csf-datepicker-wrapper td {
|
1176 |
-
text-align: center;
|
1177 |
-
border: 1px solid #f4f4f4;
|
1178 |
-
}
|
1179 |
-
.csf-datepicker-wrapper td.ui-datepicker-other-month {
|
1180 |
-
border: transparent;
|
1181 |
-
}
|
1182 |
-
.csf-datepicker-wrapper td .ui-state-default {
|
1183 |
-
color: #555;
|
1184 |
-
width: auto;
|
1185 |
-
display: block;
|
1186 |
-
padding: 6px 12px;
|
1187 |
-
}
|
1188 |
-
.csf-datepicker-wrapper td .ui-state-active,
|
1189 |
-
.csf-datepicker-wrapper td .ui-state-hover {
|
1190 |
-
color: #fff;
|
1191 |
-
background-color: #0073aa;
|
1192 |
-
}
|
1193 |
-
.csf-datepicker-wrapper td.ui-state-disabled .ui-state-default {
|
1194 |
-
opacity: 0.5;
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
/**
|
1198 |
-
* 03. 13. Field: datetime
|
1199 |
-
*/
|
1200 |
-
.csf-field-datetime input {
|
1201 |
-
margin: 0;
|
1202 |
-
}
|
1203 |
-
.csf-field-datetime .csf--to {
|
1204 |
-
margin-left: 7px;
|
1205 |
-
}
|
1206 |
-
|
1207 |
-
.csf-flatpickr select,
|
1208 |
-
.csf-flatpickr input {
|
1209 |
-
min-height: auto;
|
1210 |
-
}
|
1211 |
-
.csf-flatpickr select:focus,
|
1212 |
-
.csf-flatpickr input:focus {
|
1213 |
-
box-shadow: none;
|
1214 |
-
}
|
1215 |
-
.csf-flatpickr.open {
|
1216 |
-
z-index: 9999999 !important;
|
1217 |
-
}
|
1218 |
-
|
1219 |
-
/**
|
1220 |
-
* 03. 14. Field: gallery
|
1221 |
-
*/
|
1222 |
-
.csf-field-gallery ul {
|
1223 |
-
margin: 0;
|
1224 |
-
padding: 0;
|
1225 |
-
list-style-type: none;
|
1226 |
-
}
|
1227 |
-
.csf-field-gallery ul li {
|
1228 |
-
display: inline-block;
|
1229 |
-
position: relative;
|
1230 |
-
padding: 4px;
|
1231 |
-
margin: 0 5px 10px 0;
|
1232 |
-
border: 1px solid #ccc;
|
1233 |
-
background-color: #f9f9f9;
|
1234 |
-
border-radius: 2px;
|
1235 |
-
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
|
1236 |
-
}
|
1237 |
-
.csf-field-gallery ul li img {
|
1238 |
-
max-height: 60px;
|
1239 |
-
display: inline-block;
|
1240 |
-
vertical-align: middle;
|
1241 |
-
}
|
1242 |
-
.csf-field-gallery .button {
|
1243 |
-
margin-right: 5px;
|
1244 |
-
margin-bottom: 5px;
|
1245 |
-
}
|
1246 |
-
|
1247 |
-
/**
|
1248 |
-
* 03. 15. Field: group
|
1249 |
-
*/
|
1250 |
-
.csf-field-group .csf-cloneable-hidden {
|
1251 |
-
display: none !important;
|
1252 |
-
}
|
1253 |
-
.csf-field-group .csf-cloneable-wrapper {
|
1254 |
-
position: relative;
|
1255 |
-
}
|
1256 |
-
.csf-field-group .csf-cloneable-item {
|
1257 |
-
display: none;
|
1258 |
-
position: relative;
|
1259 |
-
margin-bottom: 5px;
|
1260 |
-
}
|
1261 |
-
.csf-field-group .csf-cloneable-item h4 {
|
1262 |
-
font-size: 1em;
|
1263 |
-
}
|
1264 |
-
.csf-field-group .ui-accordion .csf-cloneable-item {
|
1265 |
-
display: block;
|
1266 |
-
}
|
1267 |
-
.csf-field-group .csf-cloneable-content {
|
1268 |
-
border: 1px solid #ccd0d4;
|
1269 |
-
background-color: #fff;
|
1270 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1271 |
-
}
|
1272 |
-
.csf-field-group .csf-cloneable-content > .csf-field {
|
1273 |
-
padding: 15px;
|
1274 |
-
}
|
1275 |
-
.csf-field-group .csf-cloneable-title {
|
1276 |
-
display: block;
|
1277 |
-
cursor: pointer;
|
1278 |
-
position: relative;
|
1279 |
-
user-select: none;
|
1280 |
-
margin: 0;
|
1281 |
-
padding: 15px 65px 15px 10px;
|
1282 |
-
min-height: 0;
|
1283 |
-
font-size: 100%;
|
1284 |
-
border: 1px solid #ccd0d4;
|
1285 |
-
background-color: #fafafa;
|
1286 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1287 |
-
transition: border-color .15s;
|
1288 |
-
}
|
1289 |
-
.csf-field-group .csf-cloneable-title:active, .csf-field-group .csf-cloneable-title:hover, .csf-field-group .csf-cloneable-title:focus {
|
1290 |
-
border-color: #999;
|
1291 |
-
outline: none;
|
1292 |
-
}
|
1293 |
-
.csf-field-group .csf-cloneable-helper {
|
1294 |
-
position: absolute;
|
1295 |
-
top: 12px;
|
1296 |
-
right: 10px;
|
1297 |
-
z-index: 1;
|
1298 |
-
font-size: 14px;
|
1299 |
-
line-height: 1em;
|
1300 |
-
}
|
1301 |
-
.csf-field-group .csf-cloneable-helper i {
|
1302 |
-
display: inline-block;
|
1303 |
-
cursor: pointer;
|
1304 |
-
padding: 5px;
|
1305 |
-
color: #999;
|
1306 |
-
}
|
1307 |
-
.csf-field-group .csf-cloneable-helper i:hover {
|
1308 |
-
color: #555;
|
1309 |
-
}
|
1310 |
-
.csf-field-group .csf-cloneable-content {
|
1311 |
-
padding: 0;
|
1312 |
-
border-top: 0;
|
1313 |
-
}
|
1314 |
-
.csf-field-group .csf-cloneable-title-prefix,
|
1315 |
-
.csf-field-group .csf-cloneable-title-number {
|
1316 |
-
margin-right: 5px;
|
1317 |
-
}
|
1318 |
-
.csf-field-group .csf-cloneable-alert {
|
1319 |
-
display: none;
|
1320 |
-
margin-bottom: 5px;
|
1321 |
-
padding: 10px 20px;
|
1322 |
-
color: #a94442;
|
1323 |
-
border: 1px solid #ebccd1;
|
1324 |
-
background-color: #f2dede;
|
1325 |
-
}
|
1326 |
-
.csf-field-group .widget-placeholder {
|
1327 |
-
margin-bottom: 10px;
|
1328 |
-
border: 1px dashed #f1c40f;
|
1329 |
-
background-color: #fffae4;
|
1330 |
-
}
|
1331 |
-
.csf-field-group .csf-cloneable-header-icon {
|
1332 |
-
display: inline-block;
|
1333 |
-
text-align: center;
|
1334 |
-
font-size: 14px;
|
1335 |
-
width: 17px;
|
1336 |
-
text-indent: 0;
|
1337 |
-
vertical-align: text-top;
|
1338 |
-
}
|
1339 |
-
.csf-field-group .csf-cloneable-placeholder {
|
1340 |
-
background-color: #ddd;
|
1341 |
-
margin-top: 4px;
|
1342 |
-
width: 100px;
|
1343 |
-
height: 10px;
|
1344 |
-
font-size: 10px;
|
1345 |
-
line-height: 10px;
|
1346 |
-
display: inline-block;
|
1347 |
-
vertical-align: top;
|
1348 |
-
border-radius: 2px;
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
/**
|
1352 |
-
* 03. 16. Field: icon
|
1353 |
-
*/
|
1354 |
-
.csf-field-icon .
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
}
|
1386 |
-
.csf-field-image_select
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
}
|
1422 |
-
.csf-field-image_select
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
}
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
.csf-field-map input {
|
1451 |
-
|
1452 |
-
}
|
1453 |
-
.csf-field-map
|
1454 |
-
|
1455 |
-
}
|
1456 |
-
.csf-field-map .csf--map-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
}
|
1476 |
-
.csf-field-map .csf--map-input {
|
1477 |
-
|
1478 |
-
}
|
1479 |
-
.csf-field-map
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
margin:
|
1505 |
-
}
|
1506 |
-
.csf-field-media .button {
|
1507 |
-
margin-left:
|
1508 |
-
}
|
1509 |
-
.csf-field-media .
|
1510 |
-
|
1511 |
-
}
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
}
|
1560 |
-
.csf-field-palette
|
1561 |
-
|
1562 |
-
}
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
.csf-field-repeater .csf-
|
1571 |
-
|
1572 |
-
}
|
1573 |
-
.csf-field-repeater .csf-repeater-
|
1574 |
-
display:
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
}
|
1582 |
-
.csf-field-repeater .csf-repeater-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
}
|
1591 |
-
.csf-field-repeater .csf-repeater-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
}
|
1610 |
-
.csf-field-repeater .csf-repeater-helper
|
1611 |
-
|
1612 |
-
}
|
1613 |
-
.csf-field-repeater .csf-repeater-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
.csf-field-select .csf-
|
1646 |
-
|
1647 |
-
}
|
1648 |
-
.csf-field-select
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
}
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
}
|
1666 |
-
.csf-field-slider .csf--
|
1667 |
-
display: flex;
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
border-
|
1678 |
-
color: #
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
}
|
1683 |
-
.csf-field-slider
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
}
|
1740 |
-
.csf-field-sortable .csf-sortable
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
}
|
1749 |
-
.csf-field-sortable .csf-sortable-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
}
|
1768 |
-
.csf-field-sortable .
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
}
|
1802 |
-
.csf-field-sorter .csf-modules:
|
1803 |
-
padding-
|
1804 |
-
}
|
1805 |
-
.csf-field-sorter .csf-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
}
|
1818 |
-
.csf-field-sorter .csf-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
}
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
.csf-field-spinner .
|
1855 |
-
|
1856 |
-
}
|
1857 |
-
.csf-field-spinner .ui-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
}
|
1885 |
-
.csf-field-spinner .ui-spinner .ui-spinner-button:
|
1886 |
-
background-color: #
|
1887 |
-
}
|
1888 |
-
.csf-field-spinner .ui-spinner .ui-spinner-button:
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
}
|
1901 |
-
.csf-field-spinner .ui-spinner .ui-spinner-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
}
|
1908 |
-
.csf-field-spinner .ui-spinner .
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
.csf-field-spinner .ui-spinner
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
}
|
1931 |
-
.csf-field-spinner .ui-spinner-
|
1932 |
-
order:
|
1933 |
-
}
|
1934 |
-
.csf-field-spinner .
|
1935 |
-
order:
|
1936 |
-
}
|
1937 |
-
.csf-field-spinner .
|
1938 |
-
order:
|
1939 |
-
}
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
font-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
}
|
1994 |
-
.csf-field-switcher .csf--active {
|
1995 |
-
|
1996 |
-
}
|
1997 |
-
.csf-field-switcher .csf--active .csf--
|
1998 |
-
opacity:
|
1999 |
-
}
|
2000 |
-
.csf-field-switcher .csf--active .csf--
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
}
|
2023 |
-
.csf-field-tabbed .csf-tabbed-
|
2024 |
-
padding:
|
2025 |
-
}
|
2026 |
-
.csf-field-tabbed .csf-tabbed-nav
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
color: #
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
}
|
2043 |
-
.csf-field-tabbed .csf-tabbed-nav a
|
2044 |
-
background-color: #
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
}
|
2091 |
-
.csf-field-typography .csf--
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
flex
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
}
|
2108 |
-
.csf-field-typography .csf--
|
2109 |
-
position:
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
border-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
}
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
}
|
2172 |
-
.csf-field-upload .
|
2173 |
-
|
2174 |
-
}
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
}
|
2186 |
-
.csf-field-wp_editor .mce-
|
2187 |
-
|
2188 |
-
|
2189 |
-
.csf-field-wp_editor .mce-btn.mce-active
|
2190 |
-
|
2191 |
-
|
2192 |
-
.csf-field-wp_editor .
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
}
|
2203 |
-
.csf-field-wp_editor .csf-no-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
border: 0 !important;
|
2249 |
-
}
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
}
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
}
|
2450 |
-
.csf-image-preview i:
|
2451 |
-
|
2452 |
-
}
|
2453 |
-
.csf-image-preview
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
width: 100%;
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
}
|
2489 |
-
.csf-field .chosen-container-single .chosen-single abbr:
|
2490 |
-
|
2491 |
-
}
|
2492 |
-
.csf-field .chosen-container-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
}
|
2510 |
-
.csf-field .chosen-container-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
}
|
2520 |
-
.csf-field .chosen-container-single .chosen-single div b:
|
2521 |
-
|
2522 |
-
}
|
2523 |
-
.csf-field .chosen-container-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
}
|
2530 |
-
.csf-field .chosen-container-
|
2531 |
-
|
2532 |
-
}
|
2533 |
-
.csf-field .chosen-container-
|
2534 |
-
|
2535 |
-
}
|
2536 |
-
.csf-field .chosen-container-single .chosen-
|
2537 |
-
|
2538 |
-
}
|
2539 |
-
.csf-field .chosen-container-single .chosen-search
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
}
|
2552 |
-
.csf-field .wp-picker-container {
|
2553 |
-
|
2554 |
-
}
|
2555 |
-
.csf-field .
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
}
|
2568 |
-
.csf-field .
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
.
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
background-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
}
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
width: 100%;
|
2669 |
-
}
|
2670 |
-
.csf-widgets .csf-field-
|
2671 |
-
|
2672 |
-
}
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
.wp-block .csf-widgets {
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
}
|
2690 |
-
.wp-block .csf-widgets > .csf-field .
|
2691 |
-
|
2692 |
-
}
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
.control-section .csf-field {
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
}
|
2723 |
-
.control-section .csf-field-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
.control-section .csf-field-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
}
|
2765 |
-
.control-section .csf-field-sorter
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
}
|
2776 |
-
.control-section .csf-field-
|
2777 |
-
|
2778 |
-
}
|
2779 |
-
.control-section .csf-field-
|
2780 |
-
|
2781 |
-
}
|
2782 |
-
.control-section .csf-field-border
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
.control-section .csf-field-
|
2787 |
-
width:
|
2788 |
-
}
|
2789 |
-
.control-section .csf-field-
|
2790 |
-
width:
|
2791 |
-
}
|
2792 |
-
.control-section .csf-field-
|
2793 |
-
|
2794 |
-
}
|
2795 |
-
.control-section .csf-field-
|
2796 |
-
|
2797 |
-
}
|
2798 |
-
.control-section .csf-
|
2799 |
-
|
2800 |
-
|
2801 |
-
.control-section .csf-
|
2802 |
-
.control-section .csf-
|
2803 |
-
.control-section .csf-
|
2804 |
-
|
2805 |
-
|
2806 |
-
.control-section .csf-
|
2807 |
-
|
2808 |
-
|
2809 |
-
.control-section .csf-
|
2810 |
-
.control-section .csf-
|
2811 |
-
.control-section .csf-
|
2812 |
-
|
2813 |
-
|
2814 |
-
.control-section .csf-
|
2815 |
-
|
2816 |
-
|
2817 |
-
.control-section .csf-
|
2818 |
-
.control-section .csf-
|
2819 |
-
.control-section .csf-
|
2820 |
-
|
2821 |
-
|
2822 |
-
.control-section .csf-
|
2823 |
-
|
2824 |
-
}
|
2825 |
-
.control-section .csf-depend-
|
2826 |
-
|
2827 |
-
}
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
.csf-taxonomy {
|
2836 |
-
|
2837 |
-
}
|
2838 |
-
.csf-taxonomy > .csf-field {
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
border-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
}
|
2858 |
-
.csf-taxonomy
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
.csf-taxonomy-add-fields > .csf-field {
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
}
|
2885 |
-
.csf-taxonomy-add-fields
|
2886 |
-
|
2887 |
-
}
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
.csf-taxonomy-edit-fields > .csf-field {
|
2893 |
-
|
2894 |
-
}
|
2895 |
-
.csf-taxonomy-edit-fields > .csf-field > .csf-title {
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
}
|
2905 |
-
.csf-taxonomy-edit-fields > .csf-field > .csf-fieldset {
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
}
|
2912 |
-
.csf-taxonomy-edit-fields > .csf-field-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
}
|
2939 |
-
.csf-nav-menu-options > .csf-fields > .csf-field .csf-
|
2940 |
-
float: none;
|
2941 |
-
width: 100%;
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
}
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
.
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
}
|
2980 |
-
.csf-profile-options > .csf-field {
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
.csf-profile-options > .csf-field-
|
3010 |
-
margin:
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
}
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
color: #
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
padding:
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
padding: 15px
|
3169 |
-
}
|
3170 |
-
|
3171 |
-
.csf--repeat-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
.csf--repeat-shortcode {
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
.
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
text-align: center;
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
}
|
3249 |
-
.csf-modal-icon
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
border-
|
3267 |
-
|
3268 |
-
}
|
3269 |
-
.csf-modal-icon
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
top:
|
3300 |
-
left:
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
}
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
color: #
|
3338 |
-
}
|
3339 |
-
|
3340 |
-
.csf-
|
3341 |
-
margin-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
.csf-warning-primary {
|
3385 |
-
color: #
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
.csf-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
}
|
3415 |
-
|
3416 |
-
.csf-form-
|
3417 |
-
color: #
|
3418 |
-
background-color: #
|
3419 |
-
}
|
3420 |
-
|
3421 |
-
.csf-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
font-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
.csf-input-number {
|
3448 |
-
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
.csf-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
.
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
}
|
3518 |
-
.csf-welcome-wrap .csf-logo .csf--wp-
|
3519 |
-
position:
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
position:
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
border:
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
-
|
3575 |
-
|
3576 |
-
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
}
|
3582 |
-
.csf-welcome-wrap .csf--col {
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
|
3592 |
-
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
}
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
}
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
text-align:
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
color: #
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
3716 |
-
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
font-
|
3721 |
-
}
|
3722 |
-
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
}
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
.csf-metabox .csf-field .csf-
|
3753 |
-
float: none;
|
3754 |
-
width: 100%;
|
3755 |
-
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
3759 |
-
|
3760 |
-
}
|
3761 |
-
|
3762 |
-
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
.csf-
|
3767 |
-
|
3768 |
-
margin-
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
-
|
3773 |
-
|
3774 |
-
|
3775 |
-
|
3776 |
-
|
3777 |
-
|
3778 |
-
.csf-
|
3779 |
-
|
3780 |
-
|
3781 |
-
}
|
3782 |
-
|
3783 |
-
.csf-
|
3784 |
-
text-align: center;
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
|
3794 |
-
}
|
3795 |
-
|
3796 |
-
.csf-
|
3797 |
-
|
3798 |
-
|
3799 |
-
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
.csf-
|
3804 |
-
|
3805 |
-
|
3806 |
-
|
3807 |
-
|
3808 |
-
.csf-
|
3809 |
-
|
3810 |
-
}
|
3811 |
-
|
3812 |
-
.csf-
|
3813 |
-
|
3814 |
-
|
3815 |
-
|
3816 |
-
|
3817 |
-
.csf-field .csf-
|
3818 |
-
float: none;
|
3819 |
-
width: 100%;
|
3820 |
-
|
3821 |
-
|
3822 |
-
.csf-field .
|
3823 |
-
|
3824 |
-
|
3825 |
-
|
3826 |
-
|
3827 |
-
|
3828 |
-
|
3829 |
-
|
3830 |
-
|
3831 |
-
|
3832 |
-
|
3833 |
-
|
3834 |
-
.csf-
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
}
|
3839 |
-
|
3840 |
-
.csf-
|
3841 |
-
|
3842 |
-
|
3843 |
-
}
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
|
3849 |
-
.csf-
|
3850 |
-
|
3851 |
-
}
|
3852 |
-
}
|
3853 |
-
@media only screen and (max-
|
3854 |
-
.csf-modal .csf-modal-inner {
|
3855 |
-
|
3856 |
-
}
|
3857 |
-
|
3858 |
-
|
3859 |
-
|
3860 |
-
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
3864 |
-
|
3865 |
-
|
3866 |
-
|
3867 |
-
|
3868 |
-
|
3869 |
-
|
3870 |
-
|
3871 |
-
|
3872 |
-
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
3878 |
-
|
3879 |
-
|
3880 |
-
|
3881 |
-
|
3882 |
-
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
3890 |
-
clip:
|
3891 |
-
clip-path:
|
3892 |
-
}
|
3893 |
-
|
3894 |
-
.chosen-container
|
3895 |
-
|
3896 |
-
|
3897 |
-
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
3901 |
-
|
3902 |
-
|
3903 |
-
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
-
|
3944 |
-
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
-
|
3957 |
-
|
3958 |
-
|
3959 |
-
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
3968 |
-
|
3969 |
-
|
3970 |
-
|
3971 |
-
|
3972 |
-
|
3973 |
-
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
3978 |
-
|
3979 |
-
|
3980 |
-
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
-
|
3988 |
-
|
3989 |
-
height:
|
3990 |
-
|
3991 |
-
|
3992 |
-
|
3993 |
-
|
3994 |
-
|
3995 |
-
border-radius: 0;
|
3996 |
-
|
3997 |
-
|
3998 |
-
|
3999 |
-
|
4000 |
-
|
4001 |
-
|
4002 |
-
|
4003 |
-
|
4004 |
-
|
4005 |
-
|
4006 |
-
|
4007 |
-
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
4011 |
-
|
4012 |
-
|
4013 |
-
overflow-
|
4014 |
-
|
4015 |
-
|
4016 |
-
|
4017 |
-
|
4018 |
-
|
4019 |
-
|
4020 |
-
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
|
4028 |
-
|
4029 |
-
}
|
4030 |
-
|
4031 |
-
.chosen-container .chosen-results li.
|
4032 |
-
display: list-item;
|
4033 |
-
|
4034 |
-
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
color: #
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
display: list-item;
|
4051 |
-
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
4056 |
-
|
4057 |
-
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
-
}
|
4063 |
-
|
4064 |
-
.chosen-container .chosen-
|
4065 |
-
|
4066 |
-
|
4067 |
-
|
4068 |
-
|
4069 |
-
|
4070 |
-
|
4071 |
-
|
4072 |
-
|
4073 |
-
|
4074 |
-
|
4075 |
-
|
4076 |
-
|
4077 |
-
|
4078 |
-
|
4079 |
-
|
4080 |
-
}
|
4081 |
-
|
4082 |
-
.chosen-container-multi .chosen-choices li {
|
4083 |
-
|
4084 |
-
|
4085 |
-
|
4086 |
-
|
4087 |
-
|
4088 |
-
|
4089 |
-
|
4090 |
-
|
4091 |
-
|
4092 |
-
|
4093 |
-
|
4094 |
-
|
4095 |
-
|
4096 |
-
|
4097 |
-
|
4098 |
-
|
4099 |
-
|
4100 |
-
|
4101 |
-
|
4102 |
-
|
4103 |
-
|
4104 |
-
|
4105 |
-
|
4106 |
-
|
4107 |
-
|
4108 |
-
|
4109 |
-
|
4110 |
-
|
4111 |
-
|
4112 |
-
|
4113 |
-
|
4114 |
-
|
4115 |
-
|
4116 |
-
|
4117 |
-
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
|
4122 |
-
|
4123 |
-
|
4124 |
-
|
4125 |
-
|
4126 |
-
}
|
4127 |
-
|
4128 |
-
.chosen-container-multi .chosen-choices li.search-choice
|
4129 |
-
|
4130 |
-
|
4131 |
-
|
4132 |
-
|
4133 |
-
|
4134 |
-
|
4135 |
-
|
4136 |
-
|
4137 |
-
|
4138 |
-
|
4139 |
-
|
4140 |
-
|
4141 |
-
|
4142 |
-
|
4143 |
-
|
4144 |
-
|
4145 |
-
|
4146 |
-
|
4147 |
-
background
|
4148 |
-
|
4149 |
-
|
4150 |
-
|
4151 |
-
|
4152 |
-
|
4153 |
-
}
|
4154 |
-
|
4155 |
-
.chosen-container-multi .chosen-
|
4156 |
-
|
4157 |
-
|
4158 |
-
|
4159 |
-
|
4160 |
-
|
4161 |
-
|
4162 |
-
|
4163 |
-
|
4164 |
-
}
|
4165 |
-
|
4166 |
-
.chosen-container-active .chosen-single {
|
4167 |
-
border: 1px solid #
|
4168 |
-
|
4169 |
-
|
4170 |
-
|
4171 |
-
|
4172 |
-
|
4173 |
-
|
4174 |
-
|
4175 |
-
|
4176 |
-
|
4177 |
-
}
|
4178 |
-
|
4179 |
-
.chosen-container-active
|
4180 |
-
border
|
4181 |
-
|
4182 |
-
}
|
4183 |
-
|
4184 |
-
.chosen-container-active .chosen-choices {
|
4185 |
-
|
4186 |
-
|
4187 |
-
|
4188 |
-
|
4189 |
-
|
4190 |
-
|
4191 |
-
}
|
4192 |
-
|
4193 |
-
.chosen-disabled {
|
4194 |
-
|
4195 |
-
|
4196 |
-
|
4197 |
-
|
4198 |
-
|
4199 |
-
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
4203 |
-
|
4204 |
-
|
4205 |
-
|
4206 |
-
|
4207 |
-
|
4208 |
-
}
|
4209 |
-
|
4210 |
-
.chosen-rtl .chosen-single {
|
4211 |
-
|
4212 |
-
|
4213 |
-
|
4214 |
-
|
4215 |
-
|
4216 |
-
|
4217 |
-
margin-left:
|
4218 |
-
|
4219 |
-
|
4220 |
-
|
4221 |
-
|
4222 |
-
|
4223 |
-
}
|
4224 |
-
|
4225 |
-
.chosen-rtl .chosen-single
|
4226 |
-
right: auto;
|
4227 |
-
left:
|
4228 |
-
}
|
4229 |
-
|
4230 |
-
.chosen-rtl .chosen-
|
4231 |
-
|
4232 |
-
|
4233 |
-
|
4234 |
-
|
4235 |
-
|
4236 |
-
|
4237 |
-
|
4238 |
-
|
4239 |
-
|
4240 |
-
|
4241 |
-
}
|
4242 |
-
|
4243 |
-
.chosen-rtl .chosen-choices li.search-choice {
|
4244 |
-
|
4245 |
-
|
4246 |
-
}
|
4247 |
-
|
4248 |
-
.chosen-rtl
|
4249 |
-
|
4250 |
-
|
4251 |
-
}
|
4252 |
-
|
4253 |
-
.chosen-rtl.chosen-
|
4254 |
-
|
4255 |
-
padding: 0
|
4256 |
-
}
|
4257 |
-
|
4258 |
-
.chosen-rtl
|
4259 |
-
|
4260 |
-
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
4265 |
-
}
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
-
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
|
4274 |
-
|
4275 |
-
|
4276 |
-
|
4277 |
-
|
4278 |
-
|
4279 |
-
|
4280 |
-
|
4281 |
-
|
4282 |
-
-
|
4283 |
-
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
4288 |
-
|
4289 |
-
|
4290 |
-
|
4291 |
-
-webkit-box-
|
4292 |
-
box-
|
4293 |
-
|
4294 |
-
|
4295 |
-
|
4296 |
-
|
4297 |
-
|
4298 |
-
|
4299 |
-
|
4300 |
-
|
4301 |
-
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
}
|
4306 |
-
|
4307 |
-
.flatpickr-calendar.open {
|
4308 |
-
|
4309 |
-
|
4310 |
-
}
|
4311 |
-
|
4312 |
-
.flatpickr-calendar.
|
4313 |
-
|
4314 |
-
|
4315 |
-
|
4316 |
-
|
4317 |
-
|
4318 |
-
|
4319 |
-
position:
|
4320 |
-
top: 2px;
|
4321 |
-
}
|
4322 |
-
|
4323 |
-
.flatpickr-calendar.static {
|
4324 |
-
|
4325 |
-
|
4326 |
-
}
|
4327 |
-
|
4328 |
-
.flatpickr-calendar.
|
4329 |
-
|
4330 |
-
|
4331 |
-
}
|
4332 |
-
|
4333 |
-
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+
|
4334 |
-
-webkit-box-shadow:
|
4335 |
-
box-shadow:
|
4336 |
-
}
|
4337 |
-
|
4338 |
-
.flatpickr-calendar
|
4339 |
-
|
4340 |
-
|
4341 |
-
|
4342 |
-
|
4343 |
-
|
4344 |
-
|
4345 |
-
|
4346 |
-
border-
|
4347 |
-
|
4348 |
-
|
4349 |
-
|
4350 |
-
|
4351 |
-
border-
|
4352 |
-
}
|
4353 |
-
|
4354 |
-
.flatpickr-calendar.hasTime .flatpickr-time {
|
4355 |
-
height:
|
4356 |
-
|
4357 |
-
|
4358 |
-
|
4359 |
-
.flatpickr-calendar
|
4360 |
-
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
|
4365 |
-
|
4366 |
-
|
4367 |
-
|
4368 |
-
|
4369 |
-
|
4370 |
-
|
4371 |
-
|
4372 |
-
|
4373 |
-
|
4374 |
-
|
4375 |
-
|
4376 |
-
|
4377 |
-
|
4378 |
-
.flatpickr-calendar.
|
4379 |
-
|
4380 |
-
|
4381 |
-
|
4382 |
-
|
4383 |
-
|
4384 |
-
.flatpickr-calendar
|
4385 |
-
|
4386 |
-
|
4387 |
-
}
|
4388 |
-
|
4389 |
-
.flatpickr-calendar:
|
4390 |
-
border-width:
|
4391 |
-
margin: 0 -
|
4392 |
-
}
|
4393 |
-
|
4394 |
-
.flatpickr-calendar:
|
4395 |
-
|
4396 |
-
|
4397 |
-
}
|
4398 |
-
|
4399 |
-
.flatpickr-calendar.arrowTop:before
|
4400 |
-
|
4401 |
-
|
4402 |
-
|
4403 |
-
|
4404 |
-
|
4405 |
-
|
4406 |
-
|
4407 |
-
|
4408 |
-
.flatpickr-calendar.
|
4409 |
-
|
4410 |
-
}
|
4411 |
-
|
4412 |
-
.flatpickr-calendar.arrowBottom:before
|
4413 |
-
|
4414 |
-
|
4415 |
-
|
4416 |
-
|
4417 |
-
|
4418 |
-
|
4419 |
-
|
4420 |
-
|
4421 |
-
|
4422 |
-
|
4423 |
-
|
4424 |
-
|
4425 |
-
|
4426 |
-
|
4427 |
-
}
|
4428 |
-
|
4429 |
-
.flatpickr-
|
4430 |
-
|
4431 |
-
display:
|
4432 |
-
|
4433 |
-
|
4434 |
-
|
4435 |
-
|
4436 |
-
|
4437 |
-
|
4438 |
-
|
4439 |
-
|
4440 |
-
|
4441 |
-
|
4442 |
-
|
4443 |
-
|
4444 |
-
|
4445 |
-
|
4446 |
-
|
4447 |
-
|
4448 |
-
|
4449 |
-
-webkit-
|
4450 |
-
-
|
4451 |
-
-ms-
|
4452 |
-
|
4453 |
-
|
4454 |
-
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
|
4459 |
-
|
4460 |
-
|
4461 |
-
|
4462 |
-
|
4463 |
-
|
4464 |
-
|
4465 |
-
|
4466 |
-
|
4467 |
-
|
4468 |
-
|
4469 |
-
|
4470 |
-
|
4471 |
-
}
|
4472 |
-
|
4473 |
-
.flatpickr-months .flatpickr-prev-month
|
4474 |
-
.flatpickr-months .flatpickr-next-month
|
4475 |
-
|
4476 |
-
}
|
4477 |
-
|
4478 |
-
.flatpickr-months .flatpickr-prev-month
|
4479 |
-
.flatpickr-months .flatpickr-next-month
|
4480 |
-
|
4481 |
-
|
4482 |
-
|
4483 |
-
|
4484 |
-
|
4485 |
-
/*
|
4486 |
-
/*rtl:
|
4487 |
-
/*
|
4488 |
-
*/
|
4489 |
-
|
4490 |
-
|
4491 |
-
|
4492 |
-
|
4493 |
-
|
4494 |
-
|
4495 |
-
|
4496 |
-
|
4497 |
-
|
4498 |
-
/*
|
4499 |
-
|
4500 |
-
|
4501 |
-
|
4502 |
-
/*
|
4503 |
-
/*rtl:
|
4504 |
-
/*
|
4505 |
-
*/
|
4506 |
-
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
|
4512 |
-
|
4513 |
-
|
4514 |
-
|
4515 |
-
|
4516 |
-
|
4517 |
-
.flatpickr-months .flatpickr-prev-month:hover,
|
4518 |
-
.flatpickr-months .flatpickr-next-month:hover {
|
4519 |
-
|
4520 |
-
}
|
4521 |
-
|
4522 |
-
.flatpickr-months .flatpickr-prev-month
|
4523 |
-
.flatpickr-months .flatpickr-next-month
|
4524 |
-
|
4525 |
-
|
4526 |
-
|
4527 |
-
|
4528 |
-
.flatpickr-months .flatpickr-
|
4529 |
-
|
4530 |
-
|
4531 |
-
|
4532 |
-
|
4533 |
-
|
4534 |
-
|
4535 |
-
|
4536 |
-
|
4537 |
-
|
4538 |
-
}
|
4539 |
-
|
4540 |
-
.numInputWrapper
|
4541 |
-
|
4542 |
-
|
4543 |
-
}
|
4544 |
-
|
4545 |
-
.numInputWrapper input
|
4546 |
-
|
4547 |
-
|
4548 |
-
|
4549 |
-
|
4550 |
-
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
.numInputWrapper input::-
|
4555 |
-
|
4556 |
-
|
4557 |
-
|
4558 |
-
|
4559 |
-
.numInputWrapper
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
4564 |
-
|
4565 |
-
|
4566 |
-
|
4567 |
-
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
4571 |
-
|
4572 |
-
|
4573 |
-
|
4574 |
-
|
4575 |
-
|
4576 |
-
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
-
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
}
|
4591 |
-
|
4592 |
-
.numInputWrapper span.arrowUp {
|
4593 |
-
|
4594 |
-
border-
|
4595 |
-
|
4596 |
-
|
4597 |
-
|
4598 |
-
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
|
4604 |
-
|
4605 |
-
|
4606 |
-
|
4607 |
-
|
4608 |
-
|
4609 |
-
|
4610 |
-
|
4611 |
-
|
4612 |
-
|
4613 |
-
}
|
4614 |
-
|
4615 |
-
.numInputWrapper span svg {
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
4619 |
-
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
4624 |
-
|
4625 |
-
|
4626 |
-
|
4627 |
-
|
4628 |
-
|
4629 |
-
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
4633 |
-
|
4634 |
-
|
4635 |
-
|
4636 |
-
|
4637 |
-
|
4638 |
-
|
4639 |
-
|
4640 |
-
|
4641 |
-
|
4642 |
-
|
4643 |
-
|
4644 |
-
|
4645 |
-
-
|
4646 |
-
|
4647 |
-
|
4648 |
-
|
4649 |
-
|
4650 |
-
|
4651 |
-
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
4656 |
-
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
|
4662 |
-
|
4663 |
-
|
4664 |
-
|
4665 |
-
|
4666 |
-
|
4667 |
-
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
4671 |
-
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
|
4678 |
-
|
4679 |
-
|
4680 |
-
|
4681 |
-
|
4682 |
-
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
|
4687 |
-
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
4691 |
-
|
4692 |
-
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
4696 |
-
|
4697 |
-
|
4698 |
-
.flatpickr-current-month input.cur-year:
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
4704 |
-
|
4705 |
-
|
4706 |
-
|
4707 |
-
|
4708 |
-
|
4709 |
-
|
4710 |
-
|
4711 |
-
|
4712 |
-
|
4713 |
-
|
4714 |
-
|
4715 |
-
|
4716 |
-
|
4717 |
-
|
4718 |
-
|
4719 |
-
|
4720 |
-
|
4721 |
-
|
4722 |
-
|
4723 |
-
|
4724 |
-
|
4725 |
-
|
4726 |
-
|
4727 |
-
|
4728 |
-
|
4729 |
-
|
4730 |
-
|
4731 |
-
|
4732 |
-
}
|
4733 |
-
|
4734 |
-
.flatpickr-current-month .flatpickr-monthDropdown-months:
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
4741 |
-
|
4742 |
-
|
4743 |
-
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
|
4759 |
-
|
4760 |
-
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
|
4765 |
-
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
|
4777 |
-
|
4778 |
-
|
4779 |
-
|
4780 |
-
|
4781 |
-
|
4782 |
-
|
4783 |
-
|
4784 |
-
|
4785 |
-
|
4786 |
-
|
4787 |
-
|
4788 |
-
|
4789 |
-
|
4790 |
-
}
|
4791 |
-
|
4792 |
-
.
|
4793 |
-
|
4794 |
-
|
4795 |
-
|
4796 |
-
|
4797 |
-
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
|
4803 |
-
|
4804 |
-
|
4805 |
-
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
outline: 0;
|
4813 |
-
|
4814 |
-
|
4815 |
-
.
|
4816 |
-
|
4817 |
-
|
4818 |
-
|
4819 |
-
|
4820 |
-
|
4821 |
-
|
4822 |
-
-webkit-
|
4823 |
-
|
4824 |
-
|
4825 |
-
|
4826 |
-
|
4827 |
-
|
4828 |
-
|
4829 |
-
-
|
4830 |
-
|
4831 |
-
|
4832 |
-
|
4833 |
-
|
4834 |
-
|
4835 |
-
|
4836 |
-
|
4837 |
-
|
4838 |
-
}
|
4839 |
-
|
4840 |
-
.
|
4841 |
-
|
4842 |
-
|
4843 |
-
|
4844 |
-
|
4845 |
-
|
4846 |
-
|
4847 |
-
|
4848 |
-
|
4849 |
-
|
4850 |
-
|
4851 |
-
|
4852 |
-
|
4853 |
-
|
4854 |
-
|
4855 |
-
-
|
4856 |
-
|
4857 |
-
|
4858 |
-
|
4859 |
-
|
4860 |
-
|
4861 |
-
|
4862 |
-
|
4863 |
-
|
4864 |
-
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
4870 |
-
|
4871 |
-
.flatpickr-day.inRange,
|
4872 |
-
.flatpickr-day
|
4873 |
-
.flatpickr-day.
|
4874 |
-
.flatpickr-day.
|
4875 |
-
.flatpickr-day
|
4876 |
-
.flatpickr-day.
|
4877 |
-
.flatpickr-day:
|
4878 |
-
|
4879 |
-
|
4880 |
-
|
4881 |
-
|
4882 |
-
|
4883 |
-
|
4884 |
-
|
4885 |
-
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
4889 |
-
.flatpickr-day.today {
|
4890 |
-
border-color: #959ea9;
|
4891 |
-
|
4892 |
-
|
4893 |
-
|
4894 |
-
|
4895 |
-
|
4896 |
-
|
4897 |
-
|
4898 |
-
|
4899 |
-
|
4900 |
-
.flatpickr-day.
|
4901 |
-
.flatpickr-day.
|
4902 |
-
.flatpickr-day.
|
4903 |
-
.flatpickr-day.
|
4904 |
-
.flatpickr-day.
|
4905 |
-
.flatpickr-day.
|
4906 |
-
.flatpickr-day.
|
4907 |
-
.flatpickr-day.
|
4908 |
-
.flatpickr-day.
|
4909 |
-
.flatpickr-day.
|
4910 |
-
.flatpickr-day.
|
4911 |
-
.flatpickr-day.
|
4912 |
-
.flatpickr-day.
|
4913 |
-
|
4914 |
-
|
4915 |
-
|
4916 |
-
|
4917 |
-
|
4918 |
-
|
4919 |
-
|
4920 |
-
|
4921 |
-
|
4922 |
-
|
4923 |
-
|
4924 |
-
|
4925 |
-
|
4926 |
-
.flatpickr-day.
|
4927 |
-
.flatpickr-day.endRange
|
4928 |
-
|
4929 |
-
|
4930 |
-
|
4931 |
-
|
4932 |
-
.flatpickr-day.startRange.endRange,
|
4933 |
-
.flatpickr-day.
|
4934 |
-
|
4935 |
-
|
4936 |
-
|
4937 |
-
|
4938 |
-
|
4939 |
-
.flatpickr-day.
|
4940 |
-
|
4941 |
-
|
4942 |
-
|
4943 |
-
|
4944 |
-
|
4945 |
-
.flatpickr-day.
|
4946 |
-
|
4947 |
-
|
4948 |
-
|
4949 |
-
|
4950 |
-
|
4951 |
-
|
4952 |
-
|
4953 |
-
|
4954 |
-
|
4955 |
-
|
4956 |
-
.flatpickr-day.
|
4957 |
-
.flatpickr-day.
|
4958 |
-
.
|
4959 |
-
|
4960 |
-
|
4961 |
-
|
4962 |
-
|
4963 |
-
|
4964 |
-
|
4965 |
-
|
4966 |
-
cursor:
|
4967 |
-
|
4968 |
-
|
4969 |
-
|
4970 |
-
.flatpickr-day.
|
4971 |
-
|
4972 |
-
|
4973 |
-
|
4974 |
-
|
4975 |
-
|
4976 |
-
|
4977 |
-
|
4978 |
-
|
4979 |
-
|
4980 |
-
|
4981 |
-
|
4982 |
-
|
4983 |
-
|
4984 |
-
|
4985 |
-
|
4986 |
-
|
4987 |
-
|
4988 |
-
|
4989 |
-
|
4990 |
-
|
4991 |
-
|
4992 |
-
|
4993 |
-
|
4994 |
-
|
4995 |
-
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
|
5000 |
-
|
5001 |
-
|
5002 |
-
|
5003 |
-
|
5004 |
-
|
5005 |
-
|
5006 |
-
|
5007 |
-
|
5008 |
-
|
5009 |
-
|
5010 |
-
|
5011 |
-
|
5012 |
-
|
5013 |
-
|
5014 |
-
|
5015 |
-
|
5016 |
-
|
5017 |
-
|
5018 |
-
|
5019 |
-
|
5020 |
-
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
-
|
5025 |
-
|
5026 |
-
|
5027 |
-
|
5028 |
-
|
5029 |
-
|
5030 |
-
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
|
5038 |
-
|
5039 |
-
|
5040 |
-
|
5041 |
-
|
5042 |
-
|
5043 |
-
|
5044 |
-
|
5045 |
-
|
5046 |
-
|
5047 |
-
display:
|
5048 |
-
|
5049 |
-
|
5050 |
-
|
5051 |
-
|
5052 |
-
|
5053 |
-
|
5054 |
-
|
5055 |
-
|
5056 |
-
|
5057 |
-
|
5058 |
-
|
5059 |
-
|
5060 |
-
|
5061 |
-
|
5062 |
-
|
5063 |
-
|
5064 |
-
|
5065 |
-
|
5066 |
-
|
5067 |
-
|
5068 |
-
|
5069 |
-
|
5070 |
-
|
5071 |
-
|
5072 |
-
|
5073 |
-
|
5074 |
-
|
5075 |
-
|
5076 |
-
|
5077 |
-
|
5078 |
-
|
5079 |
-
|
5080 |
-
|
5081 |
-
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
5085 |
-
|
5086 |
-
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
5090 |
-
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
-
|
5095 |
-
|
5096 |
-
|
5097 |
-
|
5098 |
-
|
5099 |
-
-
|
5100 |
-
|
5101 |
-
|
5102 |
-
|
5103 |
-
.flatpickr-time input.flatpickr-
|
5104 |
-
font-weight:
|
5105 |
-
}
|
5106 |
-
|
5107 |
-
.flatpickr-time input
|
5108 |
-
|
5109 |
-
|
5110 |
-
}
|
5111 |
-
|
5112 |
-
.flatpickr-time
|
5113 |
-
|
5114 |
-
|
5115 |
-
|
5116 |
-
|
5117 |
-
|
5118 |
-
|
5119 |
-
|
5120 |
-
|
5121 |
-
|
5122 |
-
|
5123 |
-
|
5124 |
-
|
5125 |
-
-
|
5126 |
-
-
|
5127 |
-
|
5128 |
-
|
5129 |
-
|
5130 |
-
|
5131 |
-
|
5132 |
-
|
5133 |
-
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
5137 |
-
|
5138 |
-
|
5139 |
-
|
5140 |
-
|
5141 |
-
|
5142 |
-
|
5143 |
-
|
5144 |
-
.flatpickr-
|
5145 |
-
|
5146 |
-
|
5147 |
-
|
5148 |
-
|
5149 |
-
|
5150 |
-
|
5151 |
-
|
5152 |
-
|
5153 |
-
|
5154 |
-
|
5155 |
-
opacity:
|
5156 |
-
-webkit-transform: translate3d(0,
|
5157 |
-
transform: translate3d(0,
|
5158 |
-
}
|
5159 |
-
|
5160 |
-
|
5161 |
-
|
5162 |
-
|
5163 |
-
|
5164 |
-
|
5165 |
-
|
5166 |
-
|
5167 |
-
opacity:
|
5168 |
-
-webkit-transform: translate3d(0,
|
5169 |
-
transform: translate3d(0,
|
5170 |
-
}
|
5171 |
-
|
5172 |
-
opacity: 1;
|
5173 |
-
-webkit-transform: translate3d(0, 0, 0);
|
5174 |
-
transform: translate3d(0, 0, 0);
|
5175 |
-
}
|
5176 |
-
}
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
* ---------------------------------------------------------
|
4 |
+
* CODESTAR FRAMEWORK CSS MAP
|
5 |
+
* ---------------------------------------------------------
|
6 |
+
*
|
7 |
+
* 01. Base
|
8 |
+
* 01. 01. Header
|
9 |
+
* 01. 02. Sticky
|
10 |
+
* 01. 03. Header Buttons
|
11 |
+
* 01. 04. Navigation
|
12 |
+
* 01. 05. Wrapper
|
13 |
+
* 01. 06. Content
|
14 |
+
* 01. 07. Section
|
15 |
+
* 01. 08. Footer
|
16 |
+
* 01. 09. Copyright
|
17 |
+
* 01. 10. Show All Settings
|
18 |
+
* 01. 11. Search Input
|
19 |
+
* 01. 12. Metabox
|
20 |
+
* 01. 13. Comment Metabox
|
21 |
+
* 01. 14. Help Tooltip
|
22 |
+
* 02. Themes
|
23 |
+
* 02. 01. Theme Dark
|
24 |
+
* 02. 02. Theme Light
|
25 |
+
* 03. Fields
|
26 |
+
* 03. 01. Field
|
27 |
+
* 03. 02. Field: accordion
|
28 |
+
* 03. 03. Field: background
|
29 |
+
* 03. 04. Field: backup
|
30 |
+
* 03. 05. Field: border, spacing, dimensions
|
31 |
+
* 03. 06. Field: button_set
|
32 |
+
* 03. 07. Field: checkbox, radio
|
33 |
+
* 03. 08. Field: code_editor
|
34 |
+
* 03. 09. Field: color
|
35 |
+
* 03. 10. Field: color_group
|
36 |
+
* 03. 11. Field: fieldset
|
37 |
+
* 03. 12. Field: date
|
38 |
+
* 03. 13. Field: datetime
|
39 |
+
* 03. 14. Field: gallery
|
40 |
+
* 03. 15. Field: group
|
41 |
+
* 03. 16. Field: icon
|
42 |
+
* 03. 17. Field: image_select
|
43 |
+
* 03. 18. Field: link_color
|
44 |
+
* 03. 19. Field: map
|
45 |
+
* 03. 20. Field: media
|
46 |
+
* 03. 21. Field: palette
|
47 |
+
* 03. 22. Field: repeater
|
48 |
+
* 03. 23. Field: select
|
49 |
+
* 03. 24. Field: slider
|
50 |
+
* 03. 25. Field: sortable
|
51 |
+
* 03. 26. Field: sorter
|
52 |
+
* 03. 27. Field: spinner
|
53 |
+
* 03. 28. Field: switcher
|
54 |
+
* 03. 29. Field: tabbed
|
55 |
+
* 03. 30. Field: text
|
56 |
+
* 03. 31. Field: textarea
|
57 |
+
* 03. 32. Field: typography
|
58 |
+
* 03. 33. Field: upload
|
59 |
+
* 03. 34. Field: wp_editor
|
60 |
+
* 03. 35. Field: heading
|
61 |
+
* 03. 36. Field: subheading
|
62 |
+
* 03. 37. Field: submessage
|
63 |
+
* 03. 38. Field: notice
|
64 |
+
* 03. 39. Field: number
|
65 |
+
* 03. 40. Field: link
|
66 |
+
* 03. 41. Field: others
|
67 |
+
* 04. Widget
|
68 |
+
* 05. Customizer
|
69 |
+
* 06. Taxonomy
|
70 |
+
* 07. Profile
|
71 |
+
* 08. Nav Menu
|
72 |
+
* 09. Modal
|
73 |
+
* 09. 01. Shortcode Modal
|
74 |
+
* 09. 02. Gutenberg Modal
|
75 |
+
* 09. 03. Icon Modal
|
76 |
+
* 10. Helper
|
77 |
+
* 11. Welcome Page
|
78 |
+
* 12. Responsive
|
79 |
+
* 13. Others
|
80 |
+
*
|
81 |
+
* ---------------------------------------------------------
|
82 |
+
*
|
83 |
+
*/
|
84 |
+
/**
|
85 |
+
* 01. Base
|
86 |
+
*/
|
87 |
+
.csf {
|
88 |
+
position: relative;
|
89 |
+
}
|
90 |
+
.csf label {
|
91 |
+
padding: 0;
|
92 |
+
margin: 0;
|
93 |
+
display: inline-block;
|
94 |
+
}
|
95 |
+
|
96 |
+
.csf-ab-icon {
|
97 |
+
top: 2px;
|
98 |
+
}
|
99 |
+
|
100 |
+
#screen-meta-links + .csf-options {
|
101 |
+
margin-top: 40px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.csf-options {
|
105 |
+
margin-top: 20px;
|
106 |
+
margin-right: 20px;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* 01. 01. Header
|
111 |
+
*/
|
112 |
+
.csf-header {
|
113 |
+
position: relative;
|
114 |
+
}
|
115 |
+
|
116 |
+
.csf-header-inner {
|
117 |
+
padding: 25px;
|
118 |
+
transition: box-shadow .3s ease;
|
119 |
+
}
|
120 |
+
.csf-header-inner h1 {
|
121 |
+
float: left;
|
122 |
+
font-size: 1.5em;
|
123 |
+
line-height: 26px;
|
124 |
+
font-weight: 400;
|
125 |
+
margin: 0;
|
126 |
+
}
|
127 |
+
.csf-header-inner h1 small {
|
128 |
+
font-size: 11px;
|
129 |
+
font-weight: 500;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* 01. 02. Sticky
|
134 |
+
*/
|
135 |
+
.csf-sticky .csf-header-inner {
|
136 |
+
position: fixed;
|
137 |
+
z-index: 99;
|
138 |
+
top: 32px;
|
139 |
+
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* 01. 03. Header Buttons
|
144 |
+
*/
|
145 |
+
.csf-buttons {
|
146 |
+
float: right;
|
147 |
+
}
|
148 |
+
.csf-buttons .button {
|
149 |
+
margin: 0 2px;
|
150 |
+
line-height: 26px;
|
151 |
+
}
|
152 |
+
.csf-buttons .button:focus {
|
153 |
+
outline: none !important;
|
154 |
+
box-shadow: none !important;
|
155 |
+
}
|
156 |
+
.csf-buttons .csf-save {
|
157 |
+
min-width: 72px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.csf-header-left {
|
161 |
+
float: left;
|
162 |
+
}
|
163 |
+
|
164 |
+
.csf-header-right {
|
165 |
+
float: right;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* 01. 04. Navigation
|
170 |
+
*/
|
171 |
+
.csf-nav {
|
172 |
+
display: block;
|
173 |
+
position: relative;
|
174 |
+
z-index: 10;
|
175 |
+
float: left;
|
176 |
+
}
|
177 |
+
.csf-nav ul {
|
178 |
+
clear: left;
|
179 |
+
margin: 0;
|
180 |
+
list-style-type: none;
|
181 |
+
}
|
182 |
+
.csf-nav ul li {
|
183 |
+
margin-bottom: 0;
|
184 |
+
}
|
185 |
+
.csf-nav ul li a {
|
186 |
+
font-size: 13px;
|
187 |
+
position: relative;
|
188 |
+
display: block;
|
189 |
+
padding: 14px 12px;
|
190 |
+
text-decoration: none;
|
191 |
+
transition-property: color, background;
|
192 |
+
transition-duration: 0.2s;
|
193 |
+
transition-timing-function: ease;
|
194 |
+
}
|
195 |
+
.csf-nav ul li a:focus {
|
196 |
+
outline: none;
|
197 |
+
box-shadow: none;
|
198 |
+
}
|
199 |
+
.csf-nav ul li .csf-arrow:after {
|
200 |
+
content: "\f054";
|
201 |
+
display: inline-block;
|
202 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
203 |
+
font-weight: 900;
|
204 |
+
font-size: 9px;
|
205 |
+
line-height: 1;
|
206 |
+
position: absolute;
|
207 |
+
right: 10px;
|
208 |
+
top: 50%;
|
209 |
+
margin-top: -4px;
|
210 |
+
}
|
211 |
+
.csf-nav ul li.csf-tab-expanded .csf-arrow:after {
|
212 |
+
transform: rotate(90deg);
|
213 |
+
}
|
214 |
+
.csf-nav ul li.csf-tab-expanded ul {
|
215 |
+
display: block;
|
216 |
+
}
|
217 |
+
.csf-nav ul ul {
|
218 |
+
display: none;
|
219 |
+
position: relative;
|
220 |
+
}
|
221 |
+
.csf-nav ul ul li a {
|
222 |
+
font-size: 12px;
|
223 |
+
padding: 12px 14px 12px 24px;
|
224 |
+
}
|
225 |
+
.csf-nav .csf-tab-icon {
|
226 |
+
width: 20px;
|
227 |
+
margin-right: 5px;
|
228 |
+
font-size: 13px;
|
229 |
+
text-align: center;
|
230 |
+
}
|
231 |
+
.csf-nav .csf-label-error {
|
232 |
+
margin-left: 4px;
|
233 |
+
vertical-align: top;
|
234 |
+
}
|
235 |
+
|
236 |
+
.csf-nav-normal {
|
237 |
+
width: 225px;
|
238 |
+
}
|
239 |
+
.csf-nav-normal + .csf-content {
|
240 |
+
margin-left: 225px;
|
241 |
+
}
|
242 |
+
|
243 |
+
.csf-nav-inline {
|
244 |
+
width: 100%;
|
245 |
+
}
|
246 |
+
.csf-nav-inline ul li {
|
247 |
+
display: inline-block;
|
248 |
+
vertical-align: top;
|
249 |
+
}
|
250 |
+
|
251 |
+
.csf-nav-background {
|
252 |
+
position: absolute;
|
253 |
+
top: 0;
|
254 |
+
left: 0;
|
255 |
+
bottom: 0;
|
256 |
+
z-index: 9;
|
257 |
+
width: 225px;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* 01. 05. Wrapper
|
262 |
+
*/
|
263 |
+
.csf-wrapper {
|
264 |
+
position: relative;
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* 01. 06. Content
|
269 |
+
*/
|
270 |
+
.csf-content {
|
271 |
+
position: relative;
|
272 |
+
background-color: #fff;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* 01. 07. Section
|
277 |
+
*/
|
278 |
+
.csf-sections {
|
279 |
+
float: left;
|
280 |
+
width: 100%;
|
281 |
+
}
|
282 |
+
|
283 |
+
.csf-section-title {
|
284 |
+
display: none;
|
285 |
+
padding: 20px 30px;
|
286 |
+
background-color: #f5f5f5;
|
287 |
+
border-top: 1px solid #eee;
|
288 |
+
border-bottom: 1px solid #eee;
|
289 |
+
}
|
290 |
+
.csf-section-title h3 {
|
291 |
+
margin: 0;
|
292 |
+
padding: 0;
|
293 |
+
font-size: 13px;
|
294 |
+
font-weight: bold;
|
295 |
+
text-transform: uppercase;
|
296 |
+
}
|
297 |
+
.csf-section-title .csf-section-icon {
|
298 |
+
margin-right: 5px;
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* 01. 08. Footer
|
303 |
+
*/
|
304 |
+
.csf-footer {
|
305 |
+
padding: 20px;
|
306 |
+
font-size: 11px;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* 01. 09. Copyright
|
311 |
+
*/
|
312 |
+
.csf-copyright {
|
313 |
+
float: left;
|
314 |
+
margin-top: 5px;
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* 01. 10. Show All Settings
|
319 |
+
*/
|
320 |
+
.csf-search-all .csf-nav-background,
|
321 |
+
.csf-search-all .csf-nav,
|
322 |
+
.csf-show-all .csf-nav-background,
|
323 |
+
.csf-show-all .csf-nav {
|
324 |
+
display: none;
|
325 |
+
}
|
326 |
+
.csf-search-all .csf-content,
|
327 |
+
.csf-show-all .csf-content {
|
328 |
+
margin-left: 0;
|
329 |
+
}
|
330 |
+
.csf-search-all .csf-section-title,
|
331 |
+
.csf-search-all .csf-section,
|
332 |
+
.csf-show-all .csf-section-title,
|
333 |
+
.csf-show-all .csf-section {
|
334 |
+
display: block !important;
|
335 |
+
}
|
336 |
+
|
337 |
+
.csf-search-all .csf-section-title {
|
338 |
+
display: none !important;
|
339 |
+
}
|
340 |
+
|
341 |
+
.csf-expand-all {
|
342 |
+
float: left;
|
343 |
+
padding: 0 8px;
|
344 |
+
margin-right: 4px;
|
345 |
+
z-index: 1;
|
346 |
+
font-size: 13px;
|
347 |
+
line-height: 30px;
|
348 |
+
cursor: pointer;
|
349 |
+
user-select: none;
|
350 |
+
border-radius: 2px;
|
351 |
+
transition: all .2s;
|
352 |
+
}
|
353 |
+
.csf-expand-all span {
|
354 |
+
font-size: 11px;
|
355 |
+
vertical-align: middle;
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* 01. 11. Search Input
|
360 |
+
*/
|
361 |
+
.csf-search {
|
362 |
+
float: left;
|
363 |
+
}
|
364 |
+
.csf-search input {
|
365 |
+
margin: 0 2px 0 0;
|
366 |
+
border: none;
|
367 |
+
font-size: 12px;
|
368 |
+
line-height: 30px;
|
369 |
+
min-height: 30px;
|
370 |
+
text-align: inherit;
|
371 |
+
padding: 0 10px;
|
372 |
+
border-radius: 2px;
|
373 |
+
box-shadow: none;
|
374 |
+
}
|
375 |
+
.csf-search input:focus {
|
376 |
+
box-shadow: none;
|
377 |
+
}
|
378 |
+
|
379 |
+
.csf-saving .csf-buttons,
|
380 |
+
.csf-saving .csf-content {
|
381 |
+
cursor: default;
|
382 |
+
pointer-events: none;
|
383 |
+
opacity: 0.5;
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* 01. 12. Metabox
|
388 |
+
*/
|
389 |
+
.csf-metabox {
|
390 |
+
margin: -6px -12px -12px -12px;
|
391 |
+
}
|
392 |
+
.csf-metabox .csf-field {
|
393 |
+
padding: 20px;
|
394 |
+
}
|
395 |
+
.csf-metabox .csf-section-title {
|
396 |
+
padding: 20px;
|
397 |
+
}
|
398 |
+
|
399 |
+
.block-editor-page .csf-metabox {
|
400 |
+
margin: -6px -14px -14px -14px;
|
401 |
+
}
|
402 |
+
|
403 |
+
.block-editor-editor-skeleton__content .csf-metabox {
|
404 |
+
border-left: 1px solid #e2e4e7;
|
405 |
+
border-right: 1px solid #e2e4e7;
|
406 |
+
}
|
407 |
+
|
408 |
+
.csf-sections-reset {
|
409 |
+
float: left;
|
410 |
+
width: 100%;
|
411 |
+
text-align: right;
|
412 |
+
border-top: 1px solid #eee;
|
413 |
+
}
|
414 |
+
.csf-sections-reset .csf-button-cancel,
|
415 |
+
.csf-sections-reset input {
|
416 |
+
display: none;
|
417 |
+
}
|
418 |
+
.csf-sections-reset label {
|
419 |
+
padding: 10px;
|
420 |
+
}
|
421 |
+
.csf-sections-reset span {
|
422 |
+
-webkit-user-select: none;
|
423 |
+
user-select: none;
|
424 |
+
}
|
425 |
+
.csf-sections-reset input:checked ~ .csf-button-reset {
|
426 |
+
display: none;
|
427 |
+
}
|
428 |
+
.csf-sections-reset input:checked ~ .csf-button-cancel {
|
429 |
+
display: inline-block;
|
430 |
+
}
|
431 |
+
|
432 |
+
#side-sortables .csf-section-title {
|
433 |
+
padding: 12px;
|
434 |
+
}
|
435 |
+
#side-sortables .csf-field {
|
436 |
+
padding: 10px 15px;
|
437 |
+
}
|
438 |
+
#side-sortables .csf-field .csf-title {
|
439 |
+
float: none;
|
440 |
+
width: 100%;
|
441 |
+
margin-bottom: 6px;
|
442 |
+
}
|
443 |
+
#side-sortables .csf-field .csf-fieldset {
|
444 |
+
float: none;
|
445 |
+
width: 100%;
|
446 |
+
}
|
447 |
+
#side-sortables .csf-field-text input {
|
448 |
+
width: 100%;
|
449 |
+
}
|
450 |
+
#side-sortables .csf-notice {
|
451 |
+
padding: 10px 15px;
|
452 |
+
}
|
453 |
+
|
454 |
+
/**
|
455 |
+
* 01. 13. Comment Metabox
|
456 |
+
*/
|
457 |
+
.csf-comment-metabox {
|
458 |
+
margin: -6px -12px -12px -12px;
|
459 |
+
}
|
460 |
+
.csf-comment-metabox .csf-field {
|
461 |
+
padding: 20px;
|
462 |
+
}
|
463 |
+
.csf-comment-metabox .csf-section-title {
|
464 |
+
padding: 20px;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* 01. 14. Help Tooltip
|
469 |
+
*/
|
470 |
+
.csf-tooltip {
|
471 |
+
position: absolute;
|
472 |
+
z-index: 5000001;
|
473 |
+
font-size: 12px;
|
474 |
+
line-height: 1.4;
|
475 |
+
text-align: center;
|
476 |
+
text-decoration: none;
|
477 |
+
padding: 6px 12px;
|
478 |
+
max-width: 200px;
|
479 |
+
color: #fff;
|
480 |
+
background-color: #000;
|
481 |
+
background-color: rgba(0, 0, 0, 0.85);
|
482 |
+
border-radius: 4px;
|
483 |
+
}
|
484 |
+
|
485 |
+
/**
|
486 |
+
* 02. Themes
|
487 |
+
*/
|
488 |
+
/**
|
489 |
+
* 02. 01. Theme Dark
|
490 |
+
*/
|
491 |
+
.csf-theme-dark .csf-header-inner {
|
492 |
+
background-color: #050505;
|
493 |
+
}
|
494 |
+
.csf-theme-dark .csf-header-inner h1 {
|
495 |
+
color: #fff;
|
496 |
+
}
|
497 |
+
.csf-theme-dark .csf-header-inner h1 small {
|
498 |
+
color: #555;
|
499 |
+
}
|
500 |
+
.csf-theme-dark .csf-expand-all {
|
501 |
+
color: #999;
|
502 |
+
background-color: #222;
|
503 |
+
}
|
504 |
+
.csf-theme-dark .csf-expand-all:hover {
|
505 |
+
color: #fff;
|
506 |
+
background-color: #333;
|
507 |
+
}
|
508 |
+
.csf-theme-dark .csf-search input {
|
509 |
+
color: #fff;
|
510 |
+
background-color: #222;
|
511 |
+
}
|
512 |
+
.csf-theme-dark .csf-search:focus {
|
513 |
+
background-color: #444;
|
514 |
+
}
|
515 |
+
.csf-theme-dark .csf-search::-webkit-input-placeholder {
|
516 |
+
color: #666;
|
517 |
+
}
|
518 |
+
.csf-theme-dark .csf-nav ul li a {
|
519 |
+
color: #999;
|
520 |
+
border-color: #2f2f2f;
|
521 |
+
background-color: #222;
|
522 |
+
}
|
523 |
+
.csf-theme-dark .csf-nav ul li a:hover {
|
524 |
+
color: #fff;
|
525 |
+
}
|
526 |
+
.csf-theme-dark .csf-nav ul li .csf-active {
|
527 |
+
color: #fff;
|
528 |
+
background-color: #111;
|
529 |
+
}
|
530 |
+
.csf-theme-dark .csf-nav ul ul li a {
|
531 |
+
border-color: #2f2f2f;
|
532 |
+
background-color: #191919;
|
533 |
+
}
|
534 |
+
.csf-theme-dark .csf-nav ul ul li .csf-active {
|
535 |
+
background-color: #101010;
|
536 |
+
}
|
537 |
+
.csf-theme-dark .csf-nav ul ul:before {
|
538 |
+
background-color: rgba(34, 34, 34, 0.75);
|
539 |
+
}
|
540 |
+
.csf-theme-dark .csf-nav > ul > li:last-child > a {
|
541 |
+
border: none;
|
542 |
+
}
|
543 |
+
.csf-theme-dark .csf-nav-normal ul li a {
|
544 |
+
border-bottom-width: 1px;
|
545 |
+
border-bottom-style: solid;
|
546 |
+
}
|
547 |
+
.csf-theme-dark .csf-nav-normal ul li .csf-active:after {
|
548 |
+
content: " ";
|
549 |
+
position: absolute;
|
550 |
+
right: 0;
|
551 |
+
top: 50%;
|
552 |
+
height: 0;
|
553 |
+
width: 0;
|
554 |
+
pointer-events: none;
|
555 |
+
border: solid transparent;
|
556 |
+
border-right-color: #fff;
|
557 |
+
border-width: 4px;
|
558 |
+
margin-top: -4px;
|
559 |
+
}
|
560 |
+
.csf-theme-dark .csf-nav-inline {
|
561 |
+
background-color: #222;
|
562 |
+
}
|
563 |
+
.csf-theme-dark .csf-nav-inline ul li a {
|
564 |
+
text-align: center;
|
565 |
+
border-right-width: 1px;
|
566 |
+
border-right-style: solid;
|
567 |
+
}
|
568 |
+
.csf-theme-dark .csf-nav-inline ul li .csf-active:after {
|
569 |
+
content: " ";
|
570 |
+
position: absolute;
|
571 |
+
left: 50%;
|
572 |
+
bottom: 0;
|
573 |
+
height: 0;
|
574 |
+
width: 0;
|
575 |
+
pointer-events: none;
|
576 |
+
border: solid transparent;
|
577 |
+
border-bottom-color: #fff;
|
578 |
+
border-width: 4px;
|
579 |
+
margin-left: -4px;
|
580 |
+
}
|
581 |
+
.csf-theme-dark .csf-nav-background {
|
582 |
+
background-color: #222;
|
583 |
+
}
|
584 |
+
.csf-theme-dark .csf-footer {
|
585 |
+
color: #555;
|
586 |
+
background-color: #050505;
|
587 |
+
}
|
588 |
+
|
589 |
+
/**
|
590 |
+
* 02. 02. Theme Light
|
591 |
+
*/
|
592 |
+
.csf-theme-light .csf-container {
|
593 |
+
border: 1px solid #ccd0d4;
|
594 |
+
box-shadow: 0 0 15 rgba(0, 0, 0, 0.04);
|
595 |
+
}
|
596 |
+
.csf-theme-light .csf-header-inner {
|
597 |
+
border-bottom: 1px solid #ccd0d4;
|
598 |
+
background-color: #f5f5f5;
|
599 |
+
background: linear-gradient(#fefefe, #f5f5f5);
|
600 |
+
}
|
601 |
+
.csf-theme-light .csf-header-inner h1 small {
|
602 |
+
color: #999;
|
603 |
+
}
|
604 |
+
.csf-theme-light .csf-expand-all {
|
605 |
+
color: #999;
|
606 |
+
background-color: #eee;
|
607 |
+
}
|
608 |
+
.csf-theme-light .csf-expand-all:hover {
|
609 |
+
color: #555;
|
610 |
+
}
|
611 |
+
.csf-theme-light .csf-search input {
|
612 |
+
color: #555;
|
613 |
+
background-color: #eee;
|
614 |
+
}
|
615 |
+
.csf-theme-light .csf-search input::-webkit-input-placeholder {
|
616 |
+
color: #999;
|
617 |
+
}
|
618 |
+
.csf-theme-light .csf-nav ul li a {
|
619 |
+
font-weight: 500;
|
620 |
+
color: #444;
|
621 |
+
background-color: #f5f5f5;
|
622 |
+
}
|
623 |
+
.csf-theme-light .csf-nav ul li a:hover {
|
624 |
+
color: #111;
|
625 |
+
background-color: #fff;
|
626 |
+
}
|
627 |
+
.csf-theme-light .csf-nav ul li .csf-active {
|
628 |
+
color: #111;
|
629 |
+
background-color: #fff;
|
630 |
+
}
|
631 |
+
.csf-theme-light .csf-nav ul ul li a {
|
632 |
+
background-color: #eee;
|
633 |
+
}
|
634 |
+
.csf-theme-light .csf-nav-normal > ul {
|
635 |
+
margin-right: -1px;
|
636 |
+
margin-bottom: -1px;
|
637 |
+
}
|
638 |
+
.csf-theme-light .csf-nav-normal > ul li a {
|
639 |
+
border-bottom: 1px solid #ccd0d4;
|
640 |
+
border-right: 1px solid #ccd0d4;
|
641 |
+
}
|
642 |
+
.csf-theme-light .csf-nav-normal > ul li .csf-active {
|
643 |
+
border-right-color: #fff;
|
644 |
+
}
|
645 |
+
.csf-theme-light .csf-nav-inline {
|
646 |
+
background-color: #f5f5f5;
|
647 |
+
border-bottom: 1px solid #ccd0d4;
|
648 |
+
}
|
649 |
+
.csf-theme-light .csf-nav-inline > ul {
|
650 |
+
margin-bottom: -1px;
|
651 |
+
}
|
652 |
+
.csf-theme-light .csf-nav-inline > ul li a {
|
653 |
+
text-align: center;
|
654 |
+
border-right: 1px solid #ccd0d4;
|
655 |
+
border-bottom: 1px solid #ccd0d4;
|
656 |
+
}
|
657 |
+
.csf-theme-light .csf-nav-inline > ul li .csf-active {
|
658 |
+
border-bottom-color: #fff;
|
659 |
+
}
|
660 |
+
.csf-theme-light .csf-nav-inline > ul ul {
|
661 |
+
display: none !important;
|
662 |
+
}
|
663 |
+
.csf-theme-light .csf-nav-inline .csf-arrow:after {
|
664 |
+
display: none;
|
665 |
+
}
|
666 |
+
.csf-theme-light .csf-nav-background {
|
667 |
+
background-color: #f5f5f5;
|
668 |
+
border-right: 1px solid #ccd0d4;
|
669 |
+
}
|
670 |
+
.csf-theme-light .csf-footer {
|
671 |
+
color: #555;
|
672 |
+
border-top: 1px solid #ccd0d4;
|
673 |
+
background-color: #f5f5f5;
|
674 |
+
background: linear-gradient(#fafafa, #f5f5f5);
|
675 |
+
}
|
676 |
+
|
677 |
+
/**
|
678 |
+
* 03. Fields
|
679 |
+
*/
|
680 |
+
.csf-field {
|
681 |
+
position: relative;
|
682 |
+
padding: 30px;
|
683 |
+
}
|
684 |
+
.csf-field + .csf-field {
|
685 |
+
border-top: 1px solid #eee;
|
686 |
+
}
|
687 |
+
.csf-field p:first-child {
|
688 |
+
margin-top: 0;
|
689 |
+
}
|
690 |
+
.csf-field p:last-child {
|
691 |
+
margin-bottom: 0;
|
692 |
+
}
|
693 |
+
.csf-field:after, .csf-field:before {
|
694 |
+
content: " ";
|
695 |
+
display: table;
|
696 |
+
}
|
697 |
+
.csf-field:after {
|
698 |
+
clear: both;
|
699 |
+
}
|
700 |
+
.csf-field h4 {
|
701 |
+
margin-top: 0;
|
702 |
+
}
|
703 |
+
.csf-field .csf-title {
|
704 |
+
position: relative;
|
705 |
+
width: 20%;
|
706 |
+
float: left;
|
707 |
+
}
|
708 |
+
.csf-field .csf-title h4 {
|
709 |
+
margin: 0;
|
710 |
+
color: #23282d;
|
711 |
+
}
|
712 |
+
.csf-field .csf-fieldset {
|
713 |
+
float: right;
|
714 |
+
width: calc(80% - 20px);
|
715 |
+
}
|
716 |
+
|
717 |
+
.csf-pseudo-field {
|
718 |
+
padding: 0 5px 0 0 !important;
|
719 |
+
display: inline-block;
|
720 |
+
}
|
721 |
+
.csf-pseudo-field + .csf-pseudo-field {
|
722 |
+
border: 0;
|
723 |
+
}
|
724 |
+
.csf-pseudo-field pre {
|
725 |
+
display: none;
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* 03. 02. Field: accordion
|
730 |
+
*/
|
731 |
+
.csf-field-accordion .csf-accordion-item {
|
732 |
+
position: relative;
|
733 |
+
margin-bottom: 5px;
|
734 |
+
}
|
735 |
+
.csf-field-accordion .csf-accordion-item:last-child {
|
736 |
+
margin-bottom: 0;
|
737 |
+
}
|
738 |
+
.csf-field-accordion .csf-accordion-item h4 {
|
739 |
+
font-size: 1em;
|
740 |
+
}
|
741 |
+
.csf-field-accordion .csf-accordion-title {
|
742 |
+
display: block;
|
743 |
+
cursor: pointer;
|
744 |
+
position: relative;
|
745 |
+
margin: 0;
|
746 |
+
padding: 15px;
|
747 |
+
min-height: 0;
|
748 |
+
font-size: 100%;
|
749 |
+
user-select: none;
|
750 |
+
border: 1px solid #ccd0d4;
|
751 |
+
background-color: #fafafa;
|
752 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
753 |
+
transition: border-color .15s;
|
754 |
+
}
|
755 |
+
.csf-field-accordion .csf-accordion-title:active, .csf-field-accordion .csf-accordion-title:hover, .csf-field-accordion .csf-accordion-title:focus {
|
756 |
+
outline: none;
|
757 |
+
border-color: #999;
|
758 |
+
}
|
759 |
+
.csf-field-accordion .csf-accordion-title .csf--icon {
|
760 |
+
width: 20px;
|
761 |
+
text-align: center;
|
762 |
+
margin-right: 2px;
|
763 |
+
}
|
764 |
+
.csf-field-accordion .csf-accordion-icon {
|
765 |
+
width: 16px;
|
766 |
+
text-align: center;
|
767 |
+
}
|
768 |
+
.csf-field-accordion .csf-accordion-content {
|
769 |
+
display: none;
|
770 |
+
padding: 0;
|
771 |
+
border: 1px solid #ccd0d4;
|
772 |
+
border-top: none;
|
773 |
+
background-color: #fff;
|
774 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
775 |
+
}
|
776 |
+
.csf-field-accordion .csf-accordion-content > .csf-field {
|
777 |
+
padding: 15px;
|
778 |
+
}
|
779 |
+
.csf-field-accordion .csf-accordion-open {
|
780 |
+
display: block;
|
781 |
+
}
|
782 |
+
|
783 |
+
/**
|
784 |
+
* 03. 03. Field: background
|
785 |
+
*/
|
786 |
+
.csf-field-background .csf-field {
|
787 |
+
border: 0 !important;
|
788 |
+
padding: 0;
|
789 |
+
margin-bottom: 6px;
|
790 |
+
margin-right: 6px;
|
791 |
+
}
|
792 |
+
.csf-field-background .csf--title {
|
793 |
+
color: #777;
|
794 |
+
font-size: 12px;
|
795 |
+
}
|
796 |
+
.csf-field-background .csf--background-colors {
|
797 |
+
display: flex;
|
798 |
+
flex-wrap: wrap;
|
799 |
+
}
|
800 |
+
.csf-field-background .csf--background-attributes {
|
801 |
+
display: flex;
|
802 |
+
flex-wrap: wrap;
|
803 |
+
}
|
804 |
+
.csf-field-background .csf--background-attributes select {
|
805 |
+
min-width: 100%;
|
806 |
+
margin: 0;
|
807 |
+
}
|
808 |
+
.csf-field-background .csf--background-attributes .csf-field {
|
809 |
+
flex: 1;
|
810 |
+
}
|
811 |
+
.csf-field-background .csf--attributes-hidden {
|
812 |
+
display: none;
|
813 |
+
}
|
814 |
+
|
815 |
+
/**
|
816 |
+
* 03. 04. Field: backup
|
817 |
+
*/
|
818 |
+
.csf-field-backup textarea {
|
819 |
+
width: 100%;
|
820 |
+
min-height: 200px;
|
821 |
+
margin-bottom: 5px;
|
822 |
+
}
|
823 |
+
.csf-field-backup small {
|
824 |
+
display: inline-block;
|
825 |
+
margin: 5px;
|
826 |
+
}
|
827 |
+
.csf-field-backup hr {
|
828 |
+
margin: 20px 0;
|
829 |
+
border: none;
|
830 |
+
border-bottom: 1px solid #e5e5e5;
|
831 |
+
}
|
832 |
+
|
833 |
+
/**
|
834 |
+
* 03. 05. Field: border, spacing, dimensions
|
835 |
+
*/
|
836 |
+
.csf-field-border .csf--inputs,
|
837 |
+
.csf-field-spacing .csf--inputs,
|
838 |
+
.csf-field-dimensions .csf--inputs {
|
839 |
+
float: left;
|
840 |
+
display: flex;
|
841 |
+
flex-wrap: wrap;
|
842 |
+
}
|
843 |
+
.csf-field-border .csf--input,
|
844 |
+
.csf-field-spacing .csf--input,
|
845 |
+
.csf-field-dimensions .csf--input {
|
846 |
+
display: flex;
|
847 |
+
padding-right: 6px;
|
848 |
+
padding-bottom: 4px;
|
849 |
+
box-sizing: border-box;
|
850 |
+
}
|
851 |
+
.csf-field-border .csf--input select,
|
852 |
+
.csf-field-spacing .csf--input select,
|
853 |
+
.csf-field-dimensions .csf--input select {
|
854 |
+
margin: 0;
|
855 |
+
}
|
856 |
+
.csf-field-border .csf--input input,
|
857 |
+
.csf-field-spacing .csf--input input,
|
858 |
+
.csf-field-dimensions .csf--input input {
|
859 |
+
position: relative;
|
860 |
+
z-index: 1;
|
861 |
+
margin: 0;
|
862 |
+
width: 65px;
|
863 |
+
max-width: 100%;
|
864 |
+
text-align: center;
|
865 |
+
}
|
866 |
+
.csf-field-border .csf--color,
|
867 |
+
.csf-field-spacing .csf--color,
|
868 |
+
.csf-field-dimensions .csf--color {
|
869 |
+
float: left;
|
870 |
+
}
|
871 |
+
.csf-field-border .csf--label,
|
872 |
+
.csf-field-spacing .csf--label,
|
873 |
+
.csf-field-dimensions .csf--label {
|
874 |
+
display: flex;
|
875 |
+
flex-direction: column;
|
876 |
+
justify-content: center;
|
877 |
+
user-select: none;
|
878 |
+
min-width: 20px;
|
879 |
+
max-width: 100%;
|
880 |
+
padding: 0 4px;
|
881 |
+
font-size: 12px;
|
882 |
+
text-align: center;
|
883 |
+
color: #555;
|
884 |
+
border: 1px solid #7B776C;
|
885 |
+
background-color: #f5f5f5;
|
886 |
+
}
|
887 |
+
.csf-field-border .csf--icon,
|
888 |
+
.csf-field-spacing .csf--icon,
|
889 |
+
.csf-field-dimensions .csf--icon {
|
890 |
+
border-right: 0;
|
891 |
+
border-radius: 4px 0 0 4px;
|
892 |
+
}
|
893 |
+
.csf-field-border .csf--icon + input,
|
894 |
+
.csf-field-spacing .csf--icon + input,
|
895 |
+
.csf-field-dimensions .csf--icon + input {
|
896 |
+
border-top-left-radius: 0 !important;
|
897 |
+
border-bottom-left-radius: 0 !important;
|
898 |
+
}
|
899 |
+
.csf-field-border .csf--unit,
|
900 |
+
.csf-field-spacing .csf--unit,
|
901 |
+
.csf-field-dimensions .csf--unit {
|
902 |
+
border-left: 0;
|
903 |
+
border-radius: 0 4px 4px 0;
|
904 |
+
}
|
905 |
+
.csf-field-border .csf--is-unit,
|
906 |
+
.csf-field-spacing .csf--is-unit,
|
907 |
+
.csf-field-dimensions .csf--is-unit {
|
908 |
+
border-top-right-radius: 0 !important;
|
909 |
+
border-bottom-right-radius: 0 !important;
|
910 |
+
}
|
911 |
+
|
912 |
+
/**
|
913 |
+
* 03. 06. Field: button_set
|
914 |
+
*/
|
915 |
+
.csf-field-button_set .csf--buttons {
|
916 |
+
display: inline-block;
|
917 |
+
}
|
918 |
+
.csf-field-button_set .csf--button {
|
919 |
+
position: relative;
|
920 |
+
z-index: 1;
|
921 |
+
float: left;
|
922 |
+
cursor: pointer;
|
923 |
+
padding: 7px 14px;
|
924 |
+
min-width: 16px;
|
925 |
+
text-align: center;
|
926 |
+
color: #555;
|
927 |
+
border: 1px solid #cccccc;
|
928 |
+
background-color: #f7f7f7;
|
929 |
+
user-select: none;
|
930 |
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
931 |
+
}
|
932 |
+
.csf-field-button_set .csf--button:first-child {
|
933 |
+
border-radius: 4px 0 0 4px;
|
934 |
+
}
|
935 |
+
.csf-field-button_set .csf--button:last-child {
|
936 |
+
border-radius: 0 4px 4px 0;
|
937 |
+
}
|
938 |
+
.csf-field-button_set .csf--button:not(:first-child) {
|
939 |
+
margin-left: -1px;
|
940 |
+
}
|
941 |
+
.csf-field-button_set .csf--button:hover {
|
942 |
+
background-color: #eee;
|
943 |
+
}
|
944 |
+
.csf-field-button_set .csf--active:hover,
|
945 |
+
.csf-field-button_set .csf--active {
|
946 |
+
z-index: 2;
|
947 |
+
color: #fff;
|
948 |
+
border-color: #006799;
|
949 |
+
background-color: #0085ba;
|
950 |
+
}
|
951 |
+
.csf-field-button_set input {
|
952 |
+
display: none;
|
953 |
+
}
|
954 |
+
|
955 |
+
/**
|
956 |
+
* 03. 07. Field: checkbox, radio
|
957 |
+
*/
|
958 |
+
.csf-field-checkbox ul,
|
959 |
+
.csf-field-radio ul {
|
960 |
+
margin: 0;
|
961 |
+
padding: 0;
|
962 |
+
list-style-type: none;
|
963 |
+
overflow-y: auto;
|
964 |
+
max-height: 305px;
|
965 |
+
}
|
966 |
+
.csf-field-checkbox ul li,
|
967 |
+
.csf-field-radio ul li {
|
968 |
+
margin-bottom: 6px;
|
969 |
+
}
|
970 |
+
.csf-field-checkbox ul ul,
|
971 |
+
.csf-field-radio ul ul {
|
972 |
+
max-height: none;
|
973 |
+
}
|
974 |
+
.csf-field-checkbox ul ul li,
|
975 |
+
.csf-field-radio ul ul li {
|
976 |
+
margin-left: 8px;
|
977 |
+
}
|
978 |
+
.csf-field-checkbox ul ul li:first-child,
|
979 |
+
.csf-field-radio ul ul li:first-child {
|
980 |
+
margin-left: 0;
|
981 |
+
}
|
982 |
+
.csf-field-checkbox input,
|
983 |
+
.csf-field-radio input {
|
984 |
+
margin: 0 1px;
|
985 |
+
}
|
986 |
+
.csf-field-checkbox .csf--inline-list li,
|
987 |
+
.csf-field-radio .csf--inline-list li {
|
988 |
+
display: inline-block;
|
989 |
+
margin-right: 15px;
|
990 |
+
}
|
991 |
+
.csf-field-checkbox .csf--text,
|
992 |
+
.csf-field-radio .csf--text {
|
993 |
+
margin-left: 5px;
|
994 |
+
vertical-align: middle;
|
995 |
+
}
|
996 |
+
.csf-field-checkbox .csf-checker,
|
997 |
+
.csf-field-radio .csf-checker {
|
998 |
+
cursor: pointer;
|
999 |
+
}
|
1000 |
+
|
1001 |
+
/**
|
1002 |
+
* 03. 08. Field: code_editor
|
1003 |
+
*/
|
1004 |
+
.csf-field-code_editor .CodeMirror {
|
1005 |
+
width: 100%;
|
1006 |
+
height: 400px;
|
1007 |
+
}
|
1008 |
+
.csf-field-code_editor .cm-s-default {
|
1009 |
+
border: 1px solid #ccd0d4;
|
1010 |
+
}
|
1011 |
+
.csf-field-code_editor textarea {
|
1012 |
+
width: 100%;
|
1013 |
+
height: 400px;
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
/**
|
1017 |
+
* 03. 09. Field: color
|
1018 |
+
*/
|
1019 |
+
.csf-field-color > input {
|
1020 |
+
opacity: 0.75;
|
1021 |
+
width: 115px;
|
1022 |
+
max-width: 100%;
|
1023 |
+
}
|
1024 |
+
.csf-field-color .button.wp-picker-clear {
|
1025 |
+
padding: 0 8px;
|
1026 |
+
margin-left: 6px;
|
1027 |
+
line-height: 2.54545455;
|
1028 |
+
min-height: 30px;
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
/**
|
1032 |
+
* 03. 10. Field: color_group
|
1033 |
+
*/
|
1034 |
+
.csf-field-color_group .csf--left {
|
1035 |
+
float: left;
|
1036 |
+
margin-right: 10px;
|
1037 |
+
margin-bottom: 5px;
|
1038 |
+
}
|
1039 |
+
.csf-field-color_group .csf--title {
|
1040 |
+
color: #999;
|
1041 |
+
margin-bottom: 5px;
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
/**
|
1045 |
+
* 03. 11. Field: fieldset
|
1046 |
+
*/
|
1047 |
+
.csf-field-fieldset .csf-fieldset-content {
|
1048 |
+
border: 1px solid #ccd0d4;
|
1049 |
+
background-color: #fff;
|
1050 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1051 |
+
}
|
1052 |
+
.csf-field-fieldset .csf-fieldset-content > .csf-field {
|
1053 |
+
padding: 15px;
|
1054 |
+
}
|
1055 |
+
.csf-field-fieldset .csf-field-subheading {
|
1056 |
+
font-size: 13px;
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
/**
|
1060 |
+
* 03. 12. Field: date
|
1061 |
+
*/
|
1062 |
+
.csf-field-date input {
|
1063 |
+
margin: 0;
|
1064 |
+
}
|
1065 |
+
.csf-field-date .csf--to {
|
1066 |
+
margin-left: 7px;
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
.csf-datepicker-wrapper {
|
1070 |
+
margin-top: 5px;
|
1071 |
+
width: auto;
|
1072 |
+
background-color: #fff;
|
1073 |
+
z-index: 9999999 !important;
|
1074 |
+
box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
|
1075 |
+
}
|
1076 |
+
.csf-datepicker-wrapper * {
|
1077 |
+
float: none;
|
1078 |
+
margin: 0;
|
1079 |
+
padding: 0;
|
1080 |
+
font-family: inherit;
|
1081 |
+
font-weight: normal;
|
1082 |
+
font-style: normal;
|
1083 |
+
text-decoration: none;
|
1084 |
+
border: 0;
|
1085 |
+
border-radius: 0;
|
1086 |
+
box-shadow: none;
|
1087 |
+
}
|
1088 |
+
.csf-datepicker-wrapper .ui-widget-header,
|
1089 |
+
.csf-datepicker-wrapper .ui-datepicker-header {
|
1090 |
+
color: #fff;
|
1091 |
+
background: #00a0d2;
|
1092 |
+
}
|
1093 |
+
.csf-datepicker-wrapper .ui-datepicker-header .ui-state-hover {
|
1094 |
+
cursor: pointer;
|
1095 |
+
}
|
1096 |
+
.csf-datepicker-wrapper .ui-datepicker-title {
|
1097 |
+
font-size: 14px;
|
1098 |
+
line-height: 40px;
|
1099 |
+
text-align: center;
|
1100 |
+
}
|
1101 |
+
.csf-datepicker-wrapper .ui-datepicker-prev,
|
1102 |
+
.csf-datepicker-wrapper .ui-datepicker-next {
|
1103 |
+
position: static;
|
1104 |
+
top: auto;
|
1105 |
+
left: auto;
|
1106 |
+
right: auto;
|
1107 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
1108 |
+
font-weight: 900;
|
1109 |
+
font-size: 12px;
|
1110 |
+
text-align: center;
|
1111 |
+
width: 41px;
|
1112 |
+
height: 40px;
|
1113 |
+
line-height: 40px;
|
1114 |
+
color: #fff;
|
1115 |
+
background-color: rgba(255, 255, 255, 0.1);
|
1116 |
+
text-rendering: auto;
|
1117 |
+
-webkit-font-smoothing: antialiased;
|
1118 |
+
-moz-osx-font-smoothing: grayscale;
|
1119 |
+
}
|
1120 |
+
.csf-datepicker-wrapper .ui-datepicker-next span,
|
1121 |
+
.csf-datepicker-wrapper .ui-datepicker-prev span {
|
1122 |
+
display: none;
|
1123 |
+
}
|
1124 |
+
.csf-datepicker-wrapper .ui-datepicker-prev {
|
1125 |
+
float: left;
|
1126 |
+
}
|
1127 |
+
.csf-datepicker-wrapper .ui-datepicker-next {
|
1128 |
+
float: right;
|
1129 |
+
}
|
1130 |
+
.csf-datepicker-wrapper .ui-datepicker-prev:before {
|
1131 |
+
content: '\f053';
|
1132 |
+
}
|
1133 |
+
.csf-datepicker-wrapper .ui-datepicker-next:before {
|
1134 |
+
content: '\f054';
|
1135 |
+
}
|
1136 |
+
.csf-datepicker-wrapper .ui-datepicker-prev-hover,
|
1137 |
+
.csf-datepicker-wrapper .ui-datepicker-next-hover {
|
1138 |
+
opacity: 0.75;
|
1139 |
+
}
|
1140 |
+
.csf-datepicker-wrapper tbody .ui-datepicker-week-col {
|
1141 |
+
background-color: #f7f7f7;
|
1142 |
+
}
|
1143 |
+
.csf-datepicker-wrapper .ui-datepicker-buttonpane {
|
1144 |
+
padding: 10px;
|
1145 |
+
text-align: center;
|
1146 |
+
background-color: #f7f7f7;
|
1147 |
+
}
|
1148 |
+
.csf-datepicker-wrapper .ui-datepicker-buttonpane button {
|
1149 |
+
cursor: pointer;
|
1150 |
+
margin: 0 5px;
|
1151 |
+
padding: 7px 14px;
|
1152 |
+
border: 1px solid #eee;
|
1153 |
+
background-color: #fff;
|
1154 |
+
}
|
1155 |
+
.csf-datepicker-wrapper select {
|
1156 |
+
margin: 0 4px;
|
1157 |
+
}
|
1158 |
+
.csf-datepicker-wrapper select option {
|
1159 |
+
color: #555;
|
1160 |
+
}
|
1161 |
+
.csf-datepicker-wrapper table {
|
1162 |
+
font-size: 13px;
|
1163 |
+
border-collapse: collapse;
|
1164 |
+
width: 100%;
|
1165 |
+
}
|
1166 |
+
.csf-datepicker-wrapper thead {
|
1167 |
+
color: #fff;
|
1168 |
+
background: #32373c;
|
1169 |
+
}
|
1170 |
+
.csf-datepicker-wrapper th {
|
1171 |
+
text-align: center;
|
1172 |
+
padding: 7px;
|
1173 |
+
border: 1px solid #444;
|
1174 |
+
}
|
1175 |
+
.csf-datepicker-wrapper td {
|
1176 |
+
text-align: center;
|
1177 |
+
border: 1px solid #f4f4f4;
|
1178 |
+
}
|
1179 |
+
.csf-datepicker-wrapper td.ui-datepicker-other-month {
|
1180 |
+
border: transparent;
|
1181 |
+
}
|
1182 |
+
.csf-datepicker-wrapper td .ui-state-default {
|
1183 |
+
color: #555;
|
1184 |
+
width: auto;
|
1185 |
+
display: block;
|
1186 |
+
padding: 6px 12px;
|
1187 |
+
}
|
1188 |
+
.csf-datepicker-wrapper td .ui-state-active,
|
1189 |
+
.csf-datepicker-wrapper td .ui-state-hover {
|
1190 |
+
color: #fff;
|
1191 |
+
background-color: #0073aa;
|
1192 |
+
}
|
1193 |
+
.csf-datepicker-wrapper td.ui-state-disabled .ui-state-default {
|
1194 |
+
opacity: 0.5;
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
/**
|
1198 |
+
* 03. 13. Field: datetime
|
1199 |
+
*/
|
1200 |
+
.csf-field-datetime input {
|
1201 |
+
margin: 0;
|
1202 |
+
}
|
1203 |
+
.csf-field-datetime .csf--to {
|
1204 |
+
margin-left: 7px;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
.csf-flatpickr select,
|
1208 |
+
.csf-flatpickr input {
|
1209 |
+
min-height: auto;
|
1210 |
+
}
|
1211 |
+
.csf-flatpickr select:focus,
|
1212 |
+
.csf-flatpickr input:focus {
|
1213 |
+
box-shadow: none;
|
1214 |
+
}
|
1215 |
+
.csf-flatpickr.open {
|
1216 |
+
z-index: 9999999 !important;
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
/**
|
1220 |
+
* 03. 14. Field: gallery
|
1221 |
+
*/
|
1222 |
+
.csf-field-gallery ul {
|
1223 |
+
margin: 0;
|
1224 |
+
padding: 0;
|
1225 |
+
list-style-type: none;
|
1226 |
+
}
|
1227 |
+
.csf-field-gallery ul li {
|
1228 |
+
display: inline-block;
|
1229 |
+
position: relative;
|
1230 |
+
padding: 4px;
|
1231 |
+
margin: 0 5px 10px 0;
|
1232 |
+
border: 1px solid #ccc;
|
1233 |
+
background-color: #f9f9f9;
|
1234 |
+
border-radius: 2px;
|
1235 |
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
|
1236 |
+
}
|
1237 |
+
.csf-field-gallery ul li img {
|
1238 |
+
max-height: 60px;
|
1239 |
+
display: inline-block;
|
1240 |
+
vertical-align: middle;
|
1241 |
+
}
|
1242 |
+
.csf-field-gallery .button {
|
1243 |
+
margin-right: 5px;
|
1244 |
+
margin-bottom: 5px;
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
/**
|
1248 |
+
* 03. 15. Field: group
|
1249 |
+
*/
|
1250 |
+
.csf-field-group .csf-cloneable-hidden {
|
1251 |
+
display: none !important;
|
1252 |
+
}
|
1253 |
+
.csf-field-group .csf-cloneable-wrapper {
|
1254 |
+
position: relative;
|
1255 |
+
}
|
1256 |
+
.csf-field-group .csf-cloneable-item {
|
1257 |
+
display: none;
|
1258 |
+
position: relative;
|
1259 |
+
margin-bottom: 5px;
|
1260 |
+
}
|
1261 |
+
.csf-field-group .csf-cloneable-item h4 {
|
1262 |
+
font-size: 1em;
|
1263 |
+
}
|
1264 |
+
.csf-field-group .ui-accordion .csf-cloneable-item {
|
1265 |
+
display: block;
|
1266 |
+
}
|
1267 |
+
.csf-field-group .csf-cloneable-content {
|
1268 |
+
border: 1px solid #ccd0d4;
|
1269 |
+
background-color: #fff;
|
1270 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1271 |
+
}
|
1272 |
+
.csf-field-group .csf-cloneable-content > .csf-field {
|
1273 |
+
padding: 15px;
|
1274 |
+
}
|
1275 |
+
.csf-field-group .csf-cloneable-title {
|
1276 |
+
display: block;
|
1277 |
+
cursor: pointer;
|
1278 |
+
position: relative;
|
1279 |
+
user-select: none;
|
1280 |
+
margin: 0;
|
1281 |
+
padding: 15px 65px 15px 10px;
|
1282 |
+
min-height: 0;
|
1283 |
+
font-size: 100%;
|
1284 |
+
border: 1px solid #ccd0d4;
|
1285 |
+
background-color: #fafafa;
|
1286 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1287 |
+
transition: border-color .15s;
|
1288 |
+
}
|
1289 |
+
.csf-field-group .csf-cloneable-title:active, .csf-field-group .csf-cloneable-title:hover, .csf-field-group .csf-cloneable-title:focus {
|
1290 |
+
border-color: #999;
|
1291 |
+
outline: none;
|
1292 |
+
}
|
1293 |
+
.csf-field-group .csf-cloneable-helper {
|
1294 |
+
position: absolute;
|
1295 |
+
top: 12px;
|
1296 |
+
right: 10px;
|
1297 |
+
z-index: 1;
|
1298 |
+
font-size: 14px;
|
1299 |
+
line-height: 1em;
|
1300 |
+
}
|
1301 |
+
.csf-field-group .csf-cloneable-helper i {
|
1302 |
+
display: inline-block;
|
1303 |
+
cursor: pointer;
|
1304 |
+
padding: 5px;
|
1305 |
+
color: #999;
|
1306 |
+
}
|
1307 |
+
.csf-field-group .csf-cloneable-helper i:hover {
|
1308 |
+
color: #555;
|
1309 |
+
}
|
1310 |
+
.csf-field-group .csf-cloneable-content {
|
1311 |
+
padding: 0;
|
1312 |
+
border-top: 0;
|
1313 |
+
}
|
1314 |
+
.csf-field-group .csf-cloneable-title-prefix,
|
1315 |
+
.csf-field-group .csf-cloneable-title-number {
|
1316 |
+
margin-right: 5px;
|
1317 |
+
}
|
1318 |
+
.csf-field-group .csf-cloneable-alert {
|
1319 |
+
display: none;
|
1320 |
+
margin-bottom: 5px;
|
1321 |
+
padding: 10px 20px;
|
1322 |
+
color: #a94442;
|
1323 |
+
border: 1px solid #ebccd1;
|
1324 |
+
background-color: #f2dede;
|
1325 |
+
}
|
1326 |
+
.csf-field-group .widget-placeholder {
|
1327 |
+
margin-bottom: 10px;
|
1328 |
+
border: 1px dashed #f1c40f;
|
1329 |
+
background-color: #fffae4;
|
1330 |
+
}
|
1331 |
+
.csf-field-group .csf-cloneable-header-icon {
|
1332 |
+
display: inline-block;
|
1333 |
+
text-align: center;
|
1334 |
+
font-size: 14px;
|
1335 |
+
width: 17px;
|
1336 |
+
text-indent: 0;
|
1337 |
+
vertical-align: text-top;
|
1338 |
+
}
|
1339 |
+
.csf-field-group .csf-cloneable-placeholder {
|
1340 |
+
background-color: #ddd;
|
1341 |
+
margin-top: 4px;
|
1342 |
+
width: 100px;
|
1343 |
+
height: 10px;
|
1344 |
+
font-size: 10px;
|
1345 |
+
line-height: 10px;
|
1346 |
+
display: inline-block;
|
1347 |
+
vertical-align: top;
|
1348 |
+
border-radius: 2px;
|
1349 |
+
}
|
1350 |
+
|
1351 |
+
/**
|
1352 |
+
* 03. 16. Field: icon
|
1353 |
+
*/
|
1354 |
+
.csf-field-icon .csf-icon-select {
|
1355 |
+
display: flex;
|
1356 |
+
grid-gap: 5px;
|
1357 |
+
}
|
1358 |
+
.csf-field-icon .csf-icon-preview:not(.hidden) {
|
1359 |
+
display: flex;
|
1360 |
+
}
|
1361 |
+
.csf-field-icon .csf-icon-preview i {
|
1362 |
+
display: flex;
|
1363 |
+
justify-content: center;
|
1364 |
+
align-items: center;
|
1365 |
+
width: 30px;
|
1366 |
+
font-size: 14px;
|
1367 |
+
text-align: center;
|
1368 |
+
vertical-align: top;
|
1369 |
+
color: #555;
|
1370 |
+
border: 1px solid #ccc;
|
1371 |
+
background-color: #f7f7f7;
|
1372 |
+
border-radius: 3px;
|
1373 |
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
/**
|
1377 |
+
* 03. 17. Field: image_select
|
1378 |
+
*/
|
1379 |
+
.csf-field-image_select .csf--image {
|
1380 |
+
display: inline-block;
|
1381 |
+
margin: 0 5px 5px 0;
|
1382 |
+
}
|
1383 |
+
.csf-field-image_select .csf--inline-list .csf--image {
|
1384 |
+
display: block;
|
1385 |
+
}
|
1386 |
+
.csf-field-image_select figure {
|
1387 |
+
cursor: pointer;
|
1388 |
+
position: relative;
|
1389 |
+
display: inline-block;
|
1390 |
+
max-width: 100%;
|
1391 |
+
margin: 0;
|
1392 |
+
vertical-align: bottom;
|
1393 |
+
border: 2px solid transparent;
|
1394 |
+
background-color: #fff;
|
1395 |
+
user-select: none;
|
1396 |
+
transition: all .2s;
|
1397 |
+
}
|
1398 |
+
.csf-field-image_select figure:before {
|
1399 |
+
position: absolute;
|
1400 |
+
top: 0;
|
1401 |
+
left: 0;
|
1402 |
+
text-align: center;
|
1403 |
+
font-size: 10px;
|
1404 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
1405 |
+
font-weight: 900;
|
1406 |
+
content: "\f00c";
|
1407 |
+
width: 16px;
|
1408 |
+
height: 16px;
|
1409 |
+
line-height: 14px;
|
1410 |
+
opacity: 0;
|
1411 |
+
color: #fff;
|
1412 |
+
background-color: #222;
|
1413 |
+
transition: opacity .2s;
|
1414 |
+
}
|
1415 |
+
.csf-field-image_select .csf--active figure {
|
1416 |
+
border-color: #222;
|
1417 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
1418 |
+
}
|
1419 |
+
.csf-field-image_select .csf--active figure:before {
|
1420 |
+
opacity: 1;
|
1421 |
+
}
|
1422 |
+
.csf-field-image_select img {
|
1423 |
+
max-width: 100%;
|
1424 |
+
height: auto;
|
1425 |
+
vertical-align: top;
|
1426 |
+
}
|
1427 |
+
.csf-field-image_select input {
|
1428 |
+
display: none;
|
1429 |
+
}
|
1430 |
+
|
1431 |
+
/**
|
1432 |
+
* 03. 18. Field: link_color
|
1433 |
+
*/
|
1434 |
+
.csf-field-link_color .csf--left {
|
1435 |
+
float: left;
|
1436 |
+
margin-right: 10px;
|
1437 |
+
margin-bottom: 5px;
|
1438 |
+
}
|
1439 |
+
.csf-field-link_color .csf--title {
|
1440 |
+
color: #777;
|
1441 |
+
margin-bottom: 5px;
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
/**
|
1445 |
+
* 03. 19. Field: map
|
1446 |
+
*/
|
1447 |
+
.csf-field-map input {
|
1448 |
+
width: 100%;
|
1449 |
+
}
|
1450 |
+
.csf-field-map input[type="text"].ui-autocomplete-loading {
|
1451 |
+
background-position-x: calc(100% - 5px);
|
1452 |
+
}
|
1453 |
+
.csf-field-map .csf--map-search + .csf--map-osm-wrap {
|
1454 |
+
margin-top: 10px;
|
1455 |
+
}
|
1456 |
+
.csf-field-map .csf--map-osm-wrap {
|
1457 |
+
position: relative;
|
1458 |
+
padding: 5px;
|
1459 |
+
border: 1px solid #eee;
|
1460 |
+
background-color: #fff;
|
1461 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
1462 |
+
}
|
1463 |
+
.csf-field-map .csf--map-osm {
|
1464 |
+
position: relative;
|
1465 |
+
z-index: 1;
|
1466 |
+
min-height: 250px;
|
1467 |
+
}
|
1468 |
+
.csf-field-map .csf--map-inputs {
|
1469 |
+
margin-top: 10px;
|
1470 |
+
display: flex;
|
1471 |
+
justify-content: space-between;
|
1472 |
+
}
|
1473 |
+
.csf-field-map .csf--map-input {
|
1474 |
+
flex: 1;
|
1475 |
+
}
|
1476 |
+
.csf-field-map .csf--map-input:last-child {
|
1477 |
+
padding-left: 10px;
|
1478 |
+
}
|
1479 |
+
.csf-field-map label {
|
1480 |
+
display: block;
|
1481 |
+
color: #777;
|
1482 |
+
font-size: 12px;
|
1483 |
+
margin: 0 0 2px 0;
|
1484 |
+
}
|
1485 |
+
|
1486 |
+
.csf-map-ui-autocomplate {
|
1487 |
+
z-index: 999999;
|
1488 |
+
border-radius: 4px;
|
1489 |
+
overflow: hidden;
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
/**
|
1493 |
+
* 03. 20. Field: media
|
1494 |
+
*/
|
1495 |
+
.csf-field-media .csf--placeholder {
|
1496 |
+
display: flex;
|
1497 |
+
align-items: flex-start;
|
1498 |
+
}
|
1499 |
+
.csf-field-media .csf--placeholder input {
|
1500 |
+
width: 100%;
|
1501 |
+
margin: 0;
|
1502 |
+
}
|
1503 |
+
.csf-field-media .button {
|
1504 |
+
margin-left: 5px;
|
1505 |
+
}
|
1506 |
+
.csf-field-media .hidden + .button {
|
1507 |
+
margin-left: 0;
|
1508 |
+
}
|
1509 |
+
.csf-field-media .csf--preview {
|
1510 |
+
position: relative;
|
1511 |
+
}
|
1512 |
+
|
1513 |
+
/**
|
1514 |
+
* 03. 21. Field: palette
|
1515 |
+
*/
|
1516 |
+
.csf-field-palette .csf--palette {
|
1517 |
+
position: relative;
|
1518 |
+
display: inline-block;
|
1519 |
+
cursor: pointer;
|
1520 |
+
border: 2px solid #ddd;
|
1521 |
+
margin-right: 10px;
|
1522 |
+
margin-bottom: 10px;
|
1523 |
+
user-select: none;
|
1524 |
+
-webkit-user-select: none;
|
1525 |
+
transition: all .2s;
|
1526 |
+
}
|
1527 |
+
.csf-field-palette .csf--palette span {
|
1528 |
+
vertical-align: middle;
|
1529 |
+
display: inline-block;
|
1530 |
+
width: 22px;
|
1531 |
+
height: 60px;
|
1532 |
+
line-height: 60px;
|
1533 |
+
overflow: hidden;
|
1534 |
+
text-indent: -999px;
|
1535 |
+
}
|
1536 |
+
.csf-field-palette .csf--palette:before {
|
1537 |
+
position: absolute;
|
1538 |
+
top: 0;
|
1539 |
+
left: 0;
|
1540 |
+
text-align: center;
|
1541 |
+
font-size: 10px;
|
1542 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
1543 |
+
font-weight: 900;
|
1544 |
+
content: "\f00c";
|
1545 |
+
width: 16px;
|
1546 |
+
height: 16px;
|
1547 |
+
line-height: 14px;
|
1548 |
+
opacity: 0;
|
1549 |
+
color: #fff;
|
1550 |
+
background-color: #222;
|
1551 |
+
transition: opacity .2s;
|
1552 |
+
}
|
1553 |
+
.csf-field-palette .csf--active {
|
1554 |
+
border-color: #222;
|
1555 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
1556 |
+
}
|
1557 |
+
.csf-field-palette .csf--active:before {
|
1558 |
+
opacity: 1;
|
1559 |
+
}
|
1560 |
+
.csf-field-palette input {
|
1561 |
+
display: none;
|
1562 |
+
}
|
1563 |
+
|
1564 |
+
/**
|
1565 |
+
* 03. 22. Field: repeater
|
1566 |
+
*/
|
1567 |
+
.csf-field-repeater .csf-field-text input {
|
1568 |
+
width: 100%;
|
1569 |
+
}
|
1570 |
+
.csf-field-repeater .csf-repeater-hidden {
|
1571 |
+
display: none !important;
|
1572 |
+
}
|
1573 |
+
.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item {
|
1574 |
+
display: table;
|
1575 |
+
width: 100%;
|
1576 |
+
margin-bottom: 5px;
|
1577 |
+
border: 1px solid #eee;
|
1578 |
+
}
|
1579 |
+
.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item h4 {
|
1580 |
+
font-size: 1em;
|
1581 |
+
}
|
1582 |
+
.csf-field-repeater .csf-repeater-content {
|
1583 |
+
width: 100%;
|
1584 |
+
display: table-cell;
|
1585 |
+
vertical-align: middle;
|
1586 |
+
background-color: #fff;
|
1587 |
+
}
|
1588 |
+
.csf-field-repeater .csf-repeater-content > .csf-field {
|
1589 |
+
padding: 15px;
|
1590 |
+
}
|
1591 |
+
.csf-field-repeater .csf-repeater-helper {
|
1592 |
+
width: 100%;
|
1593 |
+
display: table-cell;
|
1594 |
+
vertical-align: middle;
|
1595 |
+
text-align: center;
|
1596 |
+
font-size: 14px;
|
1597 |
+
line-height: 1em;
|
1598 |
+
border-left: 1px solid #eee;
|
1599 |
+
background-color: #f7f7f7;
|
1600 |
+
}
|
1601 |
+
.csf-field-repeater .csf-repeater-helper i {
|
1602 |
+
display: inline-block;
|
1603 |
+
cursor: pointer;
|
1604 |
+
color: #999;
|
1605 |
+
padding: 5px;
|
1606 |
+
}
|
1607 |
+
.csf-field-repeater .csf-repeater-helper i:hover {
|
1608 |
+
color: #555;
|
1609 |
+
}
|
1610 |
+
.csf-field-repeater .csf-repeater-helper-inner {
|
1611 |
+
width: 75px;
|
1612 |
+
}
|
1613 |
+
.csf-field-repeater .csf-repeater-alert {
|
1614 |
+
display: none;
|
1615 |
+
margin-bottom: 5px;
|
1616 |
+
padding: 10px 20px;
|
1617 |
+
color: #a94442;
|
1618 |
+
border: 1px solid #ebccd1;
|
1619 |
+
background-color: #f2dede;
|
1620 |
+
}
|
1621 |
+
.csf-field-repeater .widget-placeholder {
|
1622 |
+
height: 50px;
|
1623 |
+
margin-bottom: 3px;
|
1624 |
+
border: 1px dashed #f1c40f;
|
1625 |
+
background-color: #fffae4;
|
1626 |
+
}
|
1627 |
+
.csf-field-repeater .ui-sortable-helper {
|
1628 |
+
height: 50px !important;
|
1629 |
+
overflow: hidden !important;
|
1630 |
+
border-color: #ccc !important;
|
1631 |
+
background-color: #eee !important;
|
1632 |
+
opacity: 0.5;
|
1633 |
+
}
|
1634 |
+
.csf-field-repeater .ui-sortable-helper .csf-repeater-helper,
|
1635 |
+
.csf-field-repeater .ui-sortable-helper .csf-repeater-content {
|
1636 |
+
display: none;
|
1637 |
+
}
|
1638 |
+
|
1639 |
+
/**
|
1640 |
+
* 03. 23. Field: select
|
1641 |
+
*/
|
1642 |
+
.csf-field-select .csf-fieldset {
|
1643 |
+
min-height: 30px;
|
1644 |
+
}
|
1645 |
+
.csf-field-select .csf-chosen {
|
1646 |
+
display: none;
|
1647 |
+
}
|
1648 |
+
.csf-field-select select {
|
1649 |
+
max-width: 100%;
|
1650 |
+
margin: 0;
|
1651 |
+
}
|
1652 |
+
.csf-field-select .csf-hide-select {
|
1653 |
+
display: none !important;
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
/**
|
1657 |
+
* 03. 24. Field: slider
|
1658 |
+
*/
|
1659 |
+
.csf-field-slider .csf--wrap {
|
1660 |
+
display: flex;
|
1661 |
+
align-items: center;
|
1662 |
+
}
|
1663 |
+
.csf-field-slider .csf--input {
|
1664 |
+
display: flex;
|
1665 |
+
}
|
1666 |
+
.csf-field-slider .csf--unit {
|
1667 |
+
display: flex;
|
1668 |
+
justify-content: center;
|
1669 |
+
flex-direction: column;
|
1670 |
+
user-select: none;
|
1671 |
+
padding: 0 6px;
|
1672 |
+
font-size: 11px;
|
1673 |
+
line-height: 1;
|
1674 |
+
border-radius: 0 4px 4px 0;
|
1675 |
+
color: #555;
|
1676 |
+
border: 1px solid #7e8993;
|
1677 |
+
border-left: 0;
|
1678 |
+
background-color: #f5f5f5;
|
1679 |
+
}
|
1680 |
+
.csf-field-slider .csf-slider-ui {
|
1681 |
+
margin-right: 15px;
|
1682 |
+
}
|
1683 |
+
.csf-field-slider input[type=number] {
|
1684 |
+
position: relative;
|
1685 |
+
z-index: 1;
|
1686 |
+
margin: 0;
|
1687 |
+
width: 50px;
|
1688 |
+
text-align: center;
|
1689 |
+
}
|
1690 |
+
.csf-field-slider .csf--is-unit {
|
1691 |
+
border-top-right-radius: 0 !important;
|
1692 |
+
border-bottom-right-radius: 0 !important;
|
1693 |
+
}
|
1694 |
+
.csf-field-slider .ui-slider {
|
1695 |
+
position: relative;
|
1696 |
+
width: 100%;
|
1697 |
+
height: 3px;
|
1698 |
+
border: none;
|
1699 |
+
background: #ddd;
|
1700 |
+
border-radius: 2px;
|
1701 |
+
}
|
1702 |
+
.csf-field-slider .ui-slider-range {
|
1703 |
+
height: 3px;
|
1704 |
+
border: none;
|
1705 |
+
background: #333;
|
1706 |
+
border-radius: 2px;
|
1707 |
+
}
|
1708 |
+
.csf-field-slider .ui-slider-handle {
|
1709 |
+
position: absolute;
|
1710 |
+
width: 16px;
|
1711 |
+
height: 16px;
|
1712 |
+
top: -7px;
|
1713 |
+
margin-left: -8px;
|
1714 |
+
border: none;
|
1715 |
+
background: #333;
|
1716 |
+
border-radius: 2px;
|
1717 |
+
}
|
1718 |
+
.csf-field-slider .ui-state-active,
|
1719 |
+
.csf-field-slider .ui-slider-handle:hover {
|
1720 |
+
cursor: pointer;
|
1721 |
+
background: #111;
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
/**
|
1725 |
+
* 03. 25. Field: sortable
|
1726 |
+
*/
|
1727 |
+
.csf-field-sortable .csf-field-text input {
|
1728 |
+
width: 100%;
|
1729 |
+
max-width: 100%;
|
1730 |
+
}
|
1731 |
+
.csf-field-sortable .csf-sortable .csf-sortable-item {
|
1732 |
+
display: table;
|
1733 |
+
width: 100%;
|
1734 |
+
margin-bottom: 5px;
|
1735 |
+
border: 1px solid #eee;
|
1736 |
+
}
|
1737 |
+
.csf-field-sortable .csf-sortable .csf-sortable-item h4 {
|
1738 |
+
font-size: 1em;
|
1739 |
+
}
|
1740 |
+
.csf-field-sortable .csf-sortable-content {
|
1741 |
+
width: 100%;
|
1742 |
+
display: table-cell;
|
1743 |
+
vertical-align: middle;
|
1744 |
+
background-color: #fff;
|
1745 |
+
}
|
1746 |
+
.csf-field-sortable .csf-sortable-content > .csf-field {
|
1747 |
+
padding: 15px;
|
1748 |
+
}
|
1749 |
+
.csf-field-sortable .csf-sortable-helper {
|
1750 |
+
width: 100%;
|
1751 |
+
display: table-cell;
|
1752 |
+
vertical-align: middle;
|
1753 |
+
text-align: center;
|
1754 |
+
font-size: 14px;
|
1755 |
+
line-height: 1em;
|
1756 |
+
border-left: 1px solid #eee;
|
1757 |
+
background-color: #f7f7f7;
|
1758 |
+
}
|
1759 |
+
.csf-field-sortable .csf-sortable-helper i {
|
1760 |
+
display: inline-block;
|
1761 |
+
cursor: pointer;
|
1762 |
+
width: 50px;
|
1763 |
+
color: #555;
|
1764 |
+
}
|
1765 |
+
.csf-field-sortable .csf-sortable-helper i:hover {
|
1766 |
+
opacity: 0.5;
|
1767 |
+
}
|
1768 |
+
.csf-field-sortable .widget-placeholder {
|
1769 |
+
height: 50px;
|
1770 |
+
margin-bottom: 3px;
|
1771 |
+
border: 1px dashed #f1c40f;
|
1772 |
+
background-color: #fffae4;
|
1773 |
+
}
|
1774 |
+
.csf-field-sortable .ui-sortable-helper {
|
1775 |
+
height: 50px !important;
|
1776 |
+
overflow: hidden !important;
|
1777 |
+
border-color: #ccc !important;
|
1778 |
+
background-color: #eee !important;
|
1779 |
+
opacity: 0.5;
|
1780 |
+
}
|
1781 |
+
.csf-field-sortable .ui-sortable-helper .csf-sortable-helper,
|
1782 |
+
.csf-field-sortable .ui-sortable-helper .csf-sortable-content {
|
1783 |
+
display: none;
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
/**
|
1787 |
+
* 03. 26. Field: sorter
|
1788 |
+
*/
|
1789 |
+
.csf-field-sorter .ui-sortable-placeholder {
|
1790 |
+
height: 20px;
|
1791 |
+
border: 1px dashed #f1c40f;
|
1792 |
+
background-color: #fffae4;
|
1793 |
+
}
|
1794 |
+
.csf-field-sorter .csf-modules {
|
1795 |
+
float: left;
|
1796 |
+
width: 50%;
|
1797 |
+
box-sizing: border-box;
|
1798 |
+
}
|
1799 |
+
.csf-field-sorter .csf-modules:first-child {
|
1800 |
+
padding-right: 15px;
|
1801 |
+
}
|
1802 |
+
.csf-field-sorter .csf-modules:last-child {
|
1803 |
+
padding-left: 15px;
|
1804 |
+
}
|
1805 |
+
.csf-field-sorter .csf-disabled,
|
1806 |
+
.csf-field-sorter .csf-enabled {
|
1807 |
+
padding: 5px 15px;
|
1808 |
+
border: 1px dashed #ddd;
|
1809 |
+
background-color: #fff;
|
1810 |
+
}
|
1811 |
+
.csf-field-sorter .csf-disabled li {
|
1812 |
+
opacity: 0.5;
|
1813 |
+
transition: opacity .15s;
|
1814 |
+
}
|
1815 |
+
.csf-field-sorter .csf-disabled .ui-sortable-helper {
|
1816 |
+
opacity: 1;
|
1817 |
+
}
|
1818 |
+
.csf-field-sorter .csf-sorter-title {
|
1819 |
+
font-size: 13px;
|
1820 |
+
font-weight: 600;
|
1821 |
+
padding: 10px;
|
1822 |
+
text-align: center;
|
1823 |
+
border: 1px dashed #ddd;
|
1824 |
+
border-bottom: none;
|
1825 |
+
background-color: #f8f8f8;
|
1826 |
+
text-transform: uppercase;
|
1827 |
+
}
|
1828 |
+
.csf-field-sorter ul {
|
1829 |
+
list-style-type: none;
|
1830 |
+
margin: 0;
|
1831 |
+
padding: 0;
|
1832 |
+
min-height: 62px;
|
1833 |
+
}
|
1834 |
+
.csf-field-sorter ul li {
|
1835 |
+
margin: 10px 0;
|
1836 |
+
padding: 10px 15px;
|
1837 |
+
cursor: move;
|
1838 |
+
font-weight: bold;
|
1839 |
+
text-align: center;
|
1840 |
+
border: 1px solid #e5e5e5;
|
1841 |
+
background-color: #fafafa;
|
1842 |
+
transition: border-color .15s;
|
1843 |
+
}
|
1844 |
+
.csf-field-sorter ul li:hover {
|
1845 |
+
border-color: #bbb;
|
1846 |
+
}
|
1847 |
+
|
1848 |
+
/**
|
1849 |
+
* 03. 27. Field: spinner
|
1850 |
+
*/
|
1851 |
+
.csf-field-spinner .csf--spin {
|
1852 |
+
display: flex;
|
1853 |
+
}
|
1854 |
+
.csf-field-spinner .ui-widget {
|
1855 |
+
font-family: inherit;
|
1856 |
+
}
|
1857 |
+
.csf-field-spinner .ui-spinner {
|
1858 |
+
display: flex;
|
1859 |
+
align-items: stretch;
|
1860 |
+
overflow: unset;
|
1861 |
+
border: none;
|
1862 |
+
background: none;
|
1863 |
+
border-radius: 0;
|
1864 |
+
}
|
1865 |
+
.csf-field-spinner .ui-spinner .ui-button {
|
1866 |
+
display: flex;
|
1867 |
+
flex-direction: column;
|
1868 |
+
justify-content: center;
|
1869 |
+
text-align: center;
|
1870 |
+
min-width: 20px;
|
1871 |
+
padding: 0 4px;
|
1872 |
+
margin: 0;
|
1873 |
+
color: #555;
|
1874 |
+
background-color: #f5f5f5;
|
1875 |
+
border: 1px solid #7e8993;
|
1876 |
+
}
|
1877 |
+
.csf-field-spinner .ui-spinner .ui-spinner-button {
|
1878 |
+
position: relative;
|
1879 |
+
cursor: pointer;
|
1880 |
+
height: auto;
|
1881 |
+
}
|
1882 |
+
.csf-field-spinner .ui-spinner .ui-spinner-button:hover {
|
1883 |
+
background-color: #e7e7e7;
|
1884 |
+
}
|
1885 |
+
.csf-field-spinner .ui-spinner .ui-spinner-button:active {
|
1886 |
+
background-color: #ddd;
|
1887 |
+
}
|
1888 |
+
.csf-field-spinner .ui-spinner .ui-spinner-button:before {
|
1889 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
1890 |
+
font-weight: 900;
|
1891 |
+
font-size: 14px;
|
1892 |
+
line-height: 14px;
|
1893 |
+
}
|
1894 |
+
.csf-field-spinner .ui-spinner .ui-spinner-down {
|
1895 |
+
border-right: 0;
|
1896 |
+
border-radius: 4px 0 0 4px;
|
1897 |
+
}
|
1898 |
+
.csf-field-spinner .ui-spinner .ui-spinner-down:before {
|
1899 |
+
content: "\f0d9";
|
1900 |
+
}
|
1901 |
+
.csf-field-spinner .ui-spinner .ui-spinner-up {
|
1902 |
+
border-left: 0;
|
1903 |
+
border-radius: 0 4px 4px 0;
|
1904 |
+
}
|
1905 |
+
.csf-field-spinner .ui-spinner .ui-spinner-up:before {
|
1906 |
+
content: "\f0da";
|
1907 |
+
}
|
1908 |
+
.csf-field-spinner .ui-spinner .csf--unit {
|
1909 |
+
border-left: 0;
|
1910 |
+
user-select: none;
|
1911 |
+
}
|
1912 |
+
.csf-field-spinner .ui-spinner .ui-button-text,
|
1913 |
+
.csf-field-spinner .ui-spinner .ui-button-icon,
|
1914 |
+
.csf-field-spinner .ui-spinner .ui-button-icon-space {
|
1915 |
+
display: none;
|
1916 |
+
}
|
1917 |
+
.csf-field-spinner .ui-spinner input {
|
1918 |
+
font-family: inherit;
|
1919 |
+
font-size: inherit;
|
1920 |
+
position: relative;
|
1921 |
+
z-index: 1;
|
1922 |
+
width: 50px;
|
1923 |
+
text-align: center;
|
1924 |
+
margin: 0;
|
1925 |
+
padding: 0 8px;
|
1926 |
+
border-radius: 0;
|
1927 |
+
}
|
1928 |
+
.csf-field-spinner .ui-spinner-down {
|
1929 |
+
order: 1;
|
1930 |
+
}
|
1931 |
+
.csf-field-spinner .ui-spinner-input {
|
1932 |
+
order: 2;
|
1933 |
+
}
|
1934 |
+
.csf-field-spinner .csf--unit {
|
1935 |
+
order: 3;
|
1936 |
+
}
|
1937 |
+
.csf-field-spinner .ui-spinner-up {
|
1938 |
+
order: 4;
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
/**
|
1942 |
+
* 03. 28. Field: switcher
|
1943 |
+
*/
|
1944 |
+
.csf-field-switcher .csf--switcher {
|
1945 |
+
float: left;
|
1946 |
+
cursor: pointer;
|
1947 |
+
position: relative;
|
1948 |
+
width: 60px;
|
1949 |
+
height: 26px;
|
1950 |
+
padding: 0;
|
1951 |
+
margin: 0;
|
1952 |
+
overflow: hidden;
|
1953 |
+
border-radius: 4px;
|
1954 |
+
background-color: #ed6f6f;
|
1955 |
+
user-select: none;
|
1956 |
+
-webkit-user-select: none;
|
1957 |
+
}
|
1958 |
+
.csf-field-switcher .csf--ball {
|
1959 |
+
position: absolute;
|
1960 |
+
top: 4px;
|
1961 |
+
left: 4px;
|
1962 |
+
width: 24px;
|
1963 |
+
height: 18px;
|
1964 |
+
background-color: #fff;
|
1965 |
+
border-radius: 4px;
|
1966 |
+
transition: all .1s;
|
1967 |
+
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
|
1968 |
+
}
|
1969 |
+
.csf-field-switcher .csf--on,
|
1970 |
+
.csf-field-switcher .csf--off {
|
1971 |
+
position: absolute;
|
1972 |
+
top: 0;
|
1973 |
+
left: 0;
|
1974 |
+
right: 0;
|
1975 |
+
font-size: 11px;
|
1976 |
+
line-height: 26px;
|
1977 |
+
font-weight: 500;
|
1978 |
+
font-style: normal;
|
1979 |
+
text-align: center;
|
1980 |
+
text-transform: uppercase;
|
1981 |
+
color: #fff;
|
1982 |
+
padding-right: 28px;
|
1983 |
+
opacity: 0;
|
1984 |
+
transition: all .1s;
|
1985 |
+
}
|
1986 |
+
.csf-field-switcher .csf--off {
|
1987 |
+
padding-right: 0;
|
1988 |
+
padding-left: 28px;
|
1989 |
+
opacity: 1;
|
1990 |
+
}
|
1991 |
+
.csf-field-switcher .csf--active {
|
1992 |
+
background: #4fb845;
|
1993 |
+
}
|
1994 |
+
.csf-field-switcher .csf--active .csf--on {
|
1995 |
+
opacity: 1;
|
1996 |
+
}
|
1997 |
+
.csf-field-switcher .csf--active .csf--off {
|
1998 |
+
opacity: 0;
|
1999 |
+
}
|
2000 |
+
.csf-field-switcher .csf--active .csf--ball {
|
2001 |
+
left: 100%;
|
2002 |
+
margin-left: -28px;
|
2003 |
+
}
|
2004 |
+
.csf-field-switcher .csf--label {
|
2005 |
+
float: left;
|
2006 |
+
margin-top: 4px;
|
2007 |
+
margin-left: 8px;
|
2008 |
+
font-weight: 400;
|
2009 |
+
color: #999;
|
2010 |
+
}
|
2011 |
+
|
2012 |
+
/**
|
2013 |
+
* 03. 29. Field: tabbed
|
2014 |
+
*/
|
2015 |
+
.csf-field-tabbed .csf-tabbed-content {
|
2016 |
+
border: 1px solid #ccd0d4;
|
2017 |
+
background-color: #fff;
|
2018 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
2019 |
+
}
|
2020 |
+
.csf-field-tabbed .csf-tabbed-content > .csf-field {
|
2021 |
+
padding: 15px;
|
2022 |
+
}
|
2023 |
+
.csf-field-tabbed .csf-tabbed-nav .csf--icon {
|
2024 |
+
padding-right: 5px;
|
2025 |
+
}
|
2026 |
+
.csf-field-tabbed .csf-tabbed-nav a {
|
2027 |
+
display: inline-block;
|
2028 |
+
padding: 12px 15px;
|
2029 |
+
margin-top: 1px;
|
2030 |
+
margin-right: 5px;
|
2031 |
+
margin-bottom: -1px;
|
2032 |
+
position: relative;
|
2033 |
+
text-decoration: none;
|
2034 |
+
color: #444;
|
2035 |
+
font-weight: 600;
|
2036 |
+
border: 1px solid #ccd0d4;
|
2037 |
+
background-color: #f3f3f3;
|
2038 |
+
transition: all .2s;
|
2039 |
+
}
|
2040 |
+
.csf-field-tabbed .csf-tabbed-nav a:hover {
|
2041 |
+
background-color: #f9f9f9;
|
2042 |
+
}
|
2043 |
+
.csf-field-tabbed .csf-tabbed-nav a.csf-tabbed-active {
|
2044 |
+
background-color: #fff;
|
2045 |
+
border-bottom-color: #fff;
|
2046 |
+
}
|
2047 |
+
.csf-field-tabbed .csf-tabbed-nav a:focus {
|
2048 |
+
outline: none;
|
2049 |
+
box-shadow: none;
|
2050 |
+
}
|
2051 |
+
|
2052 |
+
/**
|
2053 |
+
* 03. 30. Field: text
|
2054 |
+
*/
|
2055 |
+
.csf-field-text input {
|
2056 |
+
width: 50%;
|
2057 |
+
max-width: 100%;
|
2058 |
+
margin: 0;
|
2059 |
+
}
|
2060 |
+
|
2061 |
+
/**
|
2062 |
+
* 03. 31. Field: textarea
|
2063 |
+
*/
|
2064 |
+
.csf-field-textarea textarea {
|
2065 |
+
width: 100%;
|
2066 |
+
max-width: 100%;
|
2067 |
+
min-height: 125px;
|
2068 |
+
}
|
2069 |
+
.csf-field-textarea .csf-shortcode-button {
|
2070 |
+
margin-bottom: 10px;
|
2071 |
+
margin-right: 5px;
|
2072 |
+
}
|
2073 |
+
|
2074 |
+
/**
|
2075 |
+
* 03. 32. Field: typography
|
2076 |
+
*/
|
2077 |
+
.csf-field-typography textarea,
|
2078 |
+
.csf-field-typography select {
|
2079 |
+
margin: 0;
|
2080 |
+
min-width: 100%;
|
2081 |
+
max-width: 100%;
|
2082 |
+
}
|
2083 |
+
.csf-field-typography .csf--title {
|
2084 |
+
color: #777;
|
2085 |
+
margin: 0 0 2px 0;
|
2086 |
+
font-size: 12px;
|
2087 |
+
}
|
2088 |
+
.csf-field-typography .csf--title small {
|
2089 |
+
vertical-align: top;
|
2090 |
+
}
|
2091 |
+
.csf-field-typography .csf--blocks {
|
2092 |
+
display: flex;
|
2093 |
+
flex-wrap: wrap;
|
2094 |
+
}
|
2095 |
+
.csf-field-typography .csf--block {
|
2096 |
+
flex: 1;
|
2097 |
+
max-width: 100%;
|
2098 |
+
padding-right: 6px;
|
2099 |
+
padding-bottom: 6px;
|
2100 |
+
}
|
2101 |
+
.csf-field-typography .csf--input {
|
2102 |
+
margin: 0;
|
2103 |
+
min-width: 100%;
|
2104 |
+
}
|
2105 |
+
.csf-field-typography .csf--input-wrap {
|
2106 |
+
position: relative;
|
2107 |
+
}
|
2108 |
+
.csf-field-typography .csf--unit {
|
2109 |
+
position: absolute;
|
2110 |
+
z-index: 1;
|
2111 |
+
right: 4px;
|
2112 |
+
top: 4px;
|
2113 |
+
bottom: 4px;
|
2114 |
+
padding: 2px 6px;
|
2115 |
+
color: #666;
|
2116 |
+
font-size: 11px;
|
2117 |
+
line-height: 1;
|
2118 |
+
border-radius: 2px;
|
2119 |
+
background: #eee;
|
2120 |
+
user-select: none;
|
2121 |
+
display: flex;
|
2122 |
+
justify-content: center;
|
2123 |
+
flex-direction: column;
|
2124 |
+
}
|
2125 |
+
.csf-field-typography .csf--preview {
|
2126 |
+
font-size: 16px;
|
2127 |
+
line-height: 20px;
|
2128 |
+
padding: 20px;
|
2129 |
+
color: #222;
|
2130 |
+
border: 1px solid #eee;
|
2131 |
+
background-color: #fff;
|
2132 |
+
border-radius: 2.5px;
|
2133 |
+
user-select: none;
|
2134 |
+
-webkit-user-select: none;
|
2135 |
+
transition: background-color .2s, border-color .2s;
|
2136 |
+
}
|
2137 |
+
.csf-field-typography .csf--block-preview {
|
2138 |
+
cursor: pointer;
|
2139 |
+
position: relative;
|
2140 |
+
overflow: hidden;
|
2141 |
+
margin-top: 10px;
|
2142 |
+
max-width: 100%;
|
2143 |
+
}
|
2144 |
+
.csf-field-typography .csf--black-background {
|
2145 |
+
border-color: #000;
|
2146 |
+
background-color: #000;
|
2147 |
+
}
|
2148 |
+
.csf-field-typography .csf--toggle {
|
2149 |
+
position: absolute;
|
2150 |
+
top: 5px;
|
2151 |
+
right: 10px;
|
2152 |
+
color: #999;
|
2153 |
+
}
|
2154 |
+
.csf-field-typography .csf--block-extra-styles {
|
2155 |
+
margin-top: 5px;
|
2156 |
+
}
|
2157 |
+
|
2158 |
+
/**
|
2159 |
+
* 03. 33. Field: upload
|
2160 |
+
*/
|
2161 |
+
.csf-field-upload input {
|
2162 |
+
width: 100%;
|
2163 |
+
margin: 0;
|
2164 |
+
}
|
2165 |
+
.csf-field-upload .csf--wrap {
|
2166 |
+
display: flex;
|
2167 |
+
align-items: flex-start;
|
2168 |
+
}
|
2169 |
+
.csf-field-upload .button {
|
2170 |
+
margin-left: 5px;
|
2171 |
+
}
|
2172 |
+
.csf-field-upload .csf--preview {
|
2173 |
+
position: relative;
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
/**
|
2177 |
+
* 03. 34. Field: wp_editor
|
2178 |
+
*/
|
2179 |
+
.csf-field-wp_editor .csf-wp-editor {
|
2180 |
+
float: left;
|
2181 |
+
width: 100%;
|
2182 |
+
}
|
2183 |
+
.csf-field-wp_editor .mce-toolbar-grp {
|
2184 |
+
border: none;
|
2185 |
+
}
|
2186 |
+
.csf-field-wp_editor .mce-btn.mce-active button,
|
2187 |
+
.csf-field-wp_editor .mce-btn.mce-active:hover button,
|
2188 |
+
.csf-field-wp_editor .mce-btn.mce-active i,
|
2189 |
+
.csf-field-wp_editor .mce-btn.mce-active:hover i {
|
2190 |
+
color: #23282d;
|
2191 |
+
}
|
2192 |
+
.csf-field-wp_editor .wp-media-buttons {
|
2193 |
+
position: relative;
|
2194 |
+
z-index: 2;
|
2195 |
+
}
|
2196 |
+
.csf-field-wp_editor .wp-editor-tabs {
|
2197 |
+
position: relative;
|
2198 |
+
z-index: 1;
|
2199 |
+
}
|
2200 |
+
.csf-field-wp_editor .csf-no-tinymce {
|
2201 |
+
border: 1px solid #e5e5e5;
|
2202 |
+
}
|
2203 |
+
.csf-field-wp_editor .csf-no-quicktags .wp-media-buttons {
|
2204 |
+
float: none;
|
2205 |
+
display: block;
|
2206 |
+
}
|
2207 |
+
.csf-field-wp_editor .csf-no-quicktags .mce-tinymce {
|
2208 |
+
box-shadow: none;
|
2209 |
+
border: 1px solid #e5e5e5;
|
2210 |
+
}
|
2211 |
+
.csf-field-wp_editor textarea {
|
2212 |
+
width: 100%;
|
2213 |
+
max-width: 100%;
|
2214 |
+
margin: 0;
|
2215 |
+
box-shadow: none;
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
/**
|
2219 |
+
* 03. 35. Field: heading
|
2220 |
+
*/
|
2221 |
+
.csf-field-heading {
|
2222 |
+
font-size: 1.5em;
|
2223 |
+
font-weight: bold;
|
2224 |
+
color: #23282d;
|
2225 |
+
background-color: #f5f5f5;
|
2226 |
+
}
|
2227 |
+
|
2228 |
+
/**
|
2229 |
+
* 03. 36. Field: subheading
|
2230 |
+
*/
|
2231 |
+
.csf-field-subheading {
|
2232 |
+
font-size: 14px;
|
2233 |
+
font-weight: bold;
|
2234 |
+
padding-top: 17px;
|
2235 |
+
padding-bottom: 17px;
|
2236 |
+
color: #23282d;
|
2237 |
+
background-color: #f7f7f7;
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
/**
|
2241 |
+
* 03. 37. Field: submessage
|
2242 |
+
*/
|
2243 |
+
.csf-field-submessage {
|
2244 |
+
padding: 0 !important;
|
2245 |
+
border: 0 !important;
|
2246 |
+
}
|
2247 |
+
.csf-field-submessage + .csf-field {
|
2248 |
+
border-top: 0 !important;
|
2249 |
+
}
|
2250 |
+
|
2251 |
+
.csf-submessage {
|
2252 |
+
font-size: 12px;
|
2253 |
+
padding: 17px 30px;
|
2254 |
+
border-top: 1px solid transparent;
|
2255 |
+
border-bottom: 1px solid transparent;
|
2256 |
+
}
|
2257 |
+
|
2258 |
+
.csf-submessage-success {
|
2259 |
+
color: #3c763d;
|
2260 |
+
border-color: #d6e9c6;
|
2261 |
+
background-color: #dff0d8;
|
2262 |
+
}
|
2263 |
+
|
2264 |
+
.csf-submessage-info {
|
2265 |
+
color: #31708f;
|
2266 |
+
border-color: #bce8f1;
|
2267 |
+
background-color: #d9edf7;
|
2268 |
+
}
|
2269 |
+
|
2270 |
+
.csf-submessage-warning {
|
2271 |
+
color: #8a6d3b;
|
2272 |
+
border-color: #faebcc;
|
2273 |
+
background-color: #fcf8e3;
|
2274 |
+
}
|
2275 |
+
|
2276 |
+
.csf-submessage-danger {
|
2277 |
+
color: #a94442;
|
2278 |
+
border-color: #ebccd1;
|
2279 |
+
background-color: #f2dede;
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
.csf-submessage-normal {
|
2283 |
+
color: #23282d;
|
2284 |
+
border-color: #eee;
|
2285 |
+
background-color: #f7f7f7;
|
2286 |
+
}
|
2287 |
+
|
2288 |
+
/**
|
2289 |
+
* 03. 38. Field: notice
|
2290 |
+
*/
|
2291 |
+
.csf-field-notice {
|
2292 |
+
background-color: #f7f7f7;
|
2293 |
+
}
|
2294 |
+
|
2295 |
+
.csf-notice {
|
2296 |
+
padding: 12px;
|
2297 |
+
background-color: #fff;
|
2298 |
+
border-left-style: solid;
|
2299 |
+
border-left-width: 4px;
|
2300 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
2301 |
+
}
|
2302 |
+
|
2303 |
+
.csf-notice-success {
|
2304 |
+
border-color: #46b450;
|
2305 |
+
}
|
2306 |
+
|
2307 |
+
.csf-notice-info {
|
2308 |
+
border-color: #339fd4;
|
2309 |
+
}
|
2310 |
+
|
2311 |
+
.csf-notice-warning {
|
2312 |
+
border-color: #ffbc00;
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
.csf-notice-danger {
|
2316 |
+
border-color: #dc3232;
|
2317 |
+
}
|
2318 |
+
|
2319 |
+
.csf-notice-normal {
|
2320 |
+
border-color: #222;
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
/**
|
2324 |
+
* 03. 39. Field: number
|
2325 |
+
*/
|
2326 |
+
.csf-field-number input {
|
2327 |
+
width: 100%;
|
2328 |
+
margin: 0;
|
2329 |
+
}
|
2330 |
+
.csf-field-number .csf--wrap {
|
2331 |
+
position: relative;
|
2332 |
+
float: left;
|
2333 |
+
width: 100px;
|
2334 |
+
}
|
2335 |
+
.csf-field-number .csf--unit {
|
2336 |
+
position: absolute;
|
2337 |
+
z-index: 1;
|
2338 |
+
right: 4px;
|
2339 |
+
top: 4px;
|
2340 |
+
bottom: 4px;
|
2341 |
+
padding: 2px 6px;
|
2342 |
+
color: #666;
|
2343 |
+
font-size: 11px;
|
2344 |
+
line-height: 1;
|
2345 |
+
border-radius: 2px;
|
2346 |
+
background: #eee;
|
2347 |
+
user-select: none;
|
2348 |
+
display: flex;
|
2349 |
+
justify-content: center;
|
2350 |
+
flex-direction: column;
|
2351 |
+
}
|
2352 |
+
|
2353 |
+
/**
|
2354 |
+
* 03. 40. Field: link
|
2355 |
+
*/
|
2356 |
+
.csf-field-link .csf--result {
|
2357 |
+
display: inline-block;
|
2358 |
+
font-size: 12px;
|
2359 |
+
line-height: 16px;
|
2360 |
+
padding: 7px 10px;
|
2361 |
+
margin-bottom: 7px;
|
2362 |
+
color: #777;
|
2363 |
+
border: 1px solid #e5e5e5;
|
2364 |
+
background-color: #f5f5f5;
|
2365 |
+
border-radius: 2px;
|
2366 |
+
world-break: break-word;
|
2367 |
+
}
|
2368 |
+
.csf-field-link .csf--wrap {
|
2369 |
+
position: relative;
|
2370 |
+
float: left;
|
2371 |
+
width: 100px;
|
2372 |
+
}
|
2373 |
+
.csf-field-link .csf--unit {
|
2374 |
+
position: absolute;
|
2375 |
+
z-index: 1;
|
2376 |
+
right: 4px;
|
2377 |
+
top: 4px;
|
2378 |
+
bottom: 4px;
|
2379 |
+
padding: 2px 6px;
|
2380 |
+
color: #666;
|
2381 |
+
font-size: 11px;
|
2382 |
+
line-height: 1;
|
2383 |
+
border-radius: 2px;
|
2384 |
+
background: #eee;
|
2385 |
+
user-select: none;
|
2386 |
+
display: flex;
|
2387 |
+
justify-content: center;
|
2388 |
+
flex-direction: column;
|
2389 |
+
}
|
2390 |
+
|
2391 |
+
/**
|
2392 |
+
* 03. 41. others
|
2393 |
+
*/
|
2394 |
+
.csf-help {
|
2395 |
+
cursor: help;
|
2396 |
+
position: absolute;
|
2397 |
+
top: 0;
|
2398 |
+
right: 0;
|
2399 |
+
padding: 5px;
|
2400 |
+
font-size: 13px;
|
2401 |
+
color: #aaa;
|
2402 |
+
}
|
2403 |
+
.csf-help .csf-help-text {
|
2404 |
+
display: none;
|
2405 |
+
}
|
2406 |
+
|
2407 |
+
.csf--preview {
|
2408 |
+
max-width: 100%;
|
2409 |
+
}
|
2410 |
+
|
2411 |
+
.csf-image-preview {
|
2412 |
+
display: inline-flex;
|
2413 |
+
align-items: center;
|
2414 |
+
justify-content: center;
|
2415 |
+
flex-direction: column;
|
2416 |
+
position: relative;
|
2417 |
+
padding: 6px;
|
2418 |
+
max-width: 120px;
|
2419 |
+
max-height: 120px;
|
2420 |
+
min-width: 40px;
|
2421 |
+
min-height: 40px;
|
2422 |
+
margin-bottom: 10px;
|
2423 |
+
text-align: center;
|
2424 |
+
border-radius: 2px;
|
2425 |
+
border: 1px solid #ccc;
|
2426 |
+
background-color: #f9f9f9;
|
2427 |
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
|
2428 |
+
}
|
2429 |
+
.csf-image-preview i {
|
2430 |
+
cursor: pointer;
|
2431 |
+
position: absolute;
|
2432 |
+
z-index: 1;
|
2433 |
+
right: 4px;
|
2434 |
+
top: 4px;
|
2435 |
+
font-size: 14px;
|
2436 |
+
width: 22px;
|
2437 |
+
height: 22px;
|
2438 |
+
line-height: 22px;
|
2439 |
+
text-align: center;
|
2440 |
+
text-decoration: none;
|
2441 |
+
color: #fff;
|
2442 |
+
background-color: #dd3333;
|
2443 |
+
opacity: 0.75;
|
2444 |
+
border-radius: 2px;
|
2445 |
+
transition: all .2s;
|
2446 |
+
}
|
2447 |
+
.csf-image-preview i:hover {
|
2448 |
+
opacity: 1;
|
2449 |
+
}
|
2450 |
+
.csf-image-preview i:focus {
|
2451 |
+
box-shadow: none;
|
2452 |
+
}
|
2453 |
+
.csf-image-preview span {
|
2454 |
+
position: relative;
|
2455 |
+
overflow: hidden;
|
2456 |
+
display: flex;
|
2457 |
+
height: 100%;
|
2458 |
+
width: 100%;
|
2459 |
+
}
|
2460 |
+
.csf-image-preview img {
|
2461 |
+
max-width: 100%;
|
2462 |
+
height: auto;
|
2463 |
+
object-fit: contain;
|
2464 |
+
}
|
2465 |
+
|
2466 |
+
.csf-field-custom .csf-field {
|
2467 |
+
padding: 0;
|
2468 |
+
}
|
2469 |
+
|
2470 |
+
.csf-field .chosen-container-single .chosen-single {
|
2471 |
+
height: 28px;
|
2472 |
+
line-height: 26px;
|
2473 |
+
}
|
2474 |
+
.csf-field .chosen-container-single .chosen-single abbr {
|
2475 |
+
top: 0;
|
2476 |
+
right: 20px;
|
2477 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
2478 |
+
font-weight: 900;
|
2479 |
+
font-size: 12px;
|
2480 |
+
height: 100%;
|
2481 |
+
width: 18px;
|
2482 |
+
color: #aaa;
|
2483 |
+
text-align: center;
|
2484 |
+
background: none;
|
2485 |
+
}
|
2486 |
+
.csf-field .chosen-container-single .chosen-single abbr:before {
|
2487 |
+
content: "\f00d";
|
2488 |
+
}
|
2489 |
+
.csf-field .chosen-container-single .chosen-single abbr:hover {
|
2490 |
+
color: #555;
|
2491 |
+
}
|
2492 |
+
.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
2493 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
2494 |
+
font-weight: 900;
|
2495 |
+
font-size: 12px;
|
2496 |
+
height: 100%;
|
2497 |
+
width: 18px;
|
2498 |
+
color: #aaa;
|
2499 |
+
text-align: center;
|
2500 |
+
background: none;
|
2501 |
+
}
|
2502 |
+
.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
|
2503 |
+
content: "\f00d";
|
2504 |
+
display: inline-block;
|
2505 |
+
padding-top: 3px;
|
2506 |
+
}
|
2507 |
+
.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
|
2508 |
+
color: #555;
|
2509 |
+
}
|
2510 |
+
.csf-field .chosen-container-single .chosen-single div b {
|
2511 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
2512 |
+
font-weight: 900;
|
2513 |
+
font-size: 14px;
|
2514 |
+
color: #aaa;
|
2515 |
+
background: none;
|
2516 |
+
}
|
2517 |
+
.csf-field .chosen-container-single .chosen-single div b:before {
|
2518 |
+
content: "\f107";
|
2519 |
+
}
|
2520 |
+
.csf-field .chosen-container-single .chosen-single div b:hover {
|
2521 |
+
color: #555;
|
2522 |
+
}
|
2523 |
+
.csf-field .chosen-container-multi .chosen-choices li.search-choice-placeholder {
|
2524 |
+
border: 1px dashed #aaa;
|
2525 |
+
margin: 3px 5px 3px 0;
|
2526 |
+
}
|
2527 |
+
.csf-field .chosen-container-multi .ui-sortable li.search-choice span {
|
2528 |
+
cursor: move;
|
2529 |
+
}
|
2530 |
+
.csf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before {
|
2531 |
+
content: "\f106";
|
2532 |
+
}
|
2533 |
+
.csf-field .chosen-container-single .chosen-single-with-deselect span {
|
2534 |
+
margin-right: 40px;
|
2535 |
+
}
|
2536 |
+
.csf-field .chosen-container-single .chosen-search input[type="text"] {
|
2537 |
+
background: none;
|
2538 |
+
}
|
2539 |
+
.csf-field .chosen-container-single .chosen-search:before {
|
2540 |
+
font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
|
2541 |
+
font-weight: 900;
|
2542 |
+
font-size: 11px;
|
2543 |
+
content: "\f002";
|
2544 |
+
position: absolute;
|
2545 |
+
right: 12px;
|
2546 |
+
top: 10px;
|
2547 |
+
color: #aaa;
|
2548 |
+
}
|
2549 |
+
.csf-field .wp-picker-container {
|
2550 |
+
display: inline-block;
|
2551 |
+
}
|
2552 |
+
.csf-field .wp-picker-container .wp-color-result.button {
|
2553 |
+
margin-bottom: 0;
|
2554 |
+
}
|
2555 |
+
.csf-field .csf--transparent-wrap {
|
2556 |
+
display: none;
|
2557 |
+
position: relative;
|
2558 |
+
top: -1px;
|
2559 |
+
width: 235px;
|
2560 |
+
padding: 9px 10px;
|
2561 |
+
border: 1px solid #dfdfdf;
|
2562 |
+
border-top: none;
|
2563 |
+
background-color: #fff;
|
2564 |
+
}
|
2565 |
+
.csf-field .wp-picker-active .csf--transparent-wrap {
|
2566 |
+
display: block;
|
2567 |
+
}
|
2568 |
+
.csf-field .csf--transparent-slider {
|
2569 |
+
position: absolute;
|
2570 |
+
width: 190px;
|
2571 |
+
margin-left: 2px;
|
2572 |
+
height: 18px;
|
2573 |
+
}
|
2574 |
+
.csf-field .csf--transparent-slider .ui-slider-handle {
|
2575 |
+
position: absolute;
|
2576 |
+
top: -3px;
|
2577 |
+
bottom: -3px;
|
2578 |
+
z-index: 5;
|
2579 |
+
border-color: #aaa;
|
2580 |
+
border-style: solid;
|
2581 |
+
border-width: 4px 3px;
|
2582 |
+
width: 10px;
|
2583 |
+
height: 16px;
|
2584 |
+
margin: 0 -5px;
|
2585 |
+
background: none;
|
2586 |
+
cursor: ew-resize;
|
2587 |
+
opacity: 0.9;
|
2588 |
+
border-radius: 4px;
|
2589 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
2590 |
+
}
|
2591 |
+
.csf-field .csf--transparent-slider .ui-slider-handle:before {
|
2592 |
+
content: " ";
|
2593 |
+
position: absolute;
|
2594 |
+
left: -2px;
|
2595 |
+
right: -2px;
|
2596 |
+
top: -3px;
|
2597 |
+
bottom: -3px;
|
2598 |
+
border: 2px solid #fff;
|
2599 |
+
border-radius: 3px;
|
2600 |
+
}
|
2601 |
+
.csf-field .csf--transparent-offset {
|
2602 |
+
height: 18px;
|
2603 |
+
width: 200px;
|
2604 |
+
background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
|
2605 |
+
border-radius: 2px;
|
2606 |
+
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4);
|
2607 |
+
}
|
2608 |
+
.csf-field .csf--transparent-text {
|
2609 |
+
position: absolute;
|
2610 |
+
top: 12px;
|
2611 |
+
right: 10px;
|
2612 |
+
width: 30px;
|
2613 |
+
font-size: 12px;
|
2614 |
+
line-height: 12px;
|
2615 |
+
text-align: center;
|
2616 |
+
color: #999;
|
2617 |
+
}
|
2618 |
+
.csf-field .csf--transparent-button {
|
2619 |
+
cursor: pointer;
|
2620 |
+
user-select: none;
|
2621 |
+
margin-top: 10px;
|
2622 |
+
font-size: 11px;
|
2623 |
+
text-align: center;
|
2624 |
+
border-radius: 2px;
|
2625 |
+
padding: 3px 7px;
|
2626 |
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
2627 |
+
letter-spacing: 0.2px;
|
2628 |
+
color: #777;
|
2629 |
+
border: 1px solid #ccc;
|
2630 |
+
background-color: #f7f7f7;
|
2631 |
+
transition: background-color .2s, border-color .2s, color .2s;
|
2632 |
+
}
|
2633 |
+
.csf-field .csf--transparent-active .wp-color-result {
|
2634 |
+
background-image: url(../images/checkerboard.png);
|
2635 |
+
background-size: 135px;
|
2636 |
+
background-position: center left;
|
2637 |
+
background-color: transparent !important;
|
2638 |
+
}
|
2639 |
+
.csf-field .csf--transparent-active .csf--transparent-button {
|
2640 |
+
color: #fff;
|
2641 |
+
border-color: #3ea032;
|
2642 |
+
background-color: #4fb845;
|
2643 |
+
}
|
2644 |
+
.csf-field .csf--transparent-active .fa:before {
|
2645 |
+
content: "\f205";
|
2646 |
+
}
|
2647 |
+
|
2648 |
+
/**
|
2649 |
+
* 04. Widget
|
2650 |
+
*/
|
2651 |
+
.csf-widgets > .csf-field {
|
2652 |
+
position: relative;
|
2653 |
+
top: -1px;
|
2654 |
+
margin-left: -15px;
|
2655 |
+
margin-right: -15px;
|
2656 |
+
padding: 12px 15px;
|
2657 |
+
}
|
2658 |
+
.csf-widgets > .csf-field .csf-title {
|
2659 |
+
float: none;
|
2660 |
+
width: 100%;
|
2661 |
+
margin-bottom: 5px;
|
2662 |
+
}
|
2663 |
+
.csf-widgets > .csf-field .csf-fieldset {
|
2664 |
+
float: none;
|
2665 |
+
width: 100%;
|
2666 |
+
}
|
2667 |
+
.csf-widgets .csf-field-text input {
|
2668 |
+
width: 100%;
|
2669 |
+
}
|
2670 |
+
.csf-widgets .csf-field-notice .csf-notice {
|
2671 |
+
padding: 15px;
|
2672 |
+
}
|
2673 |
+
|
2674 |
+
.control-section .csf-widgets > .csf-field {
|
2675 |
+
margin-left: -10px;
|
2676 |
+
margin-right: -10px;
|
2677 |
+
padding: 10px 12px;
|
2678 |
+
}
|
2679 |
+
|
2680 |
+
.wp-block .csf-widgets {
|
2681 |
+
font-size: 13px;
|
2682 |
+
}
|
2683 |
+
.wp-block .csf-widgets > .csf-field {
|
2684 |
+
margin-left: -10px;
|
2685 |
+
margin-right: -10px;
|
2686 |
+
}
|
2687 |
+
.wp-block .csf-widgets > .csf-field .button-primary {
|
2688 |
+
color: #fff;
|
2689 |
+
}
|
2690 |
+
.wp-block .csf-widgets > .csf-field > .csf-title > h4 {
|
2691 |
+
font-size: 13px;
|
2692 |
+
}
|
2693 |
+
|
2694 |
+
/**
|
2695 |
+
* 05. Widget
|
2696 |
+
*/
|
2697 |
+
.control-section .csf-field {
|
2698 |
+
padding: 0;
|
2699 |
+
}
|
2700 |
+
.control-section .csf-field .csf-title {
|
2701 |
+
float: none;
|
2702 |
+
width: 100%;
|
2703 |
+
margin-bottom: 6px;
|
2704 |
+
}
|
2705 |
+
.control-section .csf-field .csf-title h4 {
|
2706 |
+
display: block;
|
2707 |
+
font-size: 13px;
|
2708 |
+
line-height: 1;
|
2709 |
+
font-weight: 600;
|
2710 |
+
color: inherit;
|
2711 |
+
}
|
2712 |
+
.control-section .csf-field .csf-fieldset {
|
2713 |
+
float: none;
|
2714 |
+
width: 100%;
|
2715 |
+
}
|
2716 |
+
.control-section .csf-help {
|
2717 |
+
top: -5px;
|
2718 |
+
right: -5px;
|
2719 |
+
}
|
2720 |
+
.control-section .csf-field-select select {
|
2721 |
+
width: 100%;
|
2722 |
+
}
|
2723 |
+
.control-section .csf-field-heading {
|
2724 |
+
color: inherit;
|
2725 |
+
font-size: 14px;
|
2726 |
+
line-height: 1em;
|
2727 |
+
margin-right: -15px;
|
2728 |
+
margin-left: -15px;
|
2729 |
+
padding: 15px;
|
2730 |
+
}
|
2731 |
+
.control-section .csf-field-subheading {
|
2732 |
+
color: inherit;
|
2733 |
+
font-size: 11px;
|
2734 |
+
margin-right: -15px;
|
2735 |
+
margin-left: -15px;
|
2736 |
+
padding: 10px 15px;
|
2737 |
+
}
|
2738 |
+
.control-section .csf-subtitle-text {
|
2739 |
+
margin-top: 4px;
|
2740 |
+
font-size: 12px;
|
2741 |
+
}
|
2742 |
+
.control-section .csf-field-submessage .csf-submessage {
|
2743 |
+
margin-right: -15px;
|
2744 |
+
margin-left: -15px;
|
2745 |
+
padding: 15px;
|
2746 |
+
}
|
2747 |
+
.control-section .csf-fieldset .csf-field-submessage .csf-submessage,
|
2748 |
+
.control-section .csf-fieldset .csf-field-heading,
|
2749 |
+
.control-section .csf-fieldset .csf-field-subheading {
|
2750 |
+
margin-left: 0;
|
2751 |
+
margin-right: 0;
|
2752 |
+
}
|
2753 |
+
.control-section .csf-field-date label,
|
2754 |
+
.control-section .csf-field-datetime label {
|
2755 |
+
display: block;
|
2756 |
+
}
|
2757 |
+
.control-section .csf-field-date .csf--to,
|
2758 |
+
.control-section .csf-field-datetime .csf--to {
|
2759 |
+
margin-top: 4px;
|
2760 |
+
margin-left: 0;
|
2761 |
+
}
|
2762 |
+
.control-section .csf-field-sorter ul li {
|
2763 |
+
padding: 5px;
|
2764 |
+
}
|
2765 |
+
.control-section .csf-field-sorter .csf-modules {
|
2766 |
+
float: none;
|
2767 |
+
width: 100%;
|
2768 |
+
}
|
2769 |
+
.control-section .csf-field-sorter .csf-modules:first-child {
|
2770 |
+
padding-right: 0;
|
2771 |
+
padding-bottom: 15px;
|
2772 |
+
}
|
2773 |
+
.control-section .csf-field-background .csf--background-attributes {
|
2774 |
+
flex-direction: column;
|
2775 |
+
}
|
2776 |
+
.control-section .csf-field-spacing input {
|
2777 |
+
width: 90px;
|
2778 |
+
}
|
2779 |
+
.control-section .csf-field-border .csf--input {
|
2780 |
+
flex: 1 50%;
|
2781 |
+
}
|
2782 |
+
.control-section .csf-field-border input,
|
2783 |
+
.control-section .csf-field-border select {
|
2784 |
+
width: 100%;
|
2785 |
+
}
|
2786 |
+
.control-section .csf-field-spinner input {
|
2787 |
+
width: 50px;
|
2788 |
+
}
|
2789 |
+
.control-section .csf-field-number .csf--wrap {
|
2790 |
+
width: 100%;
|
2791 |
+
}
|
2792 |
+
.control-section .csf-field-backup .csf-export-data {
|
2793 |
+
display: none;
|
2794 |
+
}
|
2795 |
+
.control-section .csf-field-fieldset .csf-fieldset-content {
|
2796 |
+
border-color: #e5e5e5;
|
2797 |
+
}
|
2798 |
+
.control-section .csf-tabbed-content > .csf-field,
|
2799 |
+
.control-section .csf-sortable-content > .csf-field,
|
2800 |
+
.control-section .csf-repeater-content > .csf-field,
|
2801 |
+
.control-section .csf-fieldset-content > .csf-field,
|
2802 |
+
.control-section .csf-cloneable-content > .csf-field,
|
2803 |
+
.control-section .csf-accordion-content > .csf-field {
|
2804 |
+
padding: 10px;
|
2805 |
+
}
|
2806 |
+
.control-section .csf-tabbed-content > .csf-field .csf-title,
|
2807 |
+
.control-section .csf-sortable-content > .csf-field .csf-title,
|
2808 |
+
.control-section .csf-repeater-content > .csf-field .csf-title,
|
2809 |
+
.control-section .csf-fieldset-content > .csf-field .csf-title,
|
2810 |
+
.control-section .csf-cloneable-content > .csf-field .csf-title,
|
2811 |
+
.control-section .csf-accordion-content > .csf-field .csf-title {
|
2812 |
+
margin-bottom: 5px;
|
2813 |
+
}
|
2814 |
+
.control-section .csf-tabbed-content > .csf-field h4,
|
2815 |
+
.control-section .csf-sortable-content > .csf-field h4,
|
2816 |
+
.control-section .csf-repeater-content > .csf-field h4,
|
2817 |
+
.control-section .csf-fieldset-content > .csf-field h4,
|
2818 |
+
.control-section .csf-cloneable-content > .csf-field h4,
|
2819 |
+
.control-section .csf-accordion-content > .csf-field h4 {
|
2820 |
+
font-size: 12px;
|
2821 |
+
}
|
2822 |
+
.control-section .csf-depend-hidden.csf-depend-on {
|
2823 |
+
display: none !important;
|
2824 |
+
}
|
2825 |
+
.control-section .csf-depend-visible.csf-depend-on {
|
2826 |
+
border-top: 0 !important;
|
2827 |
+
}
|
2828 |
+
|
2829 |
+
/**
|
2830 |
+
* 06. Taxonomy
|
2831 |
+
*/
|
2832 |
+
.csf-taxonomy {
|
2833 |
+
max-width: 95%;
|
2834 |
+
}
|
2835 |
+
.csf-taxonomy > .csf-field {
|
2836 |
+
border-top: none !important;
|
2837 |
+
}
|
2838 |
+
.csf-taxonomy > .csf-field-heading {
|
2839 |
+
font-size: 1.1em;
|
2840 |
+
padding: 20px !important;
|
2841 |
+
border: 1px solid #ddd;
|
2842 |
+
}
|
2843 |
+
.csf-taxonomy > .csf-field-subheading {
|
2844 |
+
font-size: 12px;
|
2845 |
+
padding: 15px !important;
|
2846 |
+
border: 1px solid #ddd;
|
2847 |
+
}
|
2848 |
+
.csf-taxonomy > .csf-field-submessage .csf-submessage {
|
2849 |
+
padding: 15px;
|
2850 |
+
border-left-width: 1px;
|
2851 |
+
border-left-style: solid;
|
2852 |
+
border-right-width: 1px;
|
2853 |
+
border-right-style: solid;
|
2854 |
+
}
|
2855 |
+
.csf-taxonomy > .csf-field-notice {
|
2856 |
+
background-color: transparent;
|
2857 |
+
}
|
2858 |
+
.csf-taxonomy .csf-section-title {
|
2859 |
+
display: block;
|
2860 |
+
padding: 15px;
|
2861 |
+
background-color: #f9f9f9;
|
2862 |
+
border: 1px solid #e5e5e5;
|
2863 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
.csf-taxonomy-add-fields > .csf-field {
|
2867 |
+
padding: 8px 0;
|
2868 |
+
}
|
2869 |
+
.csf-taxonomy-add-fields > .csf-field > .csf-title {
|
2870 |
+
float: none;
|
2871 |
+
width: 100%;
|
2872 |
+
padding: 2px 2px 4px 0;
|
2873 |
+
}
|
2874 |
+
.csf-taxonomy-add-fields > .csf-field > .csf-title h4 {
|
2875 |
+
font-size: 12px;
|
2876 |
+
font-weight: normal;
|
2877 |
+
}
|
2878 |
+
.csf-taxonomy-add-fields > .csf-field > .csf-fieldset {
|
2879 |
+
float: none;
|
2880 |
+
width: 100%;
|
2881 |
+
}
|
2882 |
+
.csf-taxonomy-add-fields > .csf-field > .csf-fieldset > .csf-help {
|
2883 |
+
right: -5px;
|
2884 |
+
}
|
2885 |
+
.csf-taxonomy-add-fields + p.submit {
|
2886 |
+
margin-top: 0;
|
2887 |
+
}
|
2888 |
+
|
2889 |
+
.csf-taxonomy-edit-fields > .csf-field {
|
2890 |
+
padding: 20px 0;
|
2891 |
+
}
|
2892 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-title {
|
2893 |
+
width: 200px;
|
2894 |
+
}
|
2895 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-title h4 {
|
2896 |
+
font-size: 14px;
|
2897 |
+
font-weight: 600;
|
2898 |
+
line-height: 1.3;
|
2899 |
+
display: inline-block;
|
2900 |
+
vertical-align: middle;
|
2901 |
+
}
|
2902 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-fieldset {
|
2903 |
+
width: calc(100% - 220px);
|
2904 |
+
}
|
2905 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-fieldset > .csf-help {
|
2906 |
+
top: -5px;
|
2907 |
+
right: -5px;
|
2908 |
+
}
|
2909 |
+
.csf-taxonomy-edit-fields > .csf-field-submessage {
|
2910 |
+
margin: 20px 0;
|
2911 |
+
}
|
2912 |
+
.csf-taxonomy-edit-fields > .csf-field-subheading,
|
2913 |
+
.csf-taxonomy-edit-fields > .csf-field-heading {
|
2914 |
+
margin: 20px 0;
|
2915 |
+
border: 1px solid #ddd;
|
2916 |
+
}
|
2917 |
+
|
2918 |
+
/**
|
2919 |
+
* 08. Nav Menu
|
2920 |
+
*/
|
2921 |
+
.csf-nav-menu-options {
|
2922 |
+
clear: both;
|
2923 |
+
float: left;
|
2924 |
+
width: 100%;
|
2925 |
+
}
|
2926 |
+
.csf-nav-menu-options > .csf-fields {
|
2927 |
+
margin: 10px -10px;
|
2928 |
+
border-top: 1px solid #eee;
|
2929 |
+
border-bottom: 1px solid #eee;
|
2930 |
+
}
|
2931 |
+
.csf-nav-menu-options > .csf-fields > .csf-field {
|
2932 |
+
padding: 12px;
|
2933 |
+
}
|
2934 |
+
.csf-nav-menu-options > .csf-fields > .csf-field .csf-title {
|
2935 |
+
float: none;
|
2936 |
+
width: 100%;
|
2937 |
+
margin-bottom: 5px;
|
2938 |
+
}
|
2939 |
+
.csf-nav-menu-options > .csf-fields > .csf-field .csf-fieldset {
|
2940 |
+
float: none;
|
2941 |
+
width: 100%;
|
2942 |
+
}
|
2943 |
+
.csf-nav-menu-options .csf-field-text input {
|
2944 |
+
width: 100%;
|
2945 |
+
}
|
2946 |
+
.csf-nav-menu-options .csf-field-notice .csf-notice {
|
2947 |
+
padding: 15px;
|
2948 |
+
}
|
2949 |
+
|
2950 |
+
.csf-nav-menu-title {
|
2951 |
+
padding: 12px;
|
2952 |
+
background-color: #f5f5f5;
|
2953 |
+
border-top: 1px solid #eee;
|
2954 |
+
border-bottom: 1px solid #eee;
|
2955 |
+
}
|
2956 |
+
.csf-nav-menu-title:first-child {
|
2957 |
+
border-top: 0;
|
2958 |
+
}
|
2959 |
+
.csf-nav-menu-title h4 {
|
2960 |
+
margin: 0;
|
2961 |
+
padding: 0;
|
2962 |
+
color: #23282d;
|
2963 |
+
}
|
2964 |
+
|
2965 |
+
.csf-nav-menu-icon {
|
2966 |
+
margin-right: 5px;
|
2967 |
+
}
|
2968 |
+
|
2969 |
+
/**
|
2970 |
+
* 06. Profile
|
2971 |
+
*/
|
2972 |
+
.csf-profile-options > h2 > .fa {
|
2973 |
+
padding-right: 7px;
|
2974 |
+
}
|
2975 |
+
.csf-profile-options > .csf-field {
|
2976 |
+
max-width: 750px;
|
2977 |
+
padding: 15px 0;
|
2978 |
+
border-top: none !important;
|
2979 |
+
}
|
2980 |
+
.csf-profile-options > .csf-field > .csf-title {
|
2981 |
+
width: 200px;
|
2982 |
+
}
|
2983 |
+
.csf-profile-options > .csf-field > .csf-title h4 {
|
2984 |
+
font-size: 14px;
|
2985 |
+
font-weight: 600;
|
2986 |
+
line-height: 1.3;
|
2987 |
+
display: inline-block;
|
2988 |
+
vertical-align: middle;
|
2989 |
+
}
|
2990 |
+
.csf-profile-options > .csf-field > .csf-fieldset {
|
2991 |
+
width: calc(100% - 220px);
|
2992 |
+
}
|
2993 |
+
.csf-profile-options > .csf-field > .csf-fieldset > .csf-help {
|
2994 |
+
top: -15px;
|
2995 |
+
right: -5px;
|
2996 |
+
}
|
2997 |
+
.csf-profile-options > .csf-field-heading {
|
2998 |
+
font-size: 1.1em;
|
2999 |
+
}
|
3000 |
+
.csf-profile-options > .csf-field-subheading {
|
3001 |
+
font-size: 12px;
|
3002 |
+
}
|
3003 |
+
.csf-profile-options > .csf-field-subheading,
|
3004 |
+
.csf-profile-options > .csf-field-heading {
|
3005 |
+
margin: 10px 0;
|
3006 |
+
padding: 15px !important;
|
3007 |
+
border: 1px solid #ddd;
|
3008 |
+
}
|
3009 |
+
.csf-profile-options > .csf-field-submessage {
|
3010 |
+
margin: 20px 0;
|
3011 |
+
}
|
3012 |
+
.csf-profile-options > .csf-field-submessage .csf-submessage {
|
3013 |
+
padding: 10px;
|
3014 |
+
border-left-width: 1px;
|
3015 |
+
border-left-style: solid;
|
3016 |
+
border-right-width: 1px;
|
3017 |
+
border-right-style: solid;
|
3018 |
+
}
|
3019 |
+
.csf-profile-options > .csf-field-notice {
|
3020 |
+
background-color: transparent;
|
3021 |
+
}
|
3022 |
+
|
3023 |
+
/**
|
3024 |
+
* 09. Modal
|
3025 |
+
*/
|
3026 |
+
.csf-modal {
|
3027 |
+
position: fixed;
|
3028 |
+
z-index: 100101;
|
3029 |
+
top: 0;
|
3030 |
+
left: 0;
|
3031 |
+
width: 100%;
|
3032 |
+
height: 100%;
|
3033 |
+
}
|
3034 |
+
.csf-modal.hidden {
|
3035 |
+
display: none;
|
3036 |
+
}
|
3037 |
+
|
3038 |
+
.csf-modal-icon {
|
3039 |
+
z-index: 100102;
|
3040 |
+
}
|
3041 |
+
|
3042 |
+
.csf-modal-table {
|
3043 |
+
display: table;
|
3044 |
+
width: 100%;
|
3045 |
+
height: 100%;
|
3046 |
+
}
|
3047 |
+
|
3048 |
+
.csf-modal-table-cell {
|
3049 |
+
display: table-cell;
|
3050 |
+
vertical-align: middle;
|
3051 |
+
margin: 100px 0;
|
3052 |
+
}
|
3053 |
+
|
3054 |
+
.csf-modal-inner {
|
3055 |
+
position: relative;
|
3056 |
+
z-index: 10;
|
3057 |
+
width: 760px;
|
3058 |
+
height: 750px;
|
3059 |
+
margin: 0 auto;
|
3060 |
+
background-color: #fff;
|
3061 |
+
}
|
3062 |
+
|
3063 |
+
.csf-modal-content {
|
3064 |
+
position: relative;
|
3065 |
+
overflow: hidden;
|
3066 |
+
overflow-y: auto;
|
3067 |
+
height: 595px;
|
3068 |
+
}
|
3069 |
+
.csf-modal-content .csf-shortcode-button {
|
3070 |
+
display: none;
|
3071 |
+
}
|
3072 |
+
.csf-modal-content .csf-field {
|
3073 |
+
padding: 15px 30px 15px 15px;
|
3074 |
+
}
|
3075 |
+
.csf-modal-content a:active, .csf-modal-content a:focus {
|
3076 |
+
outline: none;
|
3077 |
+
box-shadow: none;
|
3078 |
+
}
|
3079 |
+
.csf-modal-content h4 {
|
3080 |
+
font-size: 13px;
|
3081 |
+
}
|
3082 |
+
.csf-modal-content h4 small {
|
3083 |
+
font-style: italic;
|
3084 |
+
font-weight: 400;
|
3085 |
+
color: #aaa;
|
3086 |
+
}
|
3087 |
+
|
3088 |
+
.csf-modal-title {
|
3089 |
+
position: relative;
|
3090 |
+
background-color: #fcfcfc;
|
3091 |
+
border-bottom: 1px solid #ddd;
|
3092 |
+
height: 36px;
|
3093 |
+
font-size: 16px;
|
3094 |
+
font-weight: 600;
|
3095 |
+
line-height: 36px;
|
3096 |
+
margin: 0;
|
3097 |
+
padding: 0 36px 0 16px;
|
3098 |
+
}
|
3099 |
+
|
3100 |
+
.csf-modal-header {
|
3101 |
+
width: 100%;
|
3102 |
+
padding: 14px 0;
|
3103 |
+
background-color: #f5f5f5;
|
3104 |
+
border-bottom: 1px solid #ddd;
|
3105 |
+
}
|
3106 |
+
.csf-modal-header select {
|
3107 |
+
display: block;
|
3108 |
+
width: 250px;
|
3109 |
+
margin: 0 auto;
|
3110 |
+
font-size: 13px;
|
3111 |
+
line-height: 1;
|
3112 |
+
height: 30px;
|
3113 |
+
min-height: 30px;
|
3114 |
+
background-color: #fff;
|
3115 |
+
}
|
3116 |
+
|
3117 |
+
.csf-modal-close {
|
3118 |
+
color: #666;
|
3119 |
+
padding: 0;
|
3120 |
+
position: absolute;
|
3121 |
+
top: 0;
|
3122 |
+
right: 0;
|
3123 |
+
width: 36px;
|
3124 |
+
height: 36px;
|
3125 |
+
text-align: center;
|
3126 |
+
background: none;
|
3127 |
+
border: none;
|
3128 |
+
cursor: pointer;
|
3129 |
+
}
|
3130 |
+
.csf-modal-close:before {
|
3131 |
+
font: normal 20px/36px dashicons;
|
3132 |
+
content: "\f158";
|
3133 |
+
vertical-align: top;
|
3134 |
+
width: 36px;
|
3135 |
+
height: 36px;
|
3136 |
+
}
|
3137 |
+
.csf-modal-close:hover {
|
3138 |
+
opacity: 0.5;
|
3139 |
+
}
|
3140 |
+
|
3141 |
+
.csf-modal-insert-wrapper {
|
3142 |
+
text-align: center;
|
3143 |
+
width: 100%;
|
3144 |
+
padding: 15px 0;
|
3145 |
+
background-color: #f5f5f5;
|
3146 |
+
border-top: 1px solid #ddd;
|
3147 |
+
}
|
3148 |
+
|
3149 |
+
.csf-modal-overlay {
|
3150 |
+
position: absolute;
|
3151 |
+
top: 0;
|
3152 |
+
left: 0;
|
3153 |
+
width: 100%;
|
3154 |
+
height: 100%;
|
3155 |
+
background-color: #000;
|
3156 |
+
opacity: 0.5;
|
3157 |
+
}
|
3158 |
+
|
3159 |
+
/**
|
3160 |
+
* 09. 01. Shortcode Modal
|
3161 |
+
*/
|
3162 |
+
.csf--repeatable {
|
3163 |
+
padding: 15px 15px 0 15px;
|
3164 |
+
}
|
3165 |
+
|
3166 |
+
.csf--repeat-button-block {
|
3167 |
+
text-align: center;
|
3168 |
+
padding-bottom: 15px;
|
3169 |
+
}
|
3170 |
+
|
3171 |
+
.csf--repeat-shortcode {
|
3172 |
+
position: relative;
|
3173 |
+
margin-bottom: 15px;
|
3174 |
+
border: 1px dashed #ddd;
|
3175 |
+
}
|
3176 |
+
.csf--repeat-shortcode:first-child .csf-repeat-remove {
|
3177 |
+
display: none;
|
3178 |
+
}
|
3179 |
+
.csf--repeat-shortcode .csf-repeat-remove {
|
3180 |
+
position: absolute;
|
3181 |
+
right: 10px;
|
3182 |
+
top: 10px;
|
3183 |
+
z-index: 10;
|
3184 |
+
cursor: pointer;
|
3185 |
+
display: inline-block;
|
3186 |
+
font-size: 11px;
|
3187 |
+
width: 18px;
|
3188 |
+
height: 18px;
|
3189 |
+
line-height: 18px;
|
3190 |
+
text-align: center;
|
3191 |
+
border-radius: 2px;
|
3192 |
+
color: #fff;
|
3193 |
+
background-color: #e14d43;
|
3194 |
+
opacity: 0.5;
|
3195 |
+
}
|
3196 |
+
.csf--repeat-shortcode .csf-repeat-remove:hover {
|
3197 |
+
opacity: 0.5;
|
3198 |
+
}
|
3199 |
+
|
3200 |
+
.csf-shortcode-single .csf-modal-inner {
|
3201 |
+
height: 750px;
|
3202 |
+
}
|
3203 |
+
.csf-shortcode-single .csf-modal-content {
|
3204 |
+
height: 652px;
|
3205 |
+
}
|
3206 |
+
|
3207 |
+
.elementor-editor-active .csf-shortcode-button {
|
3208 |
+
margin-left: 5px;
|
3209 |
+
}
|
3210 |
+
.elementor-editor-active .csf-modal .hidden {
|
3211 |
+
display: none !important;
|
3212 |
+
}
|
3213 |
+
|
3214 |
+
/**
|
3215 |
+
* 09. 02. Gutenberg Modal
|
3216 |
+
*/
|
3217 |
+
.csf-shortcode-block {
|
3218 |
+
text-align: center;
|
3219 |
+
padding: 14px;
|
3220 |
+
font-size: 13px;
|
3221 |
+
background-color: #f5f5f5;
|
3222 |
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
3223 |
+
}
|
3224 |
+
|
3225 |
+
.csf-shortcode-block .components-button {
|
3226 |
+
margin-bottom: 10px;
|
3227 |
+
}
|
3228 |
+
|
3229 |
+
/**
|
3230 |
+
* 09. 03. Icon Modal
|
3231 |
+
*/
|
3232 |
+
.csf-modal-icon .csf-icon-title {
|
3233 |
+
padding: 15px 0;
|
3234 |
+
margin: 4px;
|
3235 |
+
font-size: 14px;
|
3236 |
+
font-weight: bold;
|
3237 |
+
text-align: center;
|
3238 |
+
border: 1px solid #eee;
|
3239 |
+
background-color: #f7f7f7;
|
3240 |
+
}
|
3241 |
+
.csf-modal-icon .csf-modal-header {
|
3242 |
+
text-align: center;
|
3243 |
+
}
|
3244 |
+
.csf-modal-icon .csf-icon-search {
|
3245 |
+
width: 50%;
|
3246 |
+
height: 40px;
|
3247 |
+
line-height: 40px;
|
3248 |
+
}
|
3249 |
+
.csf-modal-icon i {
|
3250 |
+
cursor: pointer;
|
3251 |
+
display: inline-block;
|
3252 |
+
margin: 4px;
|
3253 |
+
width: 35px;
|
3254 |
+
height: 35px;
|
3255 |
+
line-height: 35px;
|
3256 |
+
font-size: 16px;
|
3257 |
+
color: #555;
|
3258 |
+
text-align: center;
|
3259 |
+
border: 1px solid #ccc;
|
3260 |
+
background-color: #f7f7f7;
|
3261 |
+
border-radius: 2px;
|
3262 |
+
box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.05);
|
3263 |
+
}
|
3264 |
+
.csf-modal-icon i:hover {
|
3265 |
+
color: #fff;
|
3266 |
+
border-color: #222;
|
3267 |
+
background-color: #222;
|
3268 |
+
}
|
3269 |
+
.csf-modal-icon .csf-modal-content {
|
3270 |
+
padding: 10px;
|
3271 |
+
height: 618px;
|
3272 |
+
}
|
3273 |
+
.csf-modal-icon .csf-error-text {
|
3274 |
+
padding: 10px;
|
3275 |
+
}
|
3276 |
+
|
3277 |
+
.csf-modal-loading {
|
3278 |
+
display: none;
|
3279 |
+
position: absolute;
|
3280 |
+
left: 15px;
|
3281 |
+
top: 15px;
|
3282 |
+
}
|
3283 |
+
|
3284 |
+
.csf-loading {
|
3285 |
+
position: relative;
|
3286 |
+
width: 20px;
|
3287 |
+
height: 20px;
|
3288 |
+
background: #ccc;
|
3289 |
+
border-radius: 20px;
|
3290 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
|
3291 |
+
}
|
3292 |
+
.csf-loading:after {
|
3293 |
+
position: absolute;
|
3294 |
+
top: 50%;
|
3295 |
+
left: 50%;
|
3296 |
+
width: 4px;
|
3297 |
+
height: 4px;
|
3298 |
+
content: "";
|
3299 |
+
margin-top: -2px;
|
3300 |
+
margin-left: -2px;
|
3301 |
+
background-color: white;
|
3302 |
+
animation-duration: 0.5s;
|
3303 |
+
animation-iteration-count: infinite;
|
3304 |
+
animation-timing-function: linear;
|
3305 |
+
animation-name: csfLoader;
|
3306 |
+
border-radius: 4px;
|
3307 |
+
}
|
3308 |
+
|
3309 |
+
@keyframes csfLoader {
|
3310 |
+
0% {
|
3311 |
+
transform: rotate(0deg) translateX(-6px) rotate(0deg);
|
3312 |
+
}
|
3313 |
+
100% {
|
3314 |
+
transform: rotate(360deg) translateX(-6px) rotate(-360deg);
|
3315 |
+
}
|
3316 |
+
}
|
3317 |
+
/**
|
3318 |
+
* 10. Helper
|
3319 |
+
*/
|
3320 |
+
.csf-subtitle-text {
|
3321 |
+
margin-top: 6px;
|
3322 |
+
font-weight: 400;
|
3323 |
+
color: #999;
|
3324 |
+
}
|
3325 |
+
|
3326 |
+
.csf-desc-text {
|
3327 |
+
clear: both;
|
3328 |
+
float: left;
|
3329 |
+
width: 100%;
|
3330 |
+
margin-top: 6px;
|
3331 |
+
font-weight: 400;
|
3332 |
+
color: #999;
|
3333 |
+
}
|
3334 |
+
|
3335 |
+
.csf-error-text {
|
3336 |
+
margin-top: 6px;
|
3337 |
+
color: #d02c21;
|
3338 |
+
}
|
3339 |
+
|
3340 |
+
.csf-before-text {
|
3341 |
+
margin-bottom: 6px;
|
3342 |
+
}
|
3343 |
+
|
3344 |
+
.csf-after-text {
|
3345 |
+
margin-top: 6px;
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
.csf-metabox-hide {
|
3349 |
+
display: none !important;
|
3350 |
+
}
|
3351 |
+
|
3352 |
+
.csf-metabox-show {
|
3353 |
+
display: block !important;
|
3354 |
+
}
|
3355 |
+
|
3356 |
+
.csf-depend-hidden.csf-depend-on {
|
3357 |
+
display: none;
|
3358 |
+
}
|
3359 |
+
|
3360 |
+
.csf-depend-visible.csf-depend-on {
|
3361 |
+
display: block;
|
3362 |
+
opacity: 0.75;
|
3363 |
+
filter: grayscale(1);
|
3364 |
+
user-select: none;
|
3365 |
+
border-top: 1px solid #eee;
|
3366 |
+
}
|
3367 |
+
.csf-depend-visible.csf-depend-on .clear:before {
|
3368 |
+
content: "";
|
3369 |
+
left: 0;
|
3370 |
+
top: 0;
|
3371 |
+
right: 0;
|
3372 |
+
bottom: 0;
|
3373 |
+
position: absolute;
|
3374 |
+
background-color: #eee;
|
3375 |
+
opacity: 0.25;
|
3376 |
+
z-index: 10;
|
3377 |
+
}
|
3378 |
+
|
3379 |
+
.csf-warning-primary {
|
3380 |
+
color: #fff !important;
|
3381 |
+
border-color: #dc3545 !important;
|
3382 |
+
background: #dc3545 !important;
|
3383 |
+
}
|
3384 |
+
.csf-warning-primary:hover, .csf-warning-primary:focus {
|
3385 |
+
border-color: #bd2130 !important;
|
3386 |
+
background: #bd2130 !important;
|
3387 |
+
}
|
3388 |
+
.csf-warning-primary:focus {
|
3389 |
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px #bd2130 !important;
|
3390 |
+
}
|
3391 |
+
.csf-warning-primary:active {
|
3392 |
+
border-color: #bd2130 !important;
|
3393 |
+
background: #bd2130 !important;
|
3394 |
+
}
|
3395 |
+
|
3396 |
+
.csf-form-result {
|
3397 |
+
display: none;
|
3398 |
+
float: left;
|
3399 |
+
padding: 0 8px;
|
3400 |
+
margin-right: 4px;
|
3401 |
+
font-size: 11px;
|
3402 |
+
line-height: 30px;
|
3403 |
+
user-select: none;
|
3404 |
+
border-radius: 2px;
|
3405 |
+
}
|
3406 |
+
|
3407 |
+
.csf-form-show {
|
3408 |
+
display: block;
|
3409 |
+
}
|
3410 |
+
|
3411 |
+
.csf-form-success {
|
3412 |
+
color: #fff;
|
3413 |
+
background-color: #46b450;
|
3414 |
+
}
|
3415 |
+
|
3416 |
+
.csf-form-warning {
|
3417 |
+
color: #8a6d3b;
|
3418 |
+
background-color: #faebcc;
|
3419 |
+
}
|
3420 |
+
|
3421 |
+
.csf-label-error {
|
3422 |
+
position: relative;
|
3423 |
+
top: -2px;
|
3424 |
+
display: inline-block;
|
3425 |
+
font-size: 10px;
|
3426 |
+
line-height: 10px;
|
3427 |
+
height: 10px;
|
3428 |
+
width: 10px;
|
3429 |
+
padding: 1px;
|
3430 |
+
font-style: normal;
|
3431 |
+
text-align: center;
|
3432 |
+
color: #fff;
|
3433 |
+
vertical-align: middle;
|
3434 |
+
background-color: #e10000;
|
3435 |
+
border-radius: 2px;
|
3436 |
+
}
|
3437 |
+
|
3438 |
+
.csf-no-option {
|
3439 |
+
padding: 30px;
|
3440 |
+
}
|
3441 |
+
|
3442 |
+
.csf-input-number {
|
3443 |
+
-moz-appearance: textfield;
|
3444 |
+
}
|
3445 |
+
|
3446 |
+
.csf-input-number::-webkit-inner-spin-button,
|
3447 |
+
.csf-input-number::-webkit-outer-spin-button {
|
3448 |
+
-webkit-appearance: none;
|
3449 |
+
margin: 0;
|
3450 |
+
}
|
3451 |
+
|
3452 |
+
.csf-fa5-shims .csf .fas,
|
3453 |
+
.csf-fa5-shims .csf .far,
|
3454 |
+
.csf-fa5-shims .csf .fab {
|
3455 |
+
font-family: "FontAwesome";
|
3456 |
+
font-style: normal;
|
3457 |
+
}
|
3458 |
+
|
3459 |
+
/**
|
3460 |
+
* 11. Welcome Page
|
3461 |
+
*/
|
3462 |
+
.csf-welcome-wrap {
|
3463 |
+
position: relative;
|
3464 |
+
margin: 25px 40px 0 20px;
|
3465 |
+
font-size: 15px;
|
3466 |
+
max-width: 1200px;
|
3467 |
+
}
|
3468 |
+
.csf-welcome-wrap p {
|
3469 |
+
font-size: 14px;
|
3470 |
+
line-height: 1.5;
|
3471 |
+
}
|
3472 |
+
.csf-welcome-wrap h1 {
|
3473 |
+
margin: 0.2em 200px 0 0;
|
3474 |
+
padding: 0;
|
3475 |
+
color: #32373c;
|
3476 |
+
line-height: 1.2em;
|
3477 |
+
font-size: 2.8em;
|
3478 |
+
font-weight: 400;
|
3479 |
+
}
|
3480 |
+
.csf-welcome-wrap .csf-logo {
|
3481 |
+
position: absolute;
|
3482 |
+
overflow: hidden;
|
3483 |
+
top: 0;
|
3484 |
+
right: 0;
|
3485 |
+
height: 160px;
|
3486 |
+
width: 140px;
|
3487 |
+
background-image: linear-gradient(45deg, #2d67cb, #ad19f3);
|
3488 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), inset 0 0 0 4px rgba(0, 0, 0, 0.25);
|
3489 |
+
}
|
3490 |
+
.csf-welcome-wrap .csf-logo .csf--effects i {
|
3491 |
+
position: absolute;
|
3492 |
+
width: 200px;
|
3493 |
+
height: 100px;
|
3494 |
+
background-color: rgba(0, 0, 0, 0.15);
|
3495 |
+
transform: rotate(-45deg);
|
3496 |
+
}
|
3497 |
+
.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(1) {
|
3498 |
+
bottom: -20px;
|
3499 |
+
right: -70px;
|
3500 |
+
}
|
3501 |
+
.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(2) {
|
3502 |
+
bottom: -35px;
|
3503 |
+
right: -80px;
|
3504 |
+
}
|
3505 |
+
.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(3) {
|
3506 |
+
bottom: -50px;
|
3507 |
+
right: -90px;
|
3508 |
+
}
|
3509 |
+
.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(4) {
|
3510 |
+
bottom: -65px;
|
3511 |
+
right: -100px;
|
3512 |
+
}
|
3513 |
+
.csf-welcome-wrap .csf-logo .csf--wp-logos {
|
3514 |
+
position: relative;
|
3515 |
+
padding-top: 25px;
|
3516 |
+
text-align: center;
|
3517 |
+
}
|
3518 |
+
.csf-welcome-wrap .csf-logo .csf--wp-logo {
|
3519 |
+
position: absolute;
|
3520 |
+
left: 20px;
|
3521 |
+
width: 20px;
|
3522 |
+
height: 20px;
|
3523 |
+
background-repeat: no-repeat;
|
3524 |
+
background-position: center center;
|
3525 |
+
background-image: url(../images/wp-logo.svg);
|
3526 |
+
}
|
3527 |
+
.csf-welcome-wrap .csf-logo .csf--wp-plugin-logo {
|
3528 |
+
display: inline-block;
|
3529 |
+
width: 50px;
|
3530 |
+
height: 50px;
|
3531 |
+
border: 3px solid #fff;
|
3532 |
+
background-size: 40px;
|
3533 |
+
background-repeat: no-repeat;
|
3534 |
+
background-position: center center;
|
3535 |
+
background-image: url(../images/wp-plugin-logo.svg);
|
3536 |
+
border-radius: 100%;
|
3537 |
+
vertical-align: middle;
|
3538 |
+
}
|
3539 |
+
.csf-welcome-wrap .csf-logo .csf--text {
|
3540 |
+
position: absolute;
|
3541 |
+
left: 0;
|
3542 |
+
right: 0;
|
3543 |
+
top: 90px;
|
3544 |
+
color: #fff;
|
3545 |
+
font-size: 13px;
|
3546 |
+
line-height: 1.2em;
|
3547 |
+
font-weight: 600;
|
3548 |
+
text-align: center;
|
3549 |
+
text-transform: uppercase;
|
3550 |
+
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
|
3551 |
+
}
|
3552 |
+
.csf-welcome-wrap .csf-logo .csf--version {
|
3553 |
+
top: auto;
|
3554 |
+
left: auto;
|
3555 |
+
right: 8px;
|
3556 |
+
bottom: 4px;
|
3557 |
+
font-size: 11px;
|
3558 |
+
text-transform: lowercase;
|
3559 |
+
}
|
3560 |
+
.csf-welcome-wrap .csf-about-text {
|
3561 |
+
font-weight: 400;
|
3562 |
+
line-height: 1.6em;
|
3563 |
+
font-size: 19px;
|
3564 |
+
margin: 1em 200px 1em 0;
|
3565 |
+
color: #555d66;
|
3566 |
+
}
|
3567 |
+
.csf-welcome-wrap .csf-demo-button {
|
3568 |
+
margin: 1em 200px 2em 0;
|
3569 |
+
}
|
3570 |
+
.csf-welcome-wrap .nav-tab-wrapper {
|
3571 |
+
margin-bottom: 20px;
|
3572 |
+
}
|
3573 |
+
.csf-welcome-wrap ul {
|
3574 |
+
list-style-type: disc;
|
3575 |
+
padding-left: 15px;
|
3576 |
+
}
|
3577 |
+
.csf-welcome-wrap .csf--col {
|
3578 |
+
float: left;
|
3579 |
+
padding-right: 20px;
|
3580 |
+
box-sizing: border-box;
|
3581 |
+
}
|
3582 |
+
.csf-welcome-wrap .csf--col-2 {
|
3583 |
+
width: 50%;
|
3584 |
+
}
|
3585 |
+
.csf-welcome-wrap .csf--col-3 {
|
3586 |
+
width: 33.333%;
|
3587 |
+
}
|
3588 |
+
.csf-welcome-wrap .csf--col-4 {
|
3589 |
+
width: 25%;
|
3590 |
+
}
|
3591 |
+
.csf-welcome-wrap .csf--col-5 {
|
3592 |
+
width: 20%;
|
3593 |
+
}
|
3594 |
+
.csf-welcome-wrap .csf--col-last {
|
3595 |
+
padding-right: 0;
|
3596 |
+
}
|
3597 |
+
.csf-welcome-wrap .csf--col-upgrade {
|
3598 |
+
padding: 10px 0;
|
3599 |
+
text-align: center;
|
3600 |
+
border-top: 1px solid #e5e5e5;
|
3601 |
+
}
|
3602 |
+
|
3603 |
+
.csf--table-compare thead td,
|
3604 |
+
.csf--table-compare tfoot td {
|
3605 |
+
text-align: center;
|
3606 |
+
}
|
3607 |
+
.csf--table-compare td {
|
3608 |
+
font-size: 14px;
|
3609 |
+
text-align: center;
|
3610 |
+
vertical-align: middle;
|
3611 |
+
padding: 10px;
|
3612 |
+
}
|
3613 |
+
.csf--table-compare td:first-child {
|
3614 |
+
text-align: left;
|
3615 |
+
}
|
3616 |
+
.csf--table-compare tfoot td {
|
3617 |
+
padding: 15px 0;
|
3618 |
+
}
|
3619 |
+
.csf--table-compare .fa {
|
3620 |
+
font-size: 18px;
|
3621 |
+
}
|
3622 |
+
.csf--table-compare .fa-check-circle {
|
3623 |
+
color: #46b450;
|
3624 |
+
}
|
3625 |
+
.csf--table-compare .fa-times-circle {
|
3626 |
+
color: #dc3232;
|
3627 |
+
}
|
3628 |
+
|
3629 |
+
.csf-welcome-cols {
|
3630 |
+
clear: both;
|
3631 |
+
margin: 20px 0;
|
3632 |
+
background-color: #fff;
|
3633 |
+
padding: 0 0;
|
3634 |
+
border-radius: 2px;
|
3635 |
+
border: 1px solid #e5e5e5;
|
3636 |
+
}
|
3637 |
+
.csf-welcome-cols .csf--col {
|
3638 |
+
width: 33.333%;
|
3639 |
+
float: left;
|
3640 |
+
padding: 20px;
|
3641 |
+
text-align: center;
|
3642 |
+
box-sizing: border-box;
|
3643 |
+
min-height: 200px;
|
3644 |
+
border-right: 1px solid #e5e5e5;
|
3645 |
+
}
|
3646 |
+
.csf-welcome-cols .csf--left,
|
3647 |
+
.csf-welcome-cols .csf--block {
|
3648 |
+
float: left;
|
3649 |
+
width: 20%;
|
3650 |
+
padding: 0 30px;
|
3651 |
+
text-align: center;
|
3652 |
+
box-sizing: border-box;
|
3653 |
+
}
|
3654 |
+
.csf-welcome-cols .csf--block {
|
3655 |
+
width: 80%;
|
3656 |
+
}
|
3657 |
+
.csf-welcome-cols .csf--col-first {
|
3658 |
+
border-bottom: 1px solid #e5e5e5;
|
3659 |
+
}
|
3660 |
+
.csf-welcome-cols .csf--last {
|
3661 |
+
border-right: none;
|
3662 |
+
}
|
3663 |
+
.csf-welcome-cols .csf--space {
|
3664 |
+
height: 20px;
|
3665 |
+
}
|
3666 |
+
.csf-welcome-cols .csf--icon {
|
3667 |
+
display: inline-block;
|
3668 |
+
font-size: 20px;
|
3669 |
+
width: 30px;
|
3670 |
+
height: 30px;
|
3671 |
+
line-height: 30px;
|
3672 |
+
text-align: center;
|
3673 |
+
margin-bottom: 10px;
|
3674 |
+
color: #fff;
|
3675 |
+
background-color: #555;
|
3676 |
+
border-radius: 30px;
|
3677 |
+
}
|
3678 |
+
.csf-welcome-cols .csf--active {
|
3679 |
+
background-color: #5cb85c;
|
3680 |
+
}
|
3681 |
+
.csf-welcome-cols .csf--deactive {
|
3682 |
+
background-color: #e14d43;
|
3683 |
+
}
|
3684 |
+
.csf-welcome-cols .csf--title {
|
3685 |
+
font-weight: bold;
|
3686 |
+
display: block;
|
3687 |
+
}
|
3688 |
+
.csf-welcome-cols p:last-child {
|
3689 |
+
margin-bottom: 0;
|
3690 |
+
}
|
3691 |
+
|
3692 |
+
.csf-features-cols .csf--key-features {
|
3693 |
+
width: 30%;
|
3694 |
+
}
|
3695 |
+
.csf-features-cols .csf--available-fields {
|
3696 |
+
width: 70%;
|
3697 |
+
}
|
3698 |
+
|
3699 |
+
.csf-code-block {
|
3700 |
+
margin: 20px 0;
|
3701 |
+
padding: 5px 20px;
|
3702 |
+
background-color: #fff;
|
3703 |
+
border-radius: 2px;
|
3704 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
|
3705 |
+
}
|
3706 |
+
.csf-code-block pre {
|
3707 |
+
font-size: 13px;
|
3708 |
+
color: #0073aa;
|
3709 |
+
}
|
3710 |
+
.csf-code-block pre span {
|
3711 |
+
color: #999;
|
3712 |
+
}
|
3713 |
+
|
3714 |
+
.csf--table-fields td {
|
3715 |
+
font-size: 14px;
|
3716 |
+
}
|
3717 |
+
|
3718 |
+
.csf--upgrade a {
|
3719 |
+
color: #5cb85c;
|
3720 |
+
font-weight: bold;
|
3721 |
+
}
|
3722 |
+
.csf--upgrade a:focus, .csf--upgrade a:hover {
|
3723 |
+
color: #4aa14a;
|
3724 |
+
outline: none;
|
3725 |
+
box-shadow: none;
|
3726 |
+
}
|
3727 |
+
|
3728 |
+
@media only screen and (max-width: 782px) {
|
3729 |
+
.csf-welcome-cols .csf--col {
|
3730 |
+
width: 100%;
|
3731 |
+
min-height: auto;
|
3732 |
+
border-right: none;
|
3733 |
+
border-bottom: 1px solid #e5e5e5;
|
3734 |
+
}
|
3735 |
+
|
3736 |
+
.csf-features-cols .csf--key-features {
|
3737 |
+
width: 100%;
|
3738 |
+
}
|
3739 |
+
.csf-features-cols .csf--available-fields {
|
3740 |
+
width: 100%;
|
3741 |
+
}
|
3742 |
+
}
|
3743 |
+
/**
|
3744 |
+
* 12. Responsive
|
3745 |
+
*/
|
3746 |
+
@media only screen and (max-width: 1200px) {
|
3747 |
+
.csf-metabox .csf-field .csf-title {
|
3748 |
+
float: none;
|
3749 |
+
width: 100%;
|
3750 |
+
margin-bottom: 10px;
|
3751 |
+
}
|
3752 |
+
.csf-metabox .csf-field .csf-fieldset {
|
3753 |
+
float: none;
|
3754 |
+
width: 100%;
|
3755 |
+
}
|
3756 |
+
}
|
3757 |
+
@media only screen and (max-width: 782px) {
|
3758 |
+
.csf-header-inner {
|
3759 |
+
text-align: center;
|
3760 |
+
}
|
3761 |
+
.csf-header-inner h1 {
|
3762 |
+
width: 100%;
|
3763 |
+
margin-bottom: 10px;
|
3764 |
+
}
|
3765 |
+
|
3766 |
+
.csf-form-result {
|
3767 |
+
float: none;
|
3768 |
+
margin-right: 0;
|
3769 |
+
margin-bottom: 10px;
|
3770 |
+
}
|
3771 |
+
|
3772 |
+
.csf-search,
|
3773 |
+
.csf-header-right,
|
3774 |
+
.csf-header-left {
|
3775 |
+
width: 100%;
|
3776 |
+
}
|
3777 |
+
|
3778 |
+
.csf-search {
|
3779 |
+
text-align: center;
|
3780 |
+
margin-bottom: 15px;
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
.csf-footer {
|
3784 |
+
text-align: center;
|
3785 |
+
}
|
3786 |
+
|
3787 |
+
.csf-buttons {
|
3788 |
+
float: none;
|
3789 |
+
}
|
3790 |
+
|
3791 |
+
.csf-copyright {
|
3792 |
+
float: none;
|
3793 |
+
margin-top: 10px;
|
3794 |
+
}
|
3795 |
+
|
3796 |
+
.csf-nav,
|
3797 |
+
.csf-expand-all,
|
3798 |
+
.csf-reset-section,
|
3799 |
+
.csf-nav-background {
|
3800 |
+
display: none !important;
|
3801 |
+
}
|
3802 |
+
|
3803 |
+
.csf-nav-normal + .csf-content {
|
3804 |
+
margin-left: 0;
|
3805 |
+
}
|
3806 |
+
|
3807 |
+
.csf-section-title,
|
3808 |
+
.csf-section {
|
3809 |
+
display: block !important;
|
3810 |
+
}
|
3811 |
+
|
3812 |
+
.csf-field .csf-title {
|
3813 |
+
float: none;
|
3814 |
+
width: 100%;
|
3815 |
+
margin-bottom: 10px;
|
3816 |
+
}
|
3817 |
+
.csf-field .csf-fieldset {
|
3818 |
+
float: none;
|
3819 |
+
width: 100%;
|
3820 |
+
}
|
3821 |
+
|
3822 |
+
.csf-field-color .button.wp-picker-clear {
|
3823 |
+
padding: 0 8px;
|
3824 |
+
line-height: 2.14285714;
|
3825 |
+
min-height: 32px;
|
3826 |
+
}
|
3827 |
+
|
3828 |
+
.csf-profile-options > .csf-field > .csf-title,
|
3829 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-title {
|
3830 |
+
float: none;
|
3831 |
+
width: 100%;
|
3832 |
+
margin-bottom: 10px;
|
3833 |
+
}
|
3834 |
+
.csf-profile-options > .csf-field > .csf-fieldset,
|
3835 |
+
.csf-taxonomy-edit-fields > .csf-field > .csf-fieldset {
|
3836 |
+
float: none;
|
3837 |
+
width: 100%;
|
3838 |
+
}
|
3839 |
+
|
3840 |
+
.csf-nav-menu-options > .csf-fields {
|
3841 |
+
margin-left: -10px;
|
3842 |
+
margin-right: -10px;
|
3843 |
+
}
|
3844 |
+
.csf-nav-menu-options > .csf-fields > .csf-field {
|
3845 |
+
padding: 10px;
|
3846 |
+
}
|
3847 |
+
}
|
3848 |
+
@media only screen and (max-width: 782px) {
|
3849 |
+
.csf-modal .csf-modal-inner {
|
3850 |
+
width: 90%;
|
3851 |
+
}
|
3852 |
+
}
|
3853 |
+
@media only screen and (max-height: 750px) {
|
3854 |
+
.csf-modal .csf-modal-inner {
|
3855 |
+
height: auto;
|
3856 |
+
}
|
3857 |
+
.csf-modal .csf-modal-content {
|
3858 |
+
height: calc(100vh - 200px);
|
3859 |
+
}
|
3860 |
+
}
|
3861 |
+
/**
|
3862 |
+
* Chosen JS Styles
|
3863 |
+
*/
|
3864 |
+
.chosen-container {
|
3865 |
+
position: relative;
|
3866 |
+
display: inline-block;
|
3867 |
+
vertical-align: middle;
|
3868 |
+
font-size: 13px;
|
3869 |
+
user-select: none;
|
3870 |
+
}
|
3871 |
+
|
3872 |
+
.chosen-container * {
|
3873 |
+
box-sizing: border-box;
|
3874 |
+
}
|
3875 |
+
|
3876 |
+
.chosen-container .chosen-drop {
|
3877 |
+
position: absolute;
|
3878 |
+
top: 100%;
|
3879 |
+
z-index: 1010;
|
3880 |
+
width: 100%;
|
3881 |
+
border: 1px solid #aaa;
|
3882 |
+
border-top: 0;
|
3883 |
+
background: #fff;
|
3884 |
+
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
3885 |
+
clip: rect(0, 0, 0, 0);
|
3886 |
+
clip-path: inset(100% 100%);
|
3887 |
+
}
|
3888 |
+
|
3889 |
+
.chosen-container.chosen-with-drop .chosen-drop {
|
3890 |
+
clip: auto;
|
3891 |
+
clip-path: none;
|
3892 |
+
}
|
3893 |
+
|
3894 |
+
.chosen-container a {
|
3895 |
+
cursor: pointer;
|
3896 |
+
}
|
3897 |
+
|
3898 |
+
.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
|
3899 |
+
margin-right: 4px;
|
3900 |
+
overflow: hidden;
|
3901 |
+
white-space: nowrap;
|
3902 |
+
text-overflow: ellipsis;
|
3903 |
+
font-weight: normal;
|
3904 |
+
color: #999999;
|
3905 |
+
}
|
3906 |
+
|
3907 |
+
.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
|
3908 |
+
content: ":";
|
3909 |
+
padding-left: 2px;
|
3910 |
+
vertical-align: top;
|
3911 |
+
}
|
3912 |
+
|
3913 |
+
.chosen-container-single .chosen-single {
|
3914 |
+
position: relative;
|
3915 |
+
display: block;
|
3916 |
+
overflow: hidden;
|
3917 |
+
padding: 0 0 0 8px;
|
3918 |
+
height: 25px;
|
3919 |
+
border: 1px solid #aaa;
|
3920 |
+
border-radius: 5px;
|
3921 |
+
background-color: #fff;
|
3922 |
+
background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
|
3923 |
+
background-clip: padding-box;
|
3924 |
+
box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
|
3925 |
+
color: #444;
|
3926 |
+
text-decoration: none;
|
3927 |
+
white-space: nowrap;
|
3928 |
+
line-height: 24px;
|
3929 |
+
}
|
3930 |
+
|
3931 |
+
.chosen-container-single .chosen-default {
|
3932 |
+
color: #999;
|
3933 |
+
}
|
3934 |
+
|
3935 |
+
.chosen-container-single .chosen-single span {
|
3936 |
+
display: block;
|
3937 |
+
overflow: hidden;
|
3938 |
+
margin-right: 26px;
|
3939 |
+
text-overflow: ellipsis;
|
3940 |
+
white-space: nowrap;
|
3941 |
+
}
|
3942 |
+
|
3943 |
+
.chosen-container-single .chosen-single-with-deselect span {
|
3944 |
+
margin-right: 38px;
|
3945 |
+
}
|
3946 |
+
|
3947 |
+
.chosen-container-single .chosen-single abbr {
|
3948 |
+
position: absolute;
|
3949 |
+
top: 6px;
|
3950 |
+
right: 26px;
|
3951 |
+
display: block;
|
3952 |
+
width: 12px;
|
3953 |
+
height: 12px;
|
3954 |
+
font-size: 1px;
|
3955 |
+
}
|
3956 |
+
|
3957 |
+
.chosen-container-single .chosen-single div {
|
3958 |
+
position: absolute;
|
3959 |
+
top: 0;
|
3960 |
+
right: 0;
|
3961 |
+
display: block;
|
3962 |
+
width: 18px;
|
3963 |
+
height: 100%;
|
3964 |
+
}
|
3965 |
+
|
3966 |
+
.chosen-container-single .chosen-single div b {
|
3967 |
+
display: block;
|
3968 |
+
width: 100%;
|
3969 |
+
height: 100%;
|
3970 |
+
}
|
3971 |
+
|
3972 |
+
.chosen-container-single .chosen-search {
|
3973 |
+
position: relative;
|
3974 |
+
z-index: 1010;
|
3975 |
+
margin: 0;
|
3976 |
+
padding: 3px 4px;
|
3977 |
+
white-space: nowrap;
|
3978 |
+
}
|
3979 |
+
|
3980 |
+
.chosen-container-single .chosen-search input[type="text"] {
|
3981 |
+
margin: 1px 0;
|
3982 |
+
padding: 4px 20px 4px 5px;
|
3983 |
+
width: 100%;
|
3984 |
+
height: auto;
|
3985 |
+
outline: 0;
|
3986 |
+
border: 1px solid #aaa;
|
3987 |
+
font-size: 1em;
|
3988 |
+
font-family: sans-serif;
|
3989 |
+
line-height: normal;
|
3990 |
+
border-radius: 0;
|
3991 |
+
}
|
3992 |
+
|
3993 |
+
.chosen-container-single .chosen-drop {
|
3994 |
+
margin-top: -1px;
|
3995 |
+
border-radius: 0 0 4px 4px;
|
3996 |
+
background-clip: padding-box;
|
3997 |
+
}
|
3998 |
+
|
3999 |
+
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
4000 |
+
position: absolute;
|
4001 |
+
clip: rect(0, 0, 0, 0);
|
4002 |
+
clip-path: inset(100% 100%);
|
4003 |
+
}
|
4004 |
+
|
4005 |
+
.chosen-container .chosen-results {
|
4006 |
+
color: #444;
|
4007 |
+
position: relative;
|
4008 |
+
overflow-x: hidden;
|
4009 |
+
overflow-y: auto;
|
4010 |
+
margin: 0 4px 4px 0;
|
4011 |
+
padding: 0 0 0 4px;
|
4012 |
+
max-height: 240px;
|
4013 |
+
-webkit-overflow-scrolling: touch;
|
4014 |
+
}
|
4015 |
+
|
4016 |
+
.chosen-container .chosen-results li {
|
4017 |
+
display: none;
|
4018 |
+
margin: 0;
|
4019 |
+
padding: 5px 6px;
|
4020 |
+
list-style: none;
|
4021 |
+
line-height: 15px;
|
4022 |
+
word-wrap: break-word;
|
4023 |
+
-webkit-touch-callout: none;
|
4024 |
+
}
|
4025 |
+
|
4026 |
+
.chosen-container .chosen-results li.active-result {
|
4027 |
+
display: list-item;
|
4028 |
+
cursor: pointer;
|
4029 |
+
}
|
4030 |
+
|
4031 |
+
.chosen-container .chosen-results li.disabled-result {
|
4032 |
+
display: list-item;
|
4033 |
+
color: #ccc;
|
4034 |
+
cursor: default;
|
4035 |
+
}
|
4036 |
+
|
4037 |
+
.chosen-container .chosen-results li.highlighted {
|
4038 |
+
background-color: #3875d7;
|
4039 |
+
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
4040 |
+
color: #fff;
|
4041 |
+
}
|
4042 |
+
|
4043 |
+
.chosen-container .chosen-results li.no-results {
|
4044 |
+
color: #777;
|
4045 |
+
display: list-item;
|
4046 |
+
background: #f4f4f4;
|
4047 |
+
}
|
4048 |
+
|
4049 |
+
.chosen-container .chosen-results li.group-result {
|
4050 |
+
display: list-item;
|
4051 |
+
font-weight: bold;
|
4052 |
+
cursor: default;
|
4053 |
+
}
|
4054 |
+
|
4055 |
+
.chosen-container .chosen-results li.group-option {
|
4056 |
+
padding-left: 15px;
|
4057 |
+
}
|
4058 |
+
|
4059 |
+
.chosen-container .chosen-results li em {
|
4060 |
+
font-style: normal;
|
4061 |
+
text-decoration: underline;
|
4062 |
+
}
|
4063 |
+
|
4064 |
+
.chosen-container-multi .chosen-choices {
|
4065 |
+
position: relative;
|
4066 |
+
overflow: hidden;
|
4067 |
+
margin: 0;
|
4068 |
+
padding: 0 5px;
|
4069 |
+
width: 100%;
|
4070 |
+
height: auto;
|
4071 |
+
border: 1px solid #aaa;
|
4072 |
+
background-color: #fff;
|
4073 |
+
background-image: linear-gradient(#eee 1%, #fff 15%);
|
4074 |
+
cursor: text;
|
4075 |
+
}
|
4076 |
+
|
4077 |
+
.chosen-container-multi .chosen-choices li {
|
4078 |
+
float: left;
|
4079 |
+
list-style: none;
|
4080 |
+
}
|
4081 |
+
|
4082 |
+
.chosen-container-multi .chosen-choices li.search-field {
|
4083 |
+
margin: 0;
|
4084 |
+
padding: 0;
|
4085 |
+
white-space: nowrap;
|
4086 |
+
}
|
4087 |
+
|
4088 |
+
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
4089 |
+
margin: 1px 0;
|
4090 |
+
padding: 0;
|
4091 |
+
outline: 0;
|
4092 |
+
border: 0 !important;
|
4093 |
+
background: transparent !important;
|
4094 |
+
box-shadow: none;
|
4095 |
+
color: #999;
|
4096 |
+
font-size: 100%;
|
4097 |
+
font-family: sans-serif;
|
4098 |
+
line-height: normal;
|
4099 |
+
border-radius: 0;
|
4100 |
+
width: 25px;
|
4101 |
+
height: 25px;
|
4102 |
+
min-height: 25px;
|
4103 |
+
}
|
4104 |
+
|
4105 |
+
.chosen-container-multi .chosen-choices li.search-choice {
|
4106 |
+
position: relative;
|
4107 |
+
margin: 3px 5px 3px 0;
|
4108 |
+
padding: 3px 20px 3px 6px;
|
4109 |
+
border: 1px solid #aaa;
|
4110 |
+
max-width: 100%;
|
4111 |
+
border-radius: 3px;
|
4112 |
+
background-color: #eeeeee;
|
4113 |
+
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
4114 |
+
background-size: 100% 19px;
|
4115 |
+
background-repeat: repeat-x;
|
4116 |
+
background-clip: padding-box;
|
4117 |
+
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
4118 |
+
color: #333;
|
4119 |
+
line-height: 13px;
|
4120 |
+
cursor: default;
|
4121 |
+
}
|
4122 |
+
|
4123 |
+
.chosen-container-multi .chosen-choices li.search-choice span {
|
4124 |
+
word-wrap: break-word;
|
4125 |
+
white-space: nowrap;
|
4126 |
+
}
|
4127 |
+
|
4128 |
+
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
4129 |
+
position: absolute;
|
4130 |
+
top: 0;
|
4131 |
+
right: 0;
|
4132 |
+
display: block;
|
4133 |
+
width: 12px;
|
4134 |
+
height: 12px;
|
4135 |
+
font-size: 1px;
|
4136 |
+
}
|
4137 |
+
|
4138 |
+
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
4139 |
+
padding-right: 5px;
|
4140 |
+
border: 1px solid #ccc;
|
4141 |
+
background-color: #e4e4e4;
|
4142 |
+
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
4143 |
+
color: #666;
|
4144 |
+
}
|
4145 |
+
|
4146 |
+
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
4147 |
+
background: #d4d4d4;
|
4148 |
+
}
|
4149 |
+
|
4150 |
+
.chosen-container-multi .chosen-results {
|
4151 |
+
margin: 0;
|
4152 |
+
padding: 0;
|
4153 |
+
}
|
4154 |
+
|
4155 |
+
.chosen-container-multi .chosen-drop .result-selected {
|
4156 |
+
display: list-item;
|
4157 |
+
color: #ccc;
|
4158 |
+
cursor: default;
|
4159 |
+
}
|
4160 |
+
|
4161 |
+
.chosen-container-active .chosen-single {
|
4162 |
+
border: 1px solid #5897fb;
|
4163 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
4164 |
+
}
|
4165 |
+
|
4166 |
+
.chosen-container-active.chosen-with-drop .chosen-single {
|
4167 |
+
border: 1px solid #aaa;
|
4168 |
+
border-bottom-right-radius: 0;
|
4169 |
+
border-bottom-left-radius: 0;
|
4170 |
+
background-image: linear-gradient(#eee 20%, #fff 80%);
|
4171 |
+
box-shadow: 0 1px 0 #fff inset;
|
4172 |
+
}
|
4173 |
+
|
4174 |
+
.chosen-container-active.chosen-with-drop .chosen-single div {
|
4175 |
+
border-left: none;
|
4176 |
+
background: transparent;
|
4177 |
+
}
|
4178 |
+
|
4179 |
+
.chosen-container-active .chosen-choices {
|
4180 |
+
border: 1px solid #5897fb;
|
4181 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
4182 |
+
}
|
4183 |
+
|
4184 |
+
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
|
4185 |
+
color: #222 !important;
|
4186 |
+
}
|
4187 |
+
|
4188 |
+
.chosen-disabled {
|
4189 |
+
opacity: 0.5 !important;
|
4190 |
+
cursor: default;
|
4191 |
+
}
|
4192 |
+
|
4193 |
+
.chosen-disabled .chosen-single {
|
4194 |
+
cursor: default;
|
4195 |
+
}
|
4196 |
+
|
4197 |
+
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
4198 |
+
cursor: default;
|
4199 |
+
}
|
4200 |
+
|
4201 |
+
.chosen-rtl {
|
4202 |
+
text-align: right;
|
4203 |
+
}
|
4204 |
+
|
4205 |
+
.chosen-rtl .chosen-single {
|
4206 |
+
overflow: visible;
|
4207 |
+
padding: 0 8px 0 0;
|
4208 |
+
}
|
4209 |
+
|
4210 |
+
.chosen-rtl .chosen-single span {
|
4211 |
+
margin-right: 0;
|
4212 |
+
margin-left: 26px;
|
4213 |
+
direction: rtl;
|
4214 |
+
}
|
4215 |
+
|
4216 |
+
.chosen-rtl .chosen-single-with-deselect span {
|
4217 |
+
margin-left: 38px;
|
4218 |
+
}
|
4219 |
+
|
4220 |
+
.chosen-rtl .chosen-single div {
|
4221 |
+
right: auto;
|
4222 |
+
left: 3px;
|
4223 |
+
}
|
4224 |
+
|
4225 |
+
.chosen-rtl .chosen-single abbr {
|
4226 |
+
right: auto;
|
4227 |
+
left: 26px;
|
4228 |
+
}
|
4229 |
+
|
4230 |
+
.chosen-rtl .chosen-choices li {
|
4231 |
+
float: right;
|
4232 |
+
}
|
4233 |
+
|
4234 |
+
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
|
4235 |
+
direction: rtl;
|
4236 |
+
}
|
4237 |
+
|
4238 |
+
.chosen-rtl .chosen-choices li.search-choice {
|
4239 |
+
margin: 3px 5px 3px 0;
|
4240 |
+
padding: 3px 5px 3px 19px;
|
4241 |
+
}
|
4242 |
+
|
4243 |
+
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
4244 |
+
right: auto;
|
4245 |
+
left: 4px;
|
4246 |
+
}
|
4247 |
+
|
4248 |
+
.chosen-rtl.chosen-container-single .chosen-results {
|
4249 |
+
margin: 0 0 4px 4px;
|
4250 |
+
padding: 0 4px 0 0;
|
4251 |
+
}
|
4252 |
+
|
4253 |
+
.chosen-rtl .chosen-results li.group-option {
|
4254 |
+
padding-right: 15px;
|
4255 |
+
padding-left: 0;
|
4256 |
+
}
|
4257 |
+
|
4258 |
+
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
4259 |
+
border-right: none;
|
4260 |
+
}
|
4261 |
+
|
4262 |
+
.chosen-rtl .chosen-search input[type="text"] {
|
4263 |
+
padding: 4px 5px 4px 20px;
|
4264 |
+
direction: rtl;
|
4265 |
+
}
|
4266 |
+
|
4267 |
+
/**
|
4268 |
+
* Flatpickr
|
4269 |
+
*/
|
4270 |
+
.flatpickr-calendar {
|
4271 |
+
background: transparent;
|
4272 |
+
opacity: 0;
|
4273 |
+
display: none;
|
4274 |
+
text-align: center;
|
4275 |
+
visibility: hidden;
|
4276 |
+
padding: 0;
|
4277 |
+
-webkit-animation: none;
|
4278 |
+
animation: none;
|
4279 |
+
direction: ltr;
|
4280 |
+
border: 0;
|
4281 |
+
font-size: 14px;
|
4282 |
+
line-height: 24px;
|
4283 |
+
border-radius: 5px;
|
4284 |
+
position: absolute;
|
4285 |
+
width: 307.875px;
|
4286 |
+
-webkit-box-sizing: border-box;
|
4287 |
+
box-sizing: border-box;
|
4288 |
+
-ms-touch-action: manipulation;
|
4289 |
+
touch-action: manipulation;
|
4290 |
+
background: #fff;
|
4291 |
+
-webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
|
4292 |
+
box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
|
4293 |
+
}
|
4294 |
+
|
4295 |
+
.flatpickr-calendar.open,
|
4296 |
+
.flatpickr-calendar.inline {
|
4297 |
+
opacity: 1;
|
4298 |
+
max-height: 640px;
|
4299 |
+
visibility: visible;
|
4300 |
+
}
|
4301 |
+
|
4302 |
+
.flatpickr-calendar.open {
|
4303 |
+
display: inline-block;
|
4304 |
+
z-index: 99999;
|
4305 |
+
}
|
4306 |
+
|
4307 |
+
.flatpickr-calendar.animate.open {
|
4308 |
+
-webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
4309 |
+
animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
4310 |
+
}
|
4311 |
+
|
4312 |
+
.flatpickr-calendar.inline {
|
4313 |
+
display: block;
|
4314 |
+
position: relative;
|
4315 |
+
top: 2px;
|
4316 |
+
}
|
4317 |
+
|
4318 |
+
.flatpickr-calendar.static {
|
4319 |
+
position: absolute;
|
4320 |
+
top: calc(100% + 2px);
|
4321 |
+
}
|
4322 |
+
|
4323 |
+
.flatpickr-calendar.static.open {
|
4324 |
+
z-index: 999;
|
4325 |
+
display: block;
|
4326 |
+
}
|
4327 |
+
|
4328 |
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
|
4329 |
+
-webkit-box-shadow: none !important;
|
4330 |
+
box-shadow: none !important;
|
4331 |
+
}
|
4332 |
+
|
4333 |
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
|
4334 |
+
-webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
4335 |
+
box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
4336 |
+
}
|
4337 |
+
|
4338 |
+
.flatpickr-calendar .hasWeeks .dayContainer,
|
4339 |
+
.flatpickr-calendar .hasTime .dayContainer {
|
4340 |
+
border-bottom: 0;
|
4341 |
+
border-bottom-right-radius: 0;
|
4342 |
+
border-bottom-left-radius: 0;
|
4343 |
+
}
|
4344 |
+
|
4345 |
+
.flatpickr-calendar .hasWeeks .dayContainer {
|
4346 |
+
border-left: 0;
|
4347 |
+
}
|
4348 |
+
|
4349 |
+
.flatpickr-calendar.hasTime .flatpickr-time {
|
4350 |
+
height: 40px;
|
4351 |
+
border-top: 1px solid #e6e6e6;
|
4352 |
+
}
|
4353 |
+
|
4354 |
+
.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
|
4355 |
+
height: auto;
|
4356 |
+
}
|
4357 |
+
|
4358 |
+
.flatpickr-calendar:before,
|
4359 |
+
.flatpickr-calendar:after {
|
4360 |
+
position: absolute;
|
4361 |
+
display: block;
|
4362 |
+
pointer-events: none;
|
4363 |
+
border: solid transparent;
|
4364 |
+
content: '';
|
4365 |
+
height: 0;
|
4366 |
+
width: 0;
|
4367 |
+
left: 22px;
|
4368 |
+
}
|
4369 |
+
|
4370 |
+
.flatpickr-calendar.rightMost:before,
|
4371 |
+
.flatpickr-calendar.arrowRight:before,
|
4372 |
+
.flatpickr-calendar.rightMost:after,
|
4373 |
+
.flatpickr-calendar.arrowRight:after {
|
4374 |
+
left: auto;
|
4375 |
+
right: 22px;
|
4376 |
+
}
|
4377 |
+
|
4378 |
+
.flatpickr-calendar.arrowCenter:before,
|
4379 |
+
.flatpickr-calendar.arrowCenter:after {
|
4380 |
+
left: 50%;
|
4381 |
+
right: 50%;
|
4382 |
+
}
|
4383 |
+
|
4384 |
+
.flatpickr-calendar:before {
|
4385 |
+
border-width: 5px;
|
4386 |
+
margin: 0 -5px;
|
4387 |
+
}
|
4388 |
+
|
4389 |
+
.flatpickr-calendar:after {
|
4390 |
+
border-width: 4px;
|
4391 |
+
margin: 0 -4px;
|
4392 |
+
}
|
4393 |
+
|
4394 |
+
.flatpickr-calendar.arrowTop:before,
|
4395 |
+
.flatpickr-calendar.arrowTop:after {
|
4396 |
+
bottom: 100%;
|
4397 |
+
}
|
4398 |
+
|
4399 |
+
.flatpickr-calendar.arrowTop:before {
|
4400 |
+
border-bottom-color: #e6e6e6;
|
4401 |
+
}
|
4402 |
+
|
4403 |
+
.flatpickr-calendar.arrowTop:after {
|
4404 |
+
border-bottom-color: #fff;
|
4405 |
+
}
|
4406 |
+
|
4407 |
+
.flatpickr-calendar.arrowBottom:before,
|
4408 |
+
.flatpickr-calendar.arrowBottom:after {
|
4409 |
+
top: 100%;
|
4410 |
+
}
|
4411 |
+
|
4412 |
+
.flatpickr-calendar.arrowBottom:before {
|
4413 |
+
border-top-color: #e6e6e6;
|
4414 |
+
}
|
4415 |
+
|
4416 |
+
.flatpickr-calendar.arrowBottom:after {
|
4417 |
+
border-top-color: #fff;
|
4418 |
+
}
|
4419 |
+
|
4420 |
+
.flatpickr-calendar:focus {
|
4421 |
+
outline: 0;
|
4422 |
+
}
|
4423 |
+
|
4424 |
+
.flatpickr-wrapper {
|
4425 |
+
position: relative;
|
4426 |
+
display: inline-block;
|
4427 |
+
}
|
4428 |
+
|
4429 |
+
.flatpickr-months {
|
4430 |
+
display: -webkit-box;
|
4431 |
+
display: -webkit-flex;
|
4432 |
+
display: -ms-flexbox;
|
4433 |
+
display: flex;
|
4434 |
+
}
|
4435 |
+
|
4436 |
+
.flatpickr-months .flatpickr-month {
|
4437 |
+
background: transparent;
|
4438 |
+
color: rgba(0, 0, 0, 0.9);
|
4439 |
+
fill: rgba(0, 0, 0, 0.9);
|
4440 |
+
height: 34px;
|
4441 |
+
line-height: 1;
|
4442 |
+
text-align: center;
|
4443 |
+
position: relative;
|
4444 |
+
-webkit-user-select: none;
|
4445 |
+
-moz-user-select: none;
|
4446 |
+
-ms-user-select: none;
|
4447 |
+
user-select: none;
|
4448 |
+
overflow: hidden;
|
4449 |
+
-webkit-box-flex: 1;
|
4450 |
+
-webkit-flex: 1;
|
4451 |
+
-ms-flex: 1;
|
4452 |
+
flex: 1;
|
4453 |
+
}
|
4454 |
+
|
4455 |
+
.flatpickr-months .flatpickr-prev-month,
|
4456 |
+
.flatpickr-months .flatpickr-next-month {
|
4457 |
+
text-decoration: none;
|
4458 |
+
cursor: pointer;
|
4459 |
+
position: absolute;
|
4460 |
+
top: 0;
|
4461 |
+
height: 34px;
|
4462 |
+
padding: 10px;
|
4463 |
+
z-index: 3;
|
4464 |
+
color: rgba(0, 0, 0, 0.9);
|
4465 |
+
fill: rgba(0, 0, 0, 0.9);
|
4466 |
+
}
|
4467 |
+
|
4468 |
+
.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
|
4469 |
+
.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
|
4470 |
+
display: none;
|
4471 |
+
}
|
4472 |
+
|
4473 |
+
.flatpickr-months .flatpickr-prev-month i,
|
4474 |
+
.flatpickr-months .flatpickr-next-month i {
|
4475 |
+
position: relative;
|
4476 |
+
}
|
4477 |
+
|
4478 |
+
.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
|
4479 |
+
.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
|
4480 |
+
/*
|
4481 |
+
/*rtl:begin:ignore*/
|
4482 |
+
/*
|
4483 |
+
*/
|
4484 |
+
left: 0;
|
4485 |
+
/*
|
4486 |
+
/*rtl:end:ignore*/
|
4487 |
+
/*
|
4488 |
+
*/
|
4489 |
+
}
|
4490 |
+
|
4491 |
+
/*
|
4492 |
+
/*rtl:begin:ignore*/
|
4493 |
+
/*
|
4494 |
+
/*rtl:end:ignore*/
|
4495 |
+
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
|
4496 |
+
.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
|
4497 |
+
/*
|
4498 |
+
/*rtl:begin:ignore*/
|
4499 |
+
/*
|
4500 |
+
*/
|
4501 |
+
right: 0;
|
4502 |
+
/*
|
4503 |
+
/*rtl:end:ignore*/
|
4504 |
+
/*
|
4505 |
+
*/
|
4506 |
+
}
|
4507 |
+
|
4508 |
+
/*
|
4509 |
+
/*rtl:begin:ignore*/
|
4510 |
+
/*
|
4511 |
+
/*rtl:end:ignore*/
|
4512 |
+
.flatpickr-months .flatpickr-prev-month:hover,
|
4513 |
+
.flatpickr-months .flatpickr-next-month:hover {
|
4514 |
+
color: #959ea9;
|
4515 |
+
}
|
4516 |
+
|
4517 |
+
.flatpickr-months .flatpickr-prev-month:hover svg,
|
4518 |
+
.flatpickr-months .flatpickr-next-month:hover svg {
|
4519 |
+
fill: #f64747;
|
4520 |
+
}
|
4521 |
+
|
4522 |
+
.flatpickr-months .flatpickr-prev-month svg,
|
4523 |
+
.flatpickr-months .flatpickr-next-month svg {
|
4524 |
+
width: 14px;
|
4525 |
+
height: 14px;
|
4526 |
+
}
|
4527 |
+
|
4528 |
+
.flatpickr-months .flatpickr-prev-month svg path,
|
4529 |
+
.flatpickr-months .flatpickr-next-month svg path {
|
4530 |
+
-webkit-transition: fill 0.1s;
|
4531 |
+
transition: fill 0.1s;
|
4532 |
+
fill: inherit;
|
4533 |
+
}
|
4534 |
+
|
4535 |
+
.numInputWrapper {
|
4536 |
+
position: relative;
|
4537 |
+
height: auto;
|
4538 |
+
}
|
4539 |
+
|
4540 |
+
.numInputWrapper input,
|
4541 |
+
.numInputWrapper span {
|
4542 |
+
display: inline-block;
|
4543 |
+
}
|
4544 |
+
|
4545 |
+
.numInputWrapper input {
|
4546 |
+
width: 100%;
|
4547 |
+
}
|
4548 |
+
|
4549 |
+
.numInputWrapper input::-ms-clear {
|
4550 |
+
display: none;
|
4551 |
+
}
|
4552 |
+
|
4553 |
+
.numInputWrapper input::-webkit-outer-spin-button,
|
4554 |
+
.numInputWrapper input::-webkit-inner-spin-button {
|
4555 |
+
margin: 0;
|
4556 |
+
-webkit-appearance: none;
|
4557 |
+
}
|
4558 |
+
|
4559 |
+
.numInputWrapper span {
|
4560 |
+
position: absolute;
|
4561 |
+
right: 0;
|
4562 |
+
width: 14px;
|
4563 |
+
padding: 0 4px 0 2px;
|
4564 |
+
height: 50%;
|
4565 |
+
line-height: 50%;
|
4566 |
+
opacity: 0;
|
4567 |
+
cursor: pointer;
|
4568 |
+
border: 1px solid rgba(57, 57, 57, 0.15);
|
4569 |
+
-webkit-box-sizing: border-box;
|
4570 |
+
box-sizing: border-box;
|
4571 |
+
}
|
4572 |
+
|
4573 |
+
.numInputWrapper span:hover {
|
4574 |
+
background: rgba(0, 0, 0, 0.1);
|
4575 |
+
}
|
4576 |
+
|
4577 |
+
.numInputWrapper span:active {
|
4578 |
+
background: rgba(0, 0, 0, 0.2);
|
4579 |
+
}
|
4580 |
+
|
4581 |
+
.numInputWrapper span:after {
|
4582 |
+
display: block;
|
4583 |
+
content: "";
|
4584 |
+
position: absolute;
|
4585 |
+
}
|
4586 |
+
|
4587 |
+
.numInputWrapper span.arrowUp {
|
4588 |
+
top: 0;
|
4589 |
+
border-bottom: 0;
|
4590 |
+
}
|
4591 |
+
|
4592 |
+
.numInputWrapper span.arrowUp:after {
|
4593 |
+
border-left: 4px solid transparent;
|
4594 |
+
border-right: 4px solid transparent;
|
4595 |
+
border-bottom: 4px solid rgba(57, 57, 57, 0.6);
|
4596 |
+
top: 26%;
|
4597 |
+
}
|
4598 |
+
|
4599 |
+
.numInputWrapper span.arrowDown {
|
4600 |
+
top: 50%;
|
4601 |
+
}
|
4602 |
+
|
4603 |
+
.numInputWrapper span.arrowDown:after {
|
4604 |
+
border-left: 4px solid transparent;
|
4605 |
+
border-right: 4px solid transparent;
|
4606 |
+
border-top: 4px solid rgba(57, 57, 57, 0.6);
|
4607 |
+
top: 40%;
|
4608 |
+
}
|
4609 |
+
|
4610 |
+
.numInputWrapper span svg {
|
4611 |
+
width: inherit;
|
4612 |
+
height: auto;
|
4613 |
+
}
|
4614 |
+
|
4615 |
+
.numInputWrapper span svg path {
|
4616 |
+
fill: rgba(0, 0, 0, 0.5);
|
4617 |
+
}
|
4618 |
+
|
4619 |
+
.numInputWrapper:hover {
|
4620 |
+
background: rgba(0, 0, 0, 0.05);
|
4621 |
+
}
|
4622 |
+
|
4623 |
+
.numInputWrapper:hover span {
|
4624 |
+
opacity: 1;
|
4625 |
+
}
|
4626 |
+
|
4627 |
+
.flatpickr-current-month {
|
4628 |
+
font-size: 135%;
|
4629 |
+
line-height: inherit;
|
4630 |
+
font-weight: 300;
|
4631 |
+
color: inherit;
|
4632 |
+
position: absolute;
|
4633 |
+
width: 75%;
|
4634 |
+
left: 12.5%;
|
4635 |
+
padding: 7.48px 0 0 0;
|
4636 |
+
line-height: 1;
|
4637 |
+
height: 34px;
|
4638 |
+
display: inline-block;
|
4639 |
+
text-align: center;
|
4640 |
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
4641 |
+
transform: translate3d(0px, 0px, 0px);
|
4642 |
+
}
|
4643 |
+
|
4644 |
+
.flatpickr-current-month span.cur-month {
|
4645 |
+
font-family: inherit;
|
4646 |
+
font-weight: 700;
|
4647 |
+
color: inherit;
|
4648 |
+
display: inline-block;
|
4649 |
+
margin-left: 0.5ch;
|
4650 |
+
padding: 0;
|
4651 |
+
}
|
4652 |
+
|
4653 |
+
.flatpickr-current-month span.cur-month:hover {
|
4654 |
+
background: rgba(0, 0, 0, 0.05);
|
4655 |
+
}
|
4656 |
+
|
4657 |
+
.flatpickr-current-month .numInputWrapper {
|
4658 |
+
width: 6ch;
|
4659 |
+
width: 7ch\0;
|
4660 |
+
display: inline-block;
|
4661 |
+
}
|
4662 |
+
|
4663 |
+
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
|
4664 |
+
border-bottom-color: rgba(0, 0, 0, 0.9);
|
4665 |
+
}
|
4666 |
+
|
4667 |
+
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
|
4668 |
+
border-top-color: rgba(0, 0, 0, 0.9);
|
4669 |
+
}
|
4670 |
+
|
4671 |
+
.flatpickr-current-month input.cur-year {
|
4672 |
+
background: transparent;
|
4673 |
+
-webkit-box-sizing: border-box;
|
4674 |
+
box-sizing: border-box;
|
4675 |
+
color: inherit;
|
4676 |
+
cursor: text;
|
4677 |
+
padding: 0 0 0 0.5ch;
|
4678 |
+
margin: 0;
|
4679 |
+
display: inline-block;
|
4680 |
+
font-size: inherit;
|
4681 |
+
font-family: inherit;
|
4682 |
+
font-weight: 300;
|
4683 |
+
line-height: inherit;
|
4684 |
+
height: auto;
|
4685 |
+
border: 0;
|
4686 |
+
border-radius: 0;
|
4687 |
+
vertical-align: initial;
|
4688 |
+
-webkit-appearance: textfield;
|
4689 |
+
-moz-appearance: textfield;
|
4690 |
+
appearance: textfield;
|
4691 |
+
}
|
4692 |
+
|
4693 |
+
.flatpickr-current-month input.cur-year:focus {
|
4694 |
+
outline: 0;
|
4695 |
+
}
|
4696 |
+
|
4697 |
+
.flatpickr-current-month input.cur-year[disabled],
|
4698 |
+
.flatpickr-current-month input.cur-year[disabled]:hover {
|
4699 |
+
font-size: 100%;
|
4700 |
+
color: rgba(0, 0, 0, 0.5);
|
4701 |
+
background: transparent;
|
4702 |
+
pointer-events: none;
|
4703 |
+
}
|
4704 |
+
|
4705 |
+
.flatpickr-current-month .flatpickr-monthDropdown-months {
|
4706 |
+
appearance: menulist;
|
4707 |
+
background: transparent;
|
4708 |
+
border: none;
|
4709 |
+
border-radius: 0;
|
4710 |
+
box-sizing: border-box;
|
4711 |
+
color: inherit;
|
4712 |
+
cursor: pointer;
|
4713 |
+
font-size: inherit;
|
4714 |
+
font-family: inherit;
|
4715 |
+
font-weight: 300;
|
4716 |
+
height: auto;
|
4717 |
+
line-height: inherit;
|
4718 |
+
margin: -1px 0 0 0;
|
4719 |
+
outline: none;
|
4720 |
+
padding: 0 0 0 0.5ch;
|
4721 |
+
position: relative;
|
4722 |
+
vertical-align: initial;
|
4723 |
+
-webkit-box-sizing: border-box;
|
4724 |
+
-webkit-appearance: menulist;
|
4725 |
+
-moz-appearance: menulist;
|
4726 |
+
width: auto;
|
4727 |
+
}
|
4728 |
+
|
4729 |
+
.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
|
4730 |
+
.flatpickr-current-month .flatpickr-monthDropdown-months:active {
|
4731 |
+
outline: none;
|
4732 |
+
}
|
4733 |
+
|
4734 |
+
.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
|
4735 |
+
background: rgba(0, 0, 0, 0.05);
|
4736 |
+
}
|
4737 |
+
|
4738 |
+
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
|
4739 |
+
background-color: transparent;
|
4740 |
+
outline: none;
|
4741 |
+
padding: 0;
|
4742 |
+
}
|
4743 |
+
|
4744 |
+
.flatpickr-weekdays {
|
4745 |
+
background: transparent;
|
4746 |
+
text-align: center;
|
4747 |
+
overflow: hidden;
|
4748 |
+
width: 100%;
|
4749 |
+
display: -webkit-box;
|
4750 |
+
display: -webkit-flex;
|
4751 |
+
display: -ms-flexbox;
|
4752 |
+
display: flex;
|
4753 |
+
-webkit-box-align: center;
|
4754 |
+
-webkit-align-items: center;
|
4755 |
+
-ms-flex-align: center;
|
4756 |
+
align-items: center;
|
4757 |
+
height: 28px;
|
4758 |
+
}
|
4759 |
+
|
4760 |
+
.flatpickr-weekdays .flatpickr-weekdaycontainer {
|
4761 |
+
display: -webkit-box;
|
4762 |
+
display: -webkit-flex;
|
4763 |
+
display: -ms-flexbox;
|
4764 |
+
display: flex;
|
4765 |
+
-webkit-box-flex: 1;
|
4766 |
+
-webkit-flex: 1;
|
4767 |
+
-ms-flex: 1;
|
4768 |
+
flex: 1;
|
4769 |
+
}
|
4770 |
+
|
4771 |
+
span.flatpickr-weekday {
|
4772 |
+
cursor: default;
|
4773 |
+
font-size: 90%;
|
4774 |
+
background: transparent;
|
4775 |
+
color: rgba(0, 0, 0, 0.54);
|
4776 |
+
line-height: 1;
|
4777 |
+
margin: 0;
|
4778 |
+
text-align: center;
|
4779 |
+
display: block;
|
4780 |
+
-webkit-box-flex: 1;
|
4781 |
+
-webkit-flex: 1;
|
4782 |
+
-ms-flex: 1;
|
4783 |
+
flex: 1;
|
4784 |
+
font-weight: bolder;
|
4785 |
+
}
|
4786 |
+
|
4787 |
+
.dayContainer,
|
4788 |
+
.flatpickr-weeks {
|
4789 |
+
padding: 1px 0 0 0;
|
4790 |
+
}
|
4791 |
+
|
4792 |
+
.flatpickr-days {
|
4793 |
+
position: relative;
|
4794 |
+
overflow: hidden;
|
4795 |
+
display: -webkit-box;
|
4796 |
+
display: -webkit-flex;
|
4797 |
+
display: -ms-flexbox;
|
4798 |
+
display: flex;
|
4799 |
+
-webkit-box-align: start;
|
4800 |
+
-webkit-align-items: flex-start;
|
4801 |
+
-ms-flex-align: start;
|
4802 |
+
align-items: flex-start;
|
4803 |
+
width: 307.875px;
|
4804 |
+
}
|
4805 |
+
|
4806 |
+
.flatpickr-days:focus {
|
4807 |
+
outline: 0;
|
4808 |
+
}
|
4809 |
+
|
4810 |
+
.dayContainer {
|
4811 |
+
padding: 0;
|
4812 |
+
outline: 0;
|
4813 |
+
text-align: left;
|
4814 |
+
width: 307.875px;
|
4815 |
+
min-width: 307.875px;
|
4816 |
+
max-width: 307.875px;
|
4817 |
+
-webkit-box-sizing: border-box;
|
4818 |
+
box-sizing: border-box;
|
4819 |
+
display: inline-block;
|
4820 |
+
display: -ms-flexbox;
|
4821 |
+
display: -webkit-box;
|
4822 |
+
display: -webkit-flex;
|
4823 |
+
display: flex;
|
4824 |
+
-webkit-flex-wrap: wrap;
|
4825 |
+
flex-wrap: wrap;
|
4826 |
+
-ms-flex-wrap: wrap;
|
4827 |
+
-ms-flex-pack: justify;
|
4828 |
+
-webkit-justify-content: space-around;
|
4829 |
+
justify-content: space-around;
|
4830 |
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
4831 |
+
transform: translate3d(0px, 0px, 0px);
|
4832 |
+
opacity: 1;
|
4833 |
+
}
|
4834 |
+
|
4835 |
+
.dayContainer + .dayContainer {
|
4836 |
+
-webkit-box-shadow: -1px 0 0 #e6e6e6;
|
4837 |
+
box-shadow: -1px 0 0 #e6e6e6;
|
4838 |
+
}
|
4839 |
+
|
4840 |
+
.flatpickr-day {
|
4841 |
+
background: none;
|
4842 |
+
border: 1px solid transparent;
|
4843 |
+
border-radius: 150px;
|
4844 |
+
-webkit-box-sizing: border-box;
|
4845 |
+
box-sizing: border-box;
|
4846 |
+
color: #393939;
|
4847 |
+
cursor: pointer;
|
4848 |
+
font-weight: 400;
|
4849 |
+
width: 14.2857143%;
|
4850 |
+
-webkit-flex-basis: 14.2857143%;
|
4851 |
+
-ms-flex-preferred-size: 14.2857143%;
|
4852 |
+
flex-basis: 14.2857143%;
|
4853 |
+
max-width: 39px;
|
4854 |
+
height: 39px;
|
4855 |
+
line-height: 39px;
|
4856 |
+
margin: 0;
|
4857 |
+
display: inline-block;
|
4858 |
+
position: relative;
|
4859 |
+
-webkit-box-pack: center;
|
4860 |
+
-webkit-justify-content: center;
|
4861 |
+
-ms-flex-pack: center;
|
4862 |
+
justify-content: center;
|
4863 |
+
text-align: center;
|
4864 |
+
}
|
4865 |
+
|
4866 |
+
.flatpickr-day.inRange,
|
4867 |
+
.flatpickr-day.prevMonthDay.inRange,
|
4868 |
+
.flatpickr-day.nextMonthDay.inRange,
|
4869 |
+
.flatpickr-day.today.inRange,
|
4870 |
+
.flatpickr-day.prevMonthDay.today.inRange,
|
4871 |
+
.flatpickr-day.nextMonthDay.today.inRange,
|
4872 |
+
.flatpickr-day:hover,
|
4873 |
+
.flatpickr-day.prevMonthDay:hover,
|
4874 |
+
.flatpickr-day.nextMonthDay:hover,
|
4875 |
+
.flatpickr-day:focus,
|
4876 |
+
.flatpickr-day.prevMonthDay:focus,
|
4877 |
+
.flatpickr-day.nextMonthDay:focus {
|
4878 |
+
cursor: pointer;
|
4879 |
+
outline: 0;
|
4880 |
+
background: #e6e6e6;
|
4881 |
+
border-color: #e6e6e6;
|
4882 |
+
}
|
4883 |
+
|
4884 |
+
.flatpickr-day.today {
|
4885 |
+
border-color: #959ea9;
|
4886 |
+
}
|
4887 |
+
|
4888 |
+
.flatpickr-day.today:hover,
|
4889 |
+
.flatpickr-day.today:focus {
|
4890 |
+
border-color: #959ea9;
|
4891 |
+
background: #959ea9;
|
4892 |
+
color: #fff;
|
4893 |
+
}
|
4894 |
+
|
4895 |
+
.flatpickr-day.selected,
|
4896 |
+
.flatpickr-day.startRange,
|
4897 |
+
.flatpickr-day.endRange,
|
4898 |
+
.flatpickr-day.selected.inRange,
|
4899 |
+
.flatpickr-day.startRange.inRange,
|
4900 |
+
.flatpickr-day.endRange.inRange,
|
4901 |
+
.flatpickr-day.selected:focus,
|
4902 |
+
.flatpickr-day.startRange:focus,
|
4903 |
+
.flatpickr-day.endRange:focus,
|
4904 |
+
.flatpickr-day.selected:hover,
|
4905 |
+
.flatpickr-day.startRange:hover,
|
4906 |
+
.flatpickr-day.endRange:hover,
|
4907 |
+
.flatpickr-day.selected.prevMonthDay,
|
4908 |
+
.flatpickr-day.startRange.prevMonthDay,
|
4909 |
+
.flatpickr-day.endRange.prevMonthDay,
|
4910 |
+
.flatpickr-day.selected.nextMonthDay,
|
4911 |
+
.flatpickr-day.startRange.nextMonthDay,
|
4912 |
+
.flatpickr-day.endRange.nextMonthDay {
|
4913 |
+
background: #569ff7;
|
4914 |
+
-webkit-box-shadow: none;
|
4915 |
+
box-shadow: none;
|
4916 |
+
color: #fff;
|
4917 |
+
border-color: #569ff7;
|
4918 |
+
}
|
4919 |
+
|
4920 |
+
.flatpickr-day.selected.startRange,
|
4921 |
+
.flatpickr-day.startRange.startRange,
|
4922 |
+
.flatpickr-day.endRange.startRange {
|
4923 |
+
border-radius: 50px 0 0 50px;
|
4924 |
+
}
|
4925 |
+
|
4926 |
+
.flatpickr-day.selected.endRange,
|
4927 |
+
.flatpickr-day.startRange.endRange,
|
4928 |
+
.flatpickr-day.endRange.endRange {
|
4929 |
+
border-radius: 0 50px 50px 0;
|
4930 |
+
}
|
4931 |
+
|
4932 |
+
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
|
4933 |
+
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
|
4934 |
+
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
|
4935 |
+
-webkit-box-shadow: -10px 0 0 #569ff7;
|
4936 |
+
box-shadow: -10px 0 0 #569ff7;
|
4937 |
+
}
|
4938 |
+
|
4939 |
+
.flatpickr-day.selected.startRange.endRange,
|
4940 |
+
.flatpickr-day.startRange.startRange.endRange,
|
4941 |
+
.flatpickr-day.endRange.startRange.endRange {
|
4942 |
+
border-radius: 50px;
|
4943 |
+
}
|
4944 |
+
|
4945 |
+
.flatpickr-day.inRange {
|
4946 |
+
border-radius: 0;
|
4947 |
+
-webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
4948 |
+
box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
4949 |
+
}
|
4950 |
+
|
4951 |
+
.flatpickr-day.flatpickr-disabled,
|
4952 |
+
.flatpickr-day.flatpickr-disabled:hover,
|
4953 |
+
.flatpickr-day.prevMonthDay,
|
4954 |
+
.flatpickr-day.nextMonthDay,
|
4955 |
+
.flatpickr-day.notAllowed,
|
4956 |
+
.flatpickr-day.notAllowed.prevMonthDay,
|
4957 |
+
.flatpickr-day.notAllowed.nextMonthDay {
|
4958 |
+
color: rgba(57, 57, 57, 0.3);
|
4959 |
+
background: transparent;
|
4960 |
+
border-color: transparent;
|
4961 |
+
cursor: default;
|
4962 |
+
}
|
4963 |
+
|
4964 |
+
.flatpickr-day.flatpickr-disabled,
|
4965 |
+
.flatpickr-day.flatpickr-disabled:hover {
|
4966 |
+
cursor: not-allowed;
|
4967 |
+
color: rgba(57, 57, 57, 0.1);
|
4968 |
+
}
|
4969 |
+
|
4970 |
+
.flatpickr-day.week.selected {
|
4971 |
+
border-radius: 0;
|
4972 |
+
-webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
4973 |
+
box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
4974 |
+
}
|
4975 |
+
|
4976 |
+
.flatpickr-day.hidden {
|
4977 |
+
visibility: hidden;
|
4978 |
+
}
|
4979 |
+
|
4980 |
+
.rangeMode .flatpickr-day {
|
4981 |
+
margin-top: 1px;
|
4982 |
+
}
|
4983 |
+
|
4984 |
+
.flatpickr-weekwrapper {
|
4985 |
+
float: left;
|
4986 |
+
}
|
4987 |
+
|
4988 |
+
.flatpickr-weekwrapper .flatpickr-weeks {
|
4989 |
+
padding: 0 12px;
|
4990 |
+
-webkit-box-shadow: 1px 0 0 #e6e6e6;
|
4991 |
+
box-shadow: 1px 0 0 #e6e6e6;
|
4992 |
+
}
|
4993 |
+
|
4994 |
+
.flatpickr-weekwrapper .flatpickr-weekday {
|
4995 |
+
float: none;
|
4996 |
+
width: 100%;
|
4997 |
+
line-height: 28px;
|
4998 |
+
}
|
4999 |
+
|
5000 |
+
.flatpickr-weekwrapper span.flatpickr-day,
|
5001 |
+
.flatpickr-weekwrapper span.flatpickr-day:hover {
|
5002 |
+
display: block;
|
5003 |
+
width: 100%;
|
5004 |
+
max-width: none;
|
5005 |
+
color: rgba(57, 57, 57, 0.3);
|
5006 |
+
background: transparent;
|
5007 |
+
cursor: default;
|
5008 |
+
border: none;
|
5009 |
+
}
|
5010 |
+
|
5011 |
+
.flatpickr-innerContainer {
|
5012 |
+
display: block;
|
5013 |
+
display: -webkit-box;
|
5014 |
+
display: -webkit-flex;
|
5015 |
+
display: -ms-flexbox;
|
5016 |
+
display: flex;
|
5017 |
+
-webkit-box-sizing: border-box;
|
5018 |
+
box-sizing: border-box;
|
5019 |
+
overflow: hidden;
|
5020 |
+
}
|
5021 |
+
|
5022 |
+
.flatpickr-rContainer {
|
5023 |
+
display: inline-block;
|
5024 |
+
padding: 0;
|
5025 |
+
-webkit-box-sizing: border-box;
|
5026 |
+
box-sizing: border-box;
|
5027 |
+
}
|
5028 |
+
|
5029 |
+
.flatpickr-time {
|
5030 |
+
text-align: center;
|
5031 |
+
outline: 0;
|
5032 |
+
display: block;
|
5033 |
+
height: 0;
|
5034 |
+
line-height: 40px;
|
5035 |
+
max-height: 40px;
|
5036 |
+
-webkit-box-sizing: border-box;
|
5037 |
+
box-sizing: border-box;
|
5038 |
+
overflow: hidden;
|
5039 |
+
display: -webkit-box;
|
5040 |
+
display: -webkit-flex;
|
5041 |
+
display: -ms-flexbox;
|
5042 |
+
display: flex;
|
5043 |
+
}
|
5044 |
+
|
5045 |
+
.flatpickr-time:after {
|
5046 |
+
content: "";
|
5047 |
+
display: table;
|
5048 |
+
clear: both;
|
5049 |
+
}
|
5050 |
+
|
5051 |
+
.flatpickr-time .numInputWrapper {
|
5052 |
+
-webkit-box-flex: 1;
|
5053 |
+
-webkit-flex: 1;
|
5054 |
+
-ms-flex: 1;
|
5055 |
+
flex: 1;
|
5056 |
+
width: 40%;
|
5057 |
+
height: 40px;
|
5058 |
+
float: left;
|
5059 |
+
}
|
5060 |
+
|
5061 |
+
.flatpickr-time .numInputWrapper span.arrowUp:after {
|
5062 |
+
border-bottom-color: #393939;
|
5063 |
+
}
|
5064 |
+
|
5065 |
+
.flatpickr-time .numInputWrapper span.arrowDown:after {
|
5066 |
+
border-top-color: #393939;
|
5067 |
+
}
|
5068 |
+
|
5069 |
+
.flatpickr-time.hasSeconds .numInputWrapper {
|
5070 |
+
width: 26%;
|
5071 |
+
}
|
5072 |
+
|
5073 |
+
.flatpickr-time.time24hr .numInputWrapper {
|
5074 |
+
width: 49%;
|
5075 |
+
}
|
5076 |
+
|
5077 |
+
.flatpickr-time input {
|
5078 |
+
background: transparent;
|
5079 |
+
-webkit-box-shadow: none;
|
5080 |
+
box-shadow: none;
|
5081 |
+
border: 0;
|
5082 |
+
border-radius: 0;
|
5083 |
+
text-align: center;
|
5084 |
+
margin: 0;
|
5085 |
+
padding: 0;
|
5086 |
+
height: inherit;
|
5087 |
+
line-height: inherit;
|
5088 |
+
color: #393939;
|
5089 |
+
font-size: 14px;
|
5090 |
+
position: relative;
|
5091 |
+
-webkit-box-sizing: border-box;
|
5092 |
+
box-sizing: border-box;
|
5093 |
+
-webkit-appearance: textfield;
|
5094 |
+
-moz-appearance: textfield;
|
5095 |
+
appearance: textfield;
|
5096 |
+
}
|
5097 |
+
|
5098 |
+
.flatpickr-time input.flatpickr-hour {
|
5099 |
+
font-weight: bold;
|
5100 |
+
}
|
5101 |
+
|
5102 |
+
.flatpickr-time input.flatpickr-minute,
|
5103 |
+
.flatpickr-time input.flatpickr-second {
|
5104 |
+
font-weight: 400;
|
5105 |
+
}
|
5106 |
+
|
5107 |
+
.flatpickr-time input:focus {
|
5108 |
+
outline: 0;
|
5109 |
+
border: 0;
|
5110 |
+
}
|
5111 |
+
|
5112 |
+
.flatpickr-time .flatpickr-time-separator,
|
5113 |
+
.flatpickr-time .flatpickr-am-pm {
|
5114 |
+
height: inherit;
|
5115 |
+
float: left;
|
5116 |
+
line-height: inherit;
|
5117 |
+
color: #393939;
|
5118 |
+
font-weight: bold;
|
5119 |
+
width: 2%;
|
5120 |
+
-webkit-user-select: none;
|
5121 |
+
-moz-user-select: none;
|
5122 |
+
-ms-user-select: none;
|
5123 |
+
user-select: none;
|
5124 |
+
-webkit-align-self: center;
|
5125 |
+
-ms-flex-item-align: center;
|
5126 |
+
align-self: center;
|
5127 |
+
}
|
5128 |
+
|
5129 |
+
.flatpickr-time .flatpickr-am-pm {
|
5130 |
+
outline: 0;
|
5131 |
+
width: 18%;
|
5132 |
+
cursor: pointer;
|
5133 |
+
text-align: center;
|
5134 |
+
font-weight: 400;
|
5135 |
+
}
|
5136 |
+
|
5137 |
+
.flatpickr-time input:hover,
|
5138 |
+
.flatpickr-time .flatpickr-am-pm:hover,
|
5139 |
+
.flatpickr-time input:focus,
|
5140 |
+
.flatpickr-time .flatpickr-am-pm:focus {
|
5141 |
+
background: #eee;
|
5142 |
+
}
|
5143 |
+
|
5144 |
+
.flatpickr-input[readonly] {
|
5145 |
+
cursor: pointer;
|
5146 |
+
}
|
5147 |
+
|
5148 |
+
@-webkit-keyframes fpFadeInDown {
|
5149 |
+
from {
|
5150 |
+
opacity: 0;
|
5151 |
+
-webkit-transform: translate3d(0, -20px, 0);
|
5152 |
+
transform: translate3d(0, -20px, 0);
|
5153 |
+
}
|
5154 |
+
to {
|
5155 |
+
opacity: 1;
|
5156 |
+
-webkit-transform: translate3d(0, 0, 0);
|
5157 |
+
transform: translate3d(0, 0, 0);
|
5158 |
+
}
|
5159 |
+
}
|
5160 |
+
@keyframes fpFadeInDown {
|
5161 |
+
from {
|
5162 |
+
opacity: 0;
|
5163 |
+
-webkit-transform: translate3d(0, -20px, 0);
|
5164 |
+
transform: translate3d(0, -20px, 0);
|
5165 |
+
}
|
5166 |
+
to {
|
5167 |
+
opacity: 1;
|
5168 |
+
-webkit-transform: translate3d(0, 0, 0);
|
5169 |
+
transform: translate3d(0, 0, 0);
|
5170 |
+
}
|
5171 |
+
}
|
|
|
|
|
|
|
|
|
|
vendor/codestar-framework/assets/css/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.csf{position:relative}.csf label{padding:0;margin:0;display:inline-block}.csf-ab-icon{top:2px}#screen-meta-links+.csf-options{margin-top:40px}.csf-options{margin-top:20px;margin-right:20px}.csf-header{position:relative}.csf-header-inner{padding:25px;transition:box-shadow .3s ease}.csf-header-inner h1{float:left;font-size:1.5em;line-height:26px;font-weight:400;margin:0}.csf-header-inner h1 small{font-size:11px;font-weight:500}.csf-sticky .csf-header-inner{position:fixed;z-index:99;top:32px;box-shadow:0 5px 10px rgba(0,0,0,.1)}.csf-buttons{float:right}.csf-buttons .button{margin:0 2px;line-height:26px}.csf-buttons .button:focus{outline:0!important;box-shadow:none!important}.csf-buttons .csf-save{min-width:72px}.csf-header-left{float:left}.csf-header-right{float:right}.csf-nav{display:block;position:relative;z-index:10;float:left}.csf-nav ul{clear:left;margin:0;list-style-type:none}.csf-nav ul li{margin-bottom:0}.csf-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-decoration:none;transition-property:color,background;transition-duration:.2s;transition-timing-function:ease}.csf-nav ul li a:focus{outline:0;box-shadow:none}.csf-nav ul li .csf-arrow:after{content:"\f054";display:inline-block;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px}.csf-nav ul li.csf-tab-expanded .csf-arrow:after{transform:rotate(90deg)}.csf-nav ul li.csf-tab-expanded ul{display:block}.csf-nav ul ul{display:none;position:relative}.csf-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.csf-nav .csf-tab-icon{width:20px;margin-right:5px;font-size:13px;text-align:center}.csf-nav .csf-label-error{margin-left:4px;vertical-align:top}.csf-nav-normal{width:225px}.csf-nav-normal+.csf-content{margin-left:225px}.csf-nav-inline{width:100%}.csf-nav-inline ul li{display:inline-block;vertical-align:top}.csf-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:225px}.csf-wrapper{position:relative}.csf-content{position:relative;background-color:#fff}.csf-sections{float:left;width:100%}.csf-section-title{display:none;padding:20px 30px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase}.csf-section-title .csf-section-icon{margin-right:5px}.csf-footer{padding:20px;font-size:11px}.csf-copyright{float:left;margin-top:5px}.csf-search-all .csf-nav,.csf-search-all .csf-nav-background,.csf-show-all .csf-nav,.csf-show-all .csf-nav-background{display:none}.csf-search-all .csf-content,.csf-show-all .csf-content{margin-left:0}.csf-search-all .csf-section,.csf-search-all .csf-section-title,.csf-show-all .csf-section,.csf-show-all .csf-section-title{display:block!important}.csf-search-all .csf-section-title{display:none!important}.csf-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:13px;line-height:30px;cursor:pointer;user-select:none;border-radius:2px;transition:all .2s}.csf-expand-all span{font-size:11px;vertical-align:middle}.csf-search{float:left}.csf-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:30px;min-height:30px;text-align:inherit;padding:0 10px;border-radius:2px;box-shadow:none}.csf-search input:focus{box-shadow:none}.csf-saving .csf-buttons,.csf-saving .csf-content{cursor:default;pointer-events:none;opacity:.5}.csf-metabox{margin:-6px -12px -12px -12px}.csf-metabox .csf-field{padding:20px}.csf-metabox .csf-section-title{padding:20px}.block-editor-page .csf-metabox{margin:-6px -14px -14px -14px}.block-editor-editor-skeleton__content .csf-metabox{border-left:1px solid #e2e4e7;border-right:1px solid #e2e4e7}.csf-sections-reset{float:left;width:100%;text-align:right;border-top:1px solid #eee}.csf-sections-reset .csf-button-cancel,.csf-sections-reset input{display:none}.csf-sections-reset label{padding:10px}.csf-sections-reset span{-webkit-user-select:none;user-select:none}.csf-sections-reset input:checked~.csf-button-reset{display:none}.csf-sections-reset input:checked~.csf-button-cancel{display:inline-block}#side-sortables .csf-section-title{padding:12px}#side-sortables .csf-field{padding:10px 15px}#side-sortables .csf-field .csf-title{float:none;width:100%;margin-bottom:6px}#side-sortables .csf-field .csf-fieldset{float:none;width:100%}#side-sortables .csf-field-text input{width:100%}#side-sortables .csf-notice{padding:10px 15px}.csf-comment-metabox{margin:-6px -12px -12px -12px}.csf-comment-metabox .csf-field{padding:20px}.csf-comment-metabox .csf-section-title{padding:20px}.csf-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);border-radius:4px}.csf-theme-dark .csf-header-inner{background-color:#050505}.csf-theme-dark .csf-header-inner h1{color:#fff}.csf-theme-dark .csf-header-inner h1 small{color:#555}.csf-theme-dark .csf-expand-all{color:#999;background-color:#222}.csf-theme-dark .csf-expand-all:hover{color:#fff;background-color:#333}.csf-theme-dark .csf-search input{color:#fff;background-color:#222}.csf-theme-dark .csf-search:focus{background-color:#444}.csf-theme-dark .csf-search::-webkit-input-placeholder{color:#666}.csf-theme-dark .csf-nav ul li a{color:#999;border-color:#2f2f2f;background-color:#222}.csf-theme-dark .csf-nav ul li a:hover{color:#fff}.csf-theme-dark .csf-nav ul li .csf-active{color:#fff;background-color:#111}.csf-theme-dark .csf-nav ul ul li a{border-color:#2f2f2f;background-color:#191919}.csf-theme-dark .csf-nav ul ul li .csf-active{background-color:#101010}.csf-theme-dark .csf-nav ul ul:before{background-color:rgba(34,34,34,.75)}.csf-theme-dark .csf-nav>ul>li:last-child>a{border:none}.csf-theme-dark .csf-nav-normal ul li a{border-bottom-width:1px;border-bottom-style:solid}.csf-theme-dark .csf-nav-normal ul li .csf-active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.csf-theme-dark .csf-nav-inline{background-color:#222}.csf-theme-dark .csf-nav-inline ul li a{text-align:center;border-right-width:1px;border-right-style:solid}.csf-theme-dark .csf-nav-inline ul li .csf-active:after{content:" ";position:absolute;left:50%;bottom:0;height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#fff;border-width:4px;margin-left:-4px}.csf-theme-dark .csf-nav-background{background-color:#222}.csf-theme-dark .csf-footer{color:#555;background-color:#050505}.csf-theme-light .csf-container{border:1px solid #ccd0d4;box-shadow:0 0 15 rgba(0,0,0,.04)}.csf-theme-light .csf-header-inner{border-bottom:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.csf-theme-light .csf-header-inner h1 small{color:#999}.csf-theme-light .csf-expand-all{color:#999;background-color:#eee}.csf-theme-light .csf-expand-all:hover{color:#555}.csf-theme-light .csf-search input{color:#555;background-color:#eee}.csf-theme-light .csf-search input::-webkit-input-placeholder{color:#999}.csf-theme-light .csf-nav ul li a{font-weight:500;color:#444;background-color:#f5f5f5}.csf-theme-light .csf-nav ul li a:hover{color:#111;background-color:#fff}.csf-theme-light .csf-nav ul li .csf-active{color:#111;background-color:#fff}.csf-theme-light .csf-nav ul ul li a{background-color:#eee}.csf-theme-light .csf-nav-normal>ul{margin-right:-1px;margin-bottom:-1px}.csf-theme-light .csf-nav-normal>ul li a{border-bottom:1px solid #ccd0d4;border-right:1px solid #ccd0d4}.csf-theme-light .csf-nav-normal>ul li .csf-active{border-right-color:#fff}.csf-theme-light .csf-nav-inline{background-color:#f5f5f5;border-bottom:1px solid #ccd0d4}.csf-theme-light .csf-nav-inline>ul{margin-bottom:-1px}.csf-theme-light .csf-nav-inline>ul li a{text-align:center;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}.csf-theme-light .csf-nav-inline>ul li .csf-active{border-bottom-color:#fff}.csf-theme-light .csf-nav-inline>ul ul{display:none!important}.csf-theme-light .csf-nav-inline .csf-arrow:after{display:none}.csf-theme-light .csf-nav-background{background-color:#f5f5f5;border-right:1px solid #ccd0d4}.csf-theme-light .csf-footer{color:#555;border-top:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.csf-field{position:relative;padding:30px}.csf-field+.csf-field{border-top:1px solid #eee}.csf-field p:first-child{margin-top:0}.csf-field p:last-child{margin-bottom:0}.csf-field:after,.csf-field:before{content:" ";display:table}.csf-field:after{clear:both}.csf-field h4{margin-top:0}.csf-field .csf-title{position:relative;width:20%;float:left}.csf-field .csf-title h4{margin:0;color:#23282d}.csf-field .csf-fieldset{float:right;width:calc(80% - 20px)}.csf-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.csf-pseudo-field+.csf-pseudo-field{border:0}.csf-pseudo-field pre{display:none}.csf-field-accordion .csf-accordion-item{position:relative;margin-bottom:5px}.csf-field-accordion .csf-accordion-item:last-child{margin-bottom:0}.csf-field-accordion .csf-accordion-item h4{font-size:1em}.csf-field-accordion .csf-accordion-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px;min-height:0;font-size:100%;user-select:none;border:1px solid #ccd0d4;background-color:#fafafa;box-shadow:0 1px 1px rgba(0,0,0,.04);transition:border-color .15s}.csf-field-accordion .csf-accordion-title:active,.csf-field-accordion .csf-accordion-title:focus,.csf-field-accordion .csf-accordion-title:hover{outline:0;border-color:#999}.csf-field-accordion .csf-accordion-title .csf--icon{width:20px;text-align:center;margin-right:2px}.csf-field-accordion .csf-accordion-icon{width:16px;text-align:center}.csf-field-accordion .csf-accordion-content{display:none;padding:0;border:1px solid #ccd0d4;border-top:none;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-accordion .csf-accordion-content>.csf-field{padding:15px}.csf-field-accordion .csf-accordion-open{display:block}.csf-field-background .csf-field{border:0!important;padding:0;margin-bottom:6px;margin-right:6px}.csf-field-background .csf--title{color:#777;font-size:12px}.csf-field-background .csf--background-colors{display:flex;flex-wrap:wrap}.csf-field-background .csf--background-attributes{display:flex;flex-wrap:wrap}.csf-field-background .csf--background-attributes select{min-width:100%;margin:0}.csf-field-background .csf--background-attributes .csf-field{flex:1}.csf-field-background .csf--attributes-hidden{display:none}.csf-field-backup textarea{width:100%;min-height:200px;margin-bottom:5px}.csf-field-backup small{display:inline-block;margin:5px}.csf-field-backup hr{margin:20px 0;border:none;border-bottom:1px solid #e5e5e5}.csf-field-border .csf--inputs,.csf-field-dimensions .csf--inputs,.csf-field-spacing .csf--inputs{float:left;display:flex;flex-wrap:wrap}.csf-field-border .csf--input,.csf-field-dimensions .csf--input,.csf-field-spacing .csf--input{display:flex;padding-right:6px;padding-bottom:4px;box-sizing:border-box}.csf-field-border .csf--input select,.csf-field-dimensions .csf--input select,.csf-field-spacing .csf--input select{margin:0}.csf-field-border .csf--input input,.csf-field-dimensions .csf--input input,.csf-field-spacing .csf--input input{position:relative;z-index:1;margin:0;width:65px;max-width:100%;text-align:center}.csf-field-border .csf--color,.csf-field-dimensions .csf--color,.csf-field-spacing .csf--color{float:left}.csf-field-border .csf--label,.csf-field-dimensions .csf--label,.csf-field-spacing .csf--label{display:flex;flex-direction:column;justify-content:center;user-select:none;min-width:20px;max-width:100%;padding:0 4px;font-size:12px;text-align:center;color:#555;border:1px solid #7b776c;background-color:#f5f5f5}.csf-field-border .csf--icon,.csf-field-dimensions .csf--icon,.csf-field-spacing .csf--icon{border-right:0;border-radius:4px 0 0 4px}.csf-field-border .csf--icon+input,.csf-field-dimensions .csf--icon+input,.csf-field-spacing .csf--icon+input{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.csf-field-border .csf--unit,.csf-field-dimensions .csf--unit,.csf-field-spacing .csf--unit{border-left:0;border-radius:0 4px 4px 0}.csf-field-border .csf--is-unit,.csf-field-dimensions .csf--is-unit,.csf-field-spacing .csf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.csf-field-button_set .csf--buttons{display:inline-block}.csf-field-button_set .csf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:16px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.csf-field-button_set .csf--button:first-child{border-radius:4px 0 0 4px}.csf-field-button_set .csf--button:last-child{border-radius:0 4px 4px 0}.csf-field-button_set .csf--button:not(:first-child){margin-left:-1px}.csf-field-button_set .csf--button:hover{background-color:#eee}.csf-field-button_set .csf--active,.csf-field-button_set .csf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.csf-field-button_set input{display:none}.csf-field-checkbox ul,.csf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.csf-field-checkbox ul li,.csf-field-radio ul li{margin-bottom:6px}.csf-field-checkbox ul ul,.csf-field-radio ul ul{max-height:none}.csf-field-checkbox ul ul li,.csf-field-radio ul ul li{margin-left:8px}.csf-field-checkbox ul ul li:first-child,.csf-field-radio ul ul li:first-child{margin-left:0}.csf-field-checkbox input,.csf-field-radio input{margin:0 1px}.csf-field-checkbox .csf--inline-list li,.csf-field-radio .csf--inline-list li{display:inline-block;margin-right:15px}.csf-field-checkbox .csf--text,.csf-field-radio .csf--text{margin-left:5px;vertical-align:middle}.csf-field-checkbox .csf-checker,.csf-field-radio .csf-checker{cursor:pointer}.csf-field-code_editor .CodeMirror{width:100%;height:400px}.csf-field-code_editor .cm-s-default{border:1px solid #ccd0d4}.csf-field-code_editor textarea{width:100%;height:400px}.csf-field-color>input{opacity:.75;width:115px;max-width:100%}.csf-field-color .button.wp-picker-clear{padding:0 8px;margin-left:6px;line-height:2.54545455;min-height:30px}.csf-field-color_group .csf--left{float:left;margin-right:10px;margin-bottom:5px}.csf-field-color_group .csf--title{color:#999;margin-bottom:5px}.csf-field-fieldset .csf-fieldset-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-fieldset .csf-fieldset-content>.csf-field{padding:15px}.csf-field-fieldset .csf-field-subheading{font-size:13px}.csf-field-date input{margin:0}.csf-field-date .csf--to{margin-left:7px}.csf-datepicker-wrapper{margin-top:5px;width:auto;background-color:#fff;z-index:9999999!important;box-shadow:0 0 30px rgba(0,0,0,.15)}.csf-datepicker-wrapper *{float:none;margin:0;padding:0;font-family:inherit;font-weight:400;font-style:normal;text-decoration:none;border:0;border-radius:0;box-shadow:none}.csf-datepicker-wrapper .ui-datepicker-header,.csf-datepicker-wrapper .ui-widget-header{color:#fff;background:#00a0d2}.csf-datepicker-wrapper .ui-datepicker-header .ui-state-hover{cursor:pointer}.csf-datepicker-wrapper .ui-datepicker-title{font-size:14px;line-height:40px;text-align:center}.csf-datepicker-wrapper .ui-datepicker-next,.csf-datepicker-wrapper .ui-datepicker-prev{position:static;top:auto;left:auto;right:auto;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;text-align:center;width:41px;height:40px;line-height:40px;color:#fff;background-color:rgba(255,255,255,.1);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.csf-datepicker-wrapper .ui-datepicker-next span,.csf-datepicker-wrapper .ui-datepicker-prev span{display:none}.csf-datepicker-wrapper .ui-datepicker-prev{float:left}.csf-datepicker-wrapper .ui-datepicker-next{float:right}.csf-datepicker-wrapper .ui-datepicker-prev:before{content:'\f053'}.csf-datepicker-wrapper .ui-datepicker-next:before{content:'\f054'}.csf-datepicker-wrapper .ui-datepicker-next-hover,.csf-datepicker-wrapper .ui-datepicker-prev-hover{opacity:.75}.csf-datepicker-wrapper tbody .ui-datepicker-week-col{background-color:#f7f7f7}.csf-datepicker-wrapper .ui-datepicker-buttonpane{padding:10px;text-align:center;background-color:#f7f7f7}.csf-datepicker-wrapper .ui-datepicker-buttonpane button{cursor:pointer;margin:0 5px;padding:7px 14px;border:1px solid #eee;background-color:#fff}.csf-datepicker-wrapper select{margin:0 4px}.csf-datepicker-wrapper select option{color:#555}.csf-datepicker-wrapper table{font-size:13px;border-collapse:collapse;width:100%}.csf-datepicker-wrapper thead{color:#fff;background:#32373c}.csf-datepicker-wrapper th{text-align:center;padding:7px;border:1px solid #444}.csf-datepicker-wrapper td{text-align:center;border:1px solid #f4f4f4}.csf-datepicker-wrapper td.ui-datepicker-other-month{border:transparent}.csf-datepicker-wrapper td .ui-state-default{color:#555;width:auto;display:block;padding:6px 12px}.csf-datepicker-wrapper td .ui-state-active,.csf-datepicker-wrapper td .ui-state-hover{color:#fff;background-color:#0073aa}.csf-datepicker-wrapper td.ui-state-disabled .ui-state-default{opacity:.5}.csf-field-datetime input{margin:0}.csf-field-datetime .csf--to{margin-left:7px}.csf-flatpickr input,.csf-flatpickr select{min-height:auto}.csf-flatpickr input:focus,.csf-flatpickr select:focus{box-shadow:none}.csf-flatpickr.open{z-index:9999999!important}.csf-field-gallery ul{margin:0;padding:0;list-style-type:none}.csf-field-gallery ul li{display:inline-block;position:relative;padding:4px;margin:0 5px 10px 0;border:1px solid #ccc;background-color:#f9f9f9;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-field-gallery ul li img{max-height:60px;display:inline-block;vertical-align:middle}.csf-field-gallery .button{margin-right:5px;margin-bottom:5px}.csf-field-group .csf-cloneable-hidden{display:none!important}.csf-field-group .csf-cloneable-wrapper{position:relative}.csf-field-group .csf-cloneable-item{display:none;position:relative;margin-bottom:5px}.csf-field-group .csf-cloneable-item h4{font-size:1em}.csf-field-group .ui-accordion .csf-cloneable-item{display:block}.csf-field-group .csf-cloneable-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-group .csf-cloneable-content>.csf-field{padding:15px}.csf-field-group .csf-cloneable-title{display:block;cursor:pointer;position:relative;user-select:none;margin:0;padding:15px 65px 15px 10px;min-height:0;font-size:100%;border:1px solid #ccd0d4;background-color:#fafafa;box-shadow:0 1px 1px rgba(0,0,0,.04);transition:border-color .15s}.csf-field-group .csf-cloneable-title:active,.csf-field-group .csf-cloneable-title:focus,.csf-field-group .csf-cloneable-title:hover{border-color:#999;outline:0}.csf-field-group .csf-cloneable-helper{position:absolute;top:12px;right:10px;z-index:1;font-size:14px;line-height:1em}.csf-field-group .csf-cloneable-helper i{display:inline-block;cursor:pointer;padding:5px;color:#999}.csf-field-group .csf-cloneable-helper i:hover{color:#555}.csf-field-group .csf-cloneable-content{padding:0;border-top:0}.csf-field-group .csf-cloneable-title-number,.csf-field-group .csf-cloneable-title-prefix{margin-right:5px}.csf-field-group .csf-cloneable-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.csf-field-group .widget-placeholder{margin-bottom:10px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-group .csf-cloneable-header-icon{display:inline-block;text-align:center;font-size:14px;width:17px;text-indent:0;vertical-align:text-top}.csf-field-group .csf-cloneable-placeholder{background-color:#ddd;margin-top:4px;width:100px;height:10px;font-size:10px;line-height:10px;display:inline-block;vertical-align:top;border-radius:2px}.csf-field-icon .button{margin-right:5px}.csf-field-icon .csf-icon-select{display:flex}.csf-field-icon .csf-icon-preview:not(.hidden){display:flex}.csf-field-icon .csf-icon-preview i{display:flex;justify-content:center;align-items:center;width:30px;font-size:14px;margin-right:5px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-field-image_select .csf--image{display:inline-block;margin:0 5px 5px 0}.csf-field-image_select .csf--inline-list .csf--image{display:block}.csf-field-image_select figure{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;user-select:none;transition:all .2s}.csf-field-image_select figure:before{position:absolute;top:0;left:0;text-align:center;font-size:10px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;content:"\f00c";width:16px;height:16px;line-height:14px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.csf-field-image_select .csf--active figure{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.csf-field-image_select .csf--active figure:before{opacity:1}.csf-field-image_select img{max-width:100%;height:auto;vertical-align:top}.csf-field-image_select input{display:none}.csf-field-link_color .csf--left{float:left;margin-right:10px;margin-bottom:5px}.csf-field-link_color .csf--title{color:#777;margin-bottom:5px}.csf-field-map input{width:100%}.csf-field-map input[type=text].ui-autocomplete-loading{background-position-x:calc(100% - 5px)}.csf-field-map .csf--map-search+.csf--map-osm-wrap{margin-top:10px}.csf-field-map .csf--map-osm-wrap{position:relative;padding:5px;border:1px solid #eee;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-map .csf--map-osm{position:relative;z-index:1;min-height:250px}.csf-field-map .csf--map-inputs{margin-top:10px;display:flex;justify-content:space-between}.csf-field-map .csf--map-input{flex:1}.csf-field-map .csf--map-input:last-child{padding-left:10px}.csf-field-map label{display:block;color:#777;font-size:12px;margin:0 0 2px 0}.csf-map-ui-autocomplate{z-index:999999;border-radius:4px;overflow:hidden}.csf-field-media .csf--placeholder{display:flex;align-items:flex-start}.csf-field-media .csf--placeholder input{width:100%;margin:0}.csf-field-media .button{margin-left:5px}.csf-field-media .hidden+.button{margin-left:0}.csf-field-media .csf--preview{position:relative}.csf-field-palette .csf--palette{position:relative;display:inline-block;cursor:pointer;border:2px solid #ddd;margin-right:10px;margin-bottom:10px;user-select:none;-webkit-user-select:none;transition:all .2s}.csf-field-palette .csf--palette span{vertical-align:middle;display:inline-block;width:22px;height:60px;line-height:60px;overflow:hidden;text-indent:-999px}.csf-field-palette .csf--palette:before{position:absolute;top:0;left:0;text-align:center;font-size:10px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;content:"\f00c";width:16px;height:16px;line-height:14px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.csf-field-palette .csf--active{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.csf-field-palette .csf--active:before{opacity:1}.csf-field-palette input{display:none}.csf-field-repeater .csf-field-text input{width:100%}.csf-field-repeater .csf-repeater-hidden{display:none!important}.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item h4{font-size:1em}.csf-field-repeater .csf-repeater-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.csf-field-repeater .csf-repeater-content>.csf-field{padding:15px}.csf-field-repeater .csf-repeater-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.csf-field-repeater .csf-repeater-helper i{display:inline-block;cursor:pointer;color:#999;padding:5px}.csf-field-repeater .csf-repeater-helper i:hover{color:#555}.csf-field-repeater .csf-repeater-helper-inner{width:75px}.csf-field-repeater .csf-repeater-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.csf-field-repeater .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-repeater .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.csf-field-repeater .ui-sortable-helper .csf-repeater-content,.csf-field-repeater .ui-sortable-helper .csf-repeater-helper{display:none}.csf-field-select .csf-fieldset{min-height:30px}.csf-field-select .csf-chosen{display:none}.csf-field-select select{max-width:100%;margin:0}.csf-field-select .csf-hide-select{display:none!important}.csf-field-slider .csf--wrap{display:flex;align-items:center}.csf-field-slider .csf--input{display:flex}.csf-field-slider .csf--unit{display:flex;justify-content:center;flex-direction:column;user-select:none;padding:0 6px;font-size:11px;line-height:1;border-radius:0 4px 4px 0;color:#555;border:1px solid #7e8993;border-left:0;background-color:#f5f5f5}.csf-field-slider .csf-slider-ui{margin-right:15px}.csf-field-slider input[type=number]{position:relative;z-index:1;margin:0;width:50px;text-align:center}.csf-field-slider .csf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.csf-field-slider .ui-slider{position:relative;width:100%;height:3px;border:none;background:#ddd;border-radius:2px}.csf-field-slider .ui-slider-range{height:3px;border:none;background:#333;border-radius:2px}.csf-field-slider .ui-slider-handle{position:absolute;width:16px;height:16px;top:-7px;margin-left:-8px;border:none;background:#333;border-radius:2px}.csf-field-slider .ui-slider-handle:hover,.csf-field-slider .ui-state-active{cursor:pointer;background:#111}.csf-field-sortable .csf-field-text input{width:100%;max-width:100%}.csf-field-sortable .csf-sortable .csf-sortable-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.csf-field-sortable .csf-sortable .csf-sortable-item h4{font-size:1em}.csf-field-sortable .csf-sortable-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.csf-field-sortable .csf-sortable-content>.csf-field{padding:15px}.csf-field-sortable .csf-sortable-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.csf-field-sortable .csf-sortable-helper i{display:inline-block;cursor:pointer;width:50px;color:#555}.csf-field-sortable .csf-sortable-helper i:hover{opacity:.5}.csf-field-sortable .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-sortable .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.csf-field-sortable .ui-sortable-helper .csf-sortable-content,.csf-field-sortable .ui-sortable-helper .csf-sortable-helper{display:none}.csf-field-sorter .ui-sortable-placeholder{height:20px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-sorter .csf-modules{float:left;width:50%;box-sizing:border-box}.csf-field-sorter .csf-modules:first-child{padding-right:15px}.csf-field-sorter .csf-modules:last-child{padding-left:15px}.csf-field-sorter .csf-disabled,.csf-field-sorter .csf-enabled{padding:5px 15px;border:1px dashed #ddd;background-color:#fff}.csf-field-sorter .csf-disabled li{opacity:.5;transition:opacity .15s}.csf-field-sorter .csf-disabled .ui-sortable-helper{opacity:1}.csf-field-sorter .csf-sorter-title{font-size:13px;font-weight:600;padding:10px;text-align:center;border:1px dashed #ddd;border-bottom:none;background-color:#f8f8f8;text-transform:uppercase}.csf-field-sorter ul{list-style-type:none;margin:0;padding:0;min-height:62px}.csf-field-sorter ul li{margin:10px 0;padding:10px 15px;cursor:move;font-weight:700;text-align:center;border:1px solid #e5e5e5;background-color:#fafafa;transition:border-color .15s}.csf-field-sorter ul li:hover{border-color:#bbb}.csf-field-spinner .csf--spin{display:flex}.csf-field-spinner .ui-widget{font-family:inherit}.csf-field-spinner .ui-spinner{display:flex;align-items:stretch;overflow:unset;border:none;background:0 0;border-radius:0}.csf-field-spinner .ui-spinner .ui-button{display:flex;flex-direction:column;justify-content:center;text-align:center;min-width:20px;padding:0 4px;margin:0;color:#555;background-color:#f5f5f5;border:1px solid #7e8993}.csf-field-spinner .ui-spinner .ui-spinner-button{position:relative;cursor:pointer;height:auto}.csf-field-spinner .ui-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.csf-field-spinner .ui-spinner .ui-spinner-button:active{background-color:#ddd}.csf-field-spinner .ui-spinner .ui-spinner-button:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;line-height:14px}.csf-field-spinner .ui-spinner .ui-spinner-down{border-right:0;border-radius:4px 0 0 4px}.csf-field-spinner .ui-spinner .ui-spinner-down:before{content:"\f0d9"}.csf-field-spinner .ui-spinner .ui-spinner-up{border-left:0;border-radius:0 4px 4px 0}.csf-field-spinner .ui-spinner .ui-spinner-up:before{content:"\f0da"}.csf-field-spinner .ui-spinner .csf--unit{border-left:0;user-select:none}.csf-field-spinner .ui-spinner .ui-button-icon,.csf-field-spinner .ui-spinner .ui-button-icon-space,.csf-field-spinner .ui-spinner .ui-button-text{display:none}.csf-field-spinner .ui-spinner input{font-family:inherit;font-size:inherit;position:relative;z-index:1;width:50px;text-align:center;margin:0;padding:0 8px;border-radius:0}.csf-field-spinner .ui-spinner-down{order:1}.csf-field-spinner .ui-spinner-input{order:2}.csf-field-spinner .csf--unit{order:3}.csf-field-spinner .ui-spinner-up{order:4}.csf-field-switcher .csf--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;user-select:none;-webkit-user-select:none}.csf-field-switcher .csf--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.csf-field-switcher .csf--off,.csf-field-switcher .csf--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.csf-field-switcher .csf--off{padding-right:0;padding-left:28px;opacity:1}.csf-field-switcher .csf--active{background:#4fb845}.csf-field-switcher .csf--active .csf--on{opacity:1}.csf-field-switcher .csf--active .csf--off{opacity:0}.csf-field-switcher .csf--active .csf--ball{left:100%;margin-left:-28px}.csf-field-switcher .csf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.csf-field-tabbed .csf-tabbed-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-tabbed .csf-tabbed-content>.csf-field{padding:15px}.csf-field-tabbed .csf-tabbed-nav .csf--icon{padding-right:5px}.csf-field-tabbed .csf-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;border:1px solid #ccd0d4;background-color:#f3f3f3;transition:all .2s}.csf-field-tabbed .csf-tabbed-nav a:hover{background-color:#f9f9f9}.csf-field-tabbed .csf-tabbed-nav a.csf-tabbed-active{background-color:#fff;border-bottom-color:#fff}.csf-field-tabbed .csf-tabbed-nav a:focus{outline:0;box-shadow:none}.csf-field-text input{width:50%;max-width:100%;margin:0}.csf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.csf-field-textarea .csf-shortcode-button{margin-bottom:10px;margin-right:5px}.csf-field-typography select,.csf-field-typography textarea{margin:0;min-width:100%;max-width:100%}.csf-field-typography .csf--title{color:#777;margin:0 0 2px 0;font-size:12px}.csf-field-typography .csf--title small{vertical-align:top}.csf-field-typography .csf--blocks{display:flex;flex-wrap:wrap}.csf-field-typography .csf--block{flex:1;max-width:100%;padding-right:6px;padding-bottom:6px}.csf-field-typography .csf--input{margin:0;min-width:100%}.csf-field-typography .csf--input-wrap{position:relative}.csf-field-typography .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-field-typography .csf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.csf-field-typography .csf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.csf-field-typography .csf--black-background{border-color:#000;background-color:#000}.csf-field-typography .csf--toggle{position:absolute;top:5px;right:10px;color:#999}.csf-field-typography .csf--block-extra-styles{margin-top:5px}.csf-field-upload input{width:100%;margin:0}.csf-field-upload .csf--wrap{display:flex;align-items:flex-start}.csf-field-upload .button{margin-left:5px}.csf-field-upload .csf--preview{position:relative}.csf-field-wp_editor .csf-wp-editor{float:left;width:100%}.csf-field-wp_editor .mce-toolbar-grp{border:none}.csf-field-wp_editor .mce-btn.mce-active button,.csf-field-wp_editor .mce-btn.mce-active i,.csf-field-wp_editor .mce-btn.mce-active:hover button,.csf-field-wp_editor .mce-btn.mce-active:hover i{color:#23282d}.csf-field-wp_editor .wp-media-buttons{position:relative;z-index:2}.csf-field-wp_editor .wp-editor-tabs{position:relative;z-index:1}.csf-field-wp_editor .csf-no-tinymce{border:1px solid #e5e5e5}.csf-field-wp_editor .csf-no-quicktags .wp-media-buttons{float:none;display:block}.csf-field-wp_editor .csf-no-quicktags .mce-tinymce{box-shadow:none;border:1px solid #e5e5e5}.csf-field-wp_editor textarea{width:100%;max-width:100%;margin:0;box-shadow:none}.csf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.csf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.csf-field-submessage{padding:0!important;border:0!important}.csf-field-submessage+.csf-field{border-top:0!important}.csf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.csf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.csf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.csf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.csf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.csf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.csf-field-notice{background-color:#f7f7f7}.csf-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.csf-notice-success{border-color:#46b450}.csf-notice-info{border-color:#339fd4}.csf-notice-warning{border-color:#ffbc00}.csf-notice-danger{border-color:#dc3232}.csf-notice-normal{border-color:#222}.csf-field-number input{width:100%;margin:0}.csf-field-number .csf--wrap{position:relative;float:left;width:100px}.csf-field-number .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-field-link .csf--result{display:inline-block;font-size:12px;line-height:16px;padding:7px 10px;margin-bottom:7px;color:#777;border:1px solid #e5e5e5;background-color:#f5f5f5;border-radius:2px;world-break:break-word}.csf-field-link .csf--wrap{position:relative;float:left;width:100px}.csf-field-link .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:13px;color:#aaa}.csf-help .csf-help-text{display:none}.csf--preview{max-width:100%}.csf-image-preview{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;position:relative;padding:6px;max-width:120px;max-height:120px;min-width:40px;min-height:40px;margin-bottom:10px;text-align:center;border-radius:2px;border:1px solid #ccc;background-color:#f9f9f9;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-image-preview i{cursor:pointer;position:absolute;z-index:1;right:4px;top:4px;font-size:14px;width:22px;height:22px;line-height:22px;text-align:center;text-decoration:none;color:#fff;background-color:#d33;opacity:.75;border-radius:2px;transition:all .2s}.csf-image-preview i:hover{opacity:1}.csf-image-preview i:focus{box-shadow:none}.csf-image-preview span{position:relative;overflow:hidden;display:flex;height:100%;width:100%}.csf-image-preview img{max-width:100%;height:auto;object-fit:contain}.csf-field-custom .csf-field{padding:0}.csf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.csf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.csf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.csf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d";display:inline-block;padding-top:3px}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.csf-field .chosen-container-single .chosen-single div b{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;color:#aaa;background:0 0}.csf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.csf-field .chosen-container-single .chosen-single div b:hover{color:#555}.csf-field .chosen-container-multi .chosen-choices li.search-choice-placeholder{border:1px dashed #aaa;margin:3px 5px 3px 0}.csf-field .chosen-container-multi .ui-sortable li.search-choice span{cursor:move}.csf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.csf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.csf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.csf-field .chosen-container-single .chosen-search:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:11px;content:"\f002";position:absolute;right:12px;top:10px;color:#aaa}.csf-field .wp-picker-container{display:inline-block}.csf-field .wp-picker-container .wp-color-result.button{margin-bottom:0}.csf-field .csf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.csf-field .wp-picker-active .csf--transparent-wrap{display:block}.csf-field .csf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.csf-field .csf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2)}.csf-field .csf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.csf-field .csf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;border-radius:2px;box-shadow:inset 0 0 5px rgba(0,0,0,.4)}.csf-field .csf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.csf-field .csf--transparent-button{cursor:pointer;user-select:none;margin-top:10px;font-size:11px;text-align:center;border-radius:2px;padding:3px 7px;box-shadow:0 1px 0 rgba(0,0,0,.1);letter-spacing:.2px;color:#777;border:1px solid #ccc;background-color:#f7f7f7;transition:background-color .2s,border-color .2s,color .2s}.csf-field .csf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:135px;background-position:center left;background-color:transparent!important}.csf-field .csf--transparent-active .csf--transparent-button{color:#fff;border-color:#3ea032;background-color:#4fb845}.csf-field .csf--transparent-active .fa:before{content:"\f205"}.csf-widgets>.csf-field{position:relative;top:-1px;margin-left:-15px;margin-right:-15px;padding:12px 15px}.csf-widgets>.csf-field .csf-title{float:none;width:100%;margin-bottom:5px}.csf-widgets>.csf-field .csf-fieldset{float:none;width:100%}.csf-widgets .csf-field-text input{width:100%}.csf-widgets .csf-field-notice .csf-notice{padding:15px}.control-section .csf-widgets>.csf-field{margin-left:-10px;margin-right:-10px;padding:10px 12px}.wp-block .csf-widgets{font-size:13px}.wp-block .csf-widgets>.csf-field{margin-left:-10px;margin-right:-10px}.wp-block .csf-widgets>.csf-field .button-primary{color:#fff}.wp-block .csf-widgets>.csf-field>.csf-title>h4{font-size:13px}.control-section .csf-field{padding:0}.control-section .csf-field .csf-title{float:none;width:100%;margin-bottom:6px}.control-section .csf-field .csf-title h4{display:block;font-size:13px;line-height:1;font-weight:600;color:inherit}.control-section .csf-field .csf-fieldset{float:none;width:100%}.control-section .csf-help{top:-5px;right:-5px}.control-section .csf-field-select select{width:100%}.control-section .csf-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .csf-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .csf-subtitle-text{margin-top:4px;font-size:12px}.control-section .csf-field-submessage .csf-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .csf-fieldset .csf-field-heading,.control-section .csf-fieldset .csf-field-subheading,.control-section .csf-fieldset .csf-field-submessage .csf-submessage{margin-left:0;margin-right:0}.control-section .csf-field-date label,.control-section .csf-field-datetime label{display:block}.control-section .csf-field-date .csf--to,.control-section .csf-field-datetime .csf--to{margin-top:4px;margin-left:0}.control-section .csf-field-sorter ul li{padding:5px}.control-section .csf-field-sorter .csf-modules{float:none;width:100%}.control-section .csf-field-sorter .csf-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .csf-field-background .csf--background-attributes{flex-direction:column}.control-section .csf-field-spacing input{width:90px}.control-section .csf-field-border .csf--input{flex:1 50%}.control-section .csf-field-border input,.control-section .csf-field-border select{width:100%}.control-section .csf-field-spinner input{width:50px}.control-section .csf-field-number .csf--wrap{width:100%}.control-section .csf-field-backup .csf-export-data{display:none}.control-section .csf-field-fieldset .csf-fieldset-content{border-color:#e5e5e5}.control-section .csf-accordion-content>.csf-field,.control-section .csf-cloneable-content>.csf-field,.control-section .csf-fieldset-content>.csf-field,.control-section .csf-repeater-content>.csf-field,.control-section .csf-sortable-content>.csf-field,.control-section .csf-tabbed-content>.csf-field{padding:10px}.control-section .csf-accordion-content>.csf-field .csf-title,.control-section .csf-cloneable-content>.csf-field .csf-title,.control-section .csf-fieldset-content>.csf-field .csf-title,.control-section .csf-repeater-content>.csf-field .csf-title,.control-section .csf-sortable-content>.csf-field .csf-title,.control-section .csf-tabbed-content>.csf-field .csf-title{margin-bottom:5px}.control-section .csf-accordion-content>.csf-field h4,.control-section .csf-cloneable-content>.csf-field h4,.control-section .csf-fieldset-content>.csf-field h4,.control-section .csf-repeater-content>.csf-field h4,.control-section .csf-sortable-content>.csf-field h4,.control-section .csf-tabbed-content>.csf-field h4{font-size:12px}.control-section .csf-depend-hidden.csf-depend-on{display:none!important}.control-section .csf-depend-visible.csf-depend-on{border-top:0!important}.csf-taxonomy{max-width:95%}.csf-taxonomy>.csf-field{border-top:none!important}.csf-taxonomy>.csf-field-heading{font-size:1.1em;padding:20px!important;border:1px solid #ddd}.csf-taxonomy>.csf-field-subheading{font-size:12px;padding:15px!important;border:1px solid #ddd}.csf-taxonomy>.csf-field-submessage .csf-submessage{padding:15px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.csf-taxonomy>.csf-field-notice{background-color:transparent}.csf-taxonomy .csf-section-title{display:block;padding:15px;background-color:#f9f9f9;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-taxonomy-add-fields>.csf-field{padding:8px 0}.csf-taxonomy-add-fields>.csf-field>.csf-title{float:none;width:100%;padding:2px 2px 4px 0}.csf-taxonomy-add-fields>.csf-field>.csf-title h4{font-size:12px;font-weight:400}.csf-taxonomy-add-fields>.csf-field>.csf-fieldset{float:none;width:100%}.csf-taxonomy-add-fields>.csf-field>.csf-fieldset>.csf-help{right:-5px}.csf-taxonomy-add-fields+p.submit{margin-top:0}.csf-taxonomy-edit-fields>.csf-field{padding:20px 0}.csf-taxonomy-edit-fields>.csf-field>.csf-title{width:200px}.csf-taxonomy-edit-fields>.csf-field>.csf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset{width:calc(100% - 220px)}.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset>.csf-help{top:-5px;right:-5px}.csf-taxonomy-edit-fields>.csf-field-submessage{margin:20px 0}.csf-taxonomy-edit-fields>.csf-field-heading,.csf-taxonomy-edit-fields>.csf-field-subheading{margin:20px 0;border:1px solid #ddd}.csf-nav-menu-options{clear:both;float:left;width:100%}.csf-nav-menu-options>.csf-fields{margin-left:-10px;margin-top:10px;margin-bottom:10px;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-nav-menu-options>.csf-fields>.csf-field{padding:12px 14px 12px 12px}.csf-nav-menu-options>.csf-fields>.csf-field .csf-title{float:none;width:100%;margin-bottom:5px}.csf-nav-menu-options>.csf-fields>.csf-field .csf-fieldset{float:none;width:100%}.csf-nav-menu-options .csf-field-text input{width:100%}.csf-nav-menu-options .csf-field-notice .csf-notice{padding:15px}.csf-nav-menu-title{padding:12px 14px 12px 12px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-nav-menu-title:first-child{border-top:0}.csf-nav-menu-title h4{margin:0;padding:0;color:#23282d}.csf-nav-menu-icon{margin-right:5px}.csf-profile-options>h2>.fa{padding-right:7px}.csf-profile-options>.csf-field{max-width:750px;padding:15px 0;border-top:none!important}.csf-profile-options>.csf-field>.csf-title{width:200px}.csf-profile-options>.csf-field>.csf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.csf-profile-options>.csf-field>.csf-fieldset{width:calc(100% - 220px)}.csf-profile-options>.csf-field>.csf-fieldset>.csf-help{top:-15px;right:-5px}.csf-profile-options>.csf-field-heading{font-size:1.1em}.csf-profile-options>.csf-field-subheading{font-size:12px}.csf-profile-options>.csf-field-heading,.csf-profile-options>.csf-field-subheading{margin:10px 0;padding:15px!important;border:1px solid #ddd}.csf-profile-options>.csf-field-submessage{margin:20px 0}.csf-profile-options>.csf-field-submessage .csf-submessage{padding:10px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.csf-profile-options>.csf-field-notice{background-color:transparent}.csf-modal{position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.csf-modal.hidden{display:none}.csf-modal-icon{z-index:100102}.csf-modal-table{display:table;width:100%;height:100%}.csf-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.csf-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.csf-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:595px}.csf-modal-content .csf-shortcode-button{display:none}.csf-modal-content .csf-field{padding:15px 30px 15px 15px}.csf-modal-content a:active,.csf-modal-content a:focus{outline:0;box-shadow:none}.csf-modal-content h4{font-size:13px}.csf-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.csf-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.csf-modal-header{width:100%;padding:14px 0;background-color:#f5f5f5;border-bottom:1px solid #ddd}.csf-modal-header select{display:block;width:250px;margin:0 auto;font-size:13px;line-height:1;height:30px;min-height:30px;background-color:#fff}.csf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.csf-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.csf-modal-close:hover{opacity:.5}.csf-modal-insert-wrapper{text-align:center;width:100%;padding:15px 0;background-color:#f5f5f5;border-top:1px solid #ddd}.csf-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.csf--repeatable{padding:15px 15px 0 15px}.csf--repeat-button-block{text-align:center;padding-bottom:15px}.csf--repeat-shortcode{position:relative;margin-bottom:15px;border:1px dashed #ddd}.csf--repeat-shortcode:first-child .csf-repeat-remove{display:none}.csf--repeat-shortcode .csf-repeat-remove{position:absolute;right:10px;top:10px;z-index:10;cursor:pointer;display:inline-block;font-size:11px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:2px;color:#fff;background-color:#e14d43;opacity:.5}.csf--repeat-shortcode .csf-repeat-remove:hover{opacity:.5}.csf-shortcode-single .csf-modal-inner{height:750px}.csf-shortcode-single .csf-modal-content{height:652px}.elementor-editor-active .csf-shortcode-button{margin-left:5px}.elementor-editor-active .csf-modal .hidden{display:none!important}.csf-shortcode-block{text-align:center;padding:14px;font-size:13px;background-color:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.csf-shortcode-block .components-button{margin-bottom:10px}.csf-modal-icon .csf-icon-title{padding:15px 0;margin:4px;font-size:14px;font-weight:700;text-align:center;border:1px solid #eee;background-color:#f7f7f7}.csf-modal-icon .csf-modal-header{text-align:center}.csf-modal-icon .csf-icon-search{width:50%;height:40px;line-height:40px}.csf-modal-icon i{cursor:pointer;display:inline-block;margin:4px;width:35px;height:35px;line-height:35px;font-size:16px;color:#555;text-align:center;border:1px solid #ccc;background-color:#f7f7f7;border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.05)}.csf-modal-icon i:hover{color:#fff;border-color:#222;background-color:#222}.csf-modal-icon .csf-modal-content{padding:10px;height:618px}.csf-modal-icon .csf-error-text{padding:10px}.csf-modal-loading{display:none;position:absolute;left:15px;top:15px}.csf-loading{position:relative;width:20px;height:20px;background:#ccc;border-radius:20px;box-shadow:0 2px 5px rgba(0,0,0,.07)}.csf-loading:after{position:absolute;top:50%;left:50%;width:4px;height:4px;content:"";margin-top:-2px;margin-left:-2px;background-color:#fff;animation-duration:.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:csfLoader;border-radius:4px}@keyframes csfLoader{0%{transform:rotate(0) translateX(-6px) rotate(0)}100%{transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}.csf-subtitle-text{margin-top:6px;font-weight:400;color:#999}.csf-desc-text{clear:both;float:left;width:100%;margin-top:6px;font-weight:400;color:#999}.csf-error-text{margin-top:6px;color:#d02c21}.csf-before-text{margin-bottom:6px}.csf-after-text{margin-top:6px}.csf-metabox-hide{display:none!important}.csf-metabox-show{display:block!important}.csf-depend-hidden.csf-depend-on{display:none}.csf-depend-visible.csf-depend-on{display:block;opacity:.75;filter:grayscale(1);user-select:none;border-top:1px solid #eee}.csf-depend-visible.csf-depend-on .clear:before{content:"";left:0;top:0;right:0;bottom:0;position:absolute;background-color:#eee;opacity:.25;z-index:10}.csf-warning-primary{color:#fff!important;border-color:#dc3545!important;background:#dc3545!important}.csf-warning-primary:focus,.csf-warning-primary:hover{border-color:#bd2130!important;background:#bd2130!important}.csf-warning-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #bd2130!important}.csf-warning-primary:active{border-color:#bd2130!important;background:#bd2130!important}.csf-form-result{display:none;float:left;padding:0 8px;margin-right:4px;font-size:11px;line-height:30px;user-select:none;border-radius:2px}.csf-form-show{display:block}.csf-form-success{color:#fff;background-color:#46b450}.csf-form-warning{color:#8a6d3b;background-color:#faebcc}.csf-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;border-radius:2px}.csf-no-option{padding:30px}.csf-input-number{-moz-appearance:textfield}.csf-input-number::-webkit-inner-spin-button,.csf-input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.csf-fa5-shims .csf .fab,.csf-fa5-shims .csf .far,.csf-fa5-shims .csf .fas{font-family:FontAwesome;font-style:normal}.csf-welcome-wrap{position:relative;margin:25px 40px 0 20px;font-size:15px;max-width:1200px}.csf-welcome-wrap p{font-size:14px;line-height:1.5}.csf-welcome-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.csf-welcome-wrap .csf-logo{position:absolute;overflow:hidden;top:0;right:0;height:160px;width:140px;background-image:linear-gradient(45deg,#2d67cb,#ad19f3);box-shadow:0 1px 4px rgba(0,0,0,.25),inset 0 0 0 4px rgba(0,0,0,.25)}.csf-welcome-wrap .csf-logo .csf--effects i{position:absolute;width:200px;height:100px;background-color:rgba(0,0,0,.15);transform:rotate(-45deg)}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(1){bottom:-20px;right:-70px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(2){bottom:-35px;right:-80px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(3){bottom:-50px;right:-90px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(4){bottom:-65px;right:-100px}.csf-welcome-wrap .csf-logo .csf--wp-logos{position:relative;padding-top:25px;text-align:center}.csf-welcome-wrap .csf-logo .csf--wp-logo{position:absolute;left:20px;width:20px;height:20px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-logo.svg)}.csf-welcome-wrap .csf-logo .csf--wp-plugin-logo{display:inline-block;width:50px;height:50px;border:3px solid #fff;background-size:40px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-plugin-logo.svg);border-radius:100%;vertical-align:middle}.csf-welcome-wrap .csf-logo .csf--text{position:absolute;left:0;right:0;top:90px;color:#fff;font-size:13px;line-height:1.2em;font-weight:600;text-align:center;text-transform:uppercase;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.csf-welcome-wrap .csf-logo .csf--version{top:auto;left:auto;right:8px;bottom:4px;font-size:11px;text-transform:lowercase}.csf-welcome-wrap .csf-about-text{font-weight:400;line-height:1.6em;font-size:19px;margin:1em 200px 1em 0;color:#555d66}.csf-welcome-wrap .csf-demo-button{margin:1em 200px 2em 0}.csf-welcome-wrap .nav-tab-wrapper{margin-bottom:20px}.csf-welcome-wrap ul{list-style-type:disc;padding-left:15px}.csf-welcome-wrap .csf--col{float:left;padding-right:20px;box-sizing:border-box}.csf-welcome-wrap .csf--col-2{width:50%}.csf-welcome-wrap .csf--col-3{width:33.333%}.csf-welcome-wrap .csf--col-4{width:25%}.csf-welcome-wrap .csf--col-5{width:20%}.csf-welcome-wrap .csf--col-last{padding-right:0}.csf-welcome-wrap .csf--col-upgrade{padding:10px 0;text-align:center;border-top:1px solid #e5e5e5}.csf--table-compare tfoot td,.csf--table-compare thead td{text-align:center}.csf--table-compare td{font-size:14px;text-align:center;vertical-align:middle;padding:10px}.csf--table-compare td:first-child{text-align:left}.csf--table-compare tfoot td{padding:15px 0}.csf--table-compare .fa{font-size:18px}.csf--table-compare .fa-check-circle{color:#46b450}.csf--table-compare .fa-times-circle{color:#dc3232}.csf-welcome-cols{clear:both;margin:20px 0;background-color:#fff;padding:0 0;border-radius:2px;border:1px solid #e5e5e5}.csf-welcome-cols .csf--col{width:33.333%;float:left;padding:20px;text-align:center;box-sizing:border-box;min-height:200px;border-right:1px solid #e5e5e5}.csf-welcome-cols .csf--block,.csf-welcome-cols .csf--left{float:left;width:20%;padding:0 30px;text-align:center;box-sizing:border-box}.csf-welcome-cols .csf--block{width:80%}.csf-welcome-cols .csf--col-first{border-bottom:1px solid #e5e5e5}.csf-welcome-cols .csf--last{border-right:none}.csf-welcome-cols .csf--space{height:20px}.csf-welcome-cols .csf--icon{display:inline-block;font-size:20px;width:30px;height:30px;line-height:30px;text-align:center;margin-bottom:10px;color:#fff;background-color:#555;border-radius:30px}.csf-welcome-cols .csf--active{background-color:#5cb85c}.csf-welcome-cols .csf--deactive{background-color:#e14d43}.csf-welcome-cols .csf--title{font-weight:700;display:block}.csf-welcome-cols p:last-child{margin-bottom:0}.csf-features-cols .csf--key-features{width:30%}.csf-features-cols .csf--available-fields{width:70%}.csf-code-block{margin:20px 0;padding:5px 20px;background-color:#fff;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.csf-code-block pre{font-size:13px;color:#0073aa}.csf-code-block pre span{color:#999}.csf--table-fields td{font-size:14px}.csf--upgrade a{color:#5cb85c;font-weight:700}.csf--upgrade a:focus,.csf--upgrade a:hover{color:#4aa14a;outline:0;box-shadow:none}@media only screen and (max-width:782px){.csf-welcome-cols .csf--col{width:100%;min-height:auto;border-right:none;border-bottom:1px solid #e5e5e5}.csf-features-cols .csf--key-features{width:100%}.csf-features-cols .csf--available-fields{width:100%}}@media only screen and (max-width:1200px){.csf-metabox .csf-field .csf-title{float:none;width:100%;margin-bottom:10px}.csf-metabox .csf-field .csf-fieldset{float:none;width:100%}}@media only screen and (max-width:782px){.csf-header-inner{text-align:center}.csf-header-inner h1{width:100%;margin-bottom:10px}.csf-form-result{float:none;margin-right:0;margin-bottom:10px}.csf-header-left,.csf-header-right,.csf-search{width:100%}.csf-search{text-align:center;margin-bottom:15px}.csf-footer{text-align:center}.csf-buttons{float:none}.csf-copyright{float:none;margin-top:10px}.csf-expand-all,.csf-nav,.csf-nav-background,.csf-reset-section{display:none!important}.csf-nav-normal+.csf-content{margin-left:0}.csf-section,.csf-section-title{display:block!important}.csf-field .csf-title{float:none;width:100%;margin-bottom:10px}.csf-field .csf-fieldset{float:none;width:100%}.csf-field-color .button.wp-picker-clear{padding:0 8px;line-height:2.14285714;min-height:32px}.csf-profile-options>.csf-field>.csf-title,.csf-taxonomy-edit-fields>.csf-field>.csf-title{float:none;width:100%;margin-bottom:10px}.csf-profile-options>.csf-field>.csf-fieldset,.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset{float:none;width:100%}.csf-nav-menu-options>.csf-fields{margin-left:-10px;margin-right:-10px}.csf-nav-menu-options>.csf-fields>.csf-field{padding:10px}}@media only screen and (max-width:782px){.csf-modal .csf-modal-inner{width:90%}}@media only screen and (max-height:750px){.csf-modal .csf-modal-inner{height:auto}.csf-modal .csf-modal-content{height:calc(100vh - 200px)}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px;height:25px;min-height:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 6px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:0;right:0;display:block;width:12px;height:12px;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;direction:rtl}.flatpickr-calendar{background:0 0;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.arrowRight:after,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar.arrowCenter:after,.flatpickr-calendar.arrowCenter:before{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:0 0;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.flatpickr-disabled,.flatpickr-months .flatpickr-prev-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-inner-spin-button,.numInputWrapper input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:0 0;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:0 0;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:0;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:active,.flatpickr-current-month .flatpickr-monthDropdown-months:focus{outline:0}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:0;padding:0}.flatpickr-weekdays{background:0 0;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:0 0;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:0 0;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:0 0;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:0 0;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:0 0;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|
1 |
+
.csf{position:relative}.csf label{padding:0;margin:0;display:inline-block}.csf-ab-icon{top:2px}#screen-meta-links+.csf-options{margin-top:40px}.csf-options{margin-top:20px;margin-right:20px}.csf-header{position:relative}.csf-header-inner{padding:25px;transition:box-shadow .3s ease}.csf-header-inner h1{float:left;font-size:1.5em;line-height:26px;font-weight:400;margin:0}.csf-header-inner h1 small{font-size:11px;font-weight:500}.csf-sticky .csf-header-inner{position:fixed;z-index:99;top:32px;box-shadow:0 5px 10px rgba(0,0,0,.1)}.csf-buttons{float:right}.csf-buttons .button{margin:0 2px;line-height:26px}.csf-buttons .button:focus{outline:0!important;box-shadow:none!important}.csf-buttons .csf-save{min-width:72px}.csf-header-left{float:left}.csf-header-right{float:right}.csf-nav{display:block;position:relative;z-index:10;float:left}.csf-nav ul{clear:left;margin:0;list-style-type:none}.csf-nav ul li{margin-bottom:0}.csf-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-decoration:none;transition-property:color,background;transition-duration:.2s;transition-timing-function:ease}.csf-nav ul li a:focus{outline:0;box-shadow:none}.csf-nav ul li .csf-arrow:after{content:"\f054";display:inline-block;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px}.csf-nav ul li.csf-tab-expanded .csf-arrow:after{transform:rotate(90deg)}.csf-nav ul li.csf-tab-expanded ul{display:block}.csf-nav ul ul{display:none;position:relative}.csf-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.csf-nav .csf-tab-icon{width:20px;margin-right:5px;font-size:13px;text-align:center}.csf-nav .csf-label-error{margin-left:4px;vertical-align:top}.csf-nav-normal{width:225px}.csf-nav-normal+.csf-content{margin-left:225px}.csf-nav-inline{width:100%}.csf-nav-inline ul li{display:inline-block;vertical-align:top}.csf-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:225px}.csf-wrapper{position:relative}.csf-content{position:relative;background-color:#fff}.csf-sections{float:left;width:100%}.csf-section-title{display:none;padding:20px 30px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase}.csf-section-title .csf-section-icon{margin-right:5px}.csf-footer{padding:20px;font-size:11px}.csf-copyright{float:left;margin-top:5px}.csf-search-all .csf-nav,.csf-search-all .csf-nav-background,.csf-show-all .csf-nav,.csf-show-all .csf-nav-background{display:none}.csf-search-all .csf-content,.csf-show-all .csf-content{margin-left:0}.csf-search-all .csf-section,.csf-search-all .csf-section-title,.csf-show-all .csf-section,.csf-show-all .csf-section-title{display:block!important}.csf-search-all .csf-section-title{display:none!important}.csf-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:13px;line-height:30px;cursor:pointer;user-select:none;border-radius:2px;transition:all .2s}.csf-expand-all span{font-size:11px;vertical-align:middle}.csf-search{float:left}.csf-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:30px;min-height:30px;text-align:inherit;padding:0 10px;border-radius:2px;box-shadow:none}.csf-search input:focus{box-shadow:none}.csf-saving .csf-buttons,.csf-saving .csf-content{cursor:default;pointer-events:none;opacity:.5}.csf-metabox{margin:-6px -12px -12px -12px}.csf-metabox .csf-field{padding:20px}.csf-metabox .csf-section-title{padding:20px}.block-editor-page .csf-metabox{margin:-6px -14px -14px -14px}.block-editor-editor-skeleton__content .csf-metabox{border-left:1px solid #e2e4e7;border-right:1px solid #e2e4e7}.csf-sections-reset{float:left;width:100%;text-align:right;border-top:1px solid #eee}.csf-sections-reset .csf-button-cancel,.csf-sections-reset input{display:none}.csf-sections-reset label{padding:10px}.csf-sections-reset span{-webkit-user-select:none;user-select:none}.csf-sections-reset input:checked~.csf-button-reset{display:none}.csf-sections-reset input:checked~.csf-button-cancel{display:inline-block}#side-sortables .csf-section-title{padding:12px}#side-sortables .csf-field{padding:10px 15px}#side-sortables .csf-field .csf-title{float:none;width:100%;margin-bottom:6px}#side-sortables .csf-field .csf-fieldset{float:none;width:100%}#side-sortables .csf-field-text input{width:100%}#side-sortables .csf-notice{padding:10px 15px}.csf-comment-metabox{margin:-6px -12px -12px -12px}.csf-comment-metabox .csf-field{padding:20px}.csf-comment-metabox .csf-section-title{padding:20px}.csf-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);border-radius:4px}.csf-theme-dark .csf-header-inner{background-color:#050505}.csf-theme-dark .csf-header-inner h1{color:#fff}.csf-theme-dark .csf-header-inner h1 small{color:#555}.csf-theme-dark .csf-expand-all{color:#999;background-color:#222}.csf-theme-dark .csf-expand-all:hover{color:#fff;background-color:#333}.csf-theme-dark .csf-search input{color:#fff;background-color:#222}.csf-theme-dark .csf-search:focus{background-color:#444}.csf-theme-dark .csf-search::-webkit-input-placeholder{color:#666}.csf-theme-dark .csf-nav ul li a{color:#999;border-color:#2f2f2f;background-color:#222}.csf-theme-dark .csf-nav ul li a:hover{color:#fff}.csf-theme-dark .csf-nav ul li .csf-active{color:#fff;background-color:#111}.csf-theme-dark .csf-nav ul ul li a{border-color:#2f2f2f;background-color:#191919}.csf-theme-dark .csf-nav ul ul li .csf-active{background-color:#101010}.csf-theme-dark .csf-nav ul ul:before{background-color:rgba(34,34,34,.75)}.csf-theme-dark .csf-nav>ul>li:last-child>a{border:none}.csf-theme-dark .csf-nav-normal ul li a{border-bottom-width:1px;border-bottom-style:solid}.csf-theme-dark .csf-nav-normal ul li .csf-active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.csf-theme-dark .csf-nav-inline{background-color:#222}.csf-theme-dark .csf-nav-inline ul li a{text-align:center;border-right-width:1px;border-right-style:solid}.csf-theme-dark .csf-nav-inline ul li .csf-active:after{content:" ";position:absolute;left:50%;bottom:0;height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#fff;border-width:4px;margin-left:-4px}.csf-theme-dark .csf-nav-background{background-color:#222}.csf-theme-dark .csf-footer{color:#555;background-color:#050505}.csf-theme-light .csf-container{border:1px solid #ccd0d4;box-shadow:0 0 15 rgba(0,0,0,.04)}.csf-theme-light .csf-header-inner{border-bottom:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.csf-theme-light .csf-header-inner h1 small{color:#999}.csf-theme-light .csf-expand-all{color:#999;background-color:#eee}.csf-theme-light .csf-expand-all:hover{color:#555}.csf-theme-light .csf-search input{color:#555;background-color:#eee}.csf-theme-light .csf-search input::-webkit-input-placeholder{color:#999}.csf-theme-light .csf-nav ul li a{font-weight:500;color:#444;background-color:#f5f5f5}.csf-theme-light .csf-nav ul li a:hover{color:#111;background-color:#fff}.csf-theme-light .csf-nav ul li .csf-active{color:#111;background-color:#fff}.csf-theme-light .csf-nav ul ul li a{background-color:#eee}.csf-theme-light .csf-nav-normal>ul{margin-right:-1px;margin-bottom:-1px}.csf-theme-light .csf-nav-normal>ul li a{border-bottom:1px solid #ccd0d4;border-right:1px solid #ccd0d4}.csf-theme-light .csf-nav-normal>ul li .csf-active{border-right-color:#fff}.csf-theme-light .csf-nav-inline{background-color:#f5f5f5;border-bottom:1px solid #ccd0d4}.csf-theme-light .csf-nav-inline>ul{margin-bottom:-1px}.csf-theme-light .csf-nav-inline>ul li a{text-align:center;border-right:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4}.csf-theme-light .csf-nav-inline>ul li .csf-active{border-bottom-color:#fff}.csf-theme-light .csf-nav-inline>ul ul{display:none!important}.csf-theme-light .csf-nav-inline .csf-arrow:after{display:none}.csf-theme-light .csf-nav-background{background-color:#f5f5f5;border-right:1px solid #ccd0d4}.csf-theme-light .csf-footer{color:#555;border-top:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.csf-field{position:relative;padding:30px}.csf-field+.csf-field{border-top:1px solid #eee}.csf-field p:first-child{margin-top:0}.csf-field p:last-child{margin-bottom:0}.csf-field:after,.csf-field:before{content:" ";display:table}.csf-field:after{clear:both}.csf-field h4{margin-top:0}.csf-field .csf-title{position:relative;width:20%;float:left}.csf-field .csf-title h4{margin:0;color:#23282d}.csf-field .csf-fieldset{float:right;width:calc(80% - 20px)}.csf-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.csf-pseudo-field+.csf-pseudo-field{border:0}.csf-pseudo-field pre{display:none}.csf-field-accordion .csf-accordion-item{position:relative;margin-bottom:5px}.csf-field-accordion .csf-accordion-item:last-child{margin-bottom:0}.csf-field-accordion .csf-accordion-item h4{font-size:1em}.csf-field-accordion .csf-accordion-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px;min-height:0;font-size:100%;user-select:none;border:1px solid #ccd0d4;background-color:#fafafa;box-shadow:0 1px 1px rgba(0,0,0,.04);transition:border-color .15s}.csf-field-accordion .csf-accordion-title:active,.csf-field-accordion .csf-accordion-title:focus,.csf-field-accordion .csf-accordion-title:hover{outline:0;border-color:#999}.csf-field-accordion .csf-accordion-title .csf--icon{width:20px;text-align:center;margin-right:2px}.csf-field-accordion .csf-accordion-icon{width:16px;text-align:center}.csf-field-accordion .csf-accordion-content{display:none;padding:0;border:1px solid #ccd0d4;border-top:none;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-accordion .csf-accordion-content>.csf-field{padding:15px}.csf-field-accordion .csf-accordion-open{display:block}.csf-field-background .csf-field{border:0!important;padding:0;margin-bottom:6px;margin-right:6px}.csf-field-background .csf--title{color:#777;font-size:12px}.csf-field-background .csf--background-colors{display:flex;flex-wrap:wrap}.csf-field-background .csf--background-attributes{display:flex;flex-wrap:wrap}.csf-field-background .csf--background-attributes select{min-width:100%;margin:0}.csf-field-background .csf--background-attributes .csf-field{flex:1}.csf-field-background .csf--attributes-hidden{display:none}.csf-field-backup textarea{width:100%;min-height:200px;margin-bottom:5px}.csf-field-backup small{display:inline-block;margin:5px}.csf-field-backup hr{margin:20px 0;border:none;border-bottom:1px solid #e5e5e5}.csf-field-border .csf--inputs,.csf-field-dimensions .csf--inputs,.csf-field-spacing .csf--inputs{float:left;display:flex;flex-wrap:wrap}.csf-field-border .csf--input,.csf-field-dimensions .csf--input,.csf-field-spacing .csf--input{display:flex;padding-right:6px;padding-bottom:4px;box-sizing:border-box}.csf-field-border .csf--input select,.csf-field-dimensions .csf--input select,.csf-field-spacing .csf--input select{margin:0}.csf-field-border .csf--input input,.csf-field-dimensions .csf--input input,.csf-field-spacing .csf--input input{position:relative;z-index:1;margin:0;width:65px;max-width:100%;text-align:center}.csf-field-border .csf--color,.csf-field-dimensions .csf--color,.csf-field-spacing .csf--color{float:left}.csf-field-border .csf--label,.csf-field-dimensions .csf--label,.csf-field-spacing .csf--label{display:flex;flex-direction:column;justify-content:center;user-select:none;min-width:20px;max-width:100%;padding:0 4px;font-size:12px;text-align:center;color:#555;border:1px solid #7b776c;background-color:#f5f5f5}.csf-field-border .csf--icon,.csf-field-dimensions .csf--icon,.csf-field-spacing .csf--icon{border-right:0;border-radius:4px 0 0 4px}.csf-field-border .csf--icon+input,.csf-field-dimensions .csf--icon+input,.csf-field-spacing .csf--icon+input{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.csf-field-border .csf--unit,.csf-field-dimensions .csf--unit,.csf-field-spacing .csf--unit{border-left:0;border-radius:0 4px 4px 0}.csf-field-border .csf--is-unit,.csf-field-dimensions .csf--is-unit,.csf-field-spacing .csf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.csf-field-button_set .csf--buttons{display:inline-block}.csf-field-button_set .csf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:16px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.csf-field-button_set .csf--button:first-child{border-radius:4px 0 0 4px}.csf-field-button_set .csf--button:last-child{border-radius:0 4px 4px 0}.csf-field-button_set .csf--button:not(:first-child){margin-left:-1px}.csf-field-button_set .csf--button:hover{background-color:#eee}.csf-field-button_set .csf--active,.csf-field-button_set .csf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.csf-field-button_set input{display:none}.csf-field-checkbox ul,.csf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.csf-field-checkbox ul li,.csf-field-radio ul li{margin-bottom:6px}.csf-field-checkbox ul ul,.csf-field-radio ul ul{max-height:none}.csf-field-checkbox ul ul li,.csf-field-radio ul ul li{margin-left:8px}.csf-field-checkbox ul ul li:first-child,.csf-field-radio ul ul li:first-child{margin-left:0}.csf-field-checkbox input,.csf-field-radio input{margin:0 1px}.csf-field-checkbox .csf--inline-list li,.csf-field-radio .csf--inline-list li{display:inline-block;margin-right:15px}.csf-field-checkbox .csf--text,.csf-field-radio .csf--text{margin-left:5px;vertical-align:middle}.csf-field-checkbox .csf-checker,.csf-field-radio .csf-checker{cursor:pointer}.csf-field-code_editor .CodeMirror{width:100%;height:400px}.csf-field-code_editor .cm-s-default{border:1px solid #ccd0d4}.csf-field-code_editor textarea{width:100%;height:400px}.csf-field-color>input{opacity:.75;width:115px;max-width:100%}.csf-field-color .button.wp-picker-clear{padding:0 8px;margin-left:6px;line-height:2.54545455;min-height:30px}.csf-field-color_group .csf--left{float:left;margin-right:10px;margin-bottom:5px}.csf-field-color_group .csf--title{color:#999;margin-bottom:5px}.csf-field-fieldset .csf-fieldset-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-fieldset .csf-fieldset-content>.csf-field{padding:15px}.csf-field-fieldset .csf-field-subheading{font-size:13px}.csf-field-date input{margin:0}.csf-field-date .csf--to{margin-left:7px}.csf-datepicker-wrapper{margin-top:5px;width:auto;background-color:#fff;z-index:9999999!important;box-shadow:0 0 30px rgba(0,0,0,.15)}.csf-datepicker-wrapper *{float:none;margin:0;padding:0;font-family:inherit;font-weight:400;font-style:normal;text-decoration:none;border:0;border-radius:0;box-shadow:none}.csf-datepicker-wrapper .ui-datepicker-header,.csf-datepicker-wrapper .ui-widget-header{color:#fff;background:#00a0d2}.csf-datepicker-wrapper .ui-datepicker-header .ui-state-hover{cursor:pointer}.csf-datepicker-wrapper .ui-datepicker-title{font-size:14px;line-height:40px;text-align:center}.csf-datepicker-wrapper .ui-datepicker-next,.csf-datepicker-wrapper .ui-datepicker-prev{position:static;top:auto;left:auto;right:auto;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;text-align:center;width:41px;height:40px;line-height:40px;color:#fff;background-color:rgba(255,255,255,.1);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.csf-datepicker-wrapper .ui-datepicker-next span,.csf-datepicker-wrapper .ui-datepicker-prev span{display:none}.csf-datepicker-wrapper .ui-datepicker-prev{float:left}.csf-datepicker-wrapper .ui-datepicker-next{float:right}.csf-datepicker-wrapper .ui-datepicker-prev:before{content:'\f053'}.csf-datepicker-wrapper .ui-datepicker-next:before{content:'\f054'}.csf-datepicker-wrapper .ui-datepicker-next-hover,.csf-datepicker-wrapper .ui-datepicker-prev-hover{opacity:.75}.csf-datepicker-wrapper tbody .ui-datepicker-week-col{background-color:#f7f7f7}.csf-datepicker-wrapper .ui-datepicker-buttonpane{padding:10px;text-align:center;background-color:#f7f7f7}.csf-datepicker-wrapper .ui-datepicker-buttonpane button{cursor:pointer;margin:0 5px;padding:7px 14px;border:1px solid #eee;background-color:#fff}.csf-datepicker-wrapper select{margin:0 4px}.csf-datepicker-wrapper select option{color:#555}.csf-datepicker-wrapper table{font-size:13px;border-collapse:collapse;width:100%}.csf-datepicker-wrapper thead{color:#fff;background:#32373c}.csf-datepicker-wrapper th{text-align:center;padding:7px;border:1px solid #444}.csf-datepicker-wrapper td{text-align:center;border:1px solid #f4f4f4}.csf-datepicker-wrapper td.ui-datepicker-other-month{border:transparent}.csf-datepicker-wrapper td .ui-state-default{color:#555;width:auto;display:block;padding:6px 12px}.csf-datepicker-wrapper td .ui-state-active,.csf-datepicker-wrapper td .ui-state-hover{color:#fff;background-color:#0073aa}.csf-datepicker-wrapper td.ui-state-disabled .ui-state-default{opacity:.5}.csf-field-datetime input{margin:0}.csf-field-datetime .csf--to{margin-left:7px}.csf-flatpickr input,.csf-flatpickr select{min-height:auto}.csf-flatpickr input:focus,.csf-flatpickr select:focus{box-shadow:none}.csf-flatpickr.open{z-index:9999999!important}.csf-field-gallery ul{margin:0;padding:0;list-style-type:none}.csf-field-gallery ul li{display:inline-block;position:relative;padding:4px;margin:0 5px 10px 0;border:1px solid #ccc;background-color:#f9f9f9;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-field-gallery ul li img{max-height:60px;display:inline-block;vertical-align:middle}.csf-field-gallery .button{margin-right:5px;margin-bottom:5px}.csf-field-group .csf-cloneable-hidden{display:none!important}.csf-field-group .csf-cloneable-wrapper{position:relative}.csf-field-group .csf-cloneable-item{display:none;position:relative;margin-bottom:5px}.csf-field-group .csf-cloneable-item h4{font-size:1em}.csf-field-group .ui-accordion .csf-cloneable-item{display:block}.csf-field-group .csf-cloneable-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-group .csf-cloneable-content>.csf-field{padding:15px}.csf-field-group .csf-cloneable-title{display:block;cursor:pointer;position:relative;user-select:none;margin:0;padding:15px 65px 15px 10px;min-height:0;font-size:100%;border:1px solid #ccd0d4;background-color:#fafafa;box-shadow:0 1px 1px rgba(0,0,0,.04);transition:border-color .15s}.csf-field-group .csf-cloneable-title:active,.csf-field-group .csf-cloneable-title:focus,.csf-field-group .csf-cloneable-title:hover{border-color:#999;outline:0}.csf-field-group .csf-cloneable-helper{position:absolute;top:12px;right:10px;z-index:1;font-size:14px;line-height:1em}.csf-field-group .csf-cloneable-helper i{display:inline-block;cursor:pointer;padding:5px;color:#999}.csf-field-group .csf-cloneable-helper i:hover{color:#555}.csf-field-group .csf-cloneable-content{padding:0;border-top:0}.csf-field-group .csf-cloneable-title-number,.csf-field-group .csf-cloneable-title-prefix{margin-right:5px}.csf-field-group .csf-cloneable-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.csf-field-group .widget-placeholder{margin-bottom:10px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-group .csf-cloneable-header-icon{display:inline-block;text-align:center;font-size:14px;width:17px;text-indent:0;vertical-align:text-top}.csf-field-group .csf-cloneable-placeholder{background-color:#ddd;margin-top:4px;width:100px;height:10px;font-size:10px;line-height:10px;display:inline-block;vertical-align:top;border-radius:2px}.csf-field-icon .csf-icon-select{display:flex;grid-gap:5px}.csf-field-icon .csf-icon-preview:not(.hidden){display:flex}.csf-field-icon .csf-icon-preview i{display:flex;justify-content:center;align-items:center;width:30px;font-size:14px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-field-image_select .csf--image{display:inline-block;margin:0 5px 5px 0}.csf-field-image_select .csf--inline-list .csf--image{display:block}.csf-field-image_select figure{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;user-select:none;transition:all .2s}.csf-field-image_select figure:before{position:absolute;top:0;left:0;text-align:center;font-size:10px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;content:"\f00c";width:16px;height:16px;line-height:14px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.csf-field-image_select .csf--active figure{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.csf-field-image_select .csf--active figure:before{opacity:1}.csf-field-image_select img{max-width:100%;height:auto;vertical-align:top}.csf-field-image_select input{display:none}.csf-field-link_color .csf--left{float:left;margin-right:10px;margin-bottom:5px}.csf-field-link_color .csf--title{color:#777;margin-bottom:5px}.csf-field-map input{width:100%}.csf-field-map input[type=text].ui-autocomplete-loading{background-position-x:calc(100% - 5px)}.csf-field-map .csf--map-search+.csf--map-osm-wrap{margin-top:10px}.csf-field-map .csf--map-osm-wrap{position:relative;padding:5px;border:1px solid #eee;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-map .csf--map-osm{position:relative;z-index:1;min-height:250px}.csf-field-map .csf--map-inputs{margin-top:10px;display:flex;justify-content:space-between}.csf-field-map .csf--map-input{flex:1}.csf-field-map .csf--map-input:last-child{padding-left:10px}.csf-field-map label{display:block;color:#777;font-size:12px;margin:0 0 2px 0}.csf-map-ui-autocomplate{z-index:999999;border-radius:4px;overflow:hidden}.csf-field-media .csf--placeholder{display:flex;align-items:flex-start}.csf-field-media .csf--placeholder input{width:100%;margin:0}.csf-field-media .button{margin-left:5px}.csf-field-media .hidden+.button{margin-left:0}.csf-field-media .csf--preview{position:relative}.csf-field-palette .csf--palette{position:relative;display:inline-block;cursor:pointer;border:2px solid #ddd;margin-right:10px;margin-bottom:10px;user-select:none;-webkit-user-select:none;transition:all .2s}.csf-field-palette .csf--palette span{vertical-align:middle;display:inline-block;width:22px;height:60px;line-height:60px;overflow:hidden;text-indent:-999px}.csf-field-palette .csf--palette:before{position:absolute;top:0;left:0;text-align:center;font-size:10px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;content:"\f00c";width:16px;height:16px;line-height:14px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.csf-field-palette .csf--active{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.csf-field-palette .csf--active:before{opacity:1}.csf-field-palette input{display:none}.csf-field-repeater .csf-field-text input{width:100%}.csf-field-repeater .csf-repeater-hidden{display:none!important}.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.csf-field-repeater .csf-repeater-wrapper .csf-repeater-item h4{font-size:1em}.csf-field-repeater .csf-repeater-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.csf-field-repeater .csf-repeater-content>.csf-field{padding:15px}.csf-field-repeater .csf-repeater-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.csf-field-repeater .csf-repeater-helper i{display:inline-block;cursor:pointer;color:#999;padding:5px}.csf-field-repeater .csf-repeater-helper i:hover{color:#555}.csf-field-repeater .csf-repeater-helper-inner{width:75px}.csf-field-repeater .csf-repeater-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.csf-field-repeater .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-repeater .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.csf-field-repeater .ui-sortable-helper .csf-repeater-content,.csf-field-repeater .ui-sortable-helper .csf-repeater-helper{display:none}.csf-field-select .csf-fieldset{min-height:30px}.csf-field-select .csf-chosen{display:none}.csf-field-select select{max-width:100%;margin:0}.csf-field-select .csf-hide-select{display:none!important}.csf-field-slider .csf--wrap{display:flex;align-items:center}.csf-field-slider .csf--input{display:flex}.csf-field-slider .csf--unit{display:flex;justify-content:center;flex-direction:column;user-select:none;padding:0 6px;font-size:11px;line-height:1;border-radius:0 4px 4px 0;color:#555;border:1px solid #7e8993;border-left:0;background-color:#f5f5f5}.csf-field-slider .csf-slider-ui{margin-right:15px}.csf-field-slider input[type=number]{position:relative;z-index:1;margin:0;width:50px;text-align:center}.csf-field-slider .csf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.csf-field-slider .ui-slider{position:relative;width:100%;height:3px;border:none;background:#ddd;border-radius:2px}.csf-field-slider .ui-slider-range{height:3px;border:none;background:#333;border-radius:2px}.csf-field-slider .ui-slider-handle{position:absolute;width:16px;height:16px;top:-7px;margin-left:-8px;border:none;background:#333;border-radius:2px}.csf-field-slider .ui-slider-handle:hover,.csf-field-slider .ui-state-active{cursor:pointer;background:#111}.csf-field-sortable .csf-field-text input{width:100%;max-width:100%}.csf-field-sortable .csf-sortable .csf-sortable-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.csf-field-sortable .csf-sortable .csf-sortable-item h4{font-size:1em}.csf-field-sortable .csf-sortable-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.csf-field-sortable .csf-sortable-content>.csf-field{padding:15px}.csf-field-sortable .csf-sortable-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.csf-field-sortable .csf-sortable-helper i{display:inline-block;cursor:pointer;width:50px;color:#555}.csf-field-sortable .csf-sortable-helper i:hover{opacity:.5}.csf-field-sortable .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-sortable .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.csf-field-sortable .ui-sortable-helper .csf-sortable-content,.csf-field-sortable .ui-sortable-helper .csf-sortable-helper{display:none}.csf-field-sorter .ui-sortable-placeholder{height:20px;border:1px dashed #f1c40f;background-color:#fffae4}.csf-field-sorter .csf-modules{float:left;width:50%;box-sizing:border-box}.csf-field-sorter .csf-modules:first-child{padding-right:15px}.csf-field-sorter .csf-modules:last-child{padding-left:15px}.csf-field-sorter .csf-disabled,.csf-field-sorter .csf-enabled{padding:5px 15px;border:1px dashed #ddd;background-color:#fff}.csf-field-sorter .csf-disabled li{opacity:.5;transition:opacity .15s}.csf-field-sorter .csf-disabled .ui-sortable-helper{opacity:1}.csf-field-sorter .csf-sorter-title{font-size:13px;font-weight:600;padding:10px;text-align:center;border:1px dashed #ddd;border-bottom:none;background-color:#f8f8f8;text-transform:uppercase}.csf-field-sorter ul{list-style-type:none;margin:0;padding:0;min-height:62px}.csf-field-sorter ul li{margin:10px 0;padding:10px 15px;cursor:move;font-weight:700;text-align:center;border:1px solid #e5e5e5;background-color:#fafafa;transition:border-color .15s}.csf-field-sorter ul li:hover{border-color:#bbb}.csf-field-spinner .csf--spin{display:flex}.csf-field-spinner .ui-widget{font-family:inherit}.csf-field-spinner .ui-spinner{display:flex;align-items:stretch;overflow:unset;border:none;background:0 0;border-radius:0}.csf-field-spinner .ui-spinner .ui-button{display:flex;flex-direction:column;justify-content:center;text-align:center;min-width:20px;padding:0 4px;margin:0;color:#555;background-color:#f5f5f5;border:1px solid #7e8993}.csf-field-spinner .ui-spinner .ui-spinner-button{position:relative;cursor:pointer;height:auto}.csf-field-spinner .ui-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.csf-field-spinner .ui-spinner .ui-spinner-button:active{background-color:#ddd}.csf-field-spinner .ui-spinner .ui-spinner-button:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;line-height:14px}.csf-field-spinner .ui-spinner .ui-spinner-down{border-right:0;border-radius:4px 0 0 4px}.csf-field-spinner .ui-spinner .ui-spinner-down:before{content:"\f0d9"}.csf-field-spinner .ui-spinner .ui-spinner-up{border-left:0;border-radius:0 4px 4px 0}.csf-field-spinner .ui-spinner .ui-spinner-up:before{content:"\f0da"}.csf-field-spinner .ui-spinner .csf--unit{border-left:0;user-select:none}.csf-field-spinner .ui-spinner .ui-button-icon,.csf-field-spinner .ui-spinner .ui-button-icon-space,.csf-field-spinner .ui-spinner .ui-button-text{display:none}.csf-field-spinner .ui-spinner input{font-family:inherit;font-size:inherit;position:relative;z-index:1;width:50px;text-align:center;margin:0;padding:0 8px;border-radius:0}.csf-field-spinner .ui-spinner-down{order:1}.csf-field-spinner .ui-spinner-input{order:2}.csf-field-spinner .csf--unit{order:3}.csf-field-spinner .ui-spinner-up{order:4}.csf-field-switcher .csf--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;user-select:none;-webkit-user-select:none}.csf-field-switcher .csf--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.csf-field-switcher .csf--off,.csf-field-switcher .csf--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.csf-field-switcher .csf--off{padding-right:0;padding-left:28px;opacity:1}.csf-field-switcher .csf--active{background:#4fb845}.csf-field-switcher .csf--active .csf--on{opacity:1}.csf-field-switcher .csf--active .csf--off{opacity:0}.csf-field-switcher .csf--active .csf--ball{left:100%;margin-left:-28px}.csf-field-switcher .csf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.csf-field-tabbed .csf-tabbed-content{border:1px solid #ccd0d4;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-field-tabbed .csf-tabbed-content>.csf-field{padding:15px}.csf-field-tabbed .csf-tabbed-nav .csf--icon{padding-right:5px}.csf-field-tabbed .csf-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;border:1px solid #ccd0d4;background-color:#f3f3f3;transition:all .2s}.csf-field-tabbed .csf-tabbed-nav a:hover{background-color:#f9f9f9}.csf-field-tabbed .csf-tabbed-nav a.csf-tabbed-active{background-color:#fff;border-bottom-color:#fff}.csf-field-tabbed .csf-tabbed-nav a:focus{outline:0;box-shadow:none}.csf-field-text input{width:50%;max-width:100%;margin:0}.csf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.csf-field-textarea .csf-shortcode-button{margin-bottom:10px;margin-right:5px}.csf-field-typography select,.csf-field-typography textarea{margin:0;min-width:100%;max-width:100%}.csf-field-typography .csf--title{color:#777;margin:0 0 2px 0;font-size:12px}.csf-field-typography .csf--title small{vertical-align:top}.csf-field-typography .csf--blocks{display:flex;flex-wrap:wrap}.csf-field-typography .csf--block{flex:1;max-width:100%;padding-right:6px;padding-bottom:6px}.csf-field-typography .csf--input{margin:0;min-width:100%}.csf-field-typography .csf--input-wrap{position:relative}.csf-field-typography .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-field-typography .csf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.csf-field-typography .csf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.csf-field-typography .csf--black-background{border-color:#000;background-color:#000}.csf-field-typography .csf--toggle{position:absolute;top:5px;right:10px;color:#999}.csf-field-typography .csf--block-extra-styles{margin-top:5px}.csf-field-upload input{width:100%;margin:0}.csf-field-upload .csf--wrap{display:flex;align-items:flex-start}.csf-field-upload .button{margin-left:5px}.csf-field-upload .csf--preview{position:relative}.csf-field-wp_editor .csf-wp-editor{float:left;width:100%}.csf-field-wp_editor .mce-toolbar-grp{border:none}.csf-field-wp_editor .mce-btn.mce-active button,.csf-field-wp_editor .mce-btn.mce-active i,.csf-field-wp_editor .mce-btn.mce-active:hover button,.csf-field-wp_editor .mce-btn.mce-active:hover i{color:#23282d}.csf-field-wp_editor .wp-media-buttons{position:relative;z-index:2}.csf-field-wp_editor .wp-editor-tabs{position:relative;z-index:1}.csf-field-wp_editor .csf-no-tinymce{border:1px solid #e5e5e5}.csf-field-wp_editor .csf-no-quicktags .wp-media-buttons{float:none;display:block}.csf-field-wp_editor .csf-no-quicktags .mce-tinymce{box-shadow:none;border:1px solid #e5e5e5}.csf-field-wp_editor textarea{width:100%;max-width:100%;margin:0;box-shadow:none}.csf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.csf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.csf-field-submessage{padding:0!important;border:0!important}.csf-field-submessage+.csf-field{border-top:0!important}.csf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.csf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.csf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.csf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.csf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.csf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.csf-field-notice{background-color:#f7f7f7}.csf-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.csf-notice-success{border-color:#46b450}.csf-notice-info{border-color:#339fd4}.csf-notice-warning{border-color:#ffbc00}.csf-notice-danger{border-color:#dc3232}.csf-notice-normal{border-color:#222}.csf-field-number input{width:100%;margin:0}.csf-field-number .csf--wrap{position:relative;float:left;width:100px}.csf-field-number .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-field-link .csf--result{display:inline-block;font-size:12px;line-height:16px;padding:7px 10px;margin-bottom:7px;color:#777;border:1px solid #e5e5e5;background-color:#f5f5f5;border-radius:2px;world-break:break-word}.csf-field-link .csf--wrap{position:relative;float:left;width:100px}.csf-field-link .csf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.csf-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:13px;color:#aaa}.csf-help .csf-help-text{display:none}.csf--preview{max-width:100%}.csf-image-preview{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;position:relative;padding:6px;max-width:120px;max-height:120px;min-width:40px;min-height:40px;margin-bottom:10px;text-align:center;border-radius:2px;border:1px solid #ccc;background-color:#f9f9f9;box-shadow:0 1px 0 rgba(0,0,0,.08)}.csf-image-preview i{cursor:pointer;position:absolute;z-index:1;right:4px;top:4px;font-size:14px;width:22px;height:22px;line-height:22px;text-align:center;text-decoration:none;color:#fff;background-color:#d33;opacity:.75;border-radius:2px;transition:all .2s}.csf-image-preview i:hover{opacity:1}.csf-image-preview i:focus{box-shadow:none}.csf-image-preview span{position:relative;overflow:hidden;display:flex;height:100%;width:100%}.csf-image-preview img{max-width:100%;height:auto;object-fit:contain}.csf-field-custom .csf-field{padding:0}.csf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.csf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.csf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.csf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d";display:inline-block;padding-top:3px}.csf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.csf-field .chosen-container-single .chosen-single div b{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;color:#aaa;background:0 0}.csf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.csf-field .chosen-container-single .chosen-single div b:hover{color:#555}.csf-field .chosen-container-multi .chosen-choices li.search-choice-placeholder{border:1px dashed #aaa;margin:3px 5px 3px 0}.csf-field .chosen-container-multi .ui-sortable li.search-choice span{cursor:move}.csf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.csf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.csf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.csf-field .chosen-container-single .chosen-search:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:11px;content:"\f002";position:absolute;right:12px;top:10px;color:#aaa}.csf-field .wp-picker-container{display:inline-block}.csf-field .wp-picker-container .wp-color-result.button{margin-bottom:0}.csf-field .csf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.csf-field .wp-picker-active .csf--transparent-wrap{display:block}.csf-field .csf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.csf-field .csf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2)}.csf-field .csf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.csf-field .csf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;border-radius:2px;box-shadow:inset 0 0 5px rgba(0,0,0,.4)}.csf-field .csf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.csf-field .csf--transparent-button{cursor:pointer;user-select:none;margin-top:10px;font-size:11px;text-align:center;border-radius:2px;padding:3px 7px;box-shadow:0 1px 0 rgba(0,0,0,.1);letter-spacing:.2px;color:#777;border:1px solid #ccc;background-color:#f7f7f7;transition:background-color .2s,border-color .2s,color .2s}.csf-field .csf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:135px;background-position:center left;background-color:transparent!important}.csf-field .csf--transparent-active .csf--transparent-button{color:#fff;border-color:#3ea032;background-color:#4fb845}.csf-field .csf--transparent-active .fa:before{content:"\f205"}.csf-widgets>.csf-field{position:relative;top:-1px;margin-left:-15px;margin-right:-15px;padding:12px 15px}.csf-widgets>.csf-field .csf-title{float:none;width:100%;margin-bottom:5px}.csf-widgets>.csf-field .csf-fieldset{float:none;width:100%}.csf-widgets .csf-field-text input{width:100%}.csf-widgets .csf-field-notice .csf-notice{padding:15px}.control-section .csf-widgets>.csf-field{margin-left:-10px;margin-right:-10px;padding:10px 12px}.wp-block .csf-widgets{font-size:13px}.wp-block .csf-widgets>.csf-field{margin-left:-10px;margin-right:-10px}.wp-block .csf-widgets>.csf-field .button-primary{color:#fff}.wp-block .csf-widgets>.csf-field>.csf-title>h4{font-size:13px}.control-section .csf-field{padding:0}.control-section .csf-field .csf-title{float:none;width:100%;margin-bottom:6px}.control-section .csf-field .csf-title h4{display:block;font-size:13px;line-height:1;font-weight:600;color:inherit}.control-section .csf-field .csf-fieldset{float:none;width:100%}.control-section .csf-help{top:-5px;right:-5px}.control-section .csf-field-select select{width:100%}.control-section .csf-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .csf-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .csf-subtitle-text{margin-top:4px;font-size:12px}.control-section .csf-field-submessage .csf-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .csf-fieldset .csf-field-heading,.control-section .csf-fieldset .csf-field-subheading,.control-section .csf-fieldset .csf-field-submessage .csf-submessage{margin-left:0;margin-right:0}.control-section .csf-field-date label,.control-section .csf-field-datetime label{display:block}.control-section .csf-field-date .csf--to,.control-section .csf-field-datetime .csf--to{margin-top:4px;margin-left:0}.control-section .csf-field-sorter ul li{padding:5px}.control-section .csf-field-sorter .csf-modules{float:none;width:100%}.control-section .csf-field-sorter .csf-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .csf-field-background .csf--background-attributes{flex-direction:column}.control-section .csf-field-spacing input{width:90px}.control-section .csf-field-border .csf--input{flex:1 50%}.control-section .csf-field-border input,.control-section .csf-field-border select{width:100%}.control-section .csf-field-spinner input{width:50px}.control-section .csf-field-number .csf--wrap{width:100%}.control-section .csf-field-backup .csf-export-data{display:none}.control-section .csf-field-fieldset .csf-fieldset-content{border-color:#e5e5e5}.control-section .csf-accordion-content>.csf-field,.control-section .csf-cloneable-content>.csf-field,.control-section .csf-fieldset-content>.csf-field,.control-section .csf-repeater-content>.csf-field,.control-section .csf-sortable-content>.csf-field,.control-section .csf-tabbed-content>.csf-field{padding:10px}.control-section .csf-accordion-content>.csf-field .csf-title,.control-section .csf-cloneable-content>.csf-field .csf-title,.control-section .csf-fieldset-content>.csf-field .csf-title,.control-section .csf-repeater-content>.csf-field .csf-title,.control-section .csf-sortable-content>.csf-field .csf-title,.control-section .csf-tabbed-content>.csf-field .csf-title{margin-bottom:5px}.control-section .csf-accordion-content>.csf-field h4,.control-section .csf-cloneable-content>.csf-field h4,.control-section .csf-fieldset-content>.csf-field h4,.control-section .csf-repeater-content>.csf-field h4,.control-section .csf-sortable-content>.csf-field h4,.control-section .csf-tabbed-content>.csf-field h4{font-size:12px}.control-section .csf-depend-hidden.csf-depend-on{display:none!important}.control-section .csf-depend-visible.csf-depend-on{border-top:0!important}.csf-taxonomy{max-width:95%}.csf-taxonomy>.csf-field{border-top:none!important}.csf-taxonomy>.csf-field-heading{font-size:1.1em;padding:20px!important;border:1px solid #ddd}.csf-taxonomy>.csf-field-subheading{font-size:12px;padding:15px!important;border:1px solid #ddd}.csf-taxonomy>.csf-field-submessage .csf-submessage{padding:15px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.csf-taxonomy>.csf-field-notice{background-color:transparent}.csf-taxonomy .csf-section-title{display:block;padding:15px;background-color:#f9f9f9;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.csf-taxonomy-add-fields>.csf-field{padding:8px 0}.csf-taxonomy-add-fields>.csf-field>.csf-title{float:none;width:100%;padding:2px 2px 4px 0}.csf-taxonomy-add-fields>.csf-field>.csf-title h4{font-size:12px;font-weight:400}.csf-taxonomy-add-fields>.csf-field>.csf-fieldset{float:none;width:100%}.csf-taxonomy-add-fields>.csf-field>.csf-fieldset>.csf-help{right:-5px}.csf-taxonomy-add-fields+p.submit{margin-top:0}.csf-taxonomy-edit-fields>.csf-field{padding:20px 0}.csf-taxonomy-edit-fields>.csf-field>.csf-title{width:200px}.csf-taxonomy-edit-fields>.csf-field>.csf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset{width:calc(100% - 220px)}.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset>.csf-help{top:-5px;right:-5px}.csf-taxonomy-edit-fields>.csf-field-submessage{margin:20px 0}.csf-taxonomy-edit-fields>.csf-field-heading,.csf-taxonomy-edit-fields>.csf-field-subheading{margin:20px 0;border:1px solid #ddd}.csf-nav-menu-options{clear:both;float:left;width:100%}.csf-nav-menu-options>.csf-fields{margin:10px -10px;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-nav-menu-options>.csf-fields>.csf-field{padding:12px}.csf-nav-menu-options>.csf-fields>.csf-field .csf-title{float:none;width:100%;margin-bottom:5px}.csf-nav-menu-options>.csf-fields>.csf-field .csf-fieldset{float:none;width:100%}.csf-nav-menu-options .csf-field-text input{width:100%}.csf-nav-menu-options .csf-field-notice .csf-notice{padding:15px}.csf-nav-menu-title{padding:12px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.csf-nav-menu-title:first-child{border-top:0}.csf-nav-menu-title h4{margin:0;padding:0;color:#23282d}.csf-nav-menu-icon{margin-right:5px}.csf-profile-options>h2>.fa{padding-right:7px}.csf-profile-options>.csf-field{max-width:750px;padding:15px 0;border-top:none!important}.csf-profile-options>.csf-field>.csf-title{width:200px}.csf-profile-options>.csf-field>.csf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.csf-profile-options>.csf-field>.csf-fieldset{width:calc(100% - 220px)}.csf-profile-options>.csf-field>.csf-fieldset>.csf-help{top:-15px;right:-5px}.csf-profile-options>.csf-field-heading{font-size:1.1em}.csf-profile-options>.csf-field-subheading{font-size:12px}.csf-profile-options>.csf-field-heading,.csf-profile-options>.csf-field-subheading{margin:10px 0;padding:15px!important;border:1px solid #ddd}.csf-profile-options>.csf-field-submessage{margin:20px 0}.csf-profile-options>.csf-field-submessage .csf-submessage{padding:10px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.csf-profile-options>.csf-field-notice{background-color:transparent}.csf-modal{position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.csf-modal.hidden{display:none}.csf-modal-icon{z-index:100102}.csf-modal-table{display:table;width:100%;height:100%}.csf-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.csf-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.csf-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:595px}.csf-modal-content .csf-shortcode-button{display:none}.csf-modal-content .csf-field{padding:15px 30px 15px 15px}.csf-modal-content a:active,.csf-modal-content a:focus{outline:0;box-shadow:none}.csf-modal-content h4{font-size:13px}.csf-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.csf-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.csf-modal-header{width:100%;padding:14px 0;background-color:#f5f5f5;border-bottom:1px solid #ddd}.csf-modal-header select{display:block;width:250px;margin:0 auto;font-size:13px;line-height:1;height:30px;min-height:30px;background-color:#fff}.csf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.csf-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.csf-modal-close:hover{opacity:.5}.csf-modal-insert-wrapper{text-align:center;width:100%;padding:15px 0;background-color:#f5f5f5;border-top:1px solid #ddd}.csf-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.csf--repeatable{padding:15px 15px 0 15px}.csf--repeat-button-block{text-align:center;padding-bottom:15px}.csf--repeat-shortcode{position:relative;margin-bottom:15px;border:1px dashed #ddd}.csf--repeat-shortcode:first-child .csf-repeat-remove{display:none}.csf--repeat-shortcode .csf-repeat-remove{position:absolute;right:10px;top:10px;z-index:10;cursor:pointer;display:inline-block;font-size:11px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:2px;color:#fff;background-color:#e14d43;opacity:.5}.csf--repeat-shortcode .csf-repeat-remove:hover{opacity:.5}.csf-shortcode-single .csf-modal-inner{height:750px}.csf-shortcode-single .csf-modal-content{height:652px}.elementor-editor-active .csf-shortcode-button{margin-left:5px}.elementor-editor-active .csf-modal .hidden{display:none!important}.csf-shortcode-block{text-align:center;padding:14px;font-size:13px;background-color:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.csf-shortcode-block .components-button{margin-bottom:10px}.csf-modal-icon .csf-icon-title{padding:15px 0;margin:4px;font-size:14px;font-weight:700;text-align:center;border:1px solid #eee;background-color:#f7f7f7}.csf-modal-icon .csf-modal-header{text-align:center}.csf-modal-icon .csf-icon-search{width:50%;height:40px;line-height:40px}.csf-modal-icon i{cursor:pointer;display:inline-block;margin:4px;width:35px;height:35px;line-height:35px;font-size:16px;color:#555;text-align:center;border:1px solid #ccc;background-color:#f7f7f7;border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.05)}.csf-modal-icon i:hover{color:#fff;border-color:#222;background-color:#222}.csf-modal-icon .csf-modal-content{padding:10px;height:618px}.csf-modal-icon .csf-error-text{padding:10px}.csf-modal-loading{display:none;position:absolute;left:15px;top:15px}.csf-loading{position:relative;width:20px;height:20px;background:#ccc;border-radius:20px;box-shadow:0 2px 5px rgba(0,0,0,.07)}.csf-loading:after{position:absolute;top:50%;left:50%;width:4px;height:4px;content:"";margin-top:-2px;margin-left:-2px;background-color:#fff;animation-duration:.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:csfLoader;border-radius:4px}@keyframes csfLoader{0%{transform:rotate(0) translateX(-6px) rotate(0)}100%{transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}.csf-subtitle-text{margin-top:6px;font-weight:400;color:#999}.csf-desc-text{clear:both;float:left;width:100%;margin-top:6px;font-weight:400;color:#999}.csf-error-text{margin-top:6px;color:#d02c21}.csf-before-text{margin-bottom:6px}.csf-after-text{margin-top:6px}.csf-metabox-hide{display:none!important}.csf-metabox-show{display:block!important}.csf-depend-hidden.csf-depend-on{display:none}.csf-depend-visible.csf-depend-on{display:block;opacity:.75;filter:grayscale(1);user-select:none;border-top:1px solid #eee}.csf-depend-visible.csf-depend-on .clear:before{content:"";left:0;top:0;right:0;bottom:0;position:absolute;background-color:#eee;opacity:.25;z-index:10}.csf-warning-primary{color:#fff!important;border-color:#dc3545!important;background:#dc3545!important}.csf-warning-primary:focus,.csf-warning-primary:hover{border-color:#bd2130!important;background:#bd2130!important}.csf-warning-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #bd2130!important}.csf-warning-primary:active{border-color:#bd2130!important;background:#bd2130!important}.csf-form-result{display:none;float:left;padding:0 8px;margin-right:4px;font-size:11px;line-height:30px;user-select:none;border-radius:2px}.csf-form-show{display:block}.csf-form-success{color:#fff;background-color:#46b450}.csf-form-warning{color:#8a6d3b;background-color:#faebcc}.csf-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;border-radius:2px}.csf-no-option{padding:30px}.csf-input-number{-moz-appearance:textfield}.csf-input-number::-webkit-inner-spin-button,.csf-input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.csf-fa5-shims .csf .fab,.csf-fa5-shims .csf .far,.csf-fa5-shims .csf .fas{font-family:FontAwesome;font-style:normal}.csf-welcome-wrap{position:relative;margin:25px 40px 0 20px;font-size:15px;max-width:1200px}.csf-welcome-wrap p{font-size:14px;line-height:1.5}.csf-welcome-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.csf-welcome-wrap .csf-logo{position:absolute;overflow:hidden;top:0;right:0;height:160px;width:140px;background-image:linear-gradient(45deg,#2d67cb,#ad19f3);box-shadow:0 1px 4px rgba(0,0,0,.25),inset 0 0 0 4px rgba(0,0,0,.25)}.csf-welcome-wrap .csf-logo .csf--effects i{position:absolute;width:200px;height:100px;background-color:rgba(0,0,0,.15);transform:rotate(-45deg)}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(1){bottom:-20px;right:-70px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(2){bottom:-35px;right:-80px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(3){bottom:-50px;right:-90px}.csf-welcome-wrap .csf-logo .csf--effects i:nth-child(4){bottom:-65px;right:-100px}.csf-welcome-wrap .csf-logo .csf--wp-logos{position:relative;padding-top:25px;text-align:center}.csf-welcome-wrap .csf-logo .csf--wp-logo{position:absolute;left:20px;width:20px;height:20px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-logo.svg)}.csf-welcome-wrap .csf-logo .csf--wp-plugin-logo{display:inline-block;width:50px;height:50px;border:3px solid #fff;background-size:40px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-plugin-logo.svg);border-radius:100%;vertical-align:middle}.csf-welcome-wrap .csf-logo .csf--text{position:absolute;left:0;right:0;top:90px;color:#fff;font-size:13px;line-height:1.2em;font-weight:600;text-align:center;text-transform:uppercase;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.csf-welcome-wrap .csf-logo .csf--version{top:auto;left:auto;right:8px;bottom:4px;font-size:11px;text-transform:lowercase}.csf-welcome-wrap .csf-about-text{font-weight:400;line-height:1.6em;font-size:19px;margin:1em 200px 1em 0;color:#555d66}.csf-welcome-wrap .csf-demo-button{margin:1em 200px 2em 0}.csf-welcome-wrap .nav-tab-wrapper{margin-bottom:20px}.csf-welcome-wrap ul{list-style-type:disc;padding-left:15px}.csf-welcome-wrap .csf--col{float:left;padding-right:20px;box-sizing:border-box}.csf-welcome-wrap .csf--col-2{width:50%}.csf-welcome-wrap .csf--col-3{width:33.333%}.csf-welcome-wrap .csf--col-4{width:25%}.csf-welcome-wrap .csf--col-5{width:20%}.csf-welcome-wrap .csf--col-last{padding-right:0}.csf-welcome-wrap .csf--col-upgrade{padding:10px 0;text-align:center;border-top:1px solid #e5e5e5}.csf--table-compare tfoot td,.csf--table-compare thead td{text-align:center}.csf--table-compare td{font-size:14px;text-align:center;vertical-align:middle;padding:10px}.csf--table-compare td:first-child{text-align:left}.csf--table-compare tfoot td{padding:15px 0}.csf--table-compare .fa{font-size:18px}.csf--table-compare .fa-check-circle{color:#46b450}.csf--table-compare .fa-times-circle{color:#dc3232}.csf-welcome-cols{clear:both;margin:20px 0;background-color:#fff;padding:0 0;border-radius:2px;border:1px solid #e5e5e5}.csf-welcome-cols .csf--col{width:33.333%;float:left;padding:20px;text-align:center;box-sizing:border-box;min-height:200px;border-right:1px solid #e5e5e5}.csf-welcome-cols .csf--block,.csf-welcome-cols .csf--left{float:left;width:20%;padding:0 30px;text-align:center;box-sizing:border-box}.csf-welcome-cols .csf--block{width:80%}.csf-welcome-cols .csf--col-first{border-bottom:1px solid #e5e5e5}.csf-welcome-cols .csf--last{border-right:none}.csf-welcome-cols .csf--space{height:20px}.csf-welcome-cols .csf--icon{display:inline-block;font-size:20px;width:30px;height:30px;line-height:30px;text-align:center;margin-bottom:10px;color:#fff;background-color:#555;border-radius:30px}.csf-welcome-cols .csf--active{background-color:#5cb85c}.csf-welcome-cols .csf--deactive{background-color:#e14d43}.csf-welcome-cols .csf--title{font-weight:700;display:block}.csf-welcome-cols p:last-child{margin-bottom:0}.csf-features-cols .csf--key-features{width:30%}.csf-features-cols .csf--available-fields{width:70%}.csf-code-block{margin:20px 0;padding:5px 20px;background-color:#fff;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.csf-code-block pre{font-size:13px;color:#0073aa}.csf-code-block pre span{color:#999}.csf--table-fields td{font-size:14px}.csf--upgrade a{color:#5cb85c;font-weight:700}.csf--upgrade a:focus,.csf--upgrade a:hover{color:#4aa14a;outline:0;box-shadow:none}@media only screen and (max-width:782px){.csf-welcome-cols .csf--col{width:100%;min-height:auto;border-right:none;border-bottom:1px solid #e5e5e5}.csf-features-cols .csf--key-features{width:100%}.csf-features-cols .csf--available-fields{width:100%}}@media only screen and (max-width:1200px){.csf-metabox .csf-field .csf-title{float:none;width:100%;margin-bottom:10px}.csf-metabox .csf-field .csf-fieldset{float:none;width:100%}}@media only screen and (max-width:782px){.csf-header-inner{text-align:center}.csf-header-inner h1{width:100%;margin-bottom:10px}.csf-form-result{float:none;margin-right:0;margin-bottom:10px}.csf-header-left,.csf-header-right,.csf-search{width:100%}.csf-search{text-align:center;margin-bottom:15px}.csf-footer{text-align:center}.csf-buttons{float:none}.csf-copyright{float:none;margin-top:10px}.csf-expand-all,.csf-nav,.csf-nav-background,.csf-reset-section{display:none!important}.csf-nav-normal+.csf-content{margin-left:0}.csf-section,.csf-section-title{display:block!important}.csf-field .csf-title{float:none;width:100%;margin-bottom:10px}.csf-field .csf-fieldset{float:none;width:100%}.csf-field-color .button.wp-picker-clear{padding:0 8px;line-height:2.14285714;min-height:32px}.csf-profile-options>.csf-field>.csf-title,.csf-taxonomy-edit-fields>.csf-field>.csf-title{float:none;width:100%;margin-bottom:10px}.csf-profile-options>.csf-field>.csf-fieldset,.csf-taxonomy-edit-fields>.csf-field>.csf-fieldset{float:none;width:100%}.csf-nav-menu-options>.csf-fields{margin-left:-10px;margin-right:-10px}.csf-nav-menu-options>.csf-fields>.csf-field{padding:10px}}@media only screen and (max-width:782px){.csf-modal .csf-modal-inner{width:90%}}@media only screen and (max-height:750px){.csf-modal .csf-modal-inner{height:auto}.csf-modal .csf-modal-content{height:calc(100vh - 200px)}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px;height:25px;min-height:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 6px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:0;right:0;display:block;width:12px;height:12px;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;direction:rtl}.flatpickr-calendar{background:0 0;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.arrowRight:after,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar.arrowCenter:after,.flatpickr-calendar.arrowCenter:before{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:0 0;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.flatpickr-disabled,.flatpickr-months .flatpickr-prev-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-inner-spin-button,.numInputWrapper input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:0 0;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:0 0;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:0;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:active,.flatpickr-current-month .flatpickr-monthDropdown-months:focus{outline:0}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:0;padding:0}.flatpickr-weekdays{background:0 0;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:0 0;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:0 0;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:0 0;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:0 0;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:0 0;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|
vendor/codestar-framework/assets/js/gutenberg.js
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
var RawHTML = element.RawHTML;
|
21 |
var Button = components.Button;
|
22 |
|
23 |
-
registerBlockType(
|
24 |
title: block.gutenberg.title,
|
25 |
description: block.gutenberg.description,
|
26 |
icon: block.gutenberg.icon || 'screenoptions',
|
@@ -43,7 +43,7 @@
|
|
43 |
|
44 |
createElement(Button, {
|
45 |
'data-modal-id': block.modal_id,
|
46 |
-
'data-gutenberg-id': block.
|
47 |
className: 'is-secondary csf-shortcode-button',
|
48 |
onClick: function () {
|
49 |
window.csf_gutenberg_props = props;
|
20 |
var RawHTML = element.RawHTML;
|
21 |
var Button = components.Button;
|
22 |
|
23 |
+
registerBlockType(block.name, {
|
24 |
title: block.gutenberg.title,
|
25 |
description: block.gutenberg.description,
|
26 |
icon: block.gutenberg.icon || 'screenoptions',
|
43 |
|
44 |
createElement(Button, {
|
45 |
'data-modal-id': block.modal_id,
|
46 |
+
'data-gutenberg-id': block.name,
|
47 |
className: 'is-secondary csf-shortcode-button',
|
48 |
onClick: function () {
|
49 |
window.csf_gutenberg_props = props;
|
vendor/codestar-framework/assets/js/main.js
CHANGED
@@ -1,3455 +1,3478 @@
|
|
1 |
-
/**
|
2 |
-
*
|
3 |
-
* -----------------------------------------------------------
|
4 |
-
*
|
5 |
-
* Codestar Framework
|
6 |
-
* A Simple and Lightweight WordPress Option Framework
|
7 |
-
*
|
8 |
-
* -----------------------------------------------------------
|
9 |
-
*
|
10 |
-
*/
|
11 |
-
;(function( $, window, document, undefined ) {
|
12 |
-
'use strict';
|
13 |
-
|
14 |
-
//
|
15 |
-
// Constants
|
16 |
-
//
|
17 |
-
var CSF = CSF || {};
|
18 |
-
|
19 |
-
CSF.funcs = {};
|
20 |
-
|
21 |
-
CSF.vars = {
|
22 |
-
onloaded: false,
|
23 |
-
$body: $('body'),
|
24 |
-
$window: $(window),
|
25 |
-
$document: $(document),
|
26 |
-
$form_warning: null,
|
27 |
-
is_confirm: false,
|
28 |
-
form_modified: false,
|
29 |
-
code_themes: [],
|
30 |
-
is_rtl: $('body').hasClass('rtl'),
|
31 |
-
};
|
32 |
-
|
33 |
-
//
|
34 |
-
// Helper Functions
|
35 |
-
//
|
36 |
-
CSF.helper = {
|
37 |
-
|
38 |
-
//
|
39 |
-
// Generate UID
|
40 |
-
//
|
41 |
-
uid: function( prefix ) {
|
42 |
-
return ( prefix || '' ) + Math.random().toString(36).substr(2, 9);
|
43 |
-
},
|
44 |
-
|
45 |
-
// Quote regular expression characters
|
46 |
-
//
|
47 |
-
preg_quote: function( str ) {
|
48 |
-
return (str+'').replace(/(\[|\])/g, "\\$1");
|
49 |
-
},
|
50 |
-
|
51 |
-
//
|
52 |
-
// Reneme input names
|
53 |
-
//
|
54 |
-
name_nested_replace: function( $selector, field_id ) {
|
55 |
-
|
56 |
-
var checks = [];
|
57 |
-
var regex = new RegExp(CSF.helper.preg_quote(field_id +'[\\d+]'), 'g');
|
58 |
-
|
59 |
-
$selector.find(':radio').each(function() {
|
60 |
-
if ( this.checked || this.orginal_checked ) {
|
61 |
-
this.orginal_checked = true;
|
62 |
-
}
|
63 |
-
});
|
64 |
-
|
65 |
-
$selector.each( function( index ) {
|
66 |
-
$(this).find(':input').each(function() {
|
67 |
-
this.name = this.name.replace(regex, field_id +'['+ index +']');
|
68 |
-
if ( this.orginal_checked ) {
|
69 |
-
this.checked = true;
|
70 |
-
}
|
71 |
-
});
|
72 |
-
});
|
73 |
-
|
74 |
-
},
|
75 |
-
|
76 |
-
//
|
77 |
-
// Debounce
|
78 |
-
//
|
79 |
-
debounce: function( callback, threshold, immediate ) {
|
80 |
-
var timeout;
|
81 |
-
return function() {
|
82 |
-
var context = this, args = arguments;
|
83 |
-
var later = function() {
|
84 |
-
timeout = null;
|
85 |
-
if ( !immediate ) {
|
86 |
-
callback.apply(context, args);
|
87 |
-
}
|
88 |
-
};
|
89 |
-
var callNow = ( immediate && !timeout );
|
90 |
-
clearTimeout( timeout );
|
91 |
-
timeout = setTimeout( later, threshold );
|
92 |
-
if ( callNow ) {
|
93 |
-
callback.apply(context, args);
|
94 |
-
}
|
95 |
-
};
|
96 |
-
},
|
97 |
-
|
98 |
-
};
|
99 |
-
|
100 |
-
//
|
101 |
-
// Custom clone for textarea and select clone() bug
|
102 |
-
//
|
103 |
-
$.fn.csf_clone = function() {
|
104 |
-
|
105 |
-
var base = $.fn.clone.apply(this, arguments),
|
106 |
-
clone = this.find('select').add(this.filter('select')),
|
107 |
-
cloned = base.find('select').add(base.filter('select'));
|
108 |
-
|
109 |
-
for( var i = 0; i < clone.length; ++i ) {
|
110 |
-
for( var j = 0; j < clone[i].options.length; ++j ) {
|
111 |
-
|
112 |
-
if ( clone[i].options[j].selected === true ) {
|
113 |
-
cloned[i].options[j].selected = true;
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
this.find(':radio').each( function() {
|
120 |
-
this.orginal_checked = this.checked;
|
121 |
-
});
|
122 |
-
|
123 |
-
return base;
|
124 |
-
|
125 |
-
};
|
126 |
-
|
127 |
-
//
|
128 |
-
// Expand All Options
|
129 |
-
//
|
130 |
-
$.fn.csf_expand_all = function() {
|
131 |
-
return this.each( function() {
|
132 |
-
$(this).on('click', function( e ) {
|
133 |
-
|
134 |
-
e.preventDefault();
|
135 |
-
$('.csf-wrapper').toggleClass('csf-show-all');
|
136 |
-
$('.csf-section').csf_reload_script();
|
137 |
-
$(this).find('.fa').toggleClass('fa-indent').toggleClass('fa-outdent');
|
138 |
-
|
139 |
-
});
|
140 |
-
});
|
141 |
-
};
|
142 |
-
|
143 |
-
//
|
144 |
-
// Options Navigation
|
145 |
-
//
|
146 |
-
$.fn.csf_nav_options = function() {
|
147 |
-
return this.each( function() {
|
148 |
-
|
149 |
-
var $nav = $(this),
|
150 |
-
$window = $(window),
|
151 |
-
$wpwrap = $('#wpwrap'),
|
152 |
-
$links = $nav.find('a'),
|
153 |
-
$last;
|
154 |
-
|
155 |
-
$window.on('hashchange csf.hashchange', function() {
|
156 |
-
|
157 |
-
var hash = window.location.hash.replace('#tab=', '');
|
158 |
-
var slug = hash ? hash : $links.first().attr('href').replace('#tab=', '');
|
159 |
-
var $link = $('[data-tab-id="'+slug+'"]');
|
160 |
-
|
161 |
-
if ( $link.length ) {
|
162 |
-
|
163 |
-
$link.closest('.csf-tab-item').addClass('csf-tab-expanded').siblings().removeClass('csf-tab-expanded');
|
164 |
-
|
165 |
-
if( $link.next().is('ul') ) {
|
166 |
-
|
167 |
-
$link = $link.next().find('li').first().find('a');
|
168 |
-
slug = $link.data('tab-id');
|
169 |
-
|
170 |
-
}
|
171 |
-
|
172 |
-
$links.removeClass('csf-active');
|
173 |
-
$link.addClass('csf-active');
|
174 |
-
|
175 |
-
if ( $last ) {
|
176 |
-
$last.addClass('hidden');
|
177 |
-
}
|
178 |
-
|
179 |
-
var $section = $('[data-section-id="'+slug+'"]');
|
180 |
-
|
181 |
-
$section.removeClass('hidden');
|
182 |
-
$section.csf_reload_script();
|
183 |
-
|
184 |
-
$('.csf-section-id').val( $section.index()+1 );
|
185 |
-
|
186 |
-
$last = $section;
|
187 |
-
|
188 |
-
if ( $wpwrap.hasClass('wp-responsive-open') ) {
|
189 |
-
$('html, body').animate({scrollTop:($section.offset().top-50)}, 200);
|
190 |
-
$wpwrap.removeClass('wp-responsive-open');
|
191 |
-
}
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
}).trigger('csf.hashchange');
|
196 |
-
|
197 |
-
});
|
198 |
-
};
|
199 |
-
|
200 |
-
//
|
201 |
-
// Metabox Tabs
|
202 |
-
//
|
203 |
-
$.fn.csf_nav_metabox = function() {
|
204 |
-
return this.each( function() {
|
205 |
-
|
206 |
-
var $nav = $(this),
|
207 |
-
$links = $nav.find('a'),
|
208 |
-
$sections = $nav.parent().find('.csf-section'),
|
209 |
-
$last;
|
210 |
-
|
211 |
-
$links.each( function( index ) {
|
212 |
-
|
213 |
-
$(this).on('click', function( e ) {
|
214 |
-
|
215 |
-
e.preventDefault();
|
216 |
-
|
217 |
-
var $link = $(this);
|
218 |
-
|
219 |
-
$links.removeClass('csf-active');
|
220 |
-
$link.addClass('csf-active');
|
221 |
-
|
222 |
-
if ( $last !== undefined ) {
|
223 |
-
$last.addClass('hidden');
|
224 |
-
}
|
225 |
-
|
226 |
-
var $section = $sections.eq(index);
|
227 |
-
|
228 |
-
$section.removeClass('hidden');
|
229 |
-
$section.csf_reload_script();
|
230 |
-
|
231 |
-
$last = $section;
|
232 |
-
|
233 |
-
});
|
234 |
-
|
235 |
-
});
|
236 |
-
|
237 |
-
$links.first().trigger('click');
|
238 |
-
|
239 |
-
});
|
240 |
-
};
|
241 |
-
|
242 |
-
//
|
243 |
-
// Metabox Page Templates Listener
|
244 |
-
//
|
245 |
-
$.fn.csf_page_templates = function() {
|
246 |
-
if ( this.length ) {
|
247 |
-
|
248 |
-
$(document).on('change', '.editor-page-attributes__template select, #page_template', function() {
|
249 |
-
|
250 |
-
var maybe_value = $(this).val() || 'default';
|
251 |
-
|
252 |
-
$('.csf-page-templates').removeClass('csf-metabox-show').addClass('csf-metabox-hide');
|
253 |
-
$('.csf-page-'+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,'-')).removeClass('csf-metabox-hide').addClass('csf-metabox-show');
|
254 |
-
|
255 |
-
});
|
256 |
-
|
257 |
-
}
|
258 |
-
};
|
259 |
-
|
260 |
-
//
|
261 |
-
// Metabox Post Formats Listener
|
262 |
-
//
|
263 |
-
$.fn.csf_post_formats = function() {
|
264 |
-
if ( this.length ) {
|
265 |
-
|
266 |
-
$(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function() {
|
267 |
-
|
268 |
-
var maybe_value = $(this).val() || 'default';
|
269 |
-
|
270 |
-
// Fallback for classic editor version
|
271 |
-
maybe_value = ( maybe_value === '0' ) ? 'default' : maybe_value;
|
272 |
-
|
273 |
-
$('.csf-post-formats').removeClass('csf-metabox-show').addClass('csf-metabox-hide');
|
274 |
-
$('.csf-post-format-'+maybe_value).removeClass('csf-metabox-hide').addClass('csf-metabox-show');
|
275 |
-
|
276 |
-
});
|
277 |
-
|
278 |
-
}
|
279 |
-
};
|
280 |
-
|
281 |
-
//
|
282 |
-
// Search
|
283 |
-
//
|
284 |
-
$.fn.csf_search = function() {
|
285 |
-
return this.each( function() {
|
286 |
-
|
287 |
-
var $this = $(this),
|
288 |
-
$input = $this.find('input');
|
289 |
-
|
290 |
-
$input.on('change keyup', function() {
|
291 |
-
|
292 |
-
var value = $(this).val(),
|
293 |
-
$wrapper = $('.csf-wrapper'),
|
294 |
-
$section = $wrapper.find('.csf-section'),
|
295 |
-
$fields = $section.find('> .csf-field:not(.csf-depend-on)'),
|
296 |
-
$titles = $fields.find('> .csf-title, .csf-search-tags');
|
297 |
-
|
298 |
-
if ( value.length > 3 ) {
|
299 |
-
|
300 |
-
$fields.addClass('csf-metabox-hide');
|
301 |
-
$wrapper.addClass('csf-search-all');
|
302 |
-
|
303 |
-
$titles.each( function() {
|
304 |
-
|
305 |
-
var $title = $(this);
|
306 |
-
|
307 |
-
if ( $title.text().match( new RegExp('.*?' + value + '.*?', 'i') ) ) {
|
308 |
-
|
309 |
-
var $field = $title.closest('.csf-field');
|
310 |
-
|
311 |
-
$field.removeClass('csf-metabox-hide');
|
312 |
-
$field.parent().csf_reload_script();
|
313 |
-
|
314 |
-
}
|
315 |
-
|
316 |
-
});
|
317 |
-
|
318 |
-
} else {
|
319 |
-
|
320 |
-
$fields.removeClass('csf-metabox-hide');
|
321 |
-
$wrapper.removeClass('csf-search-all');
|
322 |
-
|
323 |
-
}
|
324 |
-
|
325 |
-
});
|
326 |
-
|
327 |
-
});
|
328 |
-
};
|
329 |
-
|
330 |
-
//
|
331 |
-
// Sticky Header
|
332 |
-
//
|
333 |
-
$.fn.csf_sticky = function() {
|
334 |
-
return this.each( function() {
|
335 |
-
|
336 |
-
var $this = $(this),
|
337 |
-
$window = $(window),
|
338 |
-
$inner = $this.find('.csf-header-inner'),
|
339 |
-
padding = parseInt( $inner.css('padding-left') ) + parseInt( $inner.css('padding-right') ),
|
340 |
-
offset = 32,
|
341 |
-
scrollTop = 0,
|
342 |
-
lastTop = 0,
|
343 |
-
ticking = false,
|
344 |
-
stickyUpdate = function() {
|
345 |
-
|
346 |
-
var offsetTop = $this.offset().top,
|
347 |
-
stickyTop = Math.max(offset, offsetTop - scrollTop ),
|
348 |
-
winWidth = $window.innerWidth();
|
349 |
-
|
350 |
-
if ( stickyTop <= offset && winWidth > 782 ) {
|
351 |
-
$inner.css({width: $this.outerWidth()-padding});
|
352 |
-
$this.css({height: $this.outerHeight()}).addClass( 'csf-sticky' );
|
353 |
-
} else {
|
354 |
-
$inner.removeAttr('style');
|
355 |
-
$this.removeAttr('style').removeClass( 'csf-sticky' );
|
356 |
-
}
|
357 |
-
|
358 |
-
},
|
359 |
-
requestTick = function() {
|
360 |
-
|
361 |
-
if ( !ticking ) {
|
362 |
-
requestAnimationFrame( function() {
|
363 |
-
stickyUpdate();
|
364 |
-
ticking = false;
|
365 |
-
});
|
366 |
-
}
|
367 |
-
|
368 |
-
ticking = true;
|
369 |
-
|
370 |
-
},
|
371 |
-
onSticky = function() {
|
372 |
-
|
373 |
-
scrollTop = $window.scrollTop();
|
374 |
-
requestTick();
|
375 |
-
|
376 |
-
};
|
377 |
-
|
378 |
-
$window.on( 'scroll resize', onSticky);
|
379 |
-
|
380 |
-
onSticky();
|
381 |
-
|
382 |
-
});
|
383 |
-
};
|
384 |
-
|
385 |
-
//
|
386 |
-
// Dependency System
|
387 |
-
//
|
388 |
-
$.fn.csf_dependency = function() {
|
389 |
-
return this.each( function() {
|
390 |
-
|
391 |
-
var $this = $(this),
|
392 |
-
$fields = $this.children('[data-controller]');
|
393 |
-
|
394 |
-
if( $fields.length ) {
|
395 |
-
|
396 |
-
var normal_ruleset = $.csf_deps.createRuleset(),
|
397 |
-
global_ruleset = $.csf_deps.createRuleset(),
|
398 |
-
normal_depends = [],
|
399 |
-
global_depends = [];
|
400 |
-
|
401 |
-
$fields.each( function() {
|
402 |
-
|
403 |
-
var $field = $(this),
|
404 |
-
controllers = $field.data('controller').split('|'),
|
405 |
-
conditions = $field.data('condition').split('|'),
|
406 |
-
values = $field.data('value').toString().split('|'),
|
407 |
-
is_global = $field.data('depend-global') ? true : false,
|
408 |
-
ruleset = ( is_global ) ? global_ruleset : normal_ruleset;
|
409 |
-
|
410 |
-
$.each(controllers, function( index, depend_id ) {
|
411 |
-
|
412 |
-
var value = values[index] || '',
|
413 |
-
condition = conditions[index] || conditions[0];
|
414 |
-
|
415 |
-
ruleset = ruleset.createRule('[data-depend-id="'+ depend_id +'"]', condition, value);
|
416 |
-
|
417 |
-
ruleset.include($field);
|
418 |
-
|
419 |
-
if ( is_global ) {
|
420 |
-
global_depends.push(depend_id);
|
421 |
-
} else {
|
422 |
-
normal_depends.push(depend_id);
|
423 |
-
}
|
424 |
-
|
425 |
-
});
|
426 |
-
|
427 |
-
});
|
428 |
-
|
429 |
-
if ( normal_depends.length ) {
|
430 |
-
$.csf_deps.enable($this, normal_ruleset, normal_depends);
|
431 |
-
}
|
432 |
-
|
433 |
-
if ( global_depends.length ) {
|
434 |
-
$.csf_deps.enable(CSF.vars.$body, global_ruleset, global_depends);
|
435 |
-
}
|
436 |
-
|
437 |
-
}
|
438 |
-
|
439 |
-
});
|
440 |
-
};
|
441 |
-
|
442 |
-
//
|
443 |
-
// Field: accordion
|
444 |
-
//
|
445 |
-
$.fn.csf_field_accordion = function() {
|
446 |
-
return this.each( function() {
|
447 |
-
|
448 |
-
var $titles = $(this).find('.csf-accordion-title');
|
449 |
-
|
450 |
-
$titles.on('click', function() {
|
451 |
-
|
452 |
-
var $title = $(this),
|
453 |
-
$icon = $title.find('.csf-accordion-icon'),
|
454 |
-
$content = $title.next();
|
455 |
-
|
456 |
-
if ( $icon.hasClass('fa-angle-right') ) {
|
457 |
-
$icon.removeClass('fa-angle-right').addClass('fa-angle-down');
|
458 |
-
} else {
|
459 |
-
$icon.removeClass('fa-angle-down').addClass('fa-angle-right');
|
460 |
-
}
|
461 |
-
|
462 |
-
if ( !$content.data( 'opened' ) ) {
|
463 |
-
|
464 |
-
$content.csf_reload_script();
|
465 |
-
$content.data( 'opened', true );
|
466 |
-
|
467 |
-
}
|
468 |
-
|
469 |
-
$content.toggleClass('csf-accordion-open');
|
470 |
-
|
471 |
-
});
|
472 |
-
|
473 |
-
});
|
474 |
-
};
|
475 |
-
|
476 |
-
//
|
477 |
-
// Field: backup
|
478 |
-
//
|
479 |
-
$.fn.csf_field_backup = function() {
|
480 |
-
return this.each( function() {
|
481 |
-
|
482 |
-
if ( window.wp.customize === undefined ) { return; }
|
483 |
-
|
484 |
-
var base = this,
|
485 |
-
$this = $(this),
|
486 |
-
$body = $('body'),
|
487 |
-
$import = $this.find('.csf-import'),
|
488 |
-
$reset = $this.find('.csf-reset');
|
489 |
-
|
490 |
-
base.notificationOverlay = function() {
|
491 |
-
|
492 |
-
if ( wp.customize.notifications && wp.customize.OverlayNotification ) {
|
493 |
-
|
494 |
-
// clear if there is any saved data.
|
495 |
-
if ( !wp.customize.state('saved').get() ) {
|
496 |
-
wp.customize.state('changesetStatus').set('trash');
|
497 |
-
wp.customize.each( function( setting ) { setting._dirty = false; });
|
498 |
-
wp.customize.state('saved').set(true);
|
499 |
-
}
|
500 |
-
|
501 |
-
// then show a notification overlay
|
502 |
-
wp.customize.notifications.add( new wp.customize.OverlayNotification('csf_field_backup_notification', {
|
503 |
-
type: 'default',
|
504 |
-
message: ' ',
|
505 |
-
loading: true
|
506 |
-
}));
|
507 |
-
|
508 |
-
}
|
509 |
-
|
510 |
-
};
|
511 |
-
|
512 |
-
$reset.on('click', function( e ) {
|
513 |
-
|
514 |
-
e.preventDefault();
|
515 |
-
|
516 |
-
if ( CSF.vars.is_confirm ) {
|
517 |
-
|
518 |
-
base.notificationOverlay();
|
519 |
-
|
520 |
-
window.wp.ajax.post('csf-reset', {
|
521 |
-
unique: $reset.data('unique'),
|
522 |
-
nonce: $reset.data('nonce')
|
523 |
-
})
|
524 |
-
.done( function( response ) {
|
525 |
-
window.location.reload(true);
|
526 |
-
})
|
527 |
-
.fail( function( response ) {
|
528 |
-
alert( response.error );
|
529 |
-
wp.customize.notifications.remove('csf_field_backup_notification');
|
530 |
-
});
|
531 |
-
|
532 |
-
}
|
533 |
-
|
534 |
-
});
|
535 |
-
|
536 |
-
$import.on('click', function( e ) {
|
537 |
-
|
538 |
-
e.preventDefault();
|
539 |
-
|
540 |
-
if ( CSF.vars.is_confirm ) {
|
541 |
-
|
542 |
-
base.notificationOverlay();
|
543 |
-
|
544 |
-
window.wp.ajax.post( 'csf-import', {
|
545 |
-
unique: $import.data('unique'),
|
546 |
-
nonce: $import.data('nonce'),
|
547 |
-
data: $this.find('.csf-import-data').val()
|
548 |
-
}).done( function( response ) {
|
549 |
-
window.location.reload(true);
|
550 |
-
}).fail( function( response ) {
|
551 |
-
alert( response.error );
|
552 |
-
wp.customize.notifications.remove('csf_field_backup_notification');
|
553 |
-
});
|
554 |
-
|
555 |
-
}
|
556 |
-
|
557 |
-
});
|
558 |
-
|
559 |
-
});
|
560 |
-
};
|
561 |
-
|
562 |
-
//
|
563 |
-
// Field: background
|
564 |
-
//
|
565 |
-
$.fn.csf_field_background = function() {
|
566 |
-
return this.each( function() {
|
567 |
-
$(this).find('.csf--background-image').csf_reload_script();
|
568 |
-
});
|
569 |
-
};
|
570 |
-
|
571 |
-
//
|
572 |
-
// Field: code_editor
|
573 |
-
//
|
574 |
-
$.fn.csf_field_code_editor = function() {
|
575 |
-
return this.each( function() {
|
576 |
-
|
577 |
-
if ( typeof CodeMirror !== 'function' ) { return; }
|
578 |
-
|
579 |
-
var $this = $(this),
|
580 |
-
$textarea = $this.find('textarea'),
|
581 |
-
$inited = $this.find('.CodeMirror'),
|
582 |
-
data_editor = $textarea.data('editor');
|
583 |
-
|
584 |
-
if ( $inited.length ) {
|
585 |
-
$inited.remove();
|
586 |
-
}
|
587 |
-
|
588 |
-
var interval = setInterval(function () {
|
589 |
-
if ( $this.is(':visible') ) {
|
590 |
-
|
591 |
-
var code_editor = CodeMirror.fromTextArea( $textarea[0], data_editor );
|
592 |
-
|
593 |
-
// load code-mirror theme css.
|
594 |
-
if ( data_editor.theme !== 'default' && CSF.vars.code_themes.indexOf(data_editor.theme) === -1 ) {
|
595 |
-
|
596 |
-
var $cssLink = $('<link>');
|
597 |
-
|
598 |
-
$('#csf-codemirror-css').after( $cssLink );
|
599 |
-
|
600 |
-
$cssLink.attr({
|
601 |
-
rel: 'stylesheet',
|
602 |
-
id: 'csf-codemirror-'+ data_editor.theme +'-css',
|
603 |
-
href: data_editor.cdnURL +'/theme/'+ data_editor.theme +'.min.css',
|
604 |
-
type: 'text/css',
|
605 |
-
media: 'all'
|
606 |
-
});
|
607 |
-
|
608 |
-
CSF.vars.code_themes.push(data_editor.theme);
|
609 |
-
|
610 |
-
}
|
611 |
-
|
612 |
-
CodeMirror.modeURL = data_editor.cdnURL +'/mode/%N/%N.min.js';
|
613 |
-
CodeMirror.autoLoadMode(code_editor, data_editor.mode);
|
614 |
-
|
615 |
-
code_editor.on( 'change', function( editor, event ) {
|
616 |
-
$textarea.val( code_editor.getValue() ).trigger('change');
|
617 |
-
});
|
618 |
-
|
619 |
-
clearInterval(interval);
|
620 |
-
|
621 |
-
}
|
622 |
-
});
|
623 |
-
|
624 |
-
});
|
625 |
-
};
|
626 |
-
|
627 |
-
//
|
628 |
-
// Field: date
|
629 |
-
//
|
630 |
-
$.fn.csf_field_date = function() {
|
631 |
-
return this.each( function() {
|
632 |
-
|
633 |
-
var $this = $(this),
|
634 |
-
$inputs = $this.find('input'),
|
635 |
-
settings = $this.find('.csf-date-settings').data('settings'),
|
636 |
-
wrapper = '<div class="csf-datepicker-wrapper"></div>';
|
637 |
-
|
638 |
-
var defaults = {
|
639 |
-
showAnim: '',
|
640 |
-
beforeShow: function(input, inst) {
|
641 |
-
$(inst.dpDiv).addClass('csf-datepicker-wrapper');
|
642 |
-
},
|
643 |
-
onClose: function( input, inst ) {
|
644 |
-
$(inst.dpDiv).removeClass('csf-datepicker-wrapper');
|
645 |
-
},
|
646 |
-
};
|
647 |
-
|
648 |
-
settings = $.extend({}, settings, defaults);
|
649 |
-
|
650 |
-
if ( $inputs.length === 2 ) {
|
651 |
-
|
652 |
-
settings = $.extend({}, settings, {
|
653 |
-
onSelect: function( selectedDate ) {
|
654 |
-
|
655 |
-
var $this = $(this),
|
656 |
-
$from = $inputs.first(),
|
657 |
-
option = ( $inputs.first().attr('id') === $(this).attr('id') ) ? 'minDate' : 'maxDate',
|
658 |
-
date = $.datepicker.parseDate( settings.dateFormat, selectedDate );
|
659 |
-
|
660 |
-
$inputs.not(this).datepicker('option', option, date );
|
661 |
-
|
662 |
-
}
|
663 |
-
});
|
664 |
-
|
665 |
-
}
|
666 |
-
|
667 |
-
$inputs.each( function() {
|
668 |
-
|
669 |
-
var $input = $(this);
|
670 |
-
|
671 |
-
if ( $input.hasClass('hasDatepicker') ) {
|
672 |
-
$input.removeAttr('id').removeClass('hasDatepicker');
|
673 |
-
}
|
674 |
-
|
675 |
-
$input.datepicker(settings);
|
676 |
-
|
677 |
-
});
|
678 |
-
|
679 |
-
});
|
680 |
-
};
|
681 |
-
|
682 |
-
//
|
683 |
-
// Field: datetime
|
684 |
-
//
|
685 |
-
$.fn.csf_field_datetime = function() {
|
686 |
-
return this.each( function() {
|
687 |
-
|
688 |
-
var $this = $(this),
|
689 |
-
$inputs = $this.find('input'),
|
690 |
-
settings = $this.find('.csf-datetime-settings').data('settings');
|
691 |
-
|
692 |
-
settings = $.extend({}, settings, {
|
693 |
-
onReady: function( selectedDates, dateStr, instance) {
|
694 |
-
$(instance.calendarContainer).addClass('csf-flatpickr');
|
695 |
-
},
|
696 |
-
});
|
697 |
-
|
698 |
-
if ( $inputs.length === 2 ) {
|
699 |
-
settings = $.extend({}, settings, {
|
700 |
-
onChange: function( selectedDates, dateStr, instance) {
|
701 |
-
if ( $(instance.element).data('type') === 'from' ) {
|
702 |
-
$inputs.last().get(0)._flatpickr.set( 'minDate', selectedDates[0] );
|
703 |
-
} else {
|
704 |
-
$inputs.first().get(0)._flatpickr.set( 'maxDate', selectedDates[0] );
|
705 |
-
}
|
706 |
-
},
|
707 |
-
});
|
708 |
-
}
|
709 |
-
|
710 |
-
$inputs.each( function() {
|
711 |
-
$(this).flatpickr(settings);
|
712 |
-
});
|
713 |
-
|
714 |
-
});
|
715 |
-
};
|
716 |
-
|
717 |
-
//
|
718 |
-
// Field: fieldset
|
719 |
-
//
|
720 |
-
$.fn.csf_field_fieldset = function() {
|
721 |
-
return this.each( function() {
|
722 |
-
$(this).find('.csf-fieldset-content').csf_reload_script();
|
723 |
-
});
|
724 |
-
};
|
725 |
-
|
726 |
-
//
|
727 |
-
// Field: gallery
|
728 |
-
//
|
729 |
-
$.fn.csf_field_gallery = function() {
|
730 |
-
return this.each( function() {
|
731 |
-
|
732 |
-
var $this = $(this),
|
733 |
-
$edit = $this.find('.csf-edit-gallery'),
|
734 |
-
$clear = $this.find('.csf-clear-gallery'),
|
735 |
-
$list = $this.find('ul'),
|
736 |
-
$input = $this.find('input'),
|
737 |
-
$img = $this.find('img'),
|
738 |
-
wp_media_frame;
|
739 |
-
|
740 |
-
$this.on('click', '.csf-button, .csf-edit-gallery', function( e ) {
|
741 |
-
|
742 |
-
var $el = $(this),
|
743 |
-
ids = $input.val(),
|
744 |
-
what = ( $el.hasClass('csf-edit-gallery') ) ? 'edit' : 'add',
|
745 |
-
state = ( what === 'add' && !ids.length ) ? 'gallery' : 'gallery-edit';
|
746 |
-
|
747 |
-
e.preventDefault();
|
748 |
-
|
749 |
-
if ( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) { return; }
|
750 |
-
|
751 |
-
// Open media with state
|
752 |
-
if ( state === 'gallery' ) {
|
753 |
-
|
754 |
-
wp_media_frame = window.wp.media({
|
755 |
-
library: {
|
756 |
-
type: 'image'
|
757 |
-
},
|
758 |
-
frame: 'post',
|
759 |
-
state: 'gallery',
|
760 |
-
multiple: true
|
761 |
-
});
|
762 |
-
|
763 |
-
wp_media_frame.open();
|
764 |
-
|
765 |
-
} else {
|
766 |
-
|
767 |
-
wp_media_frame = window.wp.media.gallery.edit( '[gallery ids="'+ ids +'"]' );
|
768 |
-
|
769 |
-
if ( what === 'add' ) {
|
770 |
-
wp_media_frame.setState('gallery-library');
|
771 |
-
}
|
772 |
-
|
773 |
-
}
|
774 |
-
|
775 |
-
// Media Update
|
776 |
-
wp_media_frame.on( 'update', function( selection ) {
|
777 |
-
|
778 |
-
$list.empty();
|
779 |
-
|
780 |
-
var selectedIds = selection.models.map( function( attachment ) {
|
781 |
-
|
782 |
-
var item = attachment.toJSON();
|
783 |
-
var thumb = ( item.sizes && item.sizes.thumbnail && item.sizes.thumbnail.url ) ? item.sizes.thumbnail.url : item.url;
|
784 |
-
|
785 |
-
$list.append('<li><img src="'+ thumb +'"></li>');
|
786 |
-
|
787 |
-
return item.id;
|
788 |
-
|
789 |
-
});
|
790 |
-
|
791 |
-
$input.val( selectedIds.join( ',' ) ).trigger('change');
|
792 |
-
$clear.removeClass('hidden');
|
793 |
-
$edit.removeClass('hidden');
|
794 |
-
|
795 |
-
});
|
796 |
-
|
797 |
-
});
|
798 |
-
|
799 |
-
$clear.on('click', function( e ) {
|
800 |
-
e.preventDefault();
|
801 |
-
$list.empty();
|
802 |
-
$input.val('').trigger('change');
|
803 |
-
$clear.addClass('hidden');
|
804 |
-
$edit.addClass('hidden');
|
805 |
-
});
|
806 |
-
|
807 |
-
});
|
808 |
-
|
809 |
-
};
|
810 |
-
|
811 |
-
//
|
812 |
-
// Field: group
|
813 |
-
//
|
814 |
-
$.fn.csf_field_group = function() {
|
815 |
-
return this.each( function() {
|
816 |
-
|
817 |
-
var $this
|
818 |
-
$fieldset
|
819 |
-
$group
|
820 |
-
$wrapper
|
821 |
-
$hidden
|
822 |
-
$max
|
823 |
-
$min
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
var $title
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
}
|
900 |
-
|
901 |
-
}
|
902 |
-
});
|
903 |
-
|
904 |
-
$
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
$
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
}
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
$wrapper.
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
$
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
$(
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
$modal.
|
1084 |
-
|
1085 |
-
$
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
})
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
var
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
$
|
1285 |
-
$
|
1286 |
-
$
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
$this.find('.csf--
|
1362 |
-
$this.find('.csf--
|
1363 |
-
$this.find('.csf--
|
1364 |
-
$this.find('.csf--
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
$
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
$repeater.children('.csf-repeater-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
$
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
$
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
$
|
1496 |
-
$
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
$
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
});
|
1572 |
-
};
|
1573 |
-
|
1574 |
-
//
|
1575 |
-
// Field:
|
1576 |
-
//
|
1577 |
-
$.fn.
|
1578 |
-
return this.each( function() {
|
1579 |
-
|
1580 |
-
var $
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
value
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
//
|
1760 |
-
//
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
//
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
var
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
//
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
//
|
2024 |
-
if ( $subset_block.length ) {
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
if (
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
}
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
});
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
//
|
2248 |
-
var
|
2249 |
-
|
2250 |
-
if (
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
}
|
2255 |
-
|
2256 |
-
//
|
2257 |
-
var
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
//
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
}
|
2278 |
-
|
2279 |
-
//
|
2280 |
-
var
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
}
|
2285 |
-
}
|
2286 |
-
|
2287 |
-
//
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
});
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
$
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
return
|
2489 |
-
}
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
$
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
$
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
rgba
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
$
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
$
|
2926 |
-
$
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
$
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
$this.
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
}
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
//
|
3275 |
-
//
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
$('.csf-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
});
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
$this.children('.csf-field-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
$this.children('.csf-field-
|
3398 |
-
$this.children('.csf-field-
|
3399 |
-
$this.children('.csf-field-
|
3400 |
-
$this.children('.csf-field-
|
3401 |
-
$this.children('.csf-field-
|
3402 |
-
$this.children('.csf-field-
|
3403 |
-
|
3404 |
-
|
3405 |
-
$this.children('.csf-field-
|
3406 |
-
|
3407 |
-
|
3408 |
-
$this.children('.csf-field-
|
3409 |
-
|
3410 |
-
|
3411 |
-
$this.children('.csf-field-
|
3412 |
-
$this.children('.csf-field-
|
3413 |
-
$this.children('.csf-field-
|
3414 |
-
|
3415 |
-
|
3416 |
-
$this.children('.csf-field
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
$this.
|
3423 |
-
|
3424 |
-
$(
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
* -----------------------------------------------------------
|
4 |
+
*
|
5 |
+
* Codestar Framework
|
6 |
+
* A Simple and Lightweight WordPress Option Framework
|
7 |
+
*
|
8 |
+
* -----------------------------------------------------------
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
;(function( $, window, document, undefined ) {
|
12 |
+
'use strict';
|
13 |
+
|
14 |
+
//
|
15 |
+
// Constants
|
16 |
+
//
|
17 |
+
var CSF = CSF || {};
|
18 |
+
|
19 |
+
CSF.funcs = {};
|
20 |
+
|
21 |
+
CSF.vars = {
|
22 |
+
onloaded: false,
|
23 |
+
$body: $('body'),
|
24 |
+
$window: $(window),
|
25 |
+
$document: $(document),
|
26 |
+
$form_warning: null,
|
27 |
+
is_confirm: false,
|
28 |
+
form_modified: false,
|
29 |
+
code_themes: [],
|
30 |
+
is_rtl: $('body').hasClass('rtl'),
|
31 |
+
};
|
32 |
+
|
33 |
+
//
|
34 |
+
// Helper Functions
|
35 |
+
//
|
36 |
+
CSF.helper = {
|
37 |
+
|
38 |
+
//
|
39 |
+
// Generate UID
|
40 |
+
//
|
41 |
+
uid: function( prefix ) {
|
42 |
+
return ( prefix || '' ) + Math.random().toString(36).substr(2, 9);
|
43 |
+
},
|
44 |
+
|
45 |
+
// Quote regular expression characters
|
46 |
+
//
|
47 |
+
preg_quote: function( str ) {
|
48 |
+
return (str+'').replace(/(\[|\])/g, "\\$1");
|
49 |
+
},
|
50 |
+
|
51 |
+
//
|
52 |
+
// Reneme input names
|
53 |
+
//
|
54 |
+
name_nested_replace: function( $selector, field_id ) {
|
55 |
+
|
56 |
+
var checks = [];
|
57 |
+
var regex = new RegExp(CSF.helper.preg_quote(field_id +'[\\d+]'), 'g');
|
58 |
+
|
59 |
+
$selector.find(':radio').each(function() {
|
60 |
+
if ( this.checked || this.orginal_checked ) {
|
61 |
+
this.orginal_checked = true;
|
62 |
+
}
|
63 |
+
});
|
64 |
+
|
65 |
+
$selector.each( function( index ) {
|
66 |
+
$(this).find(':input').each(function() {
|
67 |
+
this.name = this.name.replace(regex, field_id +'['+ index +']');
|
68 |
+
if ( this.orginal_checked ) {
|
69 |
+
this.checked = true;
|
70 |
+
}
|
71 |
+
});
|
72 |
+
});
|
73 |
+
|
74 |
+
},
|
75 |
+
|
76 |
+
//
|
77 |
+
// Debounce
|
78 |
+
//
|
79 |
+
debounce: function( callback, threshold, immediate ) {
|
80 |
+
var timeout;
|
81 |
+
return function() {
|
82 |
+
var context = this, args = arguments;
|
83 |
+
var later = function() {
|
84 |
+
timeout = null;
|
85 |
+
if ( !immediate ) {
|
86 |
+
callback.apply(context, args);
|
87 |
+
}
|
88 |
+
};
|
89 |
+
var callNow = ( immediate && !timeout );
|
90 |
+
clearTimeout( timeout );
|
91 |
+
timeout = setTimeout( later, threshold );
|
92 |
+
if ( callNow ) {
|
93 |
+
callback.apply(context, args);
|
94 |
+
}
|
95 |
+
};
|
96 |
+
},
|
97 |
+
|
98 |
+
};
|
99 |
+
|
100 |
+
//
|
101 |
+
// Custom clone for textarea and select clone() bug
|
102 |
+
//
|
103 |
+
$.fn.csf_clone = function() {
|
104 |
+
|
105 |
+
var base = $.fn.clone.apply(this, arguments),
|
106 |
+
clone = this.find('select').add(this.filter('select')),
|
107 |
+
cloned = base.find('select').add(base.filter('select'));
|
108 |
+
|
109 |
+
for( var i = 0; i < clone.length; ++i ) {
|
110 |
+
for( var j = 0; j < clone[i].options.length; ++j ) {
|
111 |
+
|
112 |
+
if ( clone[i].options[j].selected === true ) {
|
113 |
+
cloned[i].options[j].selected = true;
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
this.find(':radio').each( function() {
|
120 |
+
this.orginal_checked = this.checked;
|
121 |
+
});
|
122 |
+
|
123 |
+
return base;
|
124 |
+
|
125 |
+
};
|
126 |
+
|
127 |
+
//
|
128 |
+
// Expand All Options
|
129 |
+
//
|
130 |
+
$.fn.csf_expand_all = function() {
|
131 |
+
return this.each( function() {
|
132 |
+
$(this).on('click', function( e ) {
|
133 |
+
|
134 |
+
e.preventDefault();
|
135 |
+
$('.csf-wrapper').toggleClass('csf-show-all');
|
136 |
+
$('.csf-section').csf_reload_script();
|
137 |
+
$(this).find('.fa').toggleClass('fa-indent').toggleClass('fa-outdent');
|
138 |
+
|
139 |
+
});
|
140 |
+
});
|
141 |
+
};
|
142 |
+
|
143 |
+
//
|
144 |
+
// Options Navigation
|
145 |
+
//
|
146 |
+
$.fn.csf_nav_options = function() {
|
147 |
+
return this.each( function() {
|
148 |
+
|
149 |
+
var $nav = $(this),
|
150 |
+
$window = $(window),
|
151 |
+
$wpwrap = $('#wpwrap'),
|
152 |
+
$links = $nav.find('a'),
|
153 |
+
$last;
|
154 |
+
|
155 |
+
$window.on('hashchange csf.hashchange', function() {
|
156 |
+
|
157 |
+
var hash = window.location.hash.replace('#tab=', '');
|
158 |
+
var slug = hash ? hash : $links.first().attr('href').replace('#tab=', '');
|
159 |
+
var $link = $('[data-tab-id="'+slug+'"]');
|
160 |
+
|
161 |
+
if ( $link.length ) {
|
162 |
+
|
163 |
+
$link.closest('.csf-tab-item').addClass('csf-tab-expanded').siblings().removeClass('csf-tab-expanded');
|
164 |
+
|
165 |
+
if( $link.next().is('ul') ) {
|
166 |
+
|
167 |
+
$link = $link.next().find('li').first().find('a');
|
168 |
+
slug = $link.data('tab-id');
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
$links.removeClass('csf-active');
|
173 |
+
$link.addClass('csf-active');
|
174 |
+
|
175 |
+
if ( $last ) {
|
176 |
+
$last.addClass('hidden');
|
177 |
+
}
|
178 |
+
|
179 |
+
var $section = $('[data-section-id="'+slug+'"]');
|
180 |
+
|
181 |
+
$section.removeClass('hidden');
|
182 |
+
$section.csf_reload_script();
|
183 |
+
|
184 |
+
$('.csf-section-id').val( $section.index()+1 );
|
185 |
+
|
186 |
+
$last = $section;
|
187 |
+
|
188 |
+
if ( $wpwrap.hasClass('wp-responsive-open') ) {
|
189 |
+
$('html, body').animate({scrollTop:($section.offset().top-50)}, 200);
|
190 |
+
$wpwrap.removeClass('wp-responsive-open');
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
}).trigger('csf.hashchange');
|
196 |
+
|
197 |
+
});
|
198 |
+
};
|
199 |
+
|
200 |
+
//
|
201 |
+
// Metabox Tabs
|
202 |
+
//
|
203 |
+
$.fn.csf_nav_metabox = function() {
|
204 |
+
return this.each( function() {
|
205 |
+
|
206 |
+
var $nav = $(this),
|
207 |
+
$links = $nav.find('a'),
|
208 |
+
$sections = $nav.parent().find('.csf-section'),
|
209 |
+
$last;
|
210 |
+
|
211 |
+
$links.each( function( index ) {
|
212 |
+
|
213 |
+
$(this).on('click', function( e ) {
|
214 |
+
|
215 |
+
e.preventDefault();
|
216 |
+
|
217 |
+
var $link = $(this);
|
218 |
+
|
219 |
+
$links.removeClass('csf-active');
|
220 |
+
$link.addClass('csf-active');
|
221 |
+
|
222 |
+
if ( $last !== undefined ) {
|
223 |
+
$last.addClass('hidden');
|
224 |
+
}
|
225 |
+
|
226 |
+
var $section = $sections.eq(index);
|
227 |
+
|
228 |
+
$section.removeClass('hidden');
|
229 |
+
$section.csf_reload_script();
|
230 |
+
|
231 |
+
$last = $section;
|
232 |
+
|
233 |
+
});
|
234 |
+
|
235 |
+
});
|
236 |
+
|
237 |
+
$links.first().trigger('click');
|
238 |
+
|
239 |
+
});
|
240 |
+
};
|
241 |
+
|
242 |
+
//
|
243 |
+
// Metabox Page Templates Listener
|
244 |
+
//
|
245 |
+
$.fn.csf_page_templates = function() {
|
246 |
+
if ( this.length ) {
|
247 |
+
|
248 |
+
$(document).on('change', '.editor-page-attributes__template select, #page_template', function() {
|
249 |
+
|
250 |
+
var maybe_value = $(this).val() || 'default';
|
251 |
+
|
252 |
+
$('.csf-page-templates').removeClass('csf-metabox-show').addClass('csf-metabox-hide');
|
253 |
+
$('.csf-page-'+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,'-')).removeClass('csf-metabox-hide').addClass('csf-metabox-show');
|
254 |
+
|
255 |
+
});
|
256 |
+
|
257 |
+
}
|
258 |
+
};
|
259 |
+
|
260 |
+
//
|
261 |
+
// Metabox Post Formats Listener
|
262 |
+
//
|
263 |
+
$.fn.csf_post_formats = function() {
|
264 |
+
if ( this.length ) {
|
265 |
+
|
266 |
+
$(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function() {
|
267 |
+
|
268 |
+
var maybe_value = $(this).val() || 'default';
|
269 |
+
|
270 |
+
// Fallback for classic editor version
|
271 |
+
maybe_value = ( maybe_value === '0' ) ? 'default' : maybe_value;
|
272 |
+
|
273 |
+
$('.csf-post-formats').removeClass('csf-metabox-show').addClass('csf-metabox-hide');
|
274 |
+
$('.csf-post-format-'+maybe_value).removeClass('csf-metabox-hide').addClass('csf-metabox-show');
|
275 |
+
|
276 |
+
});
|
277 |
+
|
278 |
+
}
|
279 |
+
};
|
280 |
+
|
281 |
+
//
|
282 |
+
// Search
|
283 |
+
//
|
284 |
+
$.fn.csf_search = function() {
|
285 |
+
return this.each( function() {
|
286 |
+
|
287 |
+
var $this = $(this),
|
288 |
+
$input = $this.find('input');
|
289 |
+
|
290 |
+
$input.on('change keyup', function() {
|
291 |
+
|
292 |
+
var value = $(this).val(),
|
293 |
+
$wrapper = $('.csf-wrapper'),
|
294 |
+
$section = $wrapper.find('.csf-section'),
|
295 |
+
$fields = $section.find('> .csf-field:not(.csf-depend-on)'),
|
296 |
+
$titles = $fields.find('> .csf-title, .csf-search-tags');
|
297 |
+
|
298 |
+
if ( value.length > 3 ) {
|
299 |
+
|
300 |
+
$fields.addClass('csf-metabox-hide');
|
301 |
+
$wrapper.addClass('csf-search-all');
|
302 |
+
|
303 |
+
$titles.each( function() {
|
304 |
+
|
305 |
+
var $title = $(this);
|
306 |
+
|
307 |
+
if ( $title.text().match( new RegExp('.*?' + value + '.*?', 'i') ) ) {
|
308 |
+
|
309 |
+
var $field = $title.closest('.csf-field');
|
310 |
+
|
311 |
+
$field.removeClass('csf-metabox-hide');
|
312 |
+
$field.parent().csf_reload_script();
|
313 |
+
|
314 |
+
}
|
315 |
+
|
316 |
+
});
|
317 |
+
|
318 |
+
} else {
|
319 |
+
|
320 |
+
$fields.removeClass('csf-metabox-hide');
|
321 |
+
$wrapper.removeClass('csf-search-all');
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
});
|
326 |
+
|
327 |
+
});
|
328 |
+
};
|
329 |
+
|
330 |
+
//
|
331 |
+
// Sticky Header
|
332 |
+
//
|
333 |
+
$.fn.csf_sticky = function() {
|
334 |
+
return this.each( function() {
|
335 |
+
|
336 |
+
var $this = $(this),
|
337 |
+
$window = $(window),
|
338 |
+
$inner = $this.find('.csf-header-inner'),
|
339 |
+
padding = parseInt( $inner.css('padding-left') ) + parseInt( $inner.css('padding-right') ),
|
340 |
+
offset = 32,
|
341 |
+
scrollTop = 0,
|
342 |
+
lastTop = 0,
|
343 |
+
ticking = false,
|
344 |
+
stickyUpdate = function() {
|
345 |
+
|
346 |
+
var offsetTop = $this.offset().top,
|
347 |
+
stickyTop = Math.max(offset, offsetTop - scrollTop ),
|
348 |
+
winWidth = $window.innerWidth();
|
349 |
+
|
350 |
+
if ( stickyTop <= offset && winWidth > 782 ) {
|
351 |
+
$inner.css({width: $this.outerWidth()-padding});
|
352 |
+
$this.css({height: $this.outerHeight()}).addClass( 'csf-sticky' );
|
353 |
+
} else {
|
354 |
+
$inner.removeAttr('style');
|
355 |
+
$this.removeAttr('style').removeClass( 'csf-sticky' );
|
356 |
+
}
|
357 |
+
|
358 |
+
},
|
359 |
+
requestTick = function() {
|
360 |
+
|
361 |
+
if ( !ticking ) {
|
362 |
+
requestAnimationFrame( function() {
|
363 |
+
stickyUpdate();
|
364 |
+
ticking = false;
|
365 |
+
});
|
366 |
+
}
|
367 |
+
|
368 |
+
ticking = true;
|
369 |
+
|
370 |
+
},
|
371 |
+
onSticky = function() {
|
372 |
+
|
373 |
+
scrollTop = $window.scrollTop();
|
374 |
+
requestTick();
|
375 |
+
|
376 |
+
};
|
377 |
+
|
378 |
+
$window.on( 'scroll resize', onSticky);
|
379 |
+
|
380 |
+
onSticky();
|
381 |
+
|
382 |
+
});
|
383 |
+
};
|
384 |
+
|
385 |
+
//
|
386 |
+
// Dependency System
|
387 |
+
//
|
388 |
+
$.fn.csf_dependency = function() {
|
389 |
+
return this.each( function() {
|
390 |
+
|
391 |
+
var $this = $(this),
|
392 |
+
$fields = $this.children('[data-controller]');
|
393 |
+
|
394 |
+
if( $fields.length ) {
|
395 |
+
|
396 |
+
var normal_ruleset = $.csf_deps.createRuleset(),
|
397 |
+
global_ruleset = $.csf_deps.createRuleset(),
|
398 |
+
normal_depends = [],
|
399 |
+
global_depends = [];
|
400 |
+
|
401 |
+
$fields.each( function() {
|
402 |
+
|
403 |
+
var $field = $(this),
|
404 |
+
controllers = $field.data('controller').split('|'),
|
405 |
+
conditions = $field.data('condition').split('|'),
|
406 |
+
values = $field.data('value').toString().split('|'),
|
407 |
+
is_global = $field.data('depend-global') ? true : false,
|
408 |
+
ruleset = ( is_global ) ? global_ruleset : normal_ruleset;
|
409 |
+
|
410 |
+
$.each(controllers, function( index, depend_id ) {
|
411 |
+
|
412 |
+
var value = values[index] || '',
|
413 |
+
condition = conditions[index] || conditions[0];
|
414 |
+
|
415 |
+
ruleset = ruleset.createRule('[data-depend-id="'+ depend_id +'"]', condition, value);
|
416 |
+
|
417 |
+
ruleset.include($field);
|
418 |
+
|
419 |
+
if ( is_global ) {
|
420 |
+
global_depends.push(depend_id);
|
421 |
+
} else {
|
422 |
+
normal_depends.push(depend_id);
|
423 |
+
}
|
424 |
+
|
425 |
+
});
|
426 |
+
|
427 |
+
});
|
428 |
+
|
429 |
+
if ( normal_depends.length ) {
|
430 |
+
$.csf_deps.enable($this, normal_ruleset, normal_depends);
|
431 |
+
}
|
432 |
+
|
433 |
+
if ( global_depends.length ) {
|
434 |
+
$.csf_deps.enable(CSF.vars.$body, global_ruleset, global_depends);
|
435 |
+
}
|
436 |
+
|
437 |
+
}
|
438 |
+
|
439 |
+
});
|
440 |
+
};
|
441 |
+
|
442 |
+
//
|
443 |
+
// Field: accordion
|
444 |
+
//
|
445 |
+
$.fn.csf_field_accordion = function() {
|
446 |
+
return this.each( function() {
|
447 |
+
|
448 |
+
var $titles = $(this).find('.csf-accordion-title');
|
449 |
+
|
450 |
+
$titles.on('click', function() {
|
451 |
+
|
452 |
+
var $title = $(this),
|
453 |
+
$icon = $title.find('.csf-accordion-icon'),
|
454 |
+
$content = $title.next();
|
455 |
+
|
456 |
+
if ( $icon.hasClass('fa-angle-right') ) {
|
457 |
+
$icon.removeClass('fa-angle-right').addClass('fa-angle-down');
|
458 |
+
} else {
|
459 |
+
$icon.removeClass('fa-angle-down').addClass('fa-angle-right');
|
460 |
+
}
|
461 |
+
|
462 |
+
if ( !$content.data( 'opened' ) ) {
|
463 |
+
|
464 |
+
$content.csf_reload_script();
|
465 |
+
$content.data( 'opened', true );
|
466 |
+
|
467 |
+
}
|
468 |
+
|
469 |
+
$content.toggleClass('csf-accordion-open');
|
470 |
+
|
471 |
+
});
|
472 |
+
|
473 |
+
});
|
474 |
+
};
|
475 |
+
|
476 |
+
//
|
477 |
+
// Field: backup
|
478 |
+
//
|
479 |
+
$.fn.csf_field_backup = function() {
|
480 |
+
return this.each( function() {
|
481 |
+
|
482 |
+
if ( window.wp.customize === undefined ) { return; }
|
483 |
+
|
484 |
+
var base = this,
|
485 |
+
$this = $(this),
|
486 |
+
$body = $('body'),
|
487 |
+
$import = $this.find('.csf-import'),
|
488 |
+
$reset = $this.find('.csf-reset');
|
489 |
+
|
490 |
+
base.notificationOverlay = function() {
|
491 |
+
|
492 |
+
if ( wp.customize.notifications && wp.customize.OverlayNotification ) {
|
493 |
+
|
494 |
+
// clear if there is any saved data.
|
495 |
+
if ( !wp.customize.state('saved').get() ) {
|
496 |
+
wp.customize.state('changesetStatus').set('trash');
|
497 |
+
wp.customize.each( function( setting ) { setting._dirty = false; });
|
498 |
+
wp.customize.state('saved').set(true);
|
499 |
+
}
|
500 |
+
|
501 |
+
// then show a notification overlay
|
502 |
+
wp.customize.notifications.add( new wp.customize.OverlayNotification('csf_field_backup_notification', {
|
503 |
+
type: 'default',
|
504 |
+
message: ' ',
|
505 |
+
loading: true
|
506 |
+
}));
|
507 |
+
|
508 |
+
}
|
509 |
+
|
510 |
+
};
|
511 |
+
|
512 |
+
$reset.on('click', function( e ) {
|
513 |
+
|
514 |
+
e.preventDefault();
|
515 |
+
|
516 |
+
if ( CSF.vars.is_confirm ) {
|
517 |
+
|
518 |
+
base.notificationOverlay();
|
519 |
+
|
520 |
+
window.wp.ajax.post('csf-reset', {
|
521 |
+
unique: $reset.data('unique'),
|
522 |
+
nonce: $reset.data('nonce')
|
523 |
+
})
|
524 |
+
.done( function( response ) {
|
525 |
+
window.location.reload(true);
|
526 |
+
})
|
527 |
+
.fail( function( response ) {
|
528 |
+
alert( response.error );
|
529 |
+
wp.customize.notifications.remove('csf_field_backup_notification');
|
530 |
+
});
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
+
});
|
535 |
+
|
536 |
+
$import.on('click', function( e ) {
|
537 |
+
|
538 |
+
e.preventDefault();
|
539 |
+
|
540 |
+
if ( CSF.vars.is_confirm ) {
|
541 |
+
|
542 |
+
base.notificationOverlay();
|
543 |
+
|
544 |
+
window.wp.ajax.post( 'csf-import', {
|
545 |
+
unique: $import.data('unique'),
|
546 |
+
nonce: $import.data('nonce'),
|
547 |
+
data: $this.find('.csf-import-data').val()
|
548 |
+
}).done( function( response ) {
|
549 |
+
window.location.reload(true);
|
550 |
+
}).fail( function( response ) {
|
551 |
+
alert( response.error );
|
552 |
+
wp.customize.notifications.remove('csf_field_backup_notification');
|
553 |
+
});
|
554 |
+
|
555 |
+
}
|
556 |
+
|
557 |
+
});
|
558 |
+
|
559 |
+
});
|
560 |
+
};
|
561 |
+
|
562 |
+
//
|
563 |
+
// Field: background
|
564 |
+
//
|
565 |
+
$.fn.csf_field_background = function() {
|
566 |
+
return this.each( function() {
|
567 |
+
$(this).find('.csf--background-image').csf_reload_script();
|
568 |
+
});
|
569 |
+
};
|
570 |
+
|
571 |
+
//
|
572 |
+
// Field: code_editor
|
573 |
+
//
|
574 |
+
$.fn.csf_field_code_editor = function() {
|
575 |
+
return this.each( function() {
|
576 |
+
|
577 |
+
if ( typeof CodeMirror !== 'function' ) { return; }
|
578 |
+
|
579 |
+
var $this = $(this),
|
580 |
+
$textarea = $this.find('textarea'),
|
581 |
+
$inited = $this.find('.CodeMirror'),
|
582 |
+
data_editor = $textarea.data('editor');
|
583 |
+
|
584 |
+
if ( $inited.length ) {
|
585 |
+
$inited.remove();
|
586 |
+
}
|
587 |
+
|
588 |
+
var interval = setInterval(function () {
|
589 |
+
if ( $this.is(':visible') ) {
|
590 |
+
|
591 |
+
var code_editor = CodeMirror.fromTextArea( $textarea[0], data_editor );
|
592 |
+
|
593 |
+
// load code-mirror theme css.
|
594 |
+
if ( data_editor.theme !== 'default' && CSF.vars.code_themes.indexOf(data_editor.theme) === -1 ) {
|
595 |
+
|
596 |
+
var $cssLink = $('<link>');
|
597 |
+
|
598 |
+
$('#csf-codemirror-css').after( $cssLink );
|
599 |
+
|
600 |
+
$cssLink.attr({
|
601 |
+
rel: 'stylesheet',
|
602 |
+
id: 'csf-codemirror-'+ data_editor.theme +'-css',
|
603 |
+
href: data_editor.cdnURL +'/theme/'+ data_editor.theme +'.min.css',
|
604 |
+
type: 'text/css',
|
605 |
+
media: 'all'
|
606 |
+
});
|
607 |
+
|
608 |
+
CSF.vars.code_themes.push(data_editor.theme);
|
609 |
+
|
610 |
+
}
|
611 |
+
|
612 |
+
CodeMirror.modeURL = data_editor.cdnURL +'/mode/%N/%N.min.js';
|
613 |
+
CodeMirror.autoLoadMode(code_editor, data_editor.mode);
|
614 |
+
|
615 |
+
code_editor.on( 'change', function( editor, event ) {
|
616 |
+
$textarea.val( code_editor.getValue() ).trigger('change');
|
617 |
+
});
|
618 |
+
|
619 |
+
clearInterval(interval);
|
620 |
+
|
621 |
+
}
|
622 |
+
});
|
623 |
+
|
624 |
+
});
|
625 |
+
};
|
626 |
+
|
627 |
+
//
|
628 |
+
// Field: date
|
629 |
+
//
|
630 |
+
$.fn.csf_field_date = function() {
|
631 |
+
return this.each( function() {
|
632 |
+
|
633 |
+
var $this = $(this),
|
634 |
+
$inputs = $this.find('input'),
|
635 |
+
settings = $this.find('.csf-date-settings').data('settings'),
|
636 |
+
wrapper = '<div class="csf-datepicker-wrapper"></div>';
|
637 |
+
|
638 |
+
var defaults = {
|
639 |
+
showAnim: '',
|
640 |
+
beforeShow: function(input, inst) {
|
641 |
+
$(inst.dpDiv).addClass('csf-datepicker-wrapper');
|
642 |
+
},
|
643 |
+
onClose: function( input, inst ) {
|
644 |
+
$(inst.dpDiv).removeClass('csf-datepicker-wrapper');
|
645 |
+
},
|
646 |
+
};
|
647 |
+
|
648 |
+
settings = $.extend({}, settings, defaults);
|
649 |
+
|
650 |
+
if ( $inputs.length === 2 ) {
|
651 |
+
|
652 |
+
settings = $.extend({}, settings, {
|
653 |
+
onSelect: function( selectedDate ) {
|
654 |
+
|
655 |
+
var $this = $(this),
|
656 |
+
$from = $inputs.first(),
|
657 |
+
option = ( $inputs.first().attr('id') === $(this).attr('id') ) ? 'minDate' : 'maxDate',
|
658 |
+
date = $.datepicker.parseDate( settings.dateFormat, selectedDate );
|
659 |
+
|
660 |
+
$inputs.not(this).datepicker('option', option, date );
|
661 |
+
|
662 |
+
}
|
663 |
+
});
|
664 |
+
|
665 |
+
}
|
666 |
+
|
667 |
+
$inputs.each( function() {
|
668 |
+
|
669 |
+
var $input = $(this);
|
670 |
+
|
671 |
+
if ( $input.hasClass('hasDatepicker') ) {
|
672 |
+
$input.removeAttr('id').removeClass('hasDatepicker');
|
673 |
+
}
|
674 |
+
|
675 |
+
$input.datepicker(settings);
|
676 |
+
|
677 |
+
});
|
678 |
+
|
679 |
+
});
|
680 |
+
};
|
681 |
+
|
682 |
+
//
|
683 |
+
// Field: datetime
|
684 |
+
//
|
685 |
+
$.fn.csf_field_datetime = function() {
|
686 |
+
return this.each( function() {
|
687 |
+
|
688 |
+
var $this = $(this),
|
689 |
+
$inputs = $this.find('input'),
|
690 |
+
settings = $this.find('.csf-datetime-settings').data('settings');
|
691 |
+
|
692 |
+
settings = $.extend({}, settings, {
|
693 |
+
onReady: function( selectedDates, dateStr, instance) {
|
694 |
+
$(instance.calendarContainer).addClass('csf-flatpickr');
|
695 |
+
},
|
696 |
+
});
|
697 |
+
|
698 |
+
if ( $inputs.length === 2 ) {
|
699 |
+
settings = $.extend({}, settings, {
|
700 |
+
onChange: function( selectedDates, dateStr, instance) {
|
701 |
+
if ( $(instance.element).data('type') === 'from' ) {
|
702 |
+
$inputs.last().get(0)._flatpickr.set( 'minDate', selectedDates[0] );
|
703 |
+
} else {
|
704 |
+
$inputs.first().get(0)._flatpickr.set( 'maxDate', selectedDates[0] );
|
705 |
+
}
|
706 |
+
},
|
707 |
+
});
|
708 |
+
}
|
709 |
+
|
710 |
+
$inputs.each( function() {
|
711 |
+
$(this).flatpickr(settings);
|
712 |
+
});
|
713 |
+
|
714 |
+
});
|
715 |
+
};
|
716 |
+
|
717 |
+
//
|
718 |
+
// Field: fieldset
|
719 |
+
//
|
720 |
+
$.fn.csf_field_fieldset = function() {
|
721 |
+
return this.each( function() {
|
722 |
+
$(this).find('.csf-fieldset-content').csf_reload_script();
|
723 |
+
});
|
724 |
+
};
|
725 |
+
|
726 |
+
//
|
727 |
+
// Field: gallery
|
728 |
+
//
|
729 |
+
$.fn.csf_field_gallery = function() {
|
730 |
+
return this.each( function() {
|
731 |
+
|
732 |
+
var $this = $(this),
|
733 |
+
$edit = $this.find('.csf-edit-gallery'),
|
734 |
+
$clear = $this.find('.csf-clear-gallery'),
|
735 |
+
$list = $this.find('ul'),
|
736 |
+
$input = $this.find('input'),
|
737 |
+
$img = $this.find('img'),
|
738 |
+
wp_media_frame;
|
739 |
+
|
740 |
+
$this.on('click', '.csf-button, .csf-edit-gallery', function( e ) {
|
741 |
+
|
742 |
+
var $el = $(this),
|
743 |
+
ids = $input.val(),
|
744 |
+
what = ( $el.hasClass('csf-edit-gallery') ) ? 'edit' : 'add',
|
745 |
+
state = ( what === 'add' && !ids.length ) ? 'gallery' : 'gallery-edit';
|
746 |
+
|
747 |
+
e.preventDefault();
|
748 |
+
|
749 |
+
if ( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) { return; }
|
750 |
+
|
751 |
+
// Open media with state
|
752 |
+
if ( state === 'gallery' ) {
|
753 |
+
|
754 |
+
wp_media_frame = window.wp.media({
|
755 |
+
library: {
|
756 |
+
type: 'image'
|
757 |
+
},
|
758 |
+
frame: 'post',
|
759 |
+
state: 'gallery',
|
760 |
+
multiple: true
|
761 |
+
});
|
762 |
+
|
763 |
+
wp_media_frame.open();
|
764 |
+
|
765 |
+
} else {
|
766 |
+
|
767 |
+
wp_media_frame = window.wp.media.gallery.edit( '[gallery ids="'+ ids +'"]' );
|
768 |
+
|
769 |
+
if ( what === 'add' ) {
|
770 |
+
wp_media_frame.setState('gallery-library');
|
771 |
+
}
|
772 |
+
|
773 |
+
}
|
774 |
+
|
775 |
+
// Media Update
|
776 |
+
wp_media_frame.on( 'update', function( selection ) {
|
777 |
+
|
778 |
+
$list.empty();
|
779 |
+
|
780 |
+
var selectedIds = selection.models.map( function( attachment ) {
|
781 |
+
|
782 |
+
var item = attachment.toJSON();
|
783 |
+
var thumb = ( item.sizes && item.sizes.thumbnail && item.sizes.thumbnail.url ) ? item.sizes.thumbnail.url : item.url;
|
784 |
+
|
785 |
+
$list.append('<li><img src="'+ thumb +'"></li>');
|
786 |
+
|
787 |
+
return item.id;
|
788 |
+
|
789 |
+
});
|
790 |
+
|
791 |
+
$input.val( selectedIds.join( ',' ) ).trigger('change');
|
792 |
+
$clear.removeClass('hidden');
|
793 |
+
$edit.removeClass('hidden');
|
794 |
+
|
795 |
+
});
|
796 |
+
|
797 |
+
});
|
798 |
+
|
799 |
+
$clear.on('click', function( e ) {
|
800 |
+
e.preventDefault();
|
801 |
+
$list.empty();
|
802 |
+
$input.val('').trigger('change');
|
803 |
+
$clear.addClass('hidden');
|
804 |
+
$edit.addClass('hidden');
|
805 |
+
});
|
806 |
+
|
807 |
+
});
|
808 |
+
|
809 |
+
};
|
810 |
+
|
811 |
+
//
|
812 |
+
// Field: group
|
813 |
+
//
|
814 |
+
$.fn.csf_field_group = function() {
|
815 |
+
return this.each( function() {
|
816 |
+
|
817 |
+
var $this = $(this),
|
818 |
+
$fieldset = $this.children('.csf-fieldset'),
|
819 |
+
$group = $fieldset.length ? $fieldset : $this,
|
820 |
+
$wrapper = $group.children('.csf-cloneable-wrapper'),
|
821 |
+
$hidden = $group.children('.csf-cloneable-hidden'),
|
822 |
+
$max = $group.children('.csf-cloneable-max'),
|
823 |
+
$min = $group.children('.csf-cloneable-min'),
|
824 |
+
title_by = $wrapper.data('title-by'),
|
825 |
+
title_prefix = $wrapper.data('title-by-prefix'),
|
826 |
+
field_id = $wrapper.data('field-id'),
|
827 |
+
is_number = Boolean( Number( $wrapper.data('title-number') ) ),
|
828 |
+
max = parseInt( $wrapper.data('max') ),
|
829 |
+
min = parseInt( $wrapper.data('min') );
|
830 |
+
|
831 |
+
// clear accordion arrows if multi-instance
|
832 |
+
if ( $wrapper.hasClass('ui-accordion') ) {
|
833 |
+
$wrapper.find('.ui-accordion-header-icon').remove();
|
834 |
+
}
|
835 |
+
|
836 |
+
var update_title_numbers = function( $selector ) {
|
837 |
+
$selector.find('.csf-cloneable-title-number').each( function( index ) {
|
838 |
+
$(this).html( ( $(this).closest('.csf-cloneable-item').index()+1 ) + '.' );
|
839 |
+
});
|
840 |
+
};
|
841 |
+
|
842 |
+
$wrapper.accordion({
|
843 |
+
header: '> .csf-cloneable-item > .csf-cloneable-title',
|
844 |
+
collapsible : true,
|
845 |
+
active: false,
|
846 |
+
animate: false,
|
847 |
+
heightStyle: 'content',
|
848 |
+
icons: {
|
849 |
+
'header': 'csf-cloneable-header-icon fas fa-angle-right',
|
850 |
+
'activeHeader': 'csf-cloneable-header-icon fas fa-angle-down'
|
851 |
+
},
|
852 |
+
activate: function( event, ui ) {
|
853 |
+
|
854 |
+
var $panel = ui.newPanel;
|
855 |
+
var $header = ui.newHeader;
|
856 |
+
|
857 |
+
if ( $panel.length && !$panel.data( 'opened' ) ) {
|
858 |
+
|
859 |
+
var $title = $header.find('.csf-cloneable-value');
|
860 |
+
var inputs = [];
|
861 |
+
|
862 |
+
$.each(title_by, function( key, title_key ) {
|
863 |
+
inputs.push($panel.find( '[data-depend-id="'+ title_key +'"]' ));
|
864 |
+
});
|
865 |
+
|
866 |
+
$.each(inputs, function( key, $input ) {
|
867 |
+
|
868 |
+
$input.on('change keyup csf.keyup', function() {
|
869 |
+
|
870 |
+
var titles = [];
|
871 |
+
|
872 |
+
$.each(inputs, function( key, $input ) {
|
873 |
+
|
874 |
+
var input_value = $input.val();
|
875 |
+
|
876 |
+
if ( input_value ) {
|
877 |
+
titles.push( input_value );
|
878 |
+
}
|
879 |
+
|
880 |
+
});
|
881 |
+
|
882 |
+
if ( titles.length ) {
|
883 |
+
$title.text( titles.join( title_prefix ) );
|
884 |
+
}
|
885 |
+
|
886 |
+
}).trigger('csf.keyup');
|
887 |
+
|
888 |
+
});
|
889 |
+
|
890 |
+
$panel.csf_reload_script();
|
891 |
+
$panel.data( 'opened', true );
|
892 |
+
$panel.data( 'retry', false );
|
893 |
+
|
894 |
+
} else if ( $panel.data( 'retry' ) ) {
|
895 |
+
|
896 |
+
$panel.csf_reload_script_retry();
|
897 |
+
$panel.data( 'retry', false );
|
898 |
+
|
899 |
+
}
|
900 |
+
|
901 |
+
}
|
902 |
+
});
|
903 |
+
|
904 |
+
$wrapper.sortable({
|
905 |
+
axis: 'y',
|
906 |
+
handle: '.csf-cloneable-title,.csf-cloneable-sort',
|
907 |
+
helper: 'original',
|
908 |
+
cursor: 'move',
|
909 |
+
placeholder: 'widget-placeholder',
|
910 |
+
start: function( event, ui ) {
|
911 |
+
|
912 |
+
$wrapper.accordion({ active:false });
|
913 |
+
$wrapper.sortable('refreshPositions');
|
914 |
+
ui.item.children('.csf-cloneable-content').data('retry', true);
|
915 |
+
|
916 |
+
},
|
917 |
+
update: function( event, ui ) {
|
918 |
+
|
919 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-cloneable-item'), field_id );
|
920 |
+
$wrapper.csf_customizer_refresh();
|
921 |
+
|
922 |
+
if ( is_number ) {
|
923 |
+
update_title_numbers($wrapper);
|
924 |
+
}
|
925 |
+
|
926 |
+
},
|
927 |
+
});
|
928 |
+
|
929 |
+
$group.children('.csf-cloneable-add').on('click', function( e ) {
|
930 |
+
|
931 |
+
e.preventDefault();
|
932 |
+
|
933 |
+
var count = $wrapper.children('.csf-cloneable-item').length;
|
934 |
+
|
935 |
+
$min.hide();
|
936 |
+
|
937 |
+
if ( max && (count+1) > max ) {
|
938 |
+
$max.show();
|
939 |
+
return;
|
940 |
+
}
|
941 |
+
|
942 |
+
var $cloned_item = $hidden.csf_clone(true);
|
943 |
+
|
944 |
+
$cloned_item.removeClass('csf-cloneable-hidden');
|
945 |
+
|
946 |
+
$cloned_item.find(':input[name!="_pseudo"]').each( function() {
|
947 |
+
this.name = this.name.replace( '___', '' ).replace( field_id +'[0]', field_id +'['+ count +']' );
|
948 |
+
});
|
949 |
+
|
950 |
+
$wrapper.append($cloned_item);
|
951 |
+
$wrapper.accordion('refresh');
|
952 |
+
$wrapper.accordion({active: count});
|
953 |
+
$wrapper.csf_customizer_refresh();
|
954 |
+
$wrapper.csf_customizer_listen({closest: true});
|
955 |
+
|
956 |
+
if ( is_number ) {
|
957 |
+
update_title_numbers($wrapper);
|
958 |
+
}
|
959 |
+
|
960 |
+
});
|
961 |
+
|
962 |
+
var event_clone = function( e ) {
|
963 |
+
|
964 |
+
e.preventDefault();
|
965 |
+
|
966 |
+
var count = $wrapper.children('.csf-cloneable-item').length;
|
967 |
+
|
968 |
+
$min.hide();
|
969 |
+
|
970 |
+
if ( max && (count+1) > max ) {
|
971 |
+
$max.show();
|
972 |
+
return;
|
973 |
+
}
|
974 |
+
|
975 |
+
var $this = $(this),
|
976 |
+
$parent = $this.parent().parent(),
|
977 |
+
$cloned_helper = $parent.children('.csf-cloneable-helper').csf_clone(true),
|
978 |
+
$cloned_title = $parent.children('.csf-cloneable-title').csf_clone(),
|
979 |
+
$cloned_content = $parent.children('.csf-cloneable-content').csf_clone(),
|
980 |
+
$cloned_item = $('<div class="csf-cloneable-item" />');
|
981 |
+
|
982 |
+
$cloned_item.append($cloned_helper);
|
983 |
+
$cloned_item.append($cloned_title);
|
984 |
+
$cloned_item.append($cloned_content);
|
985 |
+
|
986 |
+
$wrapper.children().eq($parent.index()).after($cloned_item);
|
987 |
+
|
988 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-cloneable-item'), field_id );
|
989 |
+
|
990 |
+
$wrapper.accordion('refresh');
|
991 |
+
$wrapper.csf_customizer_refresh();
|
992 |
+
$wrapper.csf_customizer_listen({closest: true});
|
993 |
+
|
994 |
+
if ( is_number ) {
|
995 |
+
update_title_numbers($wrapper);
|
996 |
+
}
|
997 |
+
|
998 |
+
};
|
999 |
+
|
1000 |
+
$wrapper.children('.csf-cloneable-item').children('.csf-cloneable-helper').on('click', '.csf-cloneable-clone', event_clone);
|
1001 |
+
$group.children('.csf-cloneable-hidden').children('.csf-cloneable-helper').on('click', '.csf-cloneable-clone', event_clone);
|
1002 |
+
|
1003 |
+
var event_remove = function( e ) {
|
1004 |
+
|
1005 |
+
e.preventDefault();
|
1006 |
+
|
1007 |
+
var count = $wrapper.children('.csf-cloneable-item').length;
|
1008 |
+
|
1009 |
+
$max.hide();
|
1010 |
+
$min.hide();
|
1011 |
+
|
1012 |
+
if ( min && (count-1) < min ) {
|
1013 |
+
$min.show();
|
1014 |
+
return;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
$(this).closest('.csf-cloneable-item').remove();
|
1018 |
+
|
1019 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-cloneable-item'), field_id );
|
1020 |
+
|
1021 |
+
$wrapper.csf_customizer_refresh();
|
1022 |
+
|
1023 |
+
if ( is_number ) {
|
1024 |
+
update_title_numbers($wrapper);
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
};
|
1028 |
+
|
1029 |
+
$wrapper.children('.csf-cloneable-item').children('.csf-cloneable-helper').on('click', '.csf-cloneable-remove', event_remove);
|
1030 |
+
$group.children('.csf-cloneable-hidden').children('.csf-cloneable-helper').on('click', '.csf-cloneable-remove', event_remove);
|
1031 |
+
|
1032 |
+
});
|
1033 |
+
};
|
1034 |
+
|
1035 |
+
//
|
1036 |
+
// Field: icon
|
1037 |
+
//
|
1038 |
+
$.fn.csf_field_icon = function() {
|
1039 |
+
return this.each( function() {
|
1040 |
+
|
1041 |
+
var $this = $(this);
|
1042 |
+
|
1043 |
+
$this.on('click', '.csf-icon-add', function( e ) {
|
1044 |
+
|
1045 |
+
e.preventDefault();
|
1046 |
+
|
1047 |
+
var $button = $(this);
|
1048 |
+
var $modal = $('#csf-modal-icon');
|
1049 |
+
|
1050 |
+
$modal.removeClass('hidden');
|
1051 |
+
|
1052 |
+
CSF.vars.$icon_target = $this;
|
1053 |
+
|
1054 |
+
if ( !CSF.vars.icon_modal_loaded ) {
|
1055 |
+
|
1056 |
+
$modal.find('.csf-modal-loading').show();
|
1057 |
+
|
1058 |
+
window.wp.ajax.post( 'csf-get-icons', {
|
1059 |
+
nonce: $button.data('nonce')
|
1060 |
+
}).done( function( response ) {
|
1061 |
+
|
1062 |
+
$modal.find('.csf-modal-loading').hide();
|
1063 |
+
|
1064 |
+
CSF.vars.icon_modal_loaded = true;
|
1065 |
+
|
1066 |
+
var $load = $modal.find('.csf-modal-load').html( response.content );
|
1067 |
+
|
1068 |
+
$load.on('click', 'i', function( e ) {
|
1069 |
+
|
1070 |
+
e.preventDefault();
|
1071 |
+
|
1072 |
+
var icon = $(this).attr('title');
|
1073 |
+
|
1074 |
+
CSF.vars.$icon_target.find('.csf-icon-preview i').removeAttr('class').addClass(icon);
|
1075 |
+
CSF.vars.$icon_target.find('.csf-icon-preview').removeClass('hidden');
|
1076 |
+
CSF.vars.$icon_target.find('.csf-icon-remove').removeClass('hidden');
|
1077 |
+
CSF.vars.$icon_target.find('input').val(icon).trigger('change');
|
1078 |
+
|
1079 |
+
$modal.addClass('hidden');
|
1080 |
+
|
1081 |
+
});
|
1082 |
+
|
1083 |
+
$modal.on('change keyup', '.csf-icon-search', function() {
|
1084 |
+
|
1085 |
+
var value = $(this).val(),
|
1086 |
+
$icons = $load.find('i');
|
1087 |
+
|
1088 |
+
$icons.each( function() {
|
1089 |
+
|
1090 |
+
var $elem = $(this);
|
1091 |
+
|
1092 |
+
if ( $elem.attr('title').search( new RegExp( value, 'i' ) ) < 0 ) {
|
1093 |
+
$elem.hide();
|
1094 |
+
} else {
|
1095 |
+
$elem.show();
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
});
|
1099 |
+
|
1100 |
+
});
|
1101 |
+
|
1102 |
+
$modal.on('click', '.csf-modal-close, .csf-modal-overlay', function() {
|
1103 |
+
$modal.addClass('hidden');
|
1104 |
+
});
|
1105 |
+
|
1106 |
+
}).fail( function( response ) {
|
1107 |
+
$modal.find('.csf-modal-loading').hide();
|
1108 |
+
$modal.find('.csf-modal-load').html( response.error );
|
1109 |
+
$modal.on('click', function() {
|
1110 |
+
$modal.addClass('hidden');
|
1111 |
+
});
|
1112 |
+
});
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
});
|
1116 |
+
|
1117 |
+
$this.on('click', '.csf-icon-remove', function( e ) {
|
1118 |
+
e.preventDefault();
|
1119 |
+
$this.find('.csf-icon-preview').addClass('hidden');
|
1120 |
+
$this.find('input').val('').trigger('change');
|
1121 |
+
$(this).addClass('hidden');
|
1122 |
+
});
|
1123 |
+
|
1124 |
+
});
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
//
|
1128 |
+
// Field: map
|
1129 |
+
//
|
1130 |
+
$.fn.csf_field_map = function() {
|
1131 |
+
return this.each( function() {
|
1132 |
+
|
1133 |
+
if ( typeof L === 'undefined' ) { return; }
|
1134 |
+
|
1135 |
+
var $this = $(this),
|
1136 |
+
$map = $this.find('.csf--map-osm'),
|
1137 |
+
$search_input = $this.find('.csf--map-search input'),
|
1138 |
+
$latitude = $this.find('.csf--latitude'),
|
1139 |
+
$longitude = $this.find('.csf--longitude'),
|
1140 |
+
$zoom = $this.find('.csf--zoom'),
|
1141 |
+
map_data = $map.data( 'map' );
|
1142 |
+
|
1143 |
+
var mapInit = L.map( $map.get(0), map_data);
|
1144 |
+
|
1145 |
+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
1146 |
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
1147 |
+
}).addTo(mapInit);
|
1148 |
+
|
1149 |
+
var mapMarker = L.marker(map_data.center,{draggable: true}).addTo(mapInit);
|
1150 |
+
|
1151 |
+
var update_latlng = function( data ) {
|
1152 |
+
$latitude.val( data.lat );
|
1153 |
+
$longitude.val( data.lng );
|
1154 |
+
$zoom.val( mapInit.getZoom() );
|
1155 |
+
};
|
1156 |
+
|
1157 |
+
mapInit.on( 'click', function ( data ) {
|
1158 |
+
mapMarker.setLatLng( data.latlng );
|
1159 |
+
update_latlng( data.latlng );
|
1160 |
+
});
|
1161 |
+
|
1162 |
+
mapInit.on( 'zoom', function () {
|
1163 |
+
update_latlng( mapMarker.getLatLng() );
|
1164 |
+
});
|
1165 |
+
|
1166 |
+
mapMarker.on( 'drag', function () {
|
1167 |
+
update_latlng( mapMarker.getLatLng() );
|
1168 |
+
});
|
1169 |
+
|
1170 |
+
if ( ! $search_input.length ) {
|
1171 |
+
$search_input = $( '[data-depend-id="'+ $this.find('.csf--address-field').data( 'address-field' ) +'"]' );
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
var cache = {};
|
1175 |
+
|
1176 |
+
$search_input.autocomplete({
|
1177 |
+
source: function ( request, response ) {
|
1178 |
+
|
1179 |
+
var term = request.term;
|
1180 |
+
|
1181 |
+
if ( term in cache ) {
|
1182 |
+
response( cache[term] );
|
1183 |
+
return;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
$.get( 'https://nominatim.openstreetmap.org/search', {
|
1187 |
+
format: 'json',
|
1188 |
+
q: term,
|
1189 |
+
}, function( results ) {
|
1190 |
+
|
1191 |
+
var data;
|
1192 |
+
|
1193 |
+
if ( results.length ) {
|
1194 |
+
data = results.map( function( item ) {
|
1195 |
+
return {
|
1196 |
+
value: item.display_name,
|
1197 |
+
label: item.display_name,
|
1198 |
+
lat: item.lat,
|
1199 |
+
lon: item.lon
|
1200 |
+
};
|
1201 |
+
}, 'json');
|
1202 |
+
} else {
|
1203 |
+
data = [{
|
1204 |
+
value: 'no-data',
|
1205 |
+
label: 'No Results.'
|
1206 |
+
}];
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
cache[term] = data;
|
1210 |
+
response(data);
|
1211 |
+
|
1212 |
+
});
|
1213 |
+
|
1214 |
+
},
|
1215 |
+
select: function ( event, ui ) {
|
1216 |
+
|
1217 |
+
if ( ui.item.value === 'no-data' ) { return false; }
|
1218 |
+
|
1219 |
+
var latLng = L.latLng( ui.item.lat, ui.item.lon );
|
1220 |
+
|
1221 |
+
mapInit.panTo( latLng );
|
1222 |
+
mapMarker.setLatLng( latLng );
|
1223 |
+
update_latlng( latLng );
|
1224 |
+
|
1225 |
+
},
|
1226 |
+
create: function (event, ui) {
|
1227 |
+
$(this).autocomplete('widget').addClass('csf-map-ui-autocomplate');
|
1228 |
+
}
|
1229 |
+
});
|
1230 |
+
|
1231 |
+
var input_update_latlng = function() {
|
1232 |
+
|
1233 |
+
var latLng = L.latLng( $latitude.val(), $longitude.val() );
|
1234 |
+
|
1235 |
+
mapInit.panTo( latLng );
|
1236 |
+
mapMarker.setLatLng( latLng );
|
1237 |
+
|
1238 |
+
};
|
1239 |
+
|
1240 |
+
$latitude.on('change', input_update_latlng );
|
1241 |
+
$longitude.on('change', input_update_latlng );
|
1242 |
+
|
1243 |
+
});
|
1244 |
+
};
|
1245 |
+
|
1246 |
+
//
|
1247 |
+
// Field: link
|
1248 |
+
//
|
1249 |
+
$.fn.csf_field_link = function() {
|
1250 |
+
return this.each( function() {
|
1251 |
+
|
1252 |
+
var $this = $(this),
|
1253 |
+
$link = $this.find('.csf--link'),
|
1254 |
+
$add = $this.find('.csf--add'),
|
1255 |
+
$edit = $this.find('.csf--edit'),
|
1256 |
+
$remove = $this.find('.csf--remove'),
|
1257 |
+
$result = $this.find('.csf--result'),
|
1258 |
+
uniqid = CSF.helper.uid('csf-wplink-textarea-');
|
1259 |
+
|
1260 |
+
$add.on('click', function( e ) {
|
1261 |
+
|
1262 |
+
e.preventDefault();
|
1263 |
+
|
1264 |
+
window.wpLink.open(uniqid);
|
1265 |
+
|
1266 |
+
});
|
1267 |
+
|
1268 |
+
$edit.on('click', function( e ) {
|
1269 |
+
|
1270 |
+
e.preventDefault();
|
1271 |
+
|
1272 |
+
$add.trigger('click');
|
1273 |
+
|
1274 |
+
$('#wp-link-url').val($this.find('.csf--url').val());
|
1275 |
+
$('#wp-link-text').val($this.find('.csf--text').val());
|
1276 |
+
$('#wp-link-target').prop('checked', ($this.find('.csf--target').val() === '_blank'));
|
1277 |
+
|
1278 |
+
});
|
1279 |
+
|
1280 |
+
$remove.on('click', function( e ) {
|
1281 |
+
|
1282 |
+
e.preventDefault();
|
1283 |
+
|
1284 |
+
$this.find('.csf--url').val('').trigger('change');
|
1285 |
+
$this.find('.csf--text').val('');
|
1286 |
+
$this.find('.csf--target').val('');
|
1287 |
+
|
1288 |
+
$add.removeClass('hidden');
|
1289 |
+
$edit.addClass('hidden');
|
1290 |
+
$remove.addClass('hidden');
|
1291 |
+
$result.parent().addClass('hidden');
|
1292 |
+
|
1293 |
+
});
|
1294 |
+
|
1295 |
+
$link.attr('id', uniqid).on('change', function() {
|
1296 |
+
|
1297 |
+
var atts = window.wpLink.getAttrs(),
|
1298 |
+
href = atts.href,
|
1299 |
+
text = $('#wp-link-text').val(),
|
1300 |
+
target = ( atts.target ) ? atts.target : '';
|
1301 |
+
|
1302 |
+
$this.find('.csf--url').val(href).trigger('change');
|
1303 |
+
$this.find('.csf--text').val(text);
|
1304 |
+
$this.find('.csf--target').val(target);
|
1305 |
+
|
1306 |
+
$result.html('{url:"'+href+'", text:"'+text+'", target:"'+target+'"}');
|
1307 |
+
|
1308 |
+
$add.addClass('hidden');
|
1309 |
+
$edit.removeClass('hidden');
|
1310 |
+
$remove.removeClass('hidden');
|
1311 |
+
$result.parent().removeClass('hidden');
|
1312 |
+
|
1313 |
+
});
|
1314 |
+
|
1315 |
+
});
|
1316 |
+
|
1317 |
+
};
|
1318 |
+
|
1319 |
+
//
|
1320 |
+
// Field: media
|
1321 |
+
//
|
1322 |
+
$.fn.csf_field_media = function() {
|
1323 |
+
return this.each( function() {
|
1324 |
+
|
1325 |
+
var $this = $(this),
|
1326 |
+
$upload_button = $this.find('.csf--button'),
|
1327 |
+
$remove_button = $this.find('.csf--remove'),
|
1328 |
+
$library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
|
1329 |
+
$auto_attributes = ( $this.hasClass('csf-assign-field-background') ) ? $this.closest('.csf-field-background').find('.csf--auto-attributes') : false,
|
1330 |
+
wp_media_frame;
|
1331 |
+
|
1332 |
+
$upload_button.on('click', function( e ) {
|
1333 |
+
|
1334 |
+
e.preventDefault();
|
1335 |
+
|
1336 |
+
if ( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) {
|
1337 |
+
return;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
if ( wp_media_frame ) {
|
1341 |
+
wp_media_frame.open();
|
1342 |
+
return;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
wp_media_frame = window.wp.media({
|
1346 |
+
library: {
|
1347 |
+
type: $library
|
1348 |
+
}
|
1349 |
+
});
|
1350 |
+
|
1351 |
+
wp_media_frame.on( 'select', function() {
|
1352 |
+
|
1353 |
+
var thumbnail;
|
1354 |
+
var attributes = wp_media_frame.state().get('selection').first().attributes;
|
1355 |
+
var preview_size = $upload_button.data('preview-size') || 'thumbnail';
|
1356 |
+
|
1357 |
+
if ( $library.length && $library.indexOf(attributes.subtype) === -1 && $library.indexOf(attributes.type) === -1 ) {
|
1358 |
+
return;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
$this.find('.csf--id').val( attributes.id );
|
1362 |
+
$this.find('.csf--width').val( attributes.width );
|
1363 |
+
$this.find('.csf--height').val( attributes.height );
|
1364 |
+
$this.find('.csf--alt').val( attributes.alt );
|
1365 |
+
$this.find('.csf--title').val( attributes.title );
|
1366 |
+
$this.find('.csf--description').val( attributes.description );
|
1367 |
+
|
1368 |
+
if ( typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.thumbnail !== 'undefined' && preview_size === 'thumbnail' ) {
|
1369 |
+
thumbnail = attributes.sizes.thumbnail.url;
|
1370 |
+
} else if ( typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.full !== 'undefined' ) {
|
1371 |
+
thumbnail = attributes.sizes.full.url;
|
1372 |
+
} else if ( attributes.type === 'image' ) {
|
1373 |
+
thumbnail = attributes.url;
|
1374 |
+
} else {
|
1375 |
+
thumbnail = attributes.icon;
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
if ( $auto_attributes ) {
|
1379 |
+
$auto_attributes.removeClass('csf--attributes-hidden');
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
$remove_button.removeClass('hidden');
|
1383 |
+
|
1384 |
+
$this.find('.csf--preview').removeClass('hidden');
|
1385 |
+
$this.find('.csf--src').attr('src', thumbnail);
|
1386 |
+
$this.find('.csf--thumbnail').val( thumbnail );
|
1387 |
+
$this.find('.csf--url').val( attributes.url ).trigger('change');
|
1388 |
+
|
1389 |
+
});
|
1390 |
+
|
1391 |
+
wp_media_frame.open();
|
1392 |
+
|
1393 |
+
});
|
1394 |
+
|
1395 |
+
$remove_button.on('click', function( e ) {
|
1396 |
+
|
1397 |
+
e.preventDefault();
|
1398 |
+
|
1399 |
+
if ( $auto_attributes ) {
|
1400 |
+
$auto_attributes.addClass('csf--attributes-hidden');
|
1401 |
+
}
|
1402 |
+
|
1403 |
+
$remove_button.addClass('hidden');
|
1404 |
+
$this.find('input').val('');
|
1405 |
+
$this.find('.csf--preview').addClass('hidden');
|
1406 |
+
$this.find('.csf--url').trigger('change');
|
1407 |
+
|
1408 |
+
});
|
1409 |
+
|
1410 |
+
});
|
1411 |
+
|
1412 |
+
};
|
1413 |
+
|
1414 |
+
//
|
1415 |
+
// Field: repeater
|
1416 |
+
//
|
1417 |
+
$.fn.csf_field_repeater = function() {
|
1418 |
+
return this.each( function() {
|
1419 |
+
|
1420 |
+
var $this = $(this),
|
1421 |
+
$fieldset = $this.children('.csf-fieldset'),
|
1422 |
+
$repeater = $fieldset.length ? $fieldset : $this,
|
1423 |
+
$wrapper = $repeater.children('.csf-repeater-wrapper'),
|
1424 |
+
$hidden = $repeater.children('.csf-repeater-hidden'),
|
1425 |
+
$max = $repeater.children('.csf-repeater-max'),
|
1426 |
+
$min = $repeater.children('.csf-repeater-min'),
|
1427 |
+
field_id = $wrapper.data('field-id'),
|
1428 |
+
max = parseInt( $wrapper.data('max') ),
|
1429 |
+
min = parseInt( $wrapper.data('min') );
|
1430 |
+
|
1431 |
+
$wrapper.children('.csf-repeater-item').children('.csf-repeater-content').csf_reload_script();
|
1432 |
+
|
1433 |
+
$wrapper.sortable({
|
1434 |
+
axis: 'y',
|
1435 |
+
handle: '.csf-repeater-sort',
|
1436 |
+
helper: 'original',
|
1437 |
+
cursor: 'move',
|
1438 |
+
placeholder: 'widget-placeholder',
|
1439 |
+
update: function( event, ui ) {
|
1440 |
+
|
1441 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-repeater-item'), field_id );
|
1442 |
+
$wrapper.csf_customizer_refresh();
|
1443 |
+
ui.item.csf_reload_script_retry();
|
1444 |
+
|
1445 |
+
}
|
1446 |
+
});
|
1447 |
+
|
1448 |
+
$repeater.children('.csf-repeater-add').on('click', function( e ) {
|
1449 |
+
|
1450 |
+
e.preventDefault();
|
1451 |
+
|
1452 |
+
var count = $wrapper.children('.csf-repeater-item').length;
|
1453 |
+
|
1454 |
+
$min.hide();
|
1455 |
+
|
1456 |
+
if ( max && (count+1) > max ) {
|
1457 |
+
$max.show();
|
1458 |
+
return;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
var $cloned_item = $hidden.csf_clone(true);
|
1462 |
+
|
1463 |
+
$cloned_item.removeClass('csf-repeater-hidden');
|
1464 |
+
|
1465 |
+
$cloned_item.find(':input[name!="_pseudo"]').each( function() {
|
1466 |
+
this.name = this.name.replace( '___', '' ).replace( field_id +'[0]', field_id +'['+ count +']' );
|
1467 |
+
});
|
1468 |
+
|
1469 |
+
$wrapper.append($cloned_item);
|
1470 |
+
$cloned_item.children('.csf-repeater-content').csf_reload_script();
|
1471 |
+
$wrapper.csf_customizer_refresh();
|
1472 |
+
$wrapper.csf_customizer_listen({closest: true});
|
1473 |
+
|
1474 |
+
});
|
1475 |
+
|
1476 |
+
var event_clone = function( e ) {
|
1477 |
+
|
1478 |
+
e.preventDefault();
|
1479 |
+
|
1480 |
+
var count = $wrapper.children('.csf-repeater-item').length;
|
1481 |
+
|
1482 |
+
$min.hide();
|
1483 |
+
|
1484 |
+
if ( max && (count+1) > max ) {
|
1485 |
+
$max.show();
|
1486 |
+
return;
|
1487 |
+
}
|
1488 |
+
|
1489 |
+
var $this = $(this),
|
1490 |
+
$parent = $this.parent().parent().parent(),
|
1491 |
+
$cloned_content = $parent.children('.csf-repeater-content').csf_clone(),
|
1492 |
+
$cloned_helper = $parent.children('.csf-repeater-helper').csf_clone(true),
|
1493 |
+
$cloned_item = $('<div class="csf-repeater-item" />');
|
1494 |
+
|
1495 |
+
$cloned_item.append($cloned_content);
|
1496 |
+
$cloned_item.append($cloned_helper);
|
1497 |
+
|
1498 |
+
$wrapper.children().eq($parent.index()).after($cloned_item);
|
1499 |
+
|
1500 |
+
$cloned_item.children('.csf-repeater-content').csf_reload_script();
|
1501 |
+
|
1502 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-repeater-item'), field_id );
|
1503 |
+
|
1504 |
+
$wrapper.csf_customizer_refresh();
|
1505 |
+
$wrapper.csf_customizer_listen({closest: true});
|
1506 |
+
|
1507 |
+
};
|
1508 |
+
|
1509 |
+
$wrapper.children('.csf-repeater-item').children('.csf-repeater-helper').on('click', '.csf-repeater-clone', event_clone);
|
1510 |
+
$repeater.children('.csf-repeater-hidden').children('.csf-repeater-helper').on('click', '.csf-repeater-clone', event_clone);
|
1511 |
+
|
1512 |
+
var event_remove = function( e ) {
|
1513 |
+
|
1514 |
+
e.preventDefault();
|
1515 |
+
|
1516 |
+
var count = $wrapper.children('.csf-repeater-item').length;
|
1517 |
+
|
1518 |
+
$max.hide();
|
1519 |
+
$min.hide();
|
1520 |
+
|
1521 |
+
if ( min && (count-1) < min ) {
|
1522 |
+
$min.show();
|
1523 |
+
return;
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
$(this).closest('.csf-repeater-item').remove();
|
1527 |
+
|
1528 |
+
CSF.helper.name_nested_replace( $wrapper.children('.csf-repeater-item'), field_id );
|
1529 |
+
|
1530 |
+
$wrapper.csf_customizer_refresh();
|
1531 |
+
|
1532 |
+
};
|
1533 |
+
|
1534 |
+
$wrapper.children('.csf-repeater-item').children('.csf-repeater-helper').on('click', '.csf-repeater-remove', event_remove);
|
1535 |
+
$repeater.children('.csf-repeater-hidden').children('.csf-repeater-helper').on('click', '.csf-repeater-remove', event_remove);
|
1536 |
+
|
1537 |
+
});
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
//
|
1541 |
+
// Field: slider
|
1542 |
+
//
|
1543 |
+
$.fn.csf_field_slider = function() {
|
1544 |
+
return this.each( function() {
|
1545 |
+
|
1546 |
+
var $this = $(this),
|
1547 |
+
$input = $this.find('input'),
|
1548 |
+
$slider = $this.find('.csf-slider-ui'),
|
1549 |
+
data = $input.data(),
|
1550 |
+
value = $input.val() || 0;
|
1551 |
+
|
1552 |
+
if ( $slider.hasClass('ui-slider') ) {
|
1553 |
+
$slider.empty();
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
$slider.slider({
|
1557 |
+
range: 'min',
|
1558 |
+
value: value,
|
1559 |
+
min: data.min || 0,
|
1560 |
+
max: data.max || 100,
|
1561 |
+
step: data.step || 1,
|
1562 |
+
slide: function( e, o ) {
|
1563 |
+
$input.val( o.value ).trigger('change');
|
1564 |
+
}
|
1565 |
+
});
|
1566 |
+
|
1567 |
+
$input.on('keyup', function() {
|
1568 |
+
$slider.slider('value', $input.val());
|
1569 |
+
});
|
1570 |
+
|
1571 |
+
});
|
1572 |
+
};
|
1573 |
+
|
1574 |
+
//
|
1575 |
+
// Field: sortable
|
1576 |
+
//
|
1577 |
+
$.fn.csf_field_sortable = function() {
|
1578 |
+
return this.each( function() {
|
1579 |
+
|
1580 |
+
var $sortable = $(this).find('.csf-sortable');
|
1581 |
+
|
1582 |
+
$sortable.sortable({
|
1583 |
+
axis: 'y',
|
1584 |
+
helper: 'original',
|
1585 |
+
cursor: 'move',
|
1586 |
+
placeholder: 'widget-placeholder',
|
1587 |
+
update: function( event, ui ) {
|
1588 |
+
$sortable.csf_customizer_refresh();
|
1589 |
+
}
|
1590 |
+
});
|
1591 |
+
|
1592 |
+
$sortable.find('.csf-sortable-content').csf_reload_script();
|
1593 |
+
|
1594 |
+
});
|
1595 |
+
};
|
1596 |
+
|
1597 |
+
//
|
1598 |
+
// Field: sorter
|
1599 |
+
//
|
1600 |
+
$.fn.csf_field_sorter = function() {
|
1601 |
+
return this.each( function() {
|
1602 |
+
|
1603 |
+
var $this = $(this),
|
1604 |
+
$enabled = $this.find('.csf-enabled'),
|
1605 |
+
$has_disabled = $this.find('.csf-disabled'),
|
1606 |
+
$disabled = ( $has_disabled.length ) ? $has_disabled : false;
|
1607 |
+
|
1608 |
+
$enabled.sortable({
|
1609 |
+
connectWith: $disabled,
|
1610 |
+
placeholder: 'ui-sortable-placeholder',
|
1611 |
+
update: function( event, ui ) {
|
1612 |
+
|
1613 |
+
var $el = ui.item.find('input');
|
1614 |
+
|
1615 |
+
if ( ui.item.parent().hasClass('csf-enabled') ) {
|
1616 |
+
$el.attr('name', $el.attr('name').replace('disabled', 'enabled'));
|
1617 |
+
} else {
|
1618 |
+
$el.attr('name', $el.attr('name').replace('enabled', 'disabled'));
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
$this.csf_customizer_refresh();
|
1622 |
+
|
1623 |
+
}
|
1624 |
+
});
|
1625 |
+
|
1626 |
+
if ( $disabled ) {
|
1627 |
+
|
1628 |
+
$disabled.sortable({
|
1629 |
+
connectWith: $enabled,
|
1630 |
+
placeholder: 'ui-sortable-placeholder',
|
1631 |
+
update: function( event, ui ) {
|
1632 |
+
$this.csf_customizer_refresh();
|
1633 |
+
}
|
1634 |
+
});
|
1635 |
+
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
});
|
1639 |
+
};
|
1640 |
+
|
1641 |
+
//
|
1642 |
+
// Field: spinner
|
1643 |
+
//
|
1644 |
+
$.fn.csf_field_spinner = function() {
|
1645 |
+
return this.each( function() {
|
1646 |
+
|
1647 |
+
var $this = $(this),
|
1648 |
+
$input = $this.find('input'),
|
1649 |
+
$inited = $this.find('.ui-button'),
|
1650 |
+
data = $input.data();
|
1651 |
+
|
1652 |
+
if ( $inited.length ) {
|
1653 |
+
$inited.remove();
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
$input.spinner({
|
1657 |
+
min: data.min || 0,
|
1658 |
+
max: data.max || 100,
|
1659 |
+
step: data.step || 1,
|
1660 |
+
create: function( event, ui ) {
|
1661 |
+
if ( data.unit ) {
|
1662 |
+
$input.after('<span class="ui-button csf--unit">'+ data.unit +'</span>');
|
1663 |
+
}
|
1664 |
+
},
|
1665 |
+
spin: function (event, ui ) {
|
1666 |
+
$input.val(ui.value).trigger('change');
|
1667 |
+
}
|
1668 |
+
});
|
1669 |
+
|
1670 |
+
});
|
1671 |
+
};
|
1672 |
+
|
1673 |
+
//
|
1674 |
+
// Field: switcher
|
1675 |
+
//
|
1676 |
+
$.fn.csf_field_switcher = function() {
|
1677 |
+
return this.each( function() {
|
1678 |
+
|
1679 |
+
var $switcher = $(this).find('.csf--switcher');
|
1680 |
+
|
1681 |
+
$switcher.on('click', function() {
|
1682 |
+
|
1683 |
+
var value = 0;
|
1684 |
+
var $input = $switcher.find('input');
|
1685 |
+
|
1686 |
+
if ( $switcher.hasClass('csf--active') ) {
|
1687 |
+
$switcher.removeClass('csf--active');
|
1688 |
+
} else {
|
1689 |
+
value = 1;
|
1690 |
+
$switcher.addClass('csf--active');
|
1691 |
+
}
|
1692 |
+
|
1693 |
+
$input.val(value).trigger('change');
|
1694 |
+
|
1695 |
+
});
|
1696 |
+
|
1697 |
+
});
|
1698 |
+
};
|
1699 |
+
|
1700 |
+
//
|
1701 |
+
// Field: tabbed
|
1702 |
+
//
|
1703 |
+
$.fn.csf_field_tabbed = function() {
|
1704 |
+
return this.each( function() {
|
1705 |
+
|
1706 |
+
var $this = $(this),
|
1707 |
+
$links = $this.find('.csf-tabbed-nav a'),
|
1708 |
+
$contents = $this.find('.csf-tabbed-content');
|
1709 |
+
|
1710 |
+
$contents.eq(0).csf_reload_script();
|
1711 |
+
|
1712 |
+
$links.on( 'click', function( e ) {
|
1713 |
+
|
1714 |
+
e.preventDefault();
|
1715 |
+
|
1716 |
+
var $link = $(this),
|
1717 |
+
index = $link.index(),
|
1718 |
+
$content = $contents.eq(index);
|
1719 |
+
|
1720 |
+
$link.addClass('csf-tabbed-active').siblings().removeClass('csf-tabbed-active');
|
1721 |
+
$content.csf_reload_script();
|
1722 |
+
$content.removeClass('hidden').siblings().addClass('hidden');
|
1723 |
+
|
1724 |
+
});
|
1725 |
+
|
1726 |
+
});
|
1727 |
+
};
|
1728 |
+
|
1729 |
+
//
|
1730 |
+
// Field: typography
|
1731 |
+
//
|
1732 |
+
$.fn.csf_field_typography = function() {
|
1733 |
+
return this.each(function () {
|
1734 |
+
|
1735 |
+
var base = this;
|
1736 |
+
var $this = $(this);
|
1737 |
+
var loaded_fonts = [];
|
1738 |
+
var webfonts = csf_typography_json.webfonts;
|
1739 |
+
var googlestyles = csf_typography_json.googlestyles;
|
1740 |
+
var defaultstyles = csf_typography_json.defaultstyles;
|
1741 |
+
|
1742 |
+
//
|
1743 |
+
//
|
1744 |
+
// Sanitize google font subset
|
1745 |
+
base.sanitize_subset = function( subset ) {
|
1746 |
+
subset = subset.replace('-ext', ' Extended');
|
1747 |
+
subset = subset.charAt(0).toUpperCase() + subset.slice(1);
|
1748 |
+
return subset;
|
1749 |
+
};
|
1750 |
+
|
1751 |
+
//
|
1752 |
+
//
|
1753 |
+
// Sanitize google font styles (weight and style)
|
1754 |
+
base.sanitize_style = function( style ) {
|
1755 |
+
return googlestyles[style] ? googlestyles[style] : style;
|
1756 |
+
};
|
1757 |
+
|
1758 |
+
//
|
1759 |
+
//
|
1760 |
+
// Load google font
|
1761 |
+
base.load_google_font = function( font_family, weight, style ) {
|
1762 |
+
|
1763 |
+
if ( font_family && typeof WebFont === 'object' ) {
|
1764 |
+
|
1765 |
+
weight = weight ? weight.replace('normal', '') : '';
|
1766 |
+
style = style ? style.replace('normal', '') : '';
|
1767 |
+
|
1768 |
+
if ( weight || style ) {
|
1769 |
+
font_family = font_family +':'+ weight + style;
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
if ( loaded_fonts.indexOf( font_family ) === -1 ) {
|
1773 |
+
WebFont.load({ google: { families: [font_family] } });
|
1774 |
+
}
|
1775 |
+
|
1776 |
+
loaded_fonts.push( font_family );
|
1777 |
+
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
};
|
1781 |
+
|
1782 |
+
//
|
1783 |
+
//
|
1784 |
+
// Append select options
|
1785 |
+
base.append_select_options = function( $select, options, condition, type, is_multi ) {
|
1786 |
+
|
1787 |
+
$select.find('option').not(':first').remove();
|
1788 |
+
|
1789 |
+
var opts = '';
|
1790 |
+
|
1791 |
+
$.each( options, function( key, value ) {
|
1792 |
+
|
1793 |
+
var selected;
|
1794 |
+
var name = value;
|
1795 |
+
|
1796 |
+
// is_multi
|
1797 |
+
if ( is_multi ) {
|
1798 |
+
selected = ( condition && condition.indexOf(value) !== -1 ) ? ' selected' : '';
|
1799 |
+
} else {
|
1800 |
+
selected = ( condition && condition === value ) ? ' selected' : '';
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
if ( type === 'subset' ) {
|
1804 |
+
name = base.sanitize_subset( value );
|
1805 |
+
} else if ( type === 'style' ){
|
1806 |
+
name = base.sanitize_style( value );
|
1807 |
+
}
|
1808 |
+
|
1809 |
+
opts += '<option value="'+ value +'"'+ selected +'>'+ name +'</option>';
|
1810 |
+
|
1811 |
+
});
|
1812 |
+
|
1813 |
+
$select.append(opts).trigger('csf.change').trigger('chosen:updated');
|
1814 |
+
|
1815 |
+
};
|
1816 |
+
|
1817 |
+
base.init = function () {
|
1818 |
+
|
1819 |
+
//
|
1820 |
+
//
|
1821 |
+
// Constants
|
1822 |
+
var selected_styles = [];
|
1823 |
+
var $typography = $this.find('.csf--typography');
|
1824 |
+
var $type = $this.find('.csf--type');
|
1825 |
+
var $styles = $this.find('.csf--block-font-style');
|
1826 |
+
var unit = $typography.data('unit');
|
1827 |
+
var line_height_unit = $typography.data('line-height-unit');
|
1828 |
+
var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
|
1829 |
+
|
1830 |
+
//
|
1831 |
+
//
|
1832 |
+
// Chosen init
|
1833 |
+
if ( $this.find('.csf--chosen').length ) {
|
1834 |
+
|
1835 |
+
var $chosen_selects = $this.find('select');
|
1836 |
+
|
1837 |
+
$chosen_selects.each( function() {
|
1838 |
+
|
1839 |
+
var $chosen_select = $(this),
|
1840 |
+
$chosen_inited = $chosen_select.parent().find('.chosen-container');
|
1841 |
+
|
1842 |
+
if ( $chosen_inited.length ) {
|
1843 |
+
$chosen_inited.remove();
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
$chosen_select.chosen({
|
1847 |
+
allow_single_deselect: true,
|
1848 |
+
disable_search_threshold: 15,
|
1849 |
+
width: '100%'
|
1850 |
+
});
|
1851 |
+
|
1852 |
+
});
|
1853 |
+
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
//
|
1857 |
+
//
|
1858 |
+
// Font family select
|
1859 |
+
var $font_family_select = $this.find('.csf--font-family');
|
1860 |
+
var first_font_family = $font_family_select.val();
|
1861 |
+
|
1862 |
+
// Clear default font family select options
|
1863 |
+
$font_family_select.find('option').not(':first-child').remove();
|
1864 |
+
|
1865 |
+
var opts = '';
|
1866 |
+
|
1867 |
+
$.each(webfonts, function( type, group ) {
|
1868 |
+
|
1869 |
+
// Check for exclude fonts
|
1870 |
+
if ( exclude_fonts && exclude_fonts.indexOf(type) !== -1 ) { return; }
|
1871 |
+
|
1872 |
+
opts += '<optgroup label="' + group.label + '">';
|
1873 |
+
|
1874 |
+
$.each(group.fonts, function( key, value ) {
|
1875 |
+
|
1876 |
+
// use key if value is object
|
1877 |
+
value = ( typeof value === 'object' ) ? key : value;
|
1878 |
+
var selected = ( value === first_font_family ) ? ' selected' : '';
|
1879 |
+
opts += '<option value="'+ value +'" data-type="'+ type +'"'+ selected +'>'+ value +'</option>';
|
1880 |
+
|
1881 |
+
});
|
1882 |
+
|
1883 |
+
opts += '</optgroup>';
|
1884 |
+
|
1885 |
+
});
|
1886 |
+
|
1887 |
+
// Append google font select options
|
1888 |
+
$font_family_select.append(opts).trigger('chosen:updated');
|
1889 |
+
|
1890 |
+
//
|
1891 |
+
//
|
1892 |
+
// Font style select
|
1893 |
+
var $font_style_block = $this.find('.csf--block-font-style');
|
1894 |
+
|
1895 |
+
if ( $font_style_block.length ) {
|
1896 |
+
|
1897 |
+
var $font_style_select = $this.find('.csf--font-style-select');
|
1898 |
+
var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '' ) : '';
|
1899 |
+
|
1900 |
+
//
|
1901 |
+
// Font Style on on change listener
|
1902 |
+
$font_style_select.on('change csf.change', function( event ) {
|
1903 |
+
|
1904 |
+
var style_value = $font_style_select.val();
|
1905 |
+
|
1906 |
+
// set a default value
|
1907 |
+
if ( !style_value && selected_styles && selected_styles.indexOf('normal') === -1 ) {
|
1908 |
+
style_value = selected_styles[0];
|
1909 |
+
}
|
1910 |
+
|
1911 |
+
// set font weight, for eg. replacing 800italic to 800
|
1912 |
+
var font_normal = ( style_value && style_value !== 'italic' && style_value === 'normal' ) ? 'normal' : '';
|
1913 |
+
var font_weight = ( style_value && style_value !== 'italic' && style_value !== 'normal' ) ? style_value.replace('italic', '') : font_normal;
|
1914 |
+
var font_style = ( style_value && style_value.substr(-6) === 'italic' ) ? 'italic' : '';
|
1915 |
+
|
1916 |
+
$this.find('.csf--font-weight').val( font_weight );
|
1917 |
+
$this.find('.csf--font-style').val( font_style );
|
1918 |
+
|
1919 |
+
});
|
1920 |
+
|
1921 |
+
//
|
1922 |
+
//
|
1923 |
+
// Extra font style select
|
1924 |
+
var $extra_font_style_block = $this.find('.csf--block-extra-styles');
|
1925 |
+
|
1926 |
+
if ( $extra_font_style_block.length ) {
|
1927 |
+
var $extra_font_style_select = $this.find('.csf--extra-styles');
|
1928 |
+
var first_extra_style_value = $extra_font_style_select.val();
|
1929 |
+
}
|
1930 |
+
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
//
|
1934 |
+
//
|
1935 |
+
// Subsets select
|
1936 |
+
var $subset_block = $this.find('.csf--block-subset');
|
1937 |
+
if ( $subset_block.length ) {
|
1938 |
+
var $subset_select = $this.find('.csf--subset');
|
1939 |
+
var first_subset_select_value = $subset_select.val();
|
1940 |
+
var subset_multi_select = $subset_select.data('multiple') || false;
|
1941 |
+
}
|
1942 |
+
|
1943 |
+
//
|
1944 |
+
//
|
1945 |
+
// Backup font family
|
1946 |
+
var $backup_font_family_block = $this.find('.csf--block-backup-font-family');
|
1947 |
+
|
1948 |
+
//
|
1949 |
+
//
|
1950 |
+
// Font Family on Change Listener
|
1951 |
+
$font_family_select.on('change csf.change', function( event ) {
|
1952 |
+
|
1953 |
+
// Hide subsets on change
|
1954 |
+
if ( $subset_block.length ) {
|
1955 |
+
$subset_block.addClass('hidden');
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
// Hide extra font style on change
|
1959 |
+
if ( $extra_font_style_block.length ) {
|
1960 |
+
$extra_font_style_block.addClass('hidden');
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
// Hide backup font family on change
|
1964 |
+
if ( $backup_font_family_block.length ) {
|
1965 |
+
$backup_font_family_block.addClass('hidden');
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
var $selected = $font_family_select.find(':selected');
|
1969 |
+
var value = $selected.val();
|
1970 |
+
var type = $selected.data('type');
|
1971 |
+
|
1972 |
+
if ( type && value ) {
|
1973 |
+
|
1974 |
+
// Show backup fonts if font type google or custom
|
1975 |
+
if ( ( type === 'google' || type === 'custom' ) && $backup_font_family_block.length ) {
|
1976 |
+
$backup_font_family_block.removeClass('hidden');
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
// Appending font style select options
|
1980 |
+
if ( $font_style_block.length ) {
|
1981 |
+
|
1982 |
+
// set styles for multi and normal style selectors
|
1983 |
+
var styles = defaultstyles;
|
1984 |
+
|
1985 |
+
// Custom or gogle font styles
|
1986 |
+
if ( type === 'google' && webfonts[type].fonts[value][0] ) {
|
1987 |
+
styles = webfonts[type].fonts[value][0];
|
1988 |
+
} else if ( type === 'custom' && webfonts[type].fonts[value] ) {
|
1989 |
+
styles = webfonts[type].fonts[value];
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
selected_styles = styles;
|
1993 |
+
|
1994 |
+
// Set selected style value for avoid load errors
|
1995 |
+
var set_auto_style = ( styles.indexOf('normal') !== -1 ) ? 'normal' : styles[0];
|
1996 |
+
var set_style_value = ( first_style_value && styles.indexOf(first_style_value) !== -1 ) ? first_style_value : set_auto_style;
|
1997 |
+
|
1998 |
+
// Append style select options
|
1999 |
+
base.append_select_options( $font_style_select, styles, set_style_value, 'style' );
|
2000 |
+
|
2001 |
+
// Clear first value
|
2002 |
+
first_style_value = false;
|
2003 |
+
|
2004 |
+
// Show style select after appended
|
2005 |
+
$font_style_block.removeClass('hidden');
|
2006 |
+
|
2007 |
+
// Appending extra font style select options
|
2008 |
+
if ( type === 'google' && $extra_font_style_block.length && styles.length > 1 ) {
|
2009 |
+
|
2010 |
+
// Append extra-style select options
|
2011 |
+
base.append_select_options( $extra_font_style_select, styles, first_extra_style_value, 'style', true );
|
2012 |
+
|
2013 |
+
// Clear first value
|
2014 |
+
first_extra_style_value = false;
|
2015 |
+
|
2016 |
+
// Show style select after appended
|
2017 |
+
$extra_font_style_block.removeClass('hidden');
|
2018 |
+
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
// Appending google fonts subsets select options
|
2024 |
+
if ( type === 'google' && $subset_block.length && webfonts[type].fonts[value][1] ) {
|
2025 |
+
|
2026 |
+
var subsets = webfonts[type].fonts[value][1];
|
2027 |
+
var set_auto_subset = ( subsets.length < 2 && subsets[0] !== 'latin' ) ? subsets[0] : '';
|
2028 |
+
var set_subset_value = ( first_subset_select_value && subsets.indexOf(first_subset_select_value) !== -1 ) ? first_subset_select_value : set_auto_subset;
|
2029 |
+
|
2030 |
+
// check for multiple subset select
|
2031 |
+
set_subset_value = ( subset_multi_select && first_subset_select_value ) ? first_subset_select_value : set_subset_value;
|
2032 |
+
|
2033 |
+
base.append_select_options( $subset_select, subsets, set_subset_value, 'subset', subset_multi_select );
|
2034 |
+
|
2035 |
+
first_subset_select_value = false;
|
2036 |
+
|
2037 |
+
$subset_block.removeClass('hidden');
|
2038 |
+
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
} else {
|
2042 |
+
|
2043 |
+
// Clear Styles
|
2044 |
+
$styles.find(':input').val('');
|
2045 |
+
|
2046 |
+
// Clear subsets options if type and value empty
|
2047 |
+
if ( $subset_block.length ) {
|
2048 |
+
$subset_select.find('option').not(':first-child').remove();
|
2049 |
+
$subset_select.trigger('chosen:updated');
|
2050 |
+
}
|
2051 |
+
|
2052 |
+
// Clear font styles options if type and value empty
|
2053 |
+
if ( $font_style_block.length ) {
|
2054 |
+
$font_style_select.find('option').not(':first-child').remove();
|
2055 |
+
$font_style_select.trigger('chosen:updated');
|
2056 |
+
}
|
2057 |
+
|
2058 |
+
}
|
2059 |
+
|
2060 |
+
// Update font type input value
|
2061 |
+
$type.val(type);
|
2062 |
+
|
2063 |
+
}).trigger('csf.change');
|
2064 |
+
|
2065 |
+
//
|
2066 |
+
//
|
2067 |
+
// Preview
|
2068 |
+
var $preview_block = $this.find('.csf--block-preview');
|
2069 |
+
|
2070 |
+
if ( $preview_block.length ) {
|
2071 |
+
|
2072 |
+
var $preview = $this.find('.csf--preview');
|
2073 |
+
|
2074 |
+
// Set preview styles on change
|
2075 |
+
$this.on('change', CSF.helper.debounce( function( event ) {
|
2076 |
+
|
2077 |
+
$preview_block.removeClass('hidden');
|
2078 |
+
|
2079 |
+
var font_family = $font_family_select.val(),
|
2080 |
+
font_weight = $this.find('.csf--font-weight').val(),
|
2081 |
+
font_style = $this.find('.csf--font-style').val(),
|
2082 |
+
font_size = $this.find('.csf--font-size').val(),
|
2083 |
+
font_variant = $this.find('.csf--font-variant').val(),
|
2084 |
+
line_height = $this.find('.csf--line-height').val(),
|
2085 |
+
text_align = $this.find('.csf--text-align').val(),
|
2086 |
+
text_transform = $this.find('.csf--text-transform').val(),
|
2087 |
+
text_decoration = $this.find('.csf--text-decoration').val(),
|
2088 |
+
text_color = $this.find('.csf--color').val(),
|
2089 |
+
word_spacing = $this.find('.csf--word-spacing').val(),
|
2090 |
+
letter_spacing = $this.find('.csf--letter-spacing').val(),
|
2091 |
+
custom_style = $this.find('.csf--custom-style').val(),
|
2092 |
+
type = $this.find('.csf--type').val();
|
2093 |
+
|
2094 |
+
if ( type === 'google' ) {
|
2095 |
+
base.load_google_font(font_family, font_weight, font_style);
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
var properties = {};
|
2099 |
+
|
2100 |
+
if ( font_family ) { properties.fontFamily = font_family; }
|
2101 |
+
if ( font_weight ) { properties.fontWeight = font_weight; }
|
2102 |
+
if ( font_style ) { properties.fontStyle = font_style; }
|
2103 |
+
if ( font_variant ) { properties.fontVariant = font_variant; }
|
2104 |
+
if ( font_size ) { properties.fontSize = font_size + unit; }
|
2105 |
+
if ( line_height ) { properties.lineHeight = line_height + line_height_unit; }
|
2106 |
+
if ( letter_spacing ) { properties.letterSpacing = letter_spacing + unit; }
|
2107 |
+
if ( word_spacing ) { properties.wordSpacing = word_spacing + unit; }
|
2108 |
+
if ( text_align ) { properties.textAlign = text_align; }
|
2109 |
+
if ( text_transform ) { properties.textTransform = text_transform; }
|
2110 |
+
if ( text_decoration ) { properties.textDecoration = text_decoration; }
|
2111 |
+
if ( text_color ) { properties.color = text_color; }
|
2112 |
+
|
2113 |
+
$preview.removeAttr('style');
|
2114 |
+
|
2115 |
+
// Customs style attribute
|
2116 |
+
if ( custom_style ) { $preview.attr('style', custom_style); }
|
2117 |
+
|
2118 |
+
$preview.css(properties);
|
2119 |
+
|
2120 |
+
}, 100 ) );
|
2121 |
+
|
2122 |
+
// Preview black and white backgrounds trigger
|
2123 |
+
$preview_block.on('click', function() {
|
2124 |
+
|
2125 |
+
$preview.toggleClass('csf--black-background');
|
2126 |
+
|
2127 |
+
var $toggle = $preview_block.find('.csf--toggle');
|
2128 |
+
|
2129 |
+
if ( $toggle.hasClass('fa-toggle-off') ) {
|
2130 |
+
$toggle.removeClass('fa-toggle-off').addClass('fa-toggle-on');
|
2131 |
+
} else {
|
2132 |
+
$toggle.removeClass('fa-toggle-on').addClass('fa-toggle-off');
|
2133 |
+
}
|
2134 |
+
|
2135 |
+
});
|
2136 |
+
|
2137 |
+
if ( !$preview_block.hasClass('hidden') ) {
|
2138 |
+
$this.trigger('change');
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
}
|
2142 |
+
|
2143 |
+
};
|
2144 |
+
|
2145 |
+
base.init();
|
2146 |
+
|
2147 |
+
});
|
2148 |
+
};
|
2149 |
+
|
2150 |
+
//
|
2151 |
+
// Field: upload
|
2152 |
+
//
|
2153 |
+
$.fn.csf_field_upload = function() {
|
2154 |
+
return this.each( function() {
|
2155 |
+
|
2156 |
+
var $this = $(this),
|
2157 |
+
$input = $this.find('input'),
|
2158 |
+
$upload_button = $this.find('.csf--button'),
|
2159 |
+
$remove_button = $this.find('.csf--remove'),
|
2160 |
+
$preview_wrap = $this.find('.csf--preview'),
|
2161 |
+
$preview_src = $this.find('.csf--src'),
|
2162 |
+
$library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
|
2163 |
+
wp_media_frame;
|
2164 |
+
|
2165 |
+
$upload_button.on('click', function( e ) {
|
2166 |
+
|
2167 |
+
e.preventDefault();
|
2168 |
+
|
2169 |
+
if ( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) {
|
2170 |
+
return;
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
if ( wp_media_frame ) {
|
2174 |
+
wp_media_frame.open();
|
2175 |
+
return;
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
wp_media_frame = window.wp.media({
|
2179 |
+
library: {
|
2180 |
+
type: $library
|
2181 |
+
},
|
2182 |
+
});
|
2183 |
+
|
2184 |
+
wp_media_frame.on( 'select', function() {
|
2185 |
+
|
2186 |
+
var src;
|
2187 |
+
var attributes = wp_media_frame.state().get('selection').first().attributes;
|
2188 |
+
|
2189 |
+
if ( $library.length && $library.indexOf(attributes.subtype) === -1 && $library.indexOf(attributes.type) === -1 ) {
|
2190 |
+
return;
|
2191 |
+
}
|
2192 |
+
|
2193 |
+
$input.val(attributes.url).trigger('change');
|
2194 |
+
|
2195 |
+
});
|
2196 |
+
|
2197 |
+
wp_media_frame.open();
|
2198 |
+
|
2199 |
+
});
|
2200 |
+
|
2201 |
+
$remove_button.on('click', function( e ) {
|
2202 |
+
e.preventDefault();
|
2203 |
+
$input.val('').trigger('change');
|
2204 |
+
});
|
2205 |
+
|
2206 |
+
$input.on('change', function( e ) {
|
2207 |
+
|
2208 |
+
var $value = $input.val();
|
2209 |
+
|
2210 |
+
if ( $value ) {
|
2211 |
+
$remove_button.removeClass('hidden');
|
2212 |
+
} else {
|
2213 |
+
$remove_button.addClass('hidden');
|
2214 |
+
}
|
2215 |
+
|
2216 |
+
if ( $preview_wrap.length ) {
|
2217 |
+
|
2218 |
+
if ( $.inArray( $value.split('.').pop().toLowerCase(), ['jpg', 'jpeg', 'gif', 'png', 'svg', 'webp'] ) !== -1 ) {
|
2219 |
+
$preview_wrap.removeClass('hidden');
|
2220 |
+
$preview_src.attr('src', $value);
|
2221 |
+
} else {
|
2222 |
+
$preview_wrap.addClass('hidden');
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
}
|
2226 |
+
|
2227 |
+
});
|
2228 |
+
|
2229 |
+
});
|
2230 |
+
|
2231 |
+
};
|
2232 |
+
|
2233 |
+
//
|
2234 |
+
// Field: wp_editor
|
2235 |
+
//
|
2236 |
+
$.fn.csf_field_wp_editor = function() {
|
2237 |
+
return this.each( function() {
|
2238 |
+
|
2239 |
+
if ( typeof window.wp.editor === 'undefined' || typeof window.tinyMCEPreInit === 'undefined' || typeof window.tinyMCEPreInit.mceInit.csf_wp_editor === 'undefined' ) {
|
2240 |
+
return;
|
2241 |
+
}
|
2242 |
+
|
2243 |
+
var $this = $(this),
|
2244 |
+
$editor = $this.find('.csf-wp-editor'),
|
2245 |
+
$textarea = $this.find('textarea');
|
2246 |
+
|
2247 |
+
// If there is wp-editor remove it for avoid dupliated wp-editor conflicts.
|
2248 |
+
var $has_wp_editor = $this.find('.wp-editor-wrap').length || $this.find('.mce-container').length;
|
2249 |
+
|
2250 |
+
if ( $has_wp_editor ) {
|
2251 |
+
$editor.empty();
|
2252 |
+
$editor.append($textarea);
|
2253 |
+
$textarea.css('display', '');
|
2254 |
+
}
|
2255 |
+
|
2256 |
+
// Generate a unique id
|
2257 |
+
var uid = CSF.helper.uid('csf-editor-');
|
2258 |
+
|
2259 |
+
$textarea.attr('id', uid);
|
2260 |
+
|
2261 |
+
// Get default editor settings
|
2262 |
+
var default_editor_settings = {
|
2263 |
+
tinymce: window.tinyMCEPreInit.mceInit.csf_wp_editor,
|
2264 |
+
quicktags: window.tinyMCEPreInit.qtInit.csf_wp_editor
|
2265 |
+
};
|
2266 |
+
|
2267 |
+
// Get default editor settings
|
2268 |
+
var field_editor_settings = $editor.data('editor-settings');
|
2269 |
+
|
2270 |
+
// Callback for old wp editor
|
2271 |
+
var wpEditor = wp.oldEditor ? wp.oldEditor : wp.editor;
|
2272 |
+
|
2273 |
+
if ( wpEditor && wpEditor.hasOwnProperty('autop') ) {
|
2274 |
+
wp.editor.autop = wpEditor.autop;
|
2275 |
+
wp.editor.removep = wpEditor.removep;
|
2276 |
+
wp.editor.initialize = wpEditor.initialize;
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
// Add on change event handle
|
2280 |
+
var editor_on_change = function( editor ) {
|
2281 |
+
editor.on('change keyup', function() {
|
2282 |
+
var value = ( field_editor_settings.wpautop ) ? editor.getContent() : wp.editor.removep(editor.getContent());
|
2283 |
+
$textarea.val(value).trigger('change');
|
2284 |
+
});
|
2285 |
+
};
|
2286 |
+
|
2287 |
+
// Extend editor selector and on change event handler
|
2288 |
+
default_editor_settings.tinymce = $.extend( {}, default_editor_settings.tinymce, { selector: '#'+ uid, setup: editor_on_change } );
|
2289 |
+
|
2290 |
+
// Override editor tinymce settings
|
2291 |
+
if ( field_editor_settings.tinymce === false ) {
|
2292 |
+
default_editor_settings.tinymce = false;
|
2293 |
+
$editor.addClass('csf-no-tinymce');
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
// Override editor quicktags settings
|
2297 |
+
if ( field_editor_settings.quicktags === false ) {
|
2298 |
+
default_editor_settings.quicktags = false;
|
2299 |
+
$editor.addClass('csf-no-quicktags');
|
2300 |
+
}
|
2301 |
+
|
2302 |
+
// Wait until :visible
|
2303 |
+
var interval = setInterval(function () {
|
2304 |
+
if ( $this.is(':visible') ) {
|
2305 |
+
window.wp.editor.initialize(uid, default_editor_settings);
|
2306 |
+
clearInterval(interval);
|
2307 |
+
}
|
2308 |
+
});
|
2309 |
+
|
2310 |
+
// Add Media buttons
|
2311 |
+
if ( field_editor_settings.media_buttons && window.csf_media_buttons ) {
|
2312 |
+
|
2313 |
+
var $editor_buttons = $editor.find('.wp-media-buttons');
|
2314 |
+
|
2315 |
+
if ( $editor_buttons.length ) {
|
2316 |
+
|
2317 |
+
$editor_buttons.find('.csf-shortcode-button').data('editor-id', uid);
|
2318 |
+
|
2319 |
+
} else {
|
2320 |
+
|
2321 |
+
var $media_buttons = $(window.csf_media_buttons);
|
2322 |
+
|
2323 |
+
$media_buttons.find('.csf-shortcode-button').data('editor-id', uid);
|
2324 |
+
|
2325 |
+
$editor.prepend( $media_buttons );
|
2326 |
+
|
2327 |
+
}
|
2328 |
+
|
2329 |
+
}
|
2330 |
+
|
2331 |
+
});
|
2332 |
+
|
2333 |
+
};
|
2334 |
+
|
2335 |
+
//
|
2336 |
+
// Confirm
|
2337 |
+
//
|
2338 |
+
$.fn.csf_confirm = function() {
|
2339 |
+
return this.each( function() {
|
2340 |
+
$(this).on('click', function( e ) {
|
2341 |
+
|
2342 |
+
var confirm_text = $(this).data('confirm') || window.csf_vars.i18n.confirm;
|
2343 |
+
var confirm_answer = confirm( confirm_text );
|
2344 |
+
|
2345 |
+
if ( confirm_answer ) {
|
2346 |
+
CSF.vars.is_confirm = true;
|
2347 |
+
CSF.vars.form_modified = false;
|
2348 |
+
} else {
|
2349 |
+
e.preventDefault();
|
2350 |
+
return false;
|
2351 |
+
}
|
2352 |
+
|
2353 |
+
});
|
2354 |
+
});
|
2355 |
+
};
|
2356 |
+
|
2357 |
+
$.fn.serializeObject = function() {
|
2358 |
+
|
2359 |
+
var obj = {};
|
2360 |
+
|
2361 |
+
$.each( this.serializeArray(), function(i,o){
|
2362 |
+
var n = o.name,
|
2363 |
+
v = o.value;
|
2364 |
+
|
2365 |
+
obj[n] = obj[n] === undefined ? v
|
2366 |
+
: $.isArray( obj[n] ) ? obj[n].concat( v )
|
2367 |
+
: [ obj[n], v ];
|
2368 |
+
});
|
2369 |
+
|
2370 |
+
return obj;
|
2371 |
+
|
2372 |
+
};
|
2373 |
+
|
2374 |
+
//
|
2375 |
+
// Options Save
|
2376 |
+
//
|
2377 |
+
$.fn.csf_save = function() {
|
2378 |
+
return this.each( function() {
|
2379 |
+
|
2380 |
+
var $this = $(this),
|
2381 |
+
$buttons = $('.csf-save'),
|
2382 |
+
$panel = $('.csf-options'),
|
2383 |
+
flooding = false,
|
2384 |
+
timeout;
|
2385 |
+
|
2386 |
+
$this.on('click', function( e ) {
|
2387 |
+
|
2388 |
+
if ( !flooding ) {
|
2389 |
+
|
2390 |
+
var $text = $this.data('save'),
|
2391 |
+
$value = $this.val();
|
2392 |
+
|
2393 |
+
$buttons.attr('value', $text);
|
2394 |
+
|
2395 |
+
if ( $this.hasClass('csf-save-ajax') ) {
|
2396 |
+
|
2397 |
+
e.preventDefault();
|
2398 |
+
|
2399 |
+
$panel.addClass('csf-saving');
|
2400 |
+
$buttons.prop('disabled', true);
|
2401 |
+
|
2402 |
+
window.wp.ajax.post( 'csf_'+ $panel.data('unique') +'_ajax_save', {
|
2403 |
+
data: $('#csf-form').serializeJSONCSF()
|
2404 |
+
})
|
2405 |
+
.done( function( response ) {
|
2406 |
+
|
2407 |
+
// clear errors
|
2408 |
+
$('.csf-error').remove();
|
2409 |
+
|
2410 |
+
if ( Object.keys( response.errors ).length ) {
|
2411 |
+
|
2412 |
+
var error_icon = '<i class="csf-label-error csf-error">!</i>';
|
2413 |
+
|
2414 |
+
$.each(response.errors, function( key, error_message ) {
|
2415 |
+
|
2416 |
+
var $field = $('[data-depend-id="'+ key +'"]'),
|
2417 |
+
$link = $('a[href="#tab='+ $field.closest('.csf-section').data('section-id') +'"]' ),
|
2418 |
+
$tab = $link.closest('.csf-tab-item');
|
2419 |
+
|
2420 |
+
$field.closest('.csf-fieldset').append( '<p class="csf-error csf-error-text">'+ error_message +'</p>' );
|
2421 |
+
|
2422 |
+
if ( !$link.find('.csf-error').length ) {
|
2423 |
+
$link.append( error_icon );
|
2424 |
+
}
|
2425 |
+
|
2426 |
+
if ( !$tab.find('.csf-arrow .csf-error').length ) {
|
2427 |
+
$tab.find('.csf-arrow').append( error_icon );
|
2428 |
+
}
|
2429 |
+
|
2430 |
+
});
|
2431 |
+
|
2432 |
+
}
|
2433 |
+
|
2434 |
+
$panel.removeClass('csf-saving');
|
2435 |
+
$buttons.prop('disabled', false).attr('value', $value);
|
2436 |
+
flooding = false;
|
2437 |
+
|
2438 |
+
CSF.vars.form_modified = false;
|
2439 |
+
CSF.vars.$form_warning.hide();
|
2440 |
+
|
2441 |
+
clearTimeout(timeout);
|
2442 |
+
|
2443 |
+
var $result_success = $('.csf-form-success');
|
2444 |
+
$result_success.empty().append(response.notice).fadeIn('fast', function() {
|
2445 |
+
timeout = setTimeout( function() {
|
2446 |
+
$result_success.fadeOut('fast');
|
2447 |
+
}, 1000);
|
2448 |
+
});
|
2449 |
+
|
2450 |
+
})
|
2451 |
+
.fail( function( response ) {
|
2452 |
+
alert( response.error );
|
2453 |
+
});
|
2454 |
+
|
2455 |
+
} else {
|
2456 |
+
|
2457 |
+
CSF.vars.form_modified = false;
|
2458 |
+
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
}
|
2462 |
+
|
2463 |
+
flooding = true;
|
2464 |
+
|
2465 |
+
});
|
2466 |
+
|
2467 |
+
});
|
2468 |
+
};
|
2469 |
+
|
2470 |
+
//
|
2471 |
+
// Option Framework
|
2472 |
+
//
|
2473 |
+
$.fn.csf_options = function() {
|
2474 |
+
return this.each( function() {
|
2475 |
+
|
2476 |
+
var $this = $(this),
|
2477 |
+
$content = $this.find('.csf-content'),
|
2478 |
+
$form_success = $this.find('.csf-form-success'),
|
2479 |
+
$form_warning = $this.find('.csf-form-warning'),
|
2480 |
+
$save_button = $this.find('.csf-header .csf-save');
|
2481 |
+
|
2482 |
+
CSF.vars.$form_warning = $form_warning;
|
2483 |
+
|
2484 |
+
// Shows a message white leaving theme options without saving
|
2485 |
+
if ( $form_warning.length ) {
|
2486 |
+
|
2487 |
+
window.onbeforeunload = function() {
|
2488 |
+
return ( CSF.vars.form_modified ) ? true : undefined;
|
2489 |
+
};
|
2490 |
+
|
2491 |
+
$content.on('change keypress', ':input', function() {
|
2492 |
+
if ( !CSF.vars.form_modified ) {
|
2493 |
+
$form_success.hide();
|
2494 |
+
$form_warning.fadeIn('fast');
|
2495 |
+
CSF.vars.form_modified = true;
|
2496 |
+
}
|
2497 |
+
});
|
2498 |
+
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
if ( $form_success.hasClass('csf-form-show') ) {
|
2502 |
+
setTimeout( function() {
|
2503 |
+
$form_success.fadeOut('fast');
|
2504 |
+
}, 1000);
|
2505 |
+
}
|
2506 |
+
|
2507 |
+
$(document).keydown(function (event) {
|
2508 |
+
if ( ( event.ctrlKey || event.metaKey ) && event.which === 83 ) {
|
2509 |
+
$save_button.trigger('click');
|
2510 |
+
event.preventDefault();
|
2511 |
+
return false;
|
2512 |
+
}
|
2513 |
+
});
|
2514 |
+
|
2515 |
+
});
|
2516 |
+
};
|
2517 |
+
|
2518 |
+
//
|
2519 |
+
// Taxonomy Framework
|
2520 |
+
//
|
2521 |
+
$.fn.csf_taxonomy = function() {
|
2522 |
+
return this.each( function() {
|
2523 |
+
|
2524 |
+
var $this = $(this),
|
2525 |
+
$form = $this.parents('form');
|
2526 |
+
|
2527 |
+
if ( $form.attr('id') === 'addtag' ) {
|
2528 |
+
|
2529 |
+
var $submit = $form.find('#submit'),
|
2530 |
+
$cloned = $this.find('.csf-field').csf_clone();
|
2531 |
+
|
2532 |
+
$submit.on( 'click', function() {
|
2533 |
+
|
2534 |
+
if ( !$form.find('.form-required').hasClass('form-invalid') ) {
|
2535 |
+
|
2536 |
+
$this.data('inited', false);
|
2537 |
+
|
2538 |
+
$this.empty();
|
2539 |
+
|
2540 |
+
$this.html( $cloned );
|
2541 |
+
|
2542 |
+
$cloned = $cloned.csf_clone();
|
2543 |
+
|
2544 |
+
$this.csf_reload_script();
|
2545 |
+
|
2546 |
+
}
|
2547 |
+
|
2548 |
+
});
|
2549 |
+
|
2550 |
+
}
|
2551 |
+
|
2552 |
+
});
|
2553 |
+
};
|
2554 |
+
|
2555 |
+
//
|
2556 |
+
// Shortcode Framework
|
2557 |
+
//
|
2558 |
+
$.fn.csf_shortcode = function() {
|
2559 |
+
|
2560 |
+
var base = this;
|
2561 |
+
|
2562 |
+
base.shortcode_parse = function( serialize, key ) {
|
2563 |
+
|
2564 |
+
var shortcode = '';
|
2565 |
+
|
2566 |
+
$.each(serialize, function( shortcode_key, shortcode_values ) {
|
2567 |
+
|
2568 |
+
key = ( key ) ? key : shortcode_key;
|
2569 |
+
|
2570 |
+
shortcode += '[' + key;
|
2571 |
+
|
2572 |
+
$.each(shortcode_values, function( shortcode_tag, shortcode_value ) {
|
2573 |
+
|
2574 |
+
if ( shortcode_tag === 'content' ) {
|
2575 |
+
|
2576 |
+
shortcode += ']';
|
2577 |
+
shortcode += shortcode_value;
|
2578 |
+
shortcode += '[/'+ key +'';
|
2579 |
+
|
2580 |
+
} else {
|
2581 |
+
|
2582 |
+
shortcode += base.shortcode_tags( shortcode_tag, shortcode_value );
|
2583 |
+
|
2584 |
+
}
|
2585 |
+
|
2586 |
+
});
|
2587 |
+
|
2588 |
+
shortcode += ']';
|
2589 |
+
|
2590 |
+
});
|
2591 |
+
|
2592 |
+
return shortcode;
|
2593 |
+
|
2594 |
+
};
|
2595 |
+
|
2596 |
+
base.shortcode_tags = function( shortcode_tag, shortcode_value ) {
|
2597 |
+
|
2598 |
+
var shortcode = '';
|
2599 |
+
|
2600 |
+
if ( shortcode_value !== '' ) {
|
2601 |
+
|
2602 |
+
if ( typeof shortcode_value === 'object' && !$.isArray( shortcode_value ) ) {
|
2603 |
+
|
2604 |
+
$.each(shortcode_value, function( sub_shortcode_tag, sub_shortcode_value ) {
|
2605 |
+
|
2606 |
+
// sanitize spesific key/value
|
2607 |
+
switch( sub_shortcode_tag ) {
|
2608 |
+
|
2609 |
+
case 'background-image':
|
2610 |
+
sub_shortcode_value = ( sub_shortcode_value.url ) ? sub_shortcode_value.url : '';
|
2611 |
+
break;
|
2612 |
+
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
if ( sub_shortcode_value !== '' ) {
|
2616 |
+
shortcode += ' ' + sub_shortcode_tag + '="' + sub_shortcode_value.toString() + '"';
|
2617 |
+
}
|
2618 |
+
|
2619 |
+
});
|
2620 |
+
|
2621 |
+
} else {
|
2622 |
+
|
2623 |
+
shortcode += ' ' + shortcode_tag + '="' + shortcode_value.toString() + '"';
|
2624 |
+
|
2625 |
+
}
|
2626 |
+
|
2627 |
+
}
|
2628 |
+
|
2629 |
+
return shortcode;
|
2630 |
+
|
2631 |
+
};
|
2632 |
+
|
2633 |
+
base.insertAtChars = function( _this, currentValue ) {
|
2634 |
+
|
2635 |
+
var obj = ( typeof _this[0].name !== 'undefined' ) ? _this[0] : _this;
|
2636 |
+
|
2637 |
+
if ( obj.value.length && typeof obj.selectionStart !== 'undefined' ) {
|
2638 |
+
obj.focus();
|
2639 |
+
return obj.value.substring( 0, obj.selectionStart ) + currentValue + obj.value.substring( obj.selectionEnd, obj.value.length );
|
2640 |
+
} else {
|
2641 |
+
obj.focus();
|
2642 |
+
return currentValue;
|
2643 |
+
}
|
2644 |
+
|
2645 |
+
};
|
2646 |
+
|
2647 |
+
base.send_to_editor = function( html, editor_id ) {
|
2648 |
+
|
2649 |
+
var tinymce_editor;
|
2650 |
+
|
2651 |
+
if ( typeof tinymce !== 'undefined' ) {
|
2652 |
+
tinymce_editor = tinymce.get( editor_id );
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
if ( tinymce_editor && !tinymce_editor.isHidden() ) {
|
2656 |
+
tinymce_editor.execCommand( 'mceInsertContent', false, html );
|
2657 |
+
} else {
|
2658 |
+
var $editor = $('#'+editor_id);
|
2659 |
+
$editor.val( base.insertAtChars( $editor, html ) ).trigger('change');
|
2660 |
+
}
|
2661 |
+
|
2662 |
+
};
|
2663 |
+
|
2664 |
+
return this.each( function() {
|
2665 |
+
|
2666 |
+
var $modal = $(this),
|
2667 |
+
$load = $modal.find('.csf-modal-load'),
|
2668 |
+
$content = $modal.find('.csf-modal-content'),
|
2669 |
+
$insert = $modal.find('.csf-modal-insert'),
|
2670 |
+
$loading = $modal.find('.csf-modal-loading'),
|
2671 |
+
$select = $modal.find('select'),
|
2672 |
+
modal_id = $modal.data('modal-id'),
|
2673 |
+
nonce = $modal.data('nonce'),
|
2674 |
+
editor_id,
|
2675 |
+
target_id,
|
2676 |
+
gutenberg_id,
|
2677 |
+
sc_key,
|
2678 |
+
sc_name,
|
2679 |
+
sc_view,
|
2680 |
+
sc_group,
|
2681 |
+
$cloned,
|
2682 |
+
$button;
|
2683 |
+
|
2684 |
+
$(document).on('click', '.csf-shortcode-button[data-modal-id="'+ modal_id +'"]', function( e ) {
|
2685 |
+
|
2686 |
+
e.preventDefault();
|
2687 |
+
|
2688 |
+
$button = $(this);
|
2689 |
+
editor_id = $button.data('editor-id') || false;
|
2690 |
+
target_id = $button.data('target-id') || false;
|
2691 |
+
gutenberg_id = $button.data('gutenberg-id') || false;
|
2692 |
+
|
2693 |
+
$modal.removeClass('hidden');
|
2694 |
+
|
2695 |
+
// single usage trigger first shortcode
|
2696 |
+
if ( $modal.hasClass('csf-shortcode-single') && sc_name === undefined ) {
|
2697 |
+
$select.trigger('change');
|
2698 |
+
}
|
2699 |
+
|
2700 |
+
});
|
2701 |
+
|
2702 |
+
$select.on( 'change', function() {
|
2703 |
+
|
2704 |
+
var $option = $(this);
|
2705 |
+
var $selected = $option.find(':selected');
|
2706 |
+
|
2707 |
+
sc_key = $option.val();
|
2708 |
+
sc_name = $selected.data('shortcode');
|
2709 |
+
sc_view = $selected.data('view') || 'normal';
|
2710 |
+
sc_group = $selected.data('group') || sc_name;
|
2711 |
+
|
2712 |
+
$load.empty();
|
2713 |
+
|
2714 |
+
if ( sc_key ) {
|
2715 |
+
|
2716 |
+
$loading.show();
|
2717 |
+
|
2718 |
+
window.wp.ajax.post( 'csf-get-shortcode-'+ modal_id, {
|
2719 |
+
shortcode_key: sc_key,
|
2720 |
+
nonce: nonce
|
2721 |
+
})
|
2722 |
+
.done( function( response ) {
|
2723 |
+
|
2724 |
+
$loading.hide();
|
2725 |
+
|
2726 |
+
var $appended = $(response.content).appendTo($load);
|
2727 |
+
|
2728 |
+
$insert.parent().removeClass('hidden');
|
2729 |
+
|
2730 |
+
$cloned = $appended.find('.csf--repeat-shortcode').csf_clone();
|
2731 |
+
|
2732 |
+
$appended.csf_reload_script();
|
2733 |
+
$appended.find('.csf-fields').csf_reload_script();
|
2734 |
+
|
2735 |
+
});
|
2736 |
+
|
2737 |
+
} else {
|
2738 |
+
|
2739 |
+
$insert.parent().addClass('hidden');
|
2740 |
+
|
2741 |
+
}
|
2742 |
+
|
2743 |
+
});
|
2744 |
+
|
2745 |
+
$insert.on('click', function( e ) {
|
2746 |
+
|
2747 |
+
e.preventDefault();
|
2748 |
+
|
2749 |
+
if ( $insert.prop('disabled') || $insert.attr('disabled') ) { return; }
|
2750 |
+
|
2751 |
+
var shortcode = '';
|
2752 |
+
var serialize = $modal.find('.csf-field:not(.csf-depend-on)').find(':input:not(.ignore)').serializeObjectCSF();
|
2753 |
+
|
2754 |
+
switch ( sc_view ) {
|
2755 |
+
|
2756 |
+
case 'contents':
|
2757 |
+
var contentsObj = ( sc_name ) ? serialize[sc_name] : serialize;
|
2758 |
+
$.each(contentsObj, function( sc_key, sc_value ) {
|
2759 |
+
var sc_tag = ( sc_name ) ? sc_name : sc_key;
|
2760 |
+
shortcode += '['+ sc_tag +']'+ sc_value +'[/'+ sc_tag +']';
|
2761 |
+
});
|
2762 |
+
break;
|
2763 |
+
|
2764 |
+
case 'group':
|
2765 |
+
|
2766 |
+
shortcode += '[' + sc_name;
|
2767 |
+
$.each(serialize[sc_name], function( sc_key, sc_value ) {
|
2768 |
+
shortcode += base.shortcode_tags( sc_key, sc_value );
|
2769 |
+
});
|
2770 |
+
shortcode += ']';
|
2771 |
+
shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
|
2772 |
+
shortcode += '[/' + sc_name + ']';
|
2773 |
+
|
2774 |
+
break;
|
2775 |
+
|
2776 |
+
case 'repeater':
|
2777 |
+
shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
|
2778 |
+
break;
|
2779 |
+
|
2780 |
+
default:
|
2781 |
+
shortcode += base.shortcode_parse( serialize );
|
2782 |
+
break;
|
2783 |
+
|
2784 |
+
}
|
2785 |
+
|
2786 |
+
shortcode = ( shortcode === '' ) ? '['+ sc_name +']' : shortcode;
|
2787 |
+
|
2788 |
+
if ( gutenberg_id ) {
|
2789 |
+
|
2790 |
+
var content = window.csf_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.csf_gutenberg_props.attributes.shortcode : '';
|
2791 |
+
window.csf_gutenberg_props.setAttributes({shortcode: content + shortcode});
|
2792 |
+
|
2793 |
+
} else if ( editor_id ) {
|
2794 |
+
|
2795 |
+
base.send_to_editor( shortcode, editor_id );
|
2796 |
+
|
2797 |
+
} else {
|
2798 |
+
|
2799 |
+
var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
|
2800 |
+
$textarea.val( base.insertAtChars( $textarea, shortcode ) ).trigger('change');
|
2801 |
+
|
2802 |
+
}
|
2803 |
+
|
2804 |
+
$modal.addClass('hidden');
|
2805 |
+
|
2806 |
+
});
|
2807 |
+
|
2808 |
+
$modal.on('click', '.csf--repeat-button', function( e ) {
|
2809 |
+
|
2810 |
+
e.preventDefault();
|
2811 |
+
|
2812 |
+
var $repeatable = $modal.find('.csf--repeatable');
|
2813 |
+
var $new_clone = $cloned.csf_clone();
|
2814 |
+
var $remove_btn = $new_clone.find('.csf-repeat-remove');
|
2815 |
+
|
2816 |
+
var $appended = $new_clone.appendTo( $repeatable );
|
2817 |
+
|
2818 |
+
$new_clone.find('.csf-fields').csf_reload_script();
|
2819 |
+
|
2820 |
+
CSF.helper.name_nested_replace( $modal.find('.csf--repeat-shortcode'), sc_group );
|
2821 |
+
|
2822 |
+
$remove_btn.on('click', function() {
|
2823 |
+
|
2824 |
+
$new_clone.remove();
|
2825 |
+
|
2826 |
+
CSF.helper.name_nested_replace( $modal.find('.csf--repeat-shortcode'), sc_group );
|
2827 |
+
|
2828 |
+
});
|
2829 |
+
|
2830 |
+
});
|
2831 |
+
|
2832 |
+
$modal.on('click', '.csf-modal-close, .csf-modal-overlay', function() {
|
2833 |
+
$modal.addClass('hidden');
|
2834 |
+
});
|
2835 |
+
|
2836 |
+
});
|
2837 |
+
};
|
2838 |
+
|
2839 |
+
//
|
2840 |
+
// WP Color Picker
|
2841 |
+
//
|
2842 |
+
if ( typeof Color === 'function' ) {
|
2843 |
+
|
2844 |
+
Color.prototype.toString = function() {
|
2845 |
+
|
2846 |
+
if ( this._alpha < 1 ) {
|
2847 |
+
return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
|
2848 |
+
}
|
2849 |
+
|
2850 |
+
var hex = parseInt( this._color, 10 ).toString( 16 );
|
2851 |
+
|
2852 |
+
if ( this.error ) { return ''; }
|
2853 |
+
|
2854 |
+
if ( hex.length < 6 ) {
|
2855 |
+
for (var i = 6 - hex.length - 1; i >= 0; i--) {
|
2856 |
+
hex = '0' + hex;
|
2857 |
+
}
|
2858 |
+
}
|
2859 |
+
|
2860 |
+
return '#' + hex;
|
2861 |
+
|
2862 |
+
};
|
2863 |
+
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
CSF.funcs.parse_color = function( color ) {
|
2867 |
+
|
2868 |
+
var value = color.replace(/\s+/g, ''),
|
2869 |
+
trans = ( value.indexOf('rgba') !== -1 ) ? parseFloat( value.replace(/^.*,(.+)\)/, '$1') * 100 ) : 100,
|
2870 |
+
rgba = ( trans < 100 ) ? true : false;
|
2871 |
+
|
2872 |
+
return { value: value, transparent: trans, rgba: rgba };
|
2873 |
+
|
2874 |
+
};
|
2875 |
+
|
2876 |
+
$.fn.csf_color = function() {
|
2877 |
+
return this.each( function() {
|
2878 |
+
|
2879 |
+
var $input = $(this),
|
2880 |
+
picker_color = CSF.funcs.parse_color( $input.val() ),
|
2881 |
+
palette_color = window.csf_vars.color_palette.length ? window.csf_vars.color_palette : true,
|
2882 |
+
$container;
|
2883 |
+
|
2884 |
+
// Destroy and Reinit
|
2885 |
+
if ( $input.hasClass('wp-color-picker') ) {
|
2886 |
+
$input.closest('.wp-picker-container').after($input).remove();
|
2887 |
+
}
|
2888 |
+
|
2889 |
+
$input.wpColorPicker({
|
2890 |
+
palettes: palette_color,
|
2891 |
+
change: function( event, ui ) {
|
2892 |
+
|
2893 |
+
var ui_color_value = ui.color.toString();
|
2894 |
+
|
2895 |
+
$container.removeClass('csf--transparent-active');
|
2896 |
+
$container.find('.csf--transparent-offset').css('background-color', ui_color_value);
|
2897 |
+
$input.val(ui_color_value).trigger('change');
|
2898 |
+
|
2899 |
+
},
|
2900 |
+
create: function() {
|
2901 |
+
|
2902 |
+
$container = $input.closest('.wp-picker-container');
|
2903 |
+
|
2904 |
+
var a8cIris = $input.data('a8cIris'),
|
2905 |
+
$transparent_wrap = $('<div class="csf--transparent-wrap">' +
|
2906 |
+
'<div class="csf--transparent-slider"></div>' +
|
2907 |
+
'<div class="csf--transparent-offset"></div>' +
|
2908 |
+
'<div class="csf--transparent-text"></div>' +
|
2909 |
+
'<div class="csf--transparent-button">transparent <i class="fas fa-toggle-off"></i></div>' +
|
2910 |
+
'</div>').appendTo( $container.find('.wp-picker-holder') ),
|
2911 |
+
$transparent_slider = $transparent_wrap.find('.csf--transparent-slider'),
|
2912 |
+
$transparent_text = $transparent_wrap.find('.csf--transparent-text'),
|
2913 |
+
$transparent_offset = $transparent_wrap.find('.csf--transparent-offset'),
|
2914 |
+
$transparent_button = $transparent_wrap.find('.csf--transparent-button');
|
2915 |
+
|
2916 |
+
if ( $input.val() === 'transparent' ) {
|
2917 |
+
$container.addClass('csf--transparent-active');
|
2918 |
+
}
|
2919 |
+
|
2920 |
+
$transparent_button.on('click', function() {
|
2921 |
+
if ( $input.val() !== 'transparent' ) {
|
2922 |
+
$input.val('transparent').trigger('change').removeClass('iris-error');
|
2923 |
+
$container.addClass('csf--transparent-active');
|
2924 |
+
} else {
|
2925 |
+
$input.val( a8cIris._color.toString() ).trigger('change');
|
2926 |
+
$container.removeClass('csf--transparent-active');
|
2927 |
+
}
|
2928 |
+
});
|
2929 |
+
|
2930 |
+
$transparent_slider.slider({
|
2931 |
+
value: picker_color.transparent,
|
2932 |
+
step: 1,
|
2933 |
+
min: 0,
|
2934 |
+
max: 100,
|
2935 |
+
slide: function( event, ui ) {
|
2936 |
+
|
2937 |
+
var slide_value = parseFloat( ui.value / 100 );
|
2938 |
+
a8cIris._color._alpha = slide_value;
|
2939 |
+
$input.wpColorPicker( 'color', a8cIris._color.toString() );
|
2940 |
+
$transparent_text.text( ( slide_value === 1 || slide_value === 0 ? '' : slide_value ) );
|
2941 |
+
|
2942 |
+
},
|
2943 |
+
create: function() {
|
2944 |
+
|
2945 |
+
var slide_value = parseFloat( picker_color.transparent / 100 ),
|
2946 |
+
text_value = slide_value < 1 ? slide_value : '';
|
2947 |
+
|
2948 |
+
$transparent_text.text(text_value);
|
2949 |
+
$transparent_offset.css('background-color', picker_color.value);
|
2950 |
+
|
2951 |
+
$container.on('click', '.wp-picker-clear', function() {
|
2952 |
+
|
2953 |
+
a8cIris._color._alpha = 1;
|
2954 |
+
$transparent_text.text('');
|
2955 |
+
$transparent_slider.slider('option', 'value', 100);
|
2956 |
+
$container.removeClass('csf--transparent-active');
|
2957 |
+
$input.trigger('change');
|
2958 |
+
|
2959 |
+
});
|
2960 |
+
|
2961 |
+
$container.on('click', '.wp-picker-default', function() {
|
2962 |
+
|
2963 |
+
var default_color = CSF.funcs.parse_color( $input.data('default-color') ),
|
2964 |
+
default_value = parseFloat( default_color.transparent / 100 ),
|
2965 |
+
default_text = default_value < 1 ? default_value : '';
|
2966 |
+
|
2967 |
+
a8cIris._color._alpha = default_value;
|
2968 |
+
$transparent_text.text(default_text);
|
2969 |
+
$transparent_slider.slider('option', 'value', default_color.transparent);
|
2970 |
+
|
2971 |
+
if ( default_color.value === 'transparent' ) {
|
2972 |
+
$input.removeClass('iris-error');
|
2973 |
+
$container.addClass('csf--transparent-active');
|
2974 |
+
}
|
2975 |
+
|
2976 |
+
});
|
2977 |
+
|
2978 |
+
}
|
2979 |
+
});
|
2980 |
+
}
|
2981 |
+
});
|
2982 |
+
|
2983 |
+
});
|
2984 |
+
};
|
2985 |
+
|
2986 |
+
//
|
2987 |
+
// ChosenJS
|
2988 |
+
//
|
2989 |
+
$.fn.csf_chosen = function() {
|
2990 |
+
return this.each( function() {
|
2991 |
+
|
2992 |
+
var $this = $(this),
|
2993 |
+
$inited = $this.parent().find('.chosen-container'),
|
2994 |
+
is_sortable = $this.hasClass('csf-chosen-sortable') || false,
|
2995 |
+
is_ajax = $this.hasClass('csf-chosen-ajax') || false,
|
2996 |
+
is_multiple = $this.attr('multiple') || false,
|
2997 |
+
set_width = is_multiple ? '100%' : 'auto',
|
2998 |
+
set_options = $.extend({
|
2999 |
+
allow_single_deselect: true,
|
3000 |
+
disable_search_threshold: 10,
|
3001 |
+
width: set_width,
|
3002 |
+
no_results_text: window.csf_vars.i18n.no_results_text,
|
3003 |
+
}, $this.data('chosen-settings'));
|
3004 |
+
|
3005 |
+
if ( $inited.length ) {
|
3006 |
+
$inited.remove();
|
3007 |
+
}
|
3008 |
+
|
3009 |
+
// Chosen ajax
|
3010 |
+
if ( is_ajax ) {
|
3011 |
+
|
3012 |
+
var set_ajax_options = $.extend({
|
3013 |
+
data: {
|
3014 |
+
type: 'post',
|
3015 |
+
nonce: '',
|
3016 |
+
},
|
3017 |
+
allow_single_deselect: true,
|
3018 |
+
disable_search_threshold: -1,
|
3019 |
+
width: '100%',
|
3020 |
+
min_length: 3,
|
3021 |
+
type_delay: 500,
|
3022 |
+
typing_text: window.csf_vars.i18n.typing_text,
|
3023 |
+
searching_text: window.csf_vars.i18n.searching_text,
|
3024 |
+
no_results_text: window.csf_vars.i18n.no_results_text,
|
3025 |
+
}, $this.data('chosen-settings'));
|
3026 |
+
|
3027 |
+
$this.CSFAjaxChosen(set_ajax_options);
|
3028 |
+
|
3029 |
+
} else {
|
3030 |
+
|
3031 |
+
$this.chosen(set_options);
|
3032 |
+
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
// Chosen keep options order
|
3036 |
+
if ( is_multiple ) {
|
3037 |
+
|
3038 |
+
var $hidden_select = $this.parent().find('.csf-hide-select');
|
3039 |
+
var $hidden_value = $hidden_select.val() || [];
|
3040 |
+
|
3041 |
+
$this.on('change', function(obj, result) {
|
3042 |
+
|
3043 |
+
if ( result && result.selected ) {
|
3044 |
+
$hidden_select.append( '<option value="'+ result.selected +'" selected="selected">'+ result.selected +'</option>' );
|
3045 |
+
} else if ( result && result.deselected ) {
|
3046 |
+
$hidden_select.find('option[value="'+ result.deselected +'"]').remove();
|
3047 |
+
}
|
3048 |
+
|
3049 |
+
// Force customize refresh
|
3050 |
+
if ( window.wp.customize !== undefined && $hidden_select.children().length === 0 && $hidden_select.data('customize-setting-link') ) {
|
3051 |
+
window.wp.customize.control( $hidden_select.data('customize-setting-link') ).setting.set('');
|
3052 |
+
}
|
3053 |
+
|
3054 |
+
$hidden_select.trigger('change');
|
3055 |
+
|
3056 |
+
});
|
3057 |
+
|
3058 |
+
// Chosen order abstract
|
3059 |
+
$this.CSFChosenOrder($hidden_value, true);
|
3060 |
+
|
3061 |
+
}
|
3062 |
+
|
3063 |
+
// Chosen sortable
|
3064 |
+
if ( is_sortable ) {
|
3065 |
+
|
3066 |
+
var $chosen_container = $this.parent().find('.chosen-container');
|
3067 |
+
var $chosen_choices = $chosen_container.find('.chosen-choices');
|
3068 |
+
|
3069 |
+
$chosen_choices.bind('mousedown', function( event ) {
|
3070 |
+
if ( $(event.target).is('span') ) {
|
3071 |
+
event.stopPropagation();
|
3072 |
+
}
|
3073 |
+
});
|
3074 |
+
|
3075 |
+
$chosen_choices.sortable({
|
3076 |
+
items: 'li:not(.search-field)',
|
3077 |
+
helper: 'orginal',
|
3078 |
+
cursor: 'move',
|
3079 |
+
placeholder: 'search-choice-placeholder',
|
3080 |
+
start: function(e,ui) {
|
3081 |
+
ui.placeholder.width( ui.item.innerWidth() );
|
3082 |
+
ui.placeholder.height( ui.item.innerHeight() );
|
3083 |
+
},
|
3084 |
+
update: function( e, ui ) {
|
3085 |
+
|
3086 |
+
var select_options = '';
|
3087 |
+
var chosen_object = $this.data('chosen');
|
3088 |
+
var $prev_select = $this.parent().find('.csf-hide-select');
|
3089 |
+
|
3090 |
+
$chosen_choices.find('.search-choice-close').each( function() {
|
3091 |
+
var option_array_index = $(this).data('option-array-index');
|
3092 |
+
$.each(chosen_object.results_data, function(index, data) {
|
3093 |
+
if ( data.array_index === option_array_index ){
|
3094 |
+
select_options += '<option value="'+ data.value +'" selected>'+ data.value +'</option>';
|
3095 |
+
}
|
3096 |
+
});
|
3097 |
+
});
|
3098 |
+
|
3099 |
+
$prev_select.children().remove();
|
3100 |
+
$prev_select.append(select_options);
|
3101 |
+
$prev_select.trigger('change');
|
3102 |
+
|
3103 |
+
}
|
3104 |
+
});
|
3105 |
+
|
3106 |
+
}
|
3107 |
+
|
3108 |
+
});
|
3109 |
+
};
|
3110 |
+
|
3111 |
+
//
|
3112 |
+
// Helper Checkbox Checker
|
3113 |
+
//
|
3114 |
+
$.fn.csf_checkbox = function() {
|
3115 |
+
return this.each( function() {
|
3116 |
+
|
3117 |
+
var $this = $(this),
|
3118 |
+
$input = $this.find('.csf--input'),
|
3119 |
+
$checkbox = $this.find('.csf--checkbox');
|
3120 |
+
|
3121 |
+
$checkbox.on('click', function() {
|
3122 |
+
$input.val( Number( $checkbox.prop('checked') ) ).trigger('change');
|
3123 |
+
});
|
3124 |
+
|
3125 |
+
});
|
3126 |
+
};
|
3127 |
+
|
3128 |
+
//
|
3129 |
+
// Siblings
|
3130 |
+
//
|
3131 |
+
$.fn.csf_siblings = function() {
|
3132 |
+
return this.each( function() {
|
3133 |
+
|
3134 |
+
var $this = $(this),
|
3135 |
+
$siblings = $this.find('.csf--sibling'),
|
3136 |
+
multiple = $this.data('multiple') || false;
|
3137 |
+
|
3138 |
+
$siblings.on('click', function() {
|
3139 |
+
|
3140 |
+
var $sibling = $(this);
|
3141 |
+
|
3142 |
+
if ( multiple ) {
|
3143 |
+
|
3144 |
+
if ( $sibling.hasClass('csf--active') ) {
|
3145 |
+
$sibling.removeClass('csf--active');
|
3146 |
+
$sibling.find('input').prop('checked', false).trigger('change');
|
3147 |
+
} else {
|
3148 |
+
$sibling.addClass('csf--active');
|
3149 |
+
$sibling.find('input').prop('checked', true).trigger('change');
|
3150 |
+
}
|
3151 |
+
|
3152 |
+
} else {
|
3153 |
+
|
3154 |
+
$this.find('input').prop('checked', false);
|
3155 |
+
$sibling.find('input').prop('checked', true).trigger('change');
|
3156 |
+
$sibling.addClass('csf--active').siblings().removeClass('csf--active');
|
3157 |
+
|
3158 |
+
}
|
3159 |
+
|
3160 |
+
});
|
3161 |
+
|
3162 |
+
});
|
3163 |
+
};
|
3164 |
+
|
3165 |
+
//
|
3166 |
+
// Help Tooltip
|
3167 |
+
//
|
3168 |
+
$.fn.csf_help = function() {
|
3169 |
+
return this.each( function() {
|
3170 |
+
|
3171 |
+
var $this = $(this),
|
3172 |
+
$tooltip,
|
3173 |
+
offset_left;
|
3174 |
+
|
3175 |
+
$this.on({
|
3176 |
+
mouseenter: function() {
|
3177 |
+
|
3178 |
+
$tooltip = $( '<div class="csf-tooltip"></div>' ).html( $this.find('.csf-help-text').html() ).appendTo('body');
|
3179 |
+
offset_left = ( CSF.vars.is_rtl ) ? ( $this.offset().left + 24 ) : ( $this.offset().left - $tooltip.outerWidth() );
|
3180 |
+
|
3181 |
+
$tooltip.css({
|
3182 |
+
top: $this.offset().top - ( ( $tooltip.outerHeight() / 2 ) - 14 ),
|
3183 |
+
left: offset_left,
|
3184 |
+
});
|
3185 |
+
|
3186 |
+
},
|
3187 |
+
mouseleave: function() {
|
3188 |
+
|
3189 |
+
if ( $tooltip !== undefined ) {
|
3190 |
+
$tooltip.remove();
|
3191 |
+
}
|
3192 |
+
|
3193 |
+
}
|
3194 |
+
|
3195 |
+
});
|
3196 |
+
|
3197 |
+
});
|
3198 |
+
};
|
3199 |
+
|
3200 |
+
//
|
3201 |
+
// Customize Refresh
|
3202 |
+
//
|
3203 |
+
$.fn.csf_customizer_refresh = function() {
|
3204 |
+
return this.each( function() {
|
3205 |
+
|
3206 |
+
var $this = $(this),
|
3207 |
+
$complex = $this.closest('.csf-customize-complex');
|
3208 |
+
|
3209 |
+
if ( $complex.length ) {
|
3210 |
+
|
3211 |
+
var unique_id = $complex.data('unique-id');
|
3212 |
+
|
3213 |
+
if ( unique_id === undefined ) {
|
3214 |
+
return;
|
3215 |
+
}
|
3216 |
+
|
3217 |
+
var $input = $complex.find(':input'),
|
3218 |
+
option_id = $complex.data('option-id'),
|
3219 |
+
obj = $input.serializeObjectCSF(),
|
3220 |
+
data = ( ! $.isEmptyObject(obj) && obj[unique_id] && obj[unique_id][option_id] ) ? obj[unique_id][option_id] : '',
|
3221 |
+
control = window.wp.customize.control(unique_id +'['+ option_id +']');
|
3222 |
+
|
3223 |
+
// clear the value to force refresh.
|
3224 |
+
control.setting._value = null;
|
3225 |
+
|
3226 |
+
control.setting.set( data );
|
3227 |
+
|
3228 |
+
} else {
|
3229 |
+
|
3230 |
+
$this.find(':input').first().trigger('change');
|
3231 |
+
|
3232 |
+
}
|
3233 |
+
|
3234 |
+
$(document).trigger('csf-customizer-refresh', $this);
|
3235 |
+
|
3236 |
+
});
|
3237 |
+
};
|
3238 |
+
|
3239 |
+
//
|
3240 |
+
// Customize Listen Form Elements
|
3241 |
+
//
|
3242 |
+
$.fn.csf_customizer_listen = function( options ) {
|
3243 |
+
|
3244 |
+
var settings = $.extend({
|
3245 |
+
closest: false,
|
3246 |
+
}, options );
|
3247 |
+
|
3248 |
+
return this.each( function() {
|
3249 |
+
|
3250 |
+
if ( window.wp.customize === undefined ) { return; }
|
3251 |
+
|
3252 |
+
var $this = ( settings.closest ) ? $(this).closest('.csf-customize-complex') : $(this),
|
3253 |
+
$input = $this.find(':input'),
|
3254 |
+
unique_id = $this.data('unique-id'),
|
3255 |
+
option_id = $this.data('option-id');
|
3256 |
+
|
3257 |
+
if ( unique_id === undefined ) {
|
3258 |
+
return;
|
3259 |
+
}
|
3260 |
+
|
3261 |
+
$input.on('change keyup csf.change', function() {
|
3262 |
+
|
3263 |
+
var obj = $this.find(':input').serializeObjectCSF();
|
3264 |
+
var val = ( !$.isEmptyObject(obj) && obj[unique_id] && obj[unique_id][option_id] ) ? obj[unique_id][option_id] : '';
|
3265 |
+
|
3266 |
+
window.wp.customize.control( unique_id +'['+ option_id +']' ).setting.set( val );
|
3267 |
+
|
3268 |
+
});
|
3269 |
+
|
3270 |
+
});
|
3271 |
+
};
|
3272 |
+
|
3273 |
+
//
|
3274 |
+
// Customizer Listener for Reload JS
|
3275 |
+
//
|
3276 |
+
$(document).on('expanded', '.control-section', function() {
|
3277 |
+
|
3278 |
+
var $this = $(this);
|
3279 |
+
|
3280 |
+
if ( $this.hasClass('open') && !$this.data('inited') ) {
|
3281 |
+
|
3282 |
+
var $fields = $this.find('.csf-customize-field');
|
3283 |
+
var $complex = $this.find('.csf-customize-complex');
|
3284 |
+
|
3285 |
+
if ( $fields.length ) {
|
3286 |
+
$this.csf_dependency();
|
3287 |
+
$fields.csf_reload_script({dependency: false});
|
3288 |
+
$complex.csf_customizer_listen();
|
3289 |
+
}
|
3290 |
+
|
3291 |
+
$this.data('inited', true);
|
3292 |
+
|
3293 |
+
}
|
3294 |
+
|
3295 |
+
});
|
3296 |
+
|
3297 |
+
//
|
3298 |
+
// Window on resize
|
3299 |
+
//
|
3300 |
+
CSF.vars.$window.on('resize csf.resize', CSF.helper.debounce( function( event ) {
|
3301 |
+
|
3302 |
+
var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? CSF.vars.$window.width() : window.innerWidth;
|
3303 |
+
|
3304 |
+
if ( window_width <= 782 && !CSF.vars.onloaded ) {
|
3305 |
+
$('.csf-section').csf_reload_script();
|
3306 |
+
CSF.vars.onloaded = true;
|
3307 |
+
}
|
3308 |
+
|
3309 |
+
}, 200)).trigger('csf.resize');
|
3310 |
+
|
3311 |
+
//
|
3312 |
+
// Widgets Framework
|
3313 |
+
//
|
3314 |
+
$.fn.csf_widgets = function() {
|
3315 |
+
return this.each( function() {
|
3316 |
+
|
3317 |
+
$(document).on('widget-added widget-updated', function( event, $widget ) {
|
3318 |
+
|
3319 |
+
var $fields = $widget.find('.csf-fields');
|
3320 |
+
|
3321 |
+
if ( $fields.length ) {
|
3322 |
+
$fields.csf_reload_script();
|
3323 |
+
}
|
3324 |
+
|
3325 |
+
});
|
3326 |
+
|
3327 |
+
$(document).on('click', '.widget-top', function( event ) {
|
3328 |
+
|
3329 |
+
var $fields = $(this).parent().find('.csf-fields');
|
3330 |
+
|
3331 |
+
if ( $fields.length ) {
|
3332 |
+
$fields.csf_reload_script();
|
3333 |
+
}
|
3334 |
+
|
3335 |
+
});
|
3336 |
+
|
3337 |
+
$('.widgets-sortables, .control-section-sidebar').on('sortstop', function( event, ui ) {
|
3338 |
+
ui.item.find('.csf-fields').csf_reload_script_retry();
|
3339 |
+
});
|
3340 |
+
|
3341 |
+
});
|
3342 |
+
};
|
3343 |
+
|
3344 |
+
//
|
3345 |
+
// Nav Menu Options Framework
|
3346 |
+
//
|
3347 |
+
$.fn.csf_nav_menu = function() {
|
3348 |
+
return this.each( function() {
|
3349 |
+
|
3350 |
+
var $navmenu = $(this);
|
3351 |
+
|
3352 |
+
$navmenu.on('click', 'a.item-edit', function() {
|
3353 |
+
$(this).closest('li.menu-item').find('.csf-fields').csf_reload_script();
|
3354 |
+
});
|
3355 |
+
|
3356 |
+
$navmenu.on('sortstop', function( event, ui ) {
|
3357 |
+
ui.item.find('.csf-fields').csf_reload_script_retry();
|
3358 |
+
});
|
3359 |
+
|
3360 |
+
});
|
3361 |
+
};
|
3362 |
+
|
3363 |
+
//
|
3364 |
+
// Retry Plugins
|
3365 |
+
//
|
3366 |
+
$.fn.csf_reload_script_retry = function() {
|
3367 |
+
return this.each( function() {
|
3368 |
+
|
3369 |
+
var $this = $(this);
|
3370 |
+
|
3371 |
+
if ( $this.data('inited') ) {
|
3372 |
+
$this.children('.csf-field-wp_editor').csf_field_wp_editor();
|
3373 |
+
}
|
3374 |
+
|
3375 |
+
});
|
3376 |
+
};
|
3377 |
+
|
3378 |
+
//
|
3379 |
+
// Reload Plugins
|
3380 |
+
//
|
3381 |
+
$.fn.csf_reload_script = function( options ) {
|
3382 |
+
|
3383 |
+
var settings = $.extend({
|
3384 |
+
dependency: true,
|
3385 |
+
}, options );
|
3386 |
+
|
3387 |
+
return this.each( function() {
|
3388 |
+
|
3389 |
+
var $this = $(this);
|
3390 |
+
|
3391 |
+
// Avoid for conflicts
|
3392 |
+
if ( !$this.data('inited') ) {
|
3393 |
+
|
3394 |
+
// Field plugins
|
3395 |
+
$this.children('.csf-field-accordion').csf_field_accordion();
|
3396 |
+
$this.children('.csf-field-backup').csf_field_backup();
|
3397 |
+
$this.children('.csf-field-background').csf_field_background();
|
3398 |
+
$this.children('.csf-field-code_editor').csf_field_code_editor();
|
3399 |
+
$this.children('.csf-field-date').csf_field_date();
|
3400 |
+
$this.children('.csf-field-datetime').csf_field_datetime();
|
3401 |
+
$this.children('.csf-field-fieldset').csf_field_fieldset();
|
3402 |
+
$this.children('.csf-field-gallery').csf_field_gallery();
|
3403 |
+
$this.children('.csf-field-group').csf_field_group();
|
3404 |
+
$this.children('.csf-field-icon').csf_field_icon();
|
3405 |
+
$this.children('.csf-field-link').csf_field_link();
|
3406 |
+
$this.children('.csf-field-media').csf_field_media();
|
3407 |
+
$this.children('.csf-field-map').csf_field_map();
|
3408 |
+
$this.children('.csf-field-repeater').csf_field_repeater();
|
3409 |
+
$this.children('.csf-field-slider').csf_field_slider();
|
3410 |
+
$this.children('.csf-field-sortable').csf_field_sortable();
|
3411 |
+
$this.children('.csf-field-sorter').csf_field_sorter();
|
3412 |
+
$this.children('.csf-field-spinner').csf_field_spinner();
|
3413 |
+
$this.children('.csf-field-switcher').csf_field_switcher();
|
3414 |
+
$this.children('.csf-field-tabbed').csf_field_tabbed();
|
3415 |
+
$this.children('.csf-field-typography').csf_field_typography();
|
3416 |
+
$this.children('.csf-field-upload').csf_field_upload();
|
3417 |
+
$this.children('.csf-field-wp_editor').csf_field_wp_editor();
|
3418 |
+
|
3419 |
+
// Field colors
|
3420 |
+
$this.children('.csf-field-border').find('.csf-color').csf_color();
|
3421 |
+
$this.children('.csf-field-background').find('.csf-color').csf_color();
|
3422 |
+
$this.children('.csf-field-color').find('.csf-color').csf_color();
|
3423 |
+
$this.children('.csf-field-color_group').find('.csf-color').csf_color();
|
3424 |
+
$this.children('.csf-field-link_color').find('.csf-color').csf_color();
|
3425 |
+
$this.children('.csf-field-typography').find('.csf-color').csf_color();
|
3426 |
+
|
3427 |
+
// Field chosenjs
|
3428 |
+
$this.children('.csf-field-select').find('.csf-chosen').csf_chosen();
|
3429 |
+
|
3430 |
+
// Field Checkbox
|
3431 |
+
$this.children('.csf-field-checkbox').find('.csf-checkbox').csf_checkbox();
|
3432 |
+
|
3433 |
+
// Field Siblings
|
3434 |
+
$this.children('.csf-field-button_set').find('.csf-siblings').csf_siblings();
|
3435 |
+
$this.children('.csf-field-image_select').find('.csf-siblings').csf_siblings();
|
3436 |
+
$this.children('.csf-field-palette').find('.csf-siblings').csf_siblings();
|
3437 |
+
|
3438 |
+
// Help Tooptip
|
3439 |
+
$this.children('.csf-field').find('.csf-help').csf_help();
|
3440 |
+
|
3441 |
+
if ( settings.dependency ) {
|
3442 |
+
$this.csf_dependency();
|
3443 |
+
}
|
3444 |
+
|
3445 |
+
$this.data('inited', true);
|
3446 |
+
|
3447 |
+
$(document).trigger('csf-reload-script', $this);
|
3448 |
+
|
3449 |
+
}
|
3450 |
+
|
3451 |
+
});
|
3452 |
+
};
|
3453 |
+
|
3454 |
+
//
|
3455 |
+
// Document ready and run scripts
|
3456 |
+
//
|
3457 |
+
$(document).ready( function() {
|
3458 |
+
|
3459 |
+
$('.csf-save').csf_save();
|
3460 |
+
$('.csf-options').csf_options();
|
3461 |
+
$('.csf-sticky-header').csf_sticky();
|
3462 |
+
$('.csf-nav-options').csf_nav_options();
|
3463 |
+
$('.csf-nav-metabox').csf_nav_metabox();
|
3464 |
+
$('.csf-taxonomy').csf_taxonomy();
|
3465 |
+
$('.csf-page-templates').csf_page_templates();
|
3466 |
+
$('.csf-post-formats').csf_post_formats();
|
3467 |
+
$('.csf-shortcode').csf_shortcode();
|
3468 |
+
$('.csf-search').csf_search();
|
3469 |
+
$('.csf-confirm').csf_confirm();
|
3470 |
+
$('.csf-expand-all').csf_expand_all();
|
3471 |
+
$('.csf-onload').csf_reload_script();
|
3472 |
+
$('#widgets-editor').csf_widgets();
|
3473 |
+
$('#widgets-right').csf_widgets();
|
3474 |
+
$('#menu-to-edit').csf_nav_menu();
|
3475 |
+
|
3476 |
+
});
|
3477 |
+
|
3478 |
+
})( jQuery, window, document );
|
vendor/codestar-framework/assets/js/main.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.
|
2 |
-
|
3 |
-
!function(I,_,b,y){"use strict";var T=T||{};T.funcs={},T.vars={onloaded:!1,$body:I("body"),$window:I(_),$document:I(b),$form_warning:null,is_confirm:!1,form_modified:!1,code_themes:[],is_rtl:I("body").hasClass("rtl")},T.helper={uid:function(e){return(e||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(e){return(e+"").replace(/(\[|\])/g,"\\$1")},name_nested_replace:function(e,t){var n=new RegExp(T.helper.preg_quote(t+"[\\d+]"),"g");e.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),e.each(function(e){I(this).find(":input").each(function(){this.name=this.name.replace(n,t+"["+e+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(i,s,a){var c;return function(){var e=this,t=arguments,n=a&&!c;clearTimeout(c),c=setTimeout(function(){c=null,a||i.apply(e,t)},s),n&&i.apply(e,t)}}},I.fn.csf_clone=function(){for(var e=I.fn.clone.apply(this,arguments),t=this.find("select").add(this.filter("select")),n=e.find("select").add(e.filter("select")),i=0;i<t.length;++i)for(var s=0;s<t[i].options.length;++s)!0===t[i].options[s].selected&&(n[i].options[s].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),e},I.fn.csf_expand_all=function(){return this.each(function(){I(this).on("click",function(e){e.preventDefault(),I(".csf-wrapper").toggleClass("csf-show-all"),I(".csf-section").csf_reload_script(),I(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},I.fn.csf_nav_options=function(){return this.each(function(){var s,e=I(this),t=I(_),a=I("#wpwrap"),c=e.find("a");t.on("hashchange csf.hashchange",function(){var e=_.location.hash.replace("#tab=",""),t=e||c.first().attr("href").replace("#tab=",""),n=I('[data-tab-id="'+t+'"]');if(n.length){n.closest(".csf-tab-item").addClass("csf-tab-expanded").siblings().removeClass("csf-tab-expanded"),n.next().is("ul")&&(t=(n=n.next().find("li").first().find("a")).data("tab-id")),c.removeClass("csf-active"),n.addClass("csf-active"),s&&s.addClass("hidden");var i=I('[data-section-id="'+t+'"]');i.removeClass("hidden"),i.csf_reload_script(),I(".csf-section-id").val(i.index()+1),s=i,a.hasClass("wp-responsive-open")&&(I("html, body").animate({scrollTop:i.offset().top-50},200),a.removeClass("wp-responsive-open"))}}).trigger("csf.hashchange")})},I.fn.csf_nav_metabox=function(){return this.each(function(){var s,e=I(this),a=e.find("a"),c=e.parent().find(".csf-section");a.each(function(i){I(this).on("click",function(e){e.preventDefault();var t=I(this);a.removeClass("csf-active"),t.addClass("csf-active"),s!==y&&s.addClass("hidden");var n=c.eq(i);n.removeClass("hidden"),n.csf_reload_script(),s=n})}),a.first().trigger("click")})},I.fn.csf_page_templates=function(){this.length&&I(b).on("change",".editor-page-attributes__template select, #page_template",function(){var e=I(this).val()||"default";I(".csf-page-templates").removeClass("csf-metabox-show").addClass("csf-metabox-hide"),I(".csf-page-"+e.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("csf-metabox-hide").addClass("csf-metabox-show")})},I.fn.csf_post_formats=function(){this.length&&I(b).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var e=I(this).val()||"default";e="0"===e?"default":e,I(".csf-post-formats").removeClass("csf-metabox-show").addClass("csf-metabox-hide"),I(".csf-post-format-"+e).removeClass("csf-metabox-hide").addClass("csf-metabox-show")})},I.fn.csf_search=function(){return this.each(function(){I(this).find("input").on("change keyup",function(){var n=I(this).val(),e=I(".csf-wrapper"),t=e.find(".csf-section").find("> .csf-field:not(.csf-depend-on)"),i=t.find("> .csf-title, .csf-search-tags");3<n.length?(t.addClass("csf-metabox-hide"),e.addClass("csf-search-all"),i.each(function(){var e=I(this);if(e.text().match(new RegExp(".*?"+n+".*?","i"))){var t=e.closest(".csf-field");t.removeClass("csf-metabox-hide"),t.parent().csf_reload_script()}})):(t.removeClass("csf-metabox-hide"),e.removeClass("csf-search-all"))})})},I.fn.csf_sticky=function(){return this.each(function(){var i=I(this),s=I(_),a=i.find(".csf-header-inner"),c=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right")),r=0,o=!1,e=function(){o||requestAnimationFrame(function(){var e,t,n;e=i.offset().top,t=Math.max(32,e-r),n=s.innerWidth(),t<=32&&782<n?(a.css({width:i.outerWidth()-c}),i.css({height:i.outerHeight()}).addClass("csf-sticky")):(a.removeAttr("style"),i.removeAttr("style").removeClass("csf-sticky")),o=!1}),o=!0},t=function(){r=s.scrollTop(),e()};s.on("scroll resize",t),t()})},I.fn.csf_dependency=function(){return this.each(function(){var e=I(this),t=e.children("[data-controller]");if(t.length){var n=I.csf_deps.createRuleset(),i=I.csf_deps.createRuleset(),f=[],l=[];t.each(function(){var s=I(this),e=s.data("controller").split("|"),a=s.data("condition").split("|"),c=s.data("value").toString().split("|"),r=!!s.data("depend-global"),o=r?i:n;I.each(e,function(e,t){var n=c[e]||"",i=a[e]||a[0];(o=o.createRule('[data-depend-id="'+t+'"]',i,n)).include(s),r?l.push(t):f.push(t)})}),f.length&&I.csf_deps.enable(e,n,f),l.length&&I.csf_deps.enable(T.vars.$body,i,l)}})},I.fn.csf_field_accordion=function(){return this.each(function(){I(this).find(".csf-accordion-title").on("click",function(){var e=I(this),t=e.find(".csf-accordion-icon"),n=e.next();t.hasClass("fa-angle-right")?t.removeClass("fa-angle-right").addClass("fa-angle-down"):t.removeClass("fa-angle-down").addClass("fa-angle-right"),n.data("opened")||(n.csf_reload_script(),n.data("opened",!0)),n.toggleClass("csf-accordion-open")})})},I.fn.csf_field_backup=function(){return this.each(function(){if(_.wp.customize!==y){var t=this,n=I(this),i=(I("body"),n.find(".csf-import")),s=n.find(".csf-reset");t.notificationOverlay=function(){wp.customize.notifications&&wp.customize.OverlayNotification&&(wp.customize.state("saved").get()||(wp.customize.state("changesetStatus").set("trash"),wp.customize.each(function(e){e._dirty=!1}),wp.customize.state("saved").set(!0)),wp.customize.notifications.add(new wp.customize.OverlayNotification("csf_field_backup_notification",{type:"default",message:" ",loading:!0})))},s.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("csf-reset",{unique:s.data("unique"),nonce:s.data("nonce")}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("csf_field_backup_notification")}))}),i.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("csf-import",{unique:i.data("unique"),nonce:i.data("nonce"),data:n.find(".csf-import-data").val()}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("csf_field_backup_notification")}))})}})},I.fn.csf_field_background=function(){return this.each(function(){I(this).find(".csf--background-image").csf_reload_script()})},I.fn.csf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var t=I(this),i=t.find("textarea"),e=t.find(".CodeMirror"),s=i.data("editor");e.length&&e.remove();var a=setInterval(function(){if(t.is(":visible")){var n=CodeMirror.fromTextArea(i[0],s);if("default"!==s.theme&&-1===T.vars.code_themes.indexOf(s.theme)){var e=I("<link>");I("#csf-codemirror-css").after(e),e.attr({rel:"stylesheet",id:"csf-codemirror-"+s.theme+"-css",href:s.cdnURL+"/theme/"+s.theme+".min.css",type:"text/css",media:"all"}),T.vars.code_themes.push(s.theme)}CodeMirror.modeURL=s.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(n,s.mode),n.on("change",function(e,t){i.val(n.getValue()).trigger("change")}),clearInterval(a)}})}})},I.fn.csf_field_date=function(){return this.each(function(){var e=I(this),i=e.find("input"),s=e.find(".csf-date-settings").data("settings"),t={showAnim:"",beforeShow:function(e,t){I(t.dpDiv).addClass("csf-datepicker-wrapper")},onClose:function(e,t){I(t.dpDiv).removeClass("csf-datepicker-wrapper")}};s=I.extend({},s,t),2===i.length&&(s=I.extend({},s,{onSelect:function(e){I(this),i.first();var t=i.first().attr("id")===I(this).attr("id")?"minDate":"maxDate",n=I.datepicker.parseDate(s.dateFormat,e);i.not(this).datepicker("option",t,n)}})),i.each(function(){var e=I(this);e.hasClass("hasDatepicker")&&e.removeAttr("id").removeClass("hasDatepicker"),e.datepicker(s)})})},I.fn.csf_field_datetime=function(){return this.each(function(){var e=I(this),i=e.find("input"),t=e.find(".csf-datetime-settings").data("settings");t=I.extend({},t,{onReady:function(e,t,n){I(n.calendarContainer).addClass("csf-flatpickr")}}),2===i.length&&(t=I.extend({},t,{onChange:function(e,t,n){"from"===I(n.element).data("type")?i.last().get(0)._flatpickr.set("minDate",e[0]):i.first().get(0)._flatpickr.set("maxDate",e[0])}})),i.each(function(){I(this).flatpickr(t)})})},I.fn.csf_field_fieldset=function(){return this.each(function(){I(this).find(".csf-fieldset-content").csf_reload_script()})},I.fn.csf_field_gallery=function(){return this.each(function(){var a,e=I(this),c=e.find(".csf-edit-gallery"),r=e.find(".csf-clear-gallery"),o=e.find("ul"),f=e.find("input");e.find("img");e.on("click",".csf-button, .csf-edit-gallery",function(e){var t=I(this),n=f.val(),i=t.hasClass("csf-edit-gallery")?"edit":"add",s="add"!==i||n.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&("gallery"===s?(a=_.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(a=_.wp.media.gallery.edit('[gallery ids="'+n+'"]'),"add"===i&&a.setState("gallery-library")),a.on("update",function(e){o.empty();var t=e.models.map(function(e){var t=e.toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url?t.sizes.thumbnail.url:t.url;return o.append('<li><img src="'+n+'"></li>'),t.id});f.val(t.join(",")).trigger("change"),r.removeClass("hidden"),c.removeClass("hidden")}))}),r.on("click",function(e){e.preventDefault(),o.empty(),f.val("").trigger("change"),r.addClass("hidden"),c.addClass("hidden")})})},I.fn.csf_field_group=function(){return this.each(function(){var e=I(this),t=e.children(".csf-fieldset"),n=t.length?t:e,r=n.children(".csf-cloneable-wrapper"),i=n.children(".csf-cloneable-hidden"),o=n.children(".csf-cloneable-max"),f=n.children(".csf-cloneable-min"),l=r.data("field-id"),d=Boolean(Number(r.data("title-number"))),h=parseInt(r.data("max")),s=parseInt(r.data("min"));r.hasClass("ui-accordion")&&r.find(".ui-accordion-header-icon").remove();var p=function(e){e.find(".csf-cloneable-title-number").each(function(e){I(this).html(I(this).closest(".csf-cloneable-item").index()+1+".")})};r.accordion({header:"> .csf-cloneable-item > .csf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"csf-cloneable-header-icon fas fa-angle-right",activeHeader:"csf-cloneable-header-icon fas fa-angle-down"},activate:function(e,t){var n=t.newPanel,i=t.newHeader;if(n.length&&!n.data("opened")){var s=n.children().first().find(":input").first(),a=i.find(".csf-cloneable-value");s.on("change keyup",function(e){a.text(s.val())}),n.csf_reload_script(),n.data("opened",!0),n.data("retry",!1)}else n.data("retry")&&(n.csf_reload_script_retry(),n.data("retry",!1))}}),r.sortable({axis:"y",handle:".csf-cloneable-title,.csf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(e,t){r.accordion({active:!1}),r.sortable("refreshPositions"),t.item.children(".csf-cloneable-content").data("retry",!0)},update:function(e,t){T.helper.name_nested_replace(r.children(".csf-cloneable-item"),l),r.csf_customizer_refresh(),d&&p(r)}}),n.children(".csf-cloneable-add").on("click",function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;if(f.hide(),h&&h<t+1)o.show();else{var n=i.csf_clone(!0);n.removeClass("csf-cloneable-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(l+"[0]",l+"["+t+"]")}),r.append(n),r.accordion("refresh"),r.accordion({active:t}),r.csf_customizer_refresh(),r.csf_customizer_listen({closest:!0}),d&&p(r)}});var a=function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;if(f.hide(),h&&h<t+1)o.show();else{var n=I(this).parent().parent(),i=n.children(".csf-cloneable-helper").csf_clone(!0),s=n.children(".csf-cloneable-title").csf_clone(),a=n.children(".csf-cloneable-content").csf_clone(),c=I('<div class="csf-cloneable-item" />');c.append(i),c.append(s),c.append(a),r.children().eq(n.index()).after(c),T.helper.name_nested_replace(r.children(".csf-cloneable-item"),l),r.accordion("refresh"),r.csf_customizer_refresh(),r.csf_customizer_listen({closest:!0}),d&&p(r)}};r.children(".csf-cloneable-item").children(".csf-cloneable-helper").on("click",".csf-cloneable-clone",a),n.children(".csf-cloneable-hidden").children(".csf-cloneable-helper").on("click",".csf-cloneable-clone",a);var c=function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;o.hide(),f.hide(),s&&t-1<s?f.show():(I(this).closest(".csf-cloneable-item").remove(),T.helper.name_nested_replace(r.children(".csf-cloneable-item"),l),r.csf_customizer_refresh(),d&&p(r))};r.children(".csf-cloneable-item").children(".csf-cloneable-helper").on("click",".csf-cloneable-remove",c),n.children(".csf-cloneable-hidden").children(".csf-cloneable-helper").on("click",".csf-cloneable-remove",c)})},I.fn.csf_field_icon=function(){return this.each(function(){var n=I(this);n.on("click",".csf-icon-add",function(e){e.preventDefault();var t=I(this),i=I("#csf-modal-icon");i.removeClass("hidden"),T.vars.$icon_target=n,T.vars.icon_modal_loaded||(i.find(".csf-modal-loading").show(),_.wp.ajax.post("csf-get-icons",{nonce:t.data("nonce")}).done(function(e){i.find(".csf-modal-loading").hide(),T.vars.icon_modal_loaded=!0;var n=i.find(".csf-modal-load").html(e.content);n.on("click","i",function(e){e.preventDefault();var t=I(this).attr("title");T.vars.$icon_target.find(".csf-icon-preview i").removeAttr("class").addClass(t),T.vars.$icon_target.find(".csf-icon-preview").removeClass("hidden"),T.vars.$icon_target.find(".csf-icon-remove").removeClass("hidden"),T.vars.$icon_target.find("input").val(t).trigger("change"),i.addClass("hidden")}),i.on("change keyup",".csf-icon-search",function(){var t=I(this).val();n.find("i").each(function(){var e=I(this);e.attr("title").search(new RegExp(t,"i"))<0?e.hide():e.show()})}),i.on("click",".csf-modal-close, .csf-modal-overlay",function(){i.addClass("hidden")})}).fail(function(e){i.find(".csf-modal-loading").hide(),i.find(".csf-modal-load").html(e.error),i.on("click",function(){i.addClass("hidden")})}))}),n.on("click",".csf-icon-remove",function(e){e.preventDefault(),n.find(".csf-icon-preview").addClass("hidden"),n.find("input").val("").trigger("change"),I(this).addClass("hidden")})})},I.fn.csf_field_map=function(){return this.each(function(){if("undefined"!=typeof L){var e=I(this),t=e.find(".csf--map-osm"),n=e.find(".csf--map-search input"),i=e.find(".csf--latitude"),s=e.find(".csf--longitude"),a=e.find(".csf--zoom"),c=t.data("map"),r=L.map(t.get(0),c);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(r);var o=L.marker(c.center,{draggable:!0}).addTo(r),f=function(e){i.val(e.lat),s.val(e.lng),a.val(r.getZoom())};r.on("click",function(e){o.setLatLng(e.latlng),f(e.latlng)}),r.on("zoom",function(){f(o.getLatLng())}),o.on("drag",function(){f(o.getLatLng())}),n.length||(n=I('[data-depend-id="'+e.find(".csf--address-field").data("address-field")+'"]'));var l={};n.autocomplete({source:function(e,n){var i=e.term;i in l?n(l[i]):I.get("https://nominatim.openstreetmap.org/search",{format:"json",q:i},function(e){var t;t=e.length?e.map(function(e){return{value:e.display_name,label:e.display_name,lat:e.lat,lon:e.lon}},"json"):[{value:"no-data",label:"No Results."}],l[i]=t,n(t)})},select:function(e,t){if("no-data"===t.item.value)return!1;var n=L.latLng(t.item.lat,t.item.lon);r.panTo(n),o.setLatLng(n),f(n)},create:function(e,t){I(this).autocomplete("widget").addClass("csf-map-ui-autocomplate")}});var d=function(){var e=L.latLng(i.val(),s.val());r.panTo(e),o.setLatLng(e)};i.on("change",d),s.on("change",d)}})},I.fn.csf_field_link=function(){return this.each(function(){var s=I(this),e=s.find(".csf--link"),a=s.find(".csf--add"),c=s.find(".csf--edit"),r=s.find(".csf--remove"),o=s.find(".csf--result"),t=T.helper.uid("csf-wplink-textarea-");a.on("click",function(e){e.preventDefault(),_.wpLink.open(t)}),c.on("click",function(e){e.preventDefault(),a.trigger("click"),I("#wp-link-url").val(s.find(".csf--url").val()),I("#wp-link-text").val(s.find(".csf--text").val()),I("#wp-link-target").prop("checked","_blank"===s.find(".csf--target").val())}),r.on("click",function(e){e.preventDefault(),s.find(".csf--url").val("").trigger("change"),s.find(".csf--text").val(""),s.find(".csf--target").val(""),a.removeClass("hidden"),c.addClass("hidden"),r.addClass("hidden"),o.parent().addClass("hidden")}),e.attr("id",t).on("change",function(){var e=_.wpLink.getAttrs(),t=e.href,n=I("#wp-link-text").val(),i=e.target?e.target:"";s.find(".csf--url").val(t).trigger("change"),s.find(".csf--text").val(n),s.find(".csf--target").val(i),o.html('{url:"'+t+'", text:"'+n+'", target:"'+i+'"}'),a.addClass("hidden"),c.removeClass("hidden"),r.removeClass("hidden"),o.parent().removeClass("hidden")})})},I.fn.csf_field_media=function(){return this.each(function(){var i,s=I(this),a=s.find(".csf--button"),c=s.find(".csf--remove"),r=a.data("library")&&a.data("library").split(",")||"",o=!!s.hasClass("csf-assign-field-background")&&s.closest(".csf-field-background").find(".csf--auto-attributes");a.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(i||(i=_.wp.media({library:{type:r}})).on("select",function(){var e,t=i.state().get("selection").first().attributes,n=a.data("preview-size")||"thumbnail";r.length&&-1===r.indexOf(t.subtype)&&-1===r.indexOf(t.type)||(s.find(".csf--id").val(t.id),s.find(".csf--width").val(t.width),s.find(".csf--height").val(t.height),s.find(".csf--alt").val(t.alt),s.find(".csf--title").val(t.title),s.find(".csf--description").val(t.description),e=void 0!==t.sizes&&void 0!==t.sizes.thumbnail&&"thumbnail"===n?t.sizes.thumbnail.url:void 0!==t.sizes&&void 0!==t.sizes.full?t.sizes.full.url:"image"===t.type?t.url:t.icon,console.log(t),o&&o.removeClass("csf--attributes-hidden"),c.removeClass("hidden"),s.find(".csf--preview").removeClass("hidden"),s.find(".csf--src").attr("src",e),s.find(".csf--thumbnail").val(e),s.find(".csf--url").val(t.url).trigger("change"))}),i.open())}),c.on("click",function(e){e.preventDefault(),o&&o.addClass("csf--attributes-hidden"),c.addClass("hidden"),s.find("input").val(""),s.find(".csf--preview").addClass("hidden"),s.find(".csf--url").trigger("change")})})},I.fn.csf_field_repeater=function(){return this.each(function(){var e=I(this),t=e.children(".csf-fieldset"),n=t.length?t:e,c=n.children(".csf-repeater-wrapper"),i=n.children(".csf-repeater-hidden"),r=n.children(".csf-repeater-max"),o=n.children(".csf-repeater-min"),f=c.data("field-id"),l=parseInt(c.data("max")),s=parseInt(c.data("min"));c.children(".csf-repeater-item").children(".csf-repeater-content").csf_reload_script(),c.sortable({axis:"y",handle:".csf-repeater-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh(),t.item.csf_reload_script_retry()}}),n.children(".csf-repeater-add").on("click",function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=i.csf_clone(!0);n.removeClass("csf-repeater-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(f+"[0]",f+"["+t+"]")}),c.append(n),n.children(".csf-repeater-content").csf_reload_script(),c.csf_customizer_refresh(),c.csf_customizer_listen({closest:!0})}});var a=function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=I(this).parent().parent().parent(),i=n.children(".csf-repeater-content").csf_clone(),s=n.children(".csf-repeater-helper").csf_clone(!0),a=I('<div class="csf-repeater-item" />');a.append(i),a.append(s),c.children().eq(n.index()).after(a),a.children(".csf-repeater-content").csf_reload_script(),T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh(),c.csf_customizer_listen({closest:!0})}};c.children(".csf-repeater-item").children(".csf-repeater-helper").on("click",".csf-repeater-clone",a),n.children(".csf-repeater-hidden").children(".csf-repeater-helper").on("click",".csf-repeater-clone",a);var d=function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;r.hide(),o.hide(),s&&t-1<s?o.show():(I(this).closest(".csf-repeater-item").remove(),T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh())};c.children(".csf-repeater-item").children(".csf-repeater-helper").on("click",".csf-repeater-remove",d),n.children(".csf-repeater-hidden").children(".csf-repeater-helper").on("click",".csf-repeater-remove",d)})},I.fn.csf_field_slider=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".csf-slider-ui"),i=n.data(),s=n.val()||0;t.hasClass("ui-slider")&&t.empty(),t.slider({range:"min",value:s,min:i.min||0,max:i.max||100,step:i.step||1,slide:function(e,t){n.val(t.value).trigger("change")}}),n.on("keyup",function(){t.slider("value",n.val())})})},I.fn.csf_field_sortable=function(){return this.each(function(){var n=I(this).find(".csf-sortable");n.sortable({axis:"y",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){n.csf_customizer_refresh()}}),n.find(".csf-sortable-content").csf_reload_script()})},I.fn.csf_field_sorter=function(){return this.each(function(){var i=I(this),e=i.find(".csf-enabled"),t=i.find(".csf-disabled"),n=!!t.length&&t;e.sortable({connectWith:n,placeholder:"ui-sortable-placeholder",update:function(e,t){var n=t.item.find("input");t.item.parent().hasClass("csf-enabled")?n.attr("name",n.attr("name").replace("disabled","enabled")):n.attr("name",n.attr("name").replace("enabled","disabled")),i.csf_customizer_refresh()}}),n&&n.sortable({connectWith:e,placeholder:"ui-sortable-placeholder",update:function(e,t){i.csf_customizer_refresh()}})})},I.fn.csf_field_spinner=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ui-button"),i=n.data();t.length&&t.remove(),n.spinner({min:i.min||0,max:i.max||100,step:i.step||1,create:function(e,t){i.unit&&n.after('<span class="ui-button csf--unit">'+i.unit+"</span>")},spin:function(e,t){n.val(t.value).trigger("change")}})})},I.fn.csf_field_switcher=function(){return this.each(function(){var n=I(this).find(".csf--switcher");n.on("click",function(){var e=0,t=n.find("input");n.hasClass("csf--active")?n.removeClass("csf--active"):(e=1,n.addClass("csf--active")),t.val(e).trigger("change")})})},I.fn.csf_field_tabbed=function(){return this.each(function(){var e=I(this),t=e.find(".csf-tabbed-nav a"),s=e.find(".csf-tabbed-content");s.eq(0).csf_reload_script(),t.on("click",function(e){e.preventDefault();var t=I(this),n=t.index(),i=s.eq(n);t.addClass("csf-tabbed-active").siblings().removeClass("csf-tabbed-active"),i.csf_reload_script(),i.removeClass("hidden").siblings().addClass("hidden")})})},I.fn.csf_field_typography=function(){return this.each(function(){var j=this,L=I(this),i=[],A=csf_typography_json.webfonts,t=csf_typography_json.googlestyles,q=csf_typography_json.defaultstyles;j.sanitize_subset=function(e){return e=(e=e.replace("-ext"," Extended")).charAt(0).toUpperCase()+e.slice(1)},j.sanitize_style=function(e){return t[e]?t[e]:e},j.load_google_font=function(e,t,n){e&&"object"==typeof WebFont&&(t=t?t.replace("normal",""):"",n=n?n.replace("normal",""):"",(t||n)&&(e=e+":"+t+n),-1===i.indexOf(e)&&WebFont.load({google:{families:[e]}}),i.push(e))},j.append_select_options=function(e,t,s,a,c){e.find("option").not(":first").remove();var r="";I.each(t,function(e,t){var n,i=t;n=c?s&&-1!==s.indexOf(t)?" selected":"":s&&s===t?" selected":"","subset"===a?i=j.sanitize_subset(t):"style"===a&&(i=j.sanitize_style(t)),r+='<option value="'+t+'"'+n+">"+i+"</option>"}),e.append(r).trigger("csf.change").trigger("chosen:updated")},j.init=function(){var l=[],e=L.find(".csf--typography"),d=L.find(".csf--type"),h=L.find(".csf--block-font-style"),v=e.data("unit"),g=e.data("line-height-unit"),t=e.data("exclude")?e.data("exclude").split(","):[];L.find(".csf--chosen").length&&L.find("select").each(function(){var e=I(this),t=e.parent().find(".chosen-container");t.length&&t.remove(),e.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var m=L.find(".csf--font-family"),i=m.val();m.find("option").not(":first-child").remove();var s="";I.each(A,function(n,e){t&&-1!==t.indexOf(n)||(s+='<optgroup label="'+e.label+'">',I.each(e.fonts,function(e,t){s+='<option value="'+(t="object"==typeof t?e:t)+'" data-type="'+n+'"'+(t===i?" selected":"")+">"+t+"</option>"}),s+="</optgroup>")}),m.append(s).trigger("chosen:updated");var p=L.find(".csf--block-font-style");if(p.length){var u=L.find(".csf--font-style-select"),_=u.val()?u.val().replace(/normal/g,""):"";u.on("change csf.change",function(e){var t=u.val();!t&&l&&-1===l.indexOf("normal")&&(t=l[0]);var n=t&&"italic"!==t&&"normal"===t?"normal":"",i=t&&"italic"!==t&&"normal"!==t?t.replace("italic",""):n,s=t&&"italic"===t.substr(-6)?"italic":"";L.find(".csf--font-weight").val(i),L.find(".csf--font-style").val(s)});var b=L.find(".csf--block-extra-styles");if(b.length)var y=L.find(".csf--extra-styles"),w=y.val()}var C=L.find(".csf--block-subset");if(C.length)var k=L.find(".csf--subset"),x=k.val(),z=k.data("multiple")||!1;var D=L.find(".csf--block-backup-font-family");m.on("change csf.change",function(e){C.length&&C.addClass("hidden"),b.length&&b.addClass("hidden"),D.length&&D.addClass("hidden");var t=m.find(":selected"),n=t.val(),i=t.data("type");if(i&&n){if("google"!==i&&"custom"!==i||!D.length||D.removeClass("hidden"),p.length){var s=q;"google"===i&&A[i].fonts[n][0]?s=A[i].fonts[n][0]:"custom"===i&&A[i].fonts[n]&&(s=A[i].fonts[n]);var a=-1!==(l=s).indexOf("normal")?"normal":s[0],c=_&&-1!==s.indexOf(_)?_:a;j.append_select_options(u,s,c,"style"),_=!1,p.removeClass("hidden"),"google"===i&&b.length&&1<s.length&&(j.append_select_options(y,s,w,"style",!0),w=!1,b.removeClass("hidden"))}if("google"===i&&C.length&&A[i].fonts[n][1]){var r=A[i].fonts[n][1],o=r.length<2&&"latin"!==r[0]?r[0]:"",f=x&&-1!==r.indexOf(x)?x:o;f=z&&x?x:f,j.append_select_options(k,r,f,"subset",z),x=!1,C.removeClass("hidden")}}else h.find(":input").val(""),C.length&&(k.find("option").not(":first-child").remove(),k.trigger("chosen:updated")),p.length&&(u.find("option").not(":first-child").remove(),u.trigger("chosen:updated"));d.val(i)}).trigger("csf.change");var O=L.find(".csf--block-preview");if(O.length){var S=L.find(".csf--preview");L.on("change",T.helper.debounce(function(e){O.removeClass("hidden");var t=m.val(),n=L.find(".csf--font-weight").val(),i=L.find(".csf--font-style").val(),s=L.find(".csf--font-size").val(),a=L.find(".csf--font-variant").val(),c=L.find(".csf--line-height").val(),r=L.find(".csf--text-align").val(),o=L.find(".csf--text-transform").val(),f=L.find(".csf--text-decoration").val(),l=L.find(".csf--color").val(),d=L.find(".csf--word-spacing").val(),h=L.find(".csf--letter-spacing").val(),p=L.find(".csf--custom-style").val();"google"===L.find(".csf--type").val()&&j.load_google_font(t,n,i);var u={};t&&(u.fontFamily=t),n&&(u.fontWeight=n),i&&(u.fontStyle=i),a&&(u.fontVariant=a),s&&(u.fontSize=s+v),c&&(u.lineHeight=c+g),h&&(u.letterSpacing=h+v),d&&(u.wordSpacing=d+v),r&&(u.textAlign=r),o&&(u.textTransform=o),f&&(u.textDecoration=f),l&&(u.color=l),S.removeAttr("style"),p&&S.attr("style",p),S.css(u)},100)),O.on("click",function(){S.toggleClass("csf--black-background");var e=O.find(".csf--toggle");e.hasClass("fa-toggle-off")?e.removeClass("fa-toggle-off").addClass("fa-toggle-on"):e.removeClass("fa-toggle-on").addClass("fa-toggle-off")}),O.hasClass("hidden")||L.trigger("change")}},j.init()})},I.fn.csf_field_upload=function(){return this.each(function(){var t,e=I(this),n=e.find("input"),i=e.find(".csf--button"),s=e.find(".csf--remove"),a=e.find(".csf--preview"),c=e.find(".csf--src"),r=i.data("library")&&i.data("library").split(",")||"";i.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(t||(t=_.wp.media({library:{type:r}})).on("select",function(){var e=t.state().get("selection").first().attributes;r.length&&-1===r.indexOf(e.subtype)&&-1===r.indexOf(e.type)||n.val(e.url).trigger("change")}),t.open())}),s.on("click",function(e){e.preventDefault(),n.val("").trigger("change")}),n.on("change",function(e){var t=n.val();t?s.removeClass("hidden"):s.addClass("hidden"),a.length&&(-1!==I.inArray(t.split(".").pop().toLowerCase(),["jpg","jpeg","gif","png","svg","webp"])?(a.removeClass("hidden"),c.attr("src",t)):a.addClass("hidden"))})})},I.fn.csf_field_wp_editor=function(){return this.each(function(){if(void 0!==_.wp.editor&&void 0!==_.tinyMCEPreInit&&void 0!==_.tinyMCEPreInit.mceInit.csf_wp_editor){var e=I(this),t=e.find(".csf-wp-editor"),n=e.find("textarea");(e.find(".wp-editor-wrap").length||e.find(".mce-container").length)&&(t.empty(),t.append(n),n.css("display",""));var i=T.helper.uid("csf-editor-");n.attr("id",i);var s={tinymce:_.tinyMCEPreInit.mceInit.csf_wp_editor,quicktags:_.tinyMCEPreInit.qtInit.csf_wp_editor},a=t.data("editor-settings"),c=wp.oldEditor?wp.oldEditor:wp.editor;c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize);s.tinymce=I.extend({},s.tinymce,{selector:"#"+i,setup:function(t){t.on("change keyup",function(){var e=a.wpautop?t.getContent():wp.editor.removep(t.getContent());n.val(e).trigger("change")})}}),!1===a.tinymce&&(s.tinymce=!1,t.addClass("csf-no-tinymce")),!1===a.quicktags&&(s.quicktags=!1,t.addClass("csf-no-quicktags"));var r=setInterval(function(){e.is(":visible")&&(_.wp.editor.initialize(i,s),clearInterval(r))});if(a.media_buttons&&_.csf_media_buttons){var o=t.find(".wp-media-buttons");if(o.length)o.find(".csf-shortcode-button").data("editor-id",i);else{var f=I(_.csf_media_buttons);f.find(".csf-shortcode-button").data("editor-id",i),t.prepend(f)}}}})},I.fn.csf_confirm=function(){return this.each(function(){I(this).on("click",function(e){var t=I(this).data("confirm")||_.csf_vars.i18n.confirm;if(!confirm(t))return e.preventDefault(),!1;T.vars.is_confirm=!0,T.vars.form_modified=!1})})},I.fn.serializeObject=function(){var s={};return I.each(this.serializeArray(),function(e,t){var n=t.name,i=t.value;s[n]=s[n]===y?i:I.isArray(s[n])?s[n].concat(i):[s[n],i]}),s},I.fn.csf_save=function(){return this.each(function(){var i,s=I(this),c=I(".csf-save"),r=I(".csf-options"),o=!1;s.on("click",function(e){if(!o){var t=s.data("save"),n=s.val();c.attr("value",t),s.hasClass("csf-save-ajax")?(e.preventDefault(),r.addClass("csf-saving"),c.prop("disabled",!0),_.wp.ajax.post("csf_"+r.data("unique")+"_ajax_save",{data:I("#csf-form").serializeJSONCSF()}).done(function(e){if(I(".csf-error").remove(),Object.keys(e.errors).length){var a='<i class="csf-label-error csf-error">!</i>';I.each(e.errors,function(e,t){var n=I('[data-depend-id="'+e+'"]'),i=I('a[href="#tab='+n.closest(".csf-section").data("section-id")+'"]'),s=i.closest(".csf-tab-item");n.closest(".csf-fieldset").append('<p class="csf-error csf-error-text">'+t+"</p>"),i.find(".csf-error").length||i.append(a),s.find(".csf-arrow .csf-error").length||s.find(".csf-arrow").append(a)})}r.removeClass("csf-saving"),c.prop("disabled",!1).attr("value",n),o=!1,T.vars.form_modified=!1,T.vars.$form_warning.hide(),clearTimeout(i);var t=I(".csf-form-success");t.empty().append(e.notice).fadeIn("fast",function(){i=setTimeout(function(){t.fadeOut("fast")},1e3)})}).fail(function(e){alert(e.error)})):T.vars.form_modified=!1}o=!0})})},I.fn.csf_options=function(){return this.each(function(){var e=I(this),t=e.find(".csf-content"),n=e.find(".csf-form-success"),i=e.find(".csf-form-warning"),s=e.find(".csf-header .csf-save");(T.vars.$form_warning=i).length&&(_.onbeforeunload=function(){return!!T.vars.form_modified||y},t.on("change keypress",":input",function(){T.vars.form_modified||(n.hide(),i.fadeIn("fast"),T.vars.form_modified=!0)})),n.hasClass("csf-form-show")&&setTimeout(function(){n.fadeOut("fast")},1e3),I(b).keydown(function(e){if((e.ctrlKey||e.metaKey)&&83===e.which)return s.trigger("click"),e.preventDefault(),!1})})},I.fn.csf_taxonomy=function(){return this.each(function(){var e=I(this),t=e.parents("form");if("addtag"===t.attr("id")){var n=t.find("#submit"),i=e.find(".csf-field").csf_clone();n.on("click",function(){t.find(".form-required").hasClass("form-invalid")||(e.data("inited",!1),e.empty(),e.html(i),i=i.csf_clone(),e.csf_reload_script())})}})},I.fn.csf_shortcode=function(){var m=this;return m.shortcode_parse=function(e,n){var i="";return I.each(e,function(e,t){i+="["+(n=n||e),I.each(t,function(e,t){"content"===e?(i+="]",i+=t,i+="[/"+n):i+=m.shortcode_tags(e,t)}),i+="]"}),i},m.shortcode_tags=function(e,t){var n="";return""!==t&&("object"!=typeof t||I.isArray(t)?n+=" "+e.replace("-","_")+'="'+t.toString()+'"':I.each(t,function(e,t){switch(e){case"background-image":t=t.url?t.url:""}""!==t&&(n+=" "+e.replace("-","_")+'="'+t.toString()+'"')})),n},m.insertAtChars=function(e,t){var n=void 0!==e[0].name?e[0]:e;return n.value.length&&void 0!==n.selectionStart?(n.focus(),n.value.substring(0,n.selectionStart)+t+n.value.substring(n.selectionEnd,n.value.length)):(n.focus(),t)},m.send_to_editor=function(e,t){var n;if("undefined"!=typeof tinymce&&(n=tinymce.get(t)),n&&!n.isHidden())n.execCommand("mceInsertContent",!1,e);else{var i=I("#"+t);i.val(m.insertAtChars(i,e)).trigger("change")}},this.each(function(){var c,r,o,n,f,l,d,s,h,p=I(this),i=p.find(".csf-modal-load"),u=(p.find(".csf-modal-content"),p.find(".csf-modal-insert")),a=p.find(".csf-modal-loading"),t=p.find("select"),v=p.data("modal-id"),g=p.data("nonce");I(b).on("click",'.csf-shortcode-button[data-modal-id="'+v+'"]',function(e){e.preventDefault(),h=I(this),c=h.data("editor-id")||!1,r=h.data("target-id")||!1,o=h.data("gutenberg-id")||!1,p.removeClass("hidden"),p.hasClass("csf-shortcode-single")&&f===y&&t.trigger("change")}),t.on("change",function(){var e=I(this),t=e.find(":selected");n=e.val(),f=t.data("shortcode"),l=t.data("view")||"normal",d=t.data("group")||f,i.empty(),n?(a.show(),_.wp.ajax.post("csf-get-shortcode-"+v,{shortcode_key:n,nonce:g}).done(function(e){a.hide();var t=I(e.content).appendTo(i);u.parent().removeClass("hidden"),s=t.find(".csf--repeat-shortcode").csf_clone(),t.csf_reload_script(),t.find(".csf-fields").csf_reload_script()})):u.parent().addClass("hidden")}),u.on("click",function(e){if(e.preventDefault(),!u.prop("disabled")&&!u.attr("disabled")){var i="",t=p.find(".csf-field:not(.csf-depend-on)").find(":input:not(.ignore)").serializeObjectCSF();switch(l){case"contents":var n=f?t[f]:t;I.each(n,function(e,t){var n=f||e;i+="["+n+"]"+t+"[/"+n+"]"});break;case"group":i+="["+f,I.each(t[f],function(e,t){i+=m.shortcode_tags(e,t)}),i+="]",i+=m.shortcode_parse(t[d],d),i+="[/"+f+"]";break;case"repeater":i+=m.shortcode_parse(t[d],d);break;default:i+=m.shortcode_parse(t)}if(i=""===i?"["+f+"]":i,o){var s=_.csf_gutenberg_props.attributes.hasOwnProperty("shortcode")?_.csf_gutenberg_props.attributes.shortcode:"";_.csf_gutenberg_props.setAttributes({shortcode:s+i})}else if(c)m.send_to_editor(i,c);else{var a=r?I(r):h.parent().find("textarea");a.val(m.insertAtChars(a,i)).trigger("change")}p.addClass("hidden")}}),p.on("click",".csf--repeat-button",function(e){e.preventDefault();var t=p.find(".csf--repeatable"),n=s.csf_clone(),i=n.find(".csf-repeat-remove");n.appendTo(t);n.find(".csf-fields").csf_reload_script(),T.helper.name_nested_replace(p.find(".csf--repeat-shortcode"),d),i.on("click",function(){n.remove(),T.helper.name_nested_replace(p.find(".csf--repeat-shortcode"),d)})}),p.on("click",".csf-modal-close, .csf-modal-overlay",function(){p.addClass("hidden")})})},"function"==typeof Color&&(Color.prototype.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e}),T.funcs.parse_color=function(e){var t=e.replace(/\s+/g,""),n=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100;return{value:t,transparent:n,rgba:n<100}},I.fn.csf_color=function(){return this.each(function(){var c,r=I(this),o=T.funcs.parse_color(r.val()),e=!_.csf_vars.color_palette.length||_.csf_vars.color_palette;r.hasClass("wp-color-picker")&&r.closest(".wp-picker-container").after(r).remove(),r.wpColorPicker({palettes:e,change:function(e,t){var n=t.color.toString();c.removeClass("csf--transparent-active"),c.find(".csf--transparent-offset").css("background-color",n),r.val(n).trigger("change")},create:function(){c=r.closest(".wp-picker-container");var i=r.data("a8cIris"),e=I('<div class="csf--transparent-wrap"><div class="csf--transparent-slider"></div><div class="csf--transparent-offset"></div><div class="csf--transparent-text"></div><div class="csf--transparent-button">transparent <i class="fas fa-toggle-off"></i></div></div>').appendTo(c.find(".wp-picker-holder")),s=e.find(".csf--transparent-slider"),a=e.find(".csf--transparent-text"),n=e.find(".csf--transparent-offset"),t=e.find(".csf--transparent-button");"transparent"===r.val()&&c.addClass("csf--transparent-active"),t.on("click",function(){"transparent"!==r.val()?(r.val("transparent").trigger("change").removeClass("iris-error"),c.addClass("csf--transparent-active")):(r.val(i._color.toString()).trigger("change"),c.removeClass("csf--transparent-active"))}),s.slider({value:o.transparent,step:1,min:0,max:100,slide:function(e,t){var n=parseFloat(t.value/100);i._color._alpha=n,r.wpColorPicker("color",i._color.toString()),a.text(1===n||0===n?"":n)},create:function(){var e=parseFloat(o.transparent/100),t=e<1?e:"";a.text(t),n.css("background-color",o.value),c.on("click",".wp-picker-clear",function(){i._color._alpha=1,a.text(""),s.slider("option","value",100),c.removeClass("csf--transparent-active"),r.trigger("change")}),c.on("click",".wp-picker-default",function(){var e=T.funcs.parse_color(r.data("default-color")),t=parseFloat(e.transparent/100),n=t<1?t:"";i._color._alpha=t,a.text(n),s.slider("option","value",e.transparent),"transparent"===e.value&&(r.removeClass("iris-error"),c.addClass("csf--transparent-active"))})}})}})})},I.fn.csf_chosen=function(){return this.each(function(){var a=I(this),e=a.parent().find(".chosen-container"),t=a.hasClass("csf-chosen-sortable")||!1,n=a.hasClass("csf-chosen-ajax")||!1,i=a.attr("multiple")||!1,s=i?"100%":"auto",c=I.extend({allow_single_deselect:!0,disable_search_threshold:10,width:s,no_results_text:_.csf_vars.i18n.no_results_text},a.data("chosen-settings"));if(e.length&&e.remove(),n){var r=I.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:_.csf_vars.i18n.typing_text,searching_text:_.csf_vars.i18n.searching_text,no_results_text:_.csf_vars.i18n.no_results_text},a.data("chosen-settings"));a.CSFAjaxChosen(r)}else a.chosen(c);if(i){var o=a.parent().find(".csf-hide-select"),f=o.val()||[];a.on("change",function(e,t){t&&t.selected?o.append('<option value="'+t.selected+'" selected="selected">'+t.selected+"</option>"):t&&t.deselected&&o.find('option[value="'+t.deselected+'"]').remove(),_.wp.customize!==y&&0===o.children().length&&o.data("customize-setting-link")&&_.wp.customize.control(o.data("customize-setting-link")).setting.set(""),o.trigger("change")}),a.CSFChosenOrder(f,!0)}if(t){var l=a.parent().find(".chosen-container").find(".chosen-choices");l.bind("mousedown",function(e){I(e.target).is("span")&&e.stopPropagation()}),l.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,t){t.placeholder.width(t.item.innerWidth()),t.placeholder.height(t.item.innerHeight())},update:function(e,t){var i="",s=a.data("chosen"),n=a.parent().find(".csf-hide-select");l.find(".search-choice-close").each(function(){var n=I(this).data("option-array-index");I.each(s.results_data,function(e,t){t.array_index===n&&(i+='<option value="'+t.value+'" selected>'+t.value+"</option>")})}),n.children().remove(),n.append(i),n.trigger("change")}})}})},I.fn.csf_checkbox=function(){return this.each(function(){var e=I(this),t=e.find(".csf--input"),n=e.find(".csf--checkbox");n.on("click",function(){t.val(Number(n.prop("checked"))).trigger("change")})})},I.fn.csf_siblings=function(){return this.each(function(){var t=I(this),e=t.find(".csf--sibling"),n=t.data("multiple")||!1;e.on("click",function(){var e=I(this);n?e.hasClass("csf--active")?(e.removeClass("csf--active"),e.find("input").prop("checked",!1).trigger("change")):(e.addClass("csf--active"),e.find("input").prop("checked",!0).trigger("change")):(t.find("input").prop("checked",!1),e.find("input").prop("checked",!0).trigger("change"),e.addClass("csf--active").siblings().removeClass("csf--active"))})})},I.fn.csf_help=function(){return this.each(function(){var e,t,n=I(this);n.on({mouseenter:function(){e=I('<div class="csf-tooltip"></div>').html(n.find(".csf-help-text").html()).appendTo("body"),t=T.vars.is_rtl?n.offset().left+24:n.offset().left-e.outerWidth(),e.css({top:n.offset().top-(e.outerHeight()/2-14),left:t})},mouseleave:function(){e!==y&&e.remove()}})})},I.fn.csf_customizer_refresh=function(){return this.each(function(){var e=I(this),t=e.closest(".csf-customize-complex");if(t.length){var n=t.data("unique-id");if(n===y)return;var i=t.find(":input"),s=t.data("option-id"),a=i.serializeObjectCSF(),c=!I.isEmptyObject(a)&&a[n]&&a[n][s]?a[n][s]:"",r=_.wp.customize.control(n+"["+s+"]");r.setting._value=null,r.setting.set(c)}else e.find(":input").first().trigger("change");I(b).trigger("csf-customizer-refresh",e)})},I.fn.csf_customizer_listen=function(e){var t=I.extend({closest:!1},e);return this.each(function(){if(_.wp.customize!==y){var n=t.closest?I(this).closest(".csf-customize-complex"):I(this),e=n.find(":input"),i=n.data("unique-id"),s=n.data("option-id");i!==y&&e.on("change keyup",function(){var e=n.find(":input").serializeObjectCSF(),t=!I.isEmptyObject(e)&&e[i]&&e[i][s]?e[i][s]:"";_.wp.customize.control(i+"["+s+"]").setting.set(t)})}})},I(b).on("expanded",".control-section",function(){var e=I(this);if(e.hasClass("open")&&!e.data("inited")){var t=e.find(".csf-customize-field"),n=e.find(".csf-customize-complex");t.length&&(e.csf_dependency(),t.csf_reload_script({dependency:!1}),n.csf_customizer_listen()),e.data("inited",!0)}}),T.vars.$window.on("resize csf.resize",T.helper.debounce(function(e){(-1<navigator.userAgent.indexOf("AppleWebKit/")?T.vars.$window.width():_.innerWidth)<=782&&!T.vars.onloaded&&(I(".csf-section").csf_reload_script(),T.vars.onloaded=!0)},200)).trigger("csf.resize"),I.fn.csf_widgets=function(){return this.each(function(){I(b).on("widget-added widget-updated",function(e,t){var n=t.find(".csf-fields");n.length&&n.csf_reload_script()}),I(b).on("click",".widget-top",function(e){var t=I(this).parent().find(".csf-fields");t.length&&t.csf_reload_script()}),I(".widgets-sortables, .control-section-sidebar").on("sortstop",function(e,t){t.item.find(".csf-fields").csf_reload_script_retry()})})},I.fn.csf_nav_menu=function(){return this.each(function(){var e=I(this);e.on("click","a.item-edit",function(){I(this).closest("li.menu-item").find(".csf-fields").csf_reload_script()}),e.on("sortstop",function(e,t){t.item.find(".csf-fields").csf_reload_script_retry()})})},I.fn.csf_reload_script_retry=function(){return this.each(function(){var e=I(this);e.data("inited")&&e.children(".csf-field-wp_editor").csf_field_wp_editor()})},I.fn.csf_reload_script=function(e){var t=I.extend({dependency:!0},e);return this.each(function(){var e=I(this);e.data("inited")||(e.children(".csf-field-accordion").csf_field_accordion(),e.children(".csf-field-backup").csf_field_backup(),e.children(".csf-field-background").csf_field_background(),e.children(".csf-field-code_editor").csf_field_code_editor(),e.children(".csf-field-date").csf_field_date(),e.children(".csf-field-datetime").csf_field_datetime(),e.children(".csf-field-fieldset").csf_field_fieldset(),e.children(".csf-field-gallery").csf_field_gallery(),e.children(".csf-field-group").csf_field_group(),e.children(".csf-field-icon").csf_field_icon(),e.children(".csf-field-link").csf_field_link(),e.children(".csf-field-media").csf_field_media(),e.children(".csf-field-map").csf_field_map(),e.children(".csf-field-repeater").csf_field_repeater(),e.children(".csf-field-slider").csf_field_slider(),e.children(".csf-field-sortable").csf_field_sortable(),e.children(".csf-field-sorter").csf_field_sorter(),e.children(".csf-field-spinner").csf_field_spinner(),e.children(".csf-field-switcher").csf_field_switcher(),e.children(".csf-field-tabbed").csf_field_tabbed(),e.children(".csf-field-typography").csf_field_typography(),e.children(".csf-field-upload").csf_field_upload(),e.children(".csf-field-wp_editor").csf_field_wp_editor(),e.children(".csf-field-border").find(".csf-color").csf_color(),e.children(".csf-field-background").find(".csf-color").csf_color(),e.children(".csf-field-color").find(".csf-color").csf_color(),e.children(".csf-field-color_group").find(".csf-color").csf_color(),e.children(".csf-field-link_color").find(".csf-color").csf_color(),e.children(".csf-field-typography").find(".csf-color").csf_color(),e.children(".csf-field-select").find(".csf-chosen").csf_chosen(),e.children(".csf-field-checkbox").find(".csf-checkbox").csf_checkbox(),e.children(".csf-field-button_set").find(".csf-siblings").csf_siblings(),e.children(".csf-field-image_select").find(".csf-siblings").csf_siblings(),e.children(".csf-field-palette").find(".csf-siblings").csf_siblings(),e.children(".csf-field").find(".csf-help").csf_help(),t.dependency&&e.csf_dependency(),e.data("inited",!0),I(b).trigger("csf-reload-script",e))})},I(b).ready(function(){I(".csf-save").csf_save(),I(".csf-options").csf_options(),I(".csf-sticky-header").csf_sticky(),I(".csf-nav-options").csf_nav_options(),I(".csf-nav-metabox").csf_nav_metabox(),I(".csf-taxonomy").csf_taxonomy(),I(".csf-page-templates").csf_page_templates(),I(".csf-post-formats").csf_post_formats(),I(".csf-shortcode").csf_shortcode(),I(".csf-search").csf_search(),I(".csf-confirm").csf_confirm(),I(".csf-expand-all").csf_expand_all(),I(".csf-onload").csf_reload_script(),I("#widgets-editor").csf_widgets(),I("#widgets-right").csf_widgets(),I("#menu-to-edit").csf_nav_menu()})}(jQuery,window,document);
|
1 |
+
/* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.8*/
|
2 |
+
|
3 |
+
!function(I,_,b,y){"use strict";var T=T||{};T.funcs={},T.vars={onloaded:!1,$body:I("body"),$window:I(_),$document:I(b),$form_warning:null,is_confirm:!1,form_modified:!1,code_themes:[],is_rtl:I("body").hasClass("rtl")},T.helper={uid:function(e){return(e||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(e){return(e+"").replace(/(\[|\])/g,"\\$1")},name_nested_replace:function(e,t){var n=new RegExp(T.helper.preg_quote(t+"[\\d+]"),"g");e.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),e.each(function(e){I(this).find(":input").each(function(){this.name=this.name.replace(n,t+"["+e+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(i,a,s){var c;return function(){var e=this,t=arguments,n=s&&!c;clearTimeout(c),c=setTimeout(function(){c=null,s||i.apply(e,t)},a),n&&i.apply(e,t)}}},I.fn.csf_clone=function(){for(var e=I.fn.clone.apply(this,arguments),t=this.find("select").add(this.filter("select")),n=e.find("select").add(e.filter("select")),i=0;i<t.length;++i)for(var a=0;a<t[i].options.length;++a)!0===t[i].options[a].selected&&(n[i].options[a].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),e},I.fn.csf_expand_all=function(){return this.each(function(){I(this).on("click",function(e){e.preventDefault(),I(".csf-wrapper").toggleClass("csf-show-all"),I(".csf-section").csf_reload_script(),I(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},I.fn.csf_nav_options=function(){return this.each(function(){var a,e=I(this),t=I(_),s=I("#wpwrap"),c=e.find("a");t.on("hashchange csf.hashchange",function(){var e=_.location.hash.replace("#tab=",""),t=e||c.first().attr("href").replace("#tab=",""),n=I('[data-tab-id="'+t+'"]');if(n.length){n.closest(".csf-tab-item").addClass("csf-tab-expanded").siblings().removeClass("csf-tab-expanded"),n.next().is("ul")&&(t=(n=n.next().find("li").first().find("a")).data("tab-id")),c.removeClass("csf-active"),n.addClass("csf-active"),a&&a.addClass("hidden");var i=I('[data-section-id="'+t+'"]');i.removeClass("hidden"),i.csf_reload_script(),I(".csf-section-id").val(i.index()+1),a=i,s.hasClass("wp-responsive-open")&&(I("html, body").animate({scrollTop:i.offset().top-50},200),s.removeClass("wp-responsive-open"))}}).trigger("csf.hashchange")})},I.fn.csf_nav_metabox=function(){return this.each(function(){var a,e=I(this),s=e.find("a"),c=e.parent().find(".csf-section");s.each(function(i){I(this).on("click",function(e){e.preventDefault();var t=I(this);s.removeClass("csf-active"),t.addClass("csf-active"),a!==y&&a.addClass("hidden");var n=c.eq(i);n.removeClass("hidden"),n.csf_reload_script(),a=n})}),s.first().trigger("click")})},I.fn.csf_page_templates=function(){this.length&&I(b).on("change",".editor-page-attributes__template select, #page_template",function(){var e=I(this).val()||"default";I(".csf-page-templates").removeClass("csf-metabox-show").addClass("csf-metabox-hide"),I(".csf-page-"+e.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("csf-metabox-hide").addClass("csf-metabox-show")})},I.fn.csf_post_formats=function(){this.length&&I(b).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var e=I(this).val()||"default";e="0"===e?"default":e,I(".csf-post-formats").removeClass("csf-metabox-show").addClass("csf-metabox-hide"),I(".csf-post-format-"+e).removeClass("csf-metabox-hide").addClass("csf-metabox-show")})},I.fn.csf_search=function(){return this.each(function(){I(this).find("input").on("change keyup",function(){var n=I(this).val(),e=I(".csf-wrapper"),t=e.find(".csf-section").find("> .csf-field:not(.csf-depend-on)"),i=t.find("> .csf-title, .csf-search-tags");3<n.length?(t.addClass("csf-metabox-hide"),e.addClass("csf-search-all"),i.each(function(){var e=I(this);if(e.text().match(new RegExp(".*?"+n+".*?","i"))){var t=e.closest(".csf-field");t.removeClass("csf-metabox-hide"),t.parent().csf_reload_script()}})):(t.removeClass("csf-metabox-hide"),e.removeClass("csf-search-all"))})})},I.fn.csf_sticky=function(){return this.each(function(){var i=I(this),a=I(_),s=i.find(".csf-header-inner"),c=parseInt(s.css("padding-left"))+parseInt(s.css("padding-right")),r=0,o=!1,e=function(){o||requestAnimationFrame(function(){var e,t,n;e=i.offset().top,t=Math.max(32,e-r),n=a.innerWidth(),t<=32&&782<n?(s.css({width:i.outerWidth()-c}),i.css({height:i.outerHeight()}).addClass("csf-sticky")):(s.removeAttr("style"),i.removeAttr("style").removeClass("csf-sticky")),o=!1}),o=!0},t=function(){r=a.scrollTop(),e()};a.on("scroll resize",t),t()})},I.fn.csf_dependency=function(){return this.each(function(){var e=I(this),t=e.children("[data-controller]");if(t.length){var n=I.csf_deps.createRuleset(),i=I.csf_deps.createRuleset(),f=[],l=[];t.each(function(){var a=I(this),e=a.data("controller").split("|"),s=a.data("condition").split("|"),c=a.data("value").toString().split("|"),r=!!a.data("depend-global"),o=r?i:n;I.each(e,function(e,t){var n=c[e]||"",i=s[e]||s[0];(o=o.createRule('[data-depend-id="'+t+'"]',i,n)).include(a),r?l.push(t):f.push(t)})}),f.length&&I.csf_deps.enable(e,n,f),l.length&&I.csf_deps.enable(T.vars.$body,i,l)}})},I.fn.csf_field_accordion=function(){return this.each(function(){I(this).find(".csf-accordion-title").on("click",function(){var e=I(this),t=e.find(".csf-accordion-icon"),n=e.next();t.hasClass("fa-angle-right")?t.removeClass("fa-angle-right").addClass("fa-angle-down"):t.removeClass("fa-angle-down").addClass("fa-angle-right"),n.data("opened")||(n.csf_reload_script(),n.data("opened",!0)),n.toggleClass("csf-accordion-open")})})},I.fn.csf_field_backup=function(){return this.each(function(){if(_.wp.customize!==y){var t=this,n=I(this),i=(I("body"),n.find(".csf-import")),a=n.find(".csf-reset");t.notificationOverlay=function(){wp.customize.notifications&&wp.customize.OverlayNotification&&(wp.customize.state("saved").get()||(wp.customize.state("changesetStatus").set("trash"),wp.customize.each(function(e){e._dirty=!1}),wp.customize.state("saved").set(!0)),wp.customize.notifications.add(new wp.customize.OverlayNotification("csf_field_backup_notification",{type:"default",message:" ",loading:!0})))},a.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("csf-reset",{unique:a.data("unique"),nonce:a.data("nonce")}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("csf_field_backup_notification")}))}),i.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("csf-import",{unique:i.data("unique"),nonce:i.data("nonce"),data:n.find(".csf-import-data").val()}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("csf_field_backup_notification")}))})}})},I.fn.csf_field_background=function(){return this.each(function(){I(this).find(".csf--background-image").csf_reload_script()})},I.fn.csf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var t=I(this),i=t.find("textarea"),e=t.find(".CodeMirror"),a=i.data("editor");e.length&&e.remove();var s=setInterval(function(){if(t.is(":visible")){var n=CodeMirror.fromTextArea(i[0],a);if("default"!==a.theme&&-1===T.vars.code_themes.indexOf(a.theme)){var e=I("<link>");I("#csf-codemirror-css").after(e),e.attr({rel:"stylesheet",id:"csf-codemirror-"+a.theme+"-css",href:a.cdnURL+"/theme/"+a.theme+".min.css",type:"text/css",media:"all"}),T.vars.code_themes.push(a.theme)}CodeMirror.modeURL=a.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(n,a.mode),n.on("change",function(e,t){i.val(n.getValue()).trigger("change")}),clearInterval(s)}})}})},I.fn.csf_field_date=function(){return this.each(function(){var e=I(this),i=e.find("input"),a=e.find(".csf-date-settings").data("settings"),t={showAnim:"",beforeShow:function(e,t){I(t.dpDiv).addClass("csf-datepicker-wrapper")},onClose:function(e,t){I(t.dpDiv).removeClass("csf-datepicker-wrapper")}};a=I.extend({},a,t),2===i.length&&(a=I.extend({},a,{onSelect:function(e){I(this),i.first();var t=i.first().attr("id")===I(this).attr("id")?"minDate":"maxDate",n=I.datepicker.parseDate(a.dateFormat,e);i.not(this).datepicker("option",t,n)}})),i.each(function(){var e=I(this);e.hasClass("hasDatepicker")&&e.removeAttr("id").removeClass("hasDatepicker"),e.datepicker(a)})})},I.fn.csf_field_datetime=function(){return this.each(function(){var e=I(this),i=e.find("input"),t=e.find(".csf-datetime-settings").data("settings");t=I.extend({},t,{onReady:function(e,t,n){I(n.calendarContainer).addClass("csf-flatpickr")}}),2===i.length&&(t=I.extend({},t,{onChange:function(e,t,n){"from"===I(n.element).data("type")?i.last().get(0)._flatpickr.set("minDate",e[0]):i.first().get(0)._flatpickr.set("maxDate",e[0])}})),i.each(function(){I(this).flatpickr(t)})})},I.fn.csf_field_fieldset=function(){return this.each(function(){I(this).find(".csf-fieldset-content").csf_reload_script()})},I.fn.csf_field_gallery=function(){return this.each(function(){var s,e=I(this),c=e.find(".csf-edit-gallery"),r=e.find(".csf-clear-gallery"),o=e.find("ul"),f=e.find("input");e.find("img");e.on("click",".csf-button, .csf-edit-gallery",function(e){var t=I(this),n=f.val(),i=t.hasClass("csf-edit-gallery")?"edit":"add",a="add"!==i||n.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&("gallery"===a?(s=_.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(s=_.wp.media.gallery.edit('[gallery ids="'+n+'"]'),"add"===i&&s.setState("gallery-library")),s.on("update",function(e){o.empty();var t=e.models.map(function(e){var t=e.toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url?t.sizes.thumbnail.url:t.url;return o.append('<li><img src="'+n+'"></li>'),t.id});f.val(t.join(",")).trigger("change"),r.removeClass("hidden"),c.removeClass("hidden")}))}),r.on("click",function(e){e.preventDefault(),o.empty(),f.val("").trigger("change"),r.addClass("hidden"),c.addClass("hidden")})})},I.fn.csf_field_group=function(){return this.each(function(){var e=I(this),t=e.children(".csf-fieldset"),n=t.length?t:e,r=n.children(".csf-cloneable-wrapper"),i=n.children(".csf-cloneable-hidden"),o=n.children(".csf-cloneable-max"),f=n.children(".csf-cloneable-min"),c=r.data("title-by"),l=r.data("title-by-prefix"),d=r.data("field-id"),h=Boolean(Number(r.data("title-number"))),p=parseInt(r.data("max")),a=parseInt(r.data("min"));r.hasClass("ui-accordion")&&r.find(".ui-accordion-header-icon").remove();var u=function(e){e.find(".csf-cloneable-title-number").each(function(e){I(this).html(I(this).closest(".csf-cloneable-item").index()+1+".")})};r.accordion({header:"> .csf-cloneable-item > .csf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"csf-cloneable-header-icon fas fa-angle-right",activeHeader:"csf-cloneable-header-icon fas fa-angle-down"},activate:function(e,t){var n=t.newPanel,i=t.newHeader;if(n.length&&!n.data("opened")){var a=i.find(".csf-cloneable-value"),s=[];I.each(c,function(e,t){s.push(n.find('[data-depend-id="'+t+'"]'))}),I.each(s,function(e,t){t.on("change keyup csf.keyup",function(){var i=[];I.each(s,function(e,t){var n=t.val();n&&i.push(n)}),i.length&&a.text(i.join(l))}).trigger("csf.keyup")}),n.csf_reload_script(),n.data("opened",!0),n.data("retry",!1)}else n.data("retry")&&(n.csf_reload_script_retry(),n.data("retry",!1))}}),r.sortable({axis:"y",handle:".csf-cloneable-title,.csf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(e,t){r.accordion({active:!1}),r.sortable("refreshPositions"),t.item.children(".csf-cloneable-content").data("retry",!0)},update:function(e,t){T.helper.name_nested_replace(r.children(".csf-cloneable-item"),d),r.csf_customizer_refresh(),h&&u(r)}}),n.children(".csf-cloneable-add").on("click",function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=i.csf_clone(!0);n.removeClass("csf-cloneable-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(d+"[0]",d+"["+t+"]")}),r.append(n),r.accordion("refresh"),r.accordion({active:t}),r.csf_customizer_refresh(),r.csf_customizer_listen({closest:!0}),h&&u(r)}});var s=function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=I(this).parent().parent(),i=n.children(".csf-cloneable-helper").csf_clone(!0),a=n.children(".csf-cloneable-title").csf_clone(),s=n.children(".csf-cloneable-content").csf_clone(),c=I('<div class="csf-cloneable-item" />');c.append(i),c.append(a),c.append(s),r.children().eq(n.index()).after(c),T.helper.name_nested_replace(r.children(".csf-cloneable-item"),d),r.accordion("refresh"),r.csf_customizer_refresh(),r.csf_customizer_listen({closest:!0}),h&&u(r)}};r.children(".csf-cloneable-item").children(".csf-cloneable-helper").on("click",".csf-cloneable-clone",s),n.children(".csf-cloneable-hidden").children(".csf-cloneable-helper").on("click",".csf-cloneable-clone",s);var v=function(e){e.preventDefault();var t=r.children(".csf-cloneable-item").length;o.hide(),f.hide(),a&&t-1<a?f.show():(I(this).closest(".csf-cloneable-item").remove(),T.helper.name_nested_replace(r.children(".csf-cloneable-item"),d),r.csf_customizer_refresh(),h&&u(r))};r.children(".csf-cloneable-item").children(".csf-cloneable-helper").on("click",".csf-cloneable-remove",v),n.children(".csf-cloneable-hidden").children(".csf-cloneable-helper").on("click",".csf-cloneable-remove",v)})},I.fn.csf_field_icon=function(){return this.each(function(){var n=I(this);n.on("click",".csf-icon-add",function(e){e.preventDefault();var t=I(this),i=I("#csf-modal-icon");i.removeClass("hidden"),T.vars.$icon_target=n,T.vars.icon_modal_loaded||(i.find(".csf-modal-loading").show(),_.wp.ajax.post("csf-get-icons",{nonce:t.data("nonce")}).done(function(e){i.find(".csf-modal-loading").hide(),T.vars.icon_modal_loaded=!0;var n=i.find(".csf-modal-load").html(e.content);n.on("click","i",function(e){e.preventDefault();var t=I(this).attr("title");T.vars.$icon_target.find(".csf-icon-preview i").removeAttr("class").addClass(t),T.vars.$icon_target.find(".csf-icon-preview").removeClass("hidden"),T.vars.$icon_target.find(".csf-icon-remove").removeClass("hidden"),T.vars.$icon_target.find("input").val(t).trigger("change"),i.addClass("hidden")}),i.on("change keyup",".csf-icon-search",function(){var t=I(this).val();n.find("i").each(function(){var e=I(this);e.attr("title").search(new RegExp(t,"i"))<0?e.hide():e.show()})}),i.on("click",".csf-modal-close, .csf-modal-overlay",function(){i.addClass("hidden")})}).fail(function(e){i.find(".csf-modal-loading").hide(),i.find(".csf-modal-load").html(e.error),i.on("click",function(){i.addClass("hidden")})}))}),n.on("click",".csf-icon-remove",function(e){e.preventDefault(),n.find(".csf-icon-preview").addClass("hidden"),n.find("input").val("").trigger("change"),I(this).addClass("hidden")})})},I.fn.csf_field_map=function(){return this.each(function(){if("undefined"!=typeof L){var e=I(this),t=e.find(".csf--map-osm"),n=e.find(".csf--map-search input"),i=e.find(".csf--latitude"),a=e.find(".csf--longitude"),s=e.find(".csf--zoom"),c=t.data("map"),r=L.map(t.get(0),c);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(r);var o=L.marker(c.center,{draggable:!0}).addTo(r),f=function(e){i.val(e.lat),a.val(e.lng),s.val(r.getZoom())};r.on("click",function(e){o.setLatLng(e.latlng),f(e.latlng)}),r.on("zoom",function(){f(o.getLatLng())}),o.on("drag",function(){f(o.getLatLng())}),n.length||(n=I('[data-depend-id="'+e.find(".csf--address-field").data("address-field")+'"]'));var l={};n.autocomplete({source:function(e,n){var i=e.term;i in l?n(l[i]):I.get("https://nominatim.openstreetmap.org/search",{format:"json",q:i},function(e){var t;t=e.length?e.map(function(e){return{value:e.display_name,label:e.display_name,lat:e.lat,lon:e.lon}},"json"):[{value:"no-data",label:"No Results."}],l[i]=t,n(t)})},select:function(e,t){if("no-data"===t.item.value)return!1;var n=L.latLng(t.item.lat,t.item.lon);r.panTo(n),o.setLatLng(n),f(n)},create:function(e,t){I(this).autocomplete("widget").addClass("csf-map-ui-autocomplate")}});var d=function(){var e=L.latLng(i.val(),a.val());r.panTo(e),o.setLatLng(e)};i.on("change",d),a.on("change",d)}})},I.fn.csf_field_link=function(){return this.each(function(){var a=I(this),e=a.find(".csf--link"),s=a.find(".csf--add"),c=a.find(".csf--edit"),r=a.find(".csf--remove"),o=a.find(".csf--result"),t=T.helper.uid("csf-wplink-textarea-");s.on("click",function(e){e.preventDefault(),_.wpLink.open(t)}),c.on("click",function(e){e.preventDefault(),s.trigger("click"),I("#wp-link-url").val(a.find(".csf--url").val()),I("#wp-link-text").val(a.find(".csf--text").val()),I("#wp-link-target").prop("checked","_blank"===a.find(".csf--target").val())}),r.on("click",function(e){e.preventDefault(),a.find(".csf--url").val("").trigger("change"),a.find(".csf--text").val(""),a.find(".csf--target").val(""),s.removeClass("hidden"),c.addClass("hidden"),r.addClass("hidden"),o.parent().addClass("hidden")}),e.attr("id",t).on("change",function(){var e=_.wpLink.getAttrs(),t=e.href,n=I("#wp-link-text").val(),i=e.target?e.target:"";a.find(".csf--url").val(t).trigger("change"),a.find(".csf--text").val(n),a.find(".csf--target").val(i),o.html('{url:"'+t+'", text:"'+n+'", target:"'+i+'"}'),s.addClass("hidden"),c.removeClass("hidden"),r.removeClass("hidden"),o.parent().removeClass("hidden")})})},I.fn.csf_field_media=function(){return this.each(function(){var i,a=I(this),s=a.find(".csf--button"),c=a.find(".csf--remove"),r=s.data("library")&&s.data("library").split(",")||"",o=!!a.hasClass("csf-assign-field-background")&&a.closest(".csf-field-background").find(".csf--auto-attributes");s.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(i||(i=_.wp.media({library:{type:r}})).on("select",function(){var e,t=i.state().get("selection").first().attributes,n=s.data("preview-size")||"thumbnail";r.length&&-1===r.indexOf(t.subtype)&&-1===r.indexOf(t.type)||(a.find(".csf--id").val(t.id),a.find(".csf--width").val(t.width),a.find(".csf--height").val(t.height),a.find(".csf--alt").val(t.alt),a.find(".csf--title").val(t.title),a.find(".csf--description").val(t.description),e=void 0!==t.sizes&&void 0!==t.sizes.thumbnail&&"thumbnail"===n?t.sizes.thumbnail.url:void 0!==t.sizes&&void 0!==t.sizes.full?t.sizes.full.url:"image"===t.type?t.url:t.icon,o&&o.removeClass("csf--attributes-hidden"),c.removeClass("hidden"),a.find(".csf--preview").removeClass("hidden"),a.find(".csf--src").attr("src",e),a.find(".csf--thumbnail").val(e),a.find(".csf--url").val(t.url).trigger("change"))}),i.open())}),c.on("click",function(e){e.preventDefault(),o&&o.addClass("csf--attributes-hidden"),c.addClass("hidden"),a.find("input").val(""),a.find(".csf--preview").addClass("hidden"),a.find(".csf--url").trigger("change")})})},I.fn.csf_field_repeater=function(){return this.each(function(){var e=I(this),t=e.children(".csf-fieldset"),n=t.length?t:e,c=n.children(".csf-repeater-wrapper"),i=n.children(".csf-repeater-hidden"),r=n.children(".csf-repeater-max"),o=n.children(".csf-repeater-min"),f=c.data("field-id"),l=parseInt(c.data("max")),a=parseInt(c.data("min"));c.children(".csf-repeater-item").children(".csf-repeater-content").csf_reload_script(),c.sortable({axis:"y",handle:".csf-repeater-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh(),t.item.csf_reload_script_retry()}}),n.children(".csf-repeater-add").on("click",function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=i.csf_clone(!0);n.removeClass("csf-repeater-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(f+"[0]",f+"["+t+"]")}),c.append(n),n.children(".csf-repeater-content").csf_reload_script(),c.csf_customizer_refresh(),c.csf_customizer_listen({closest:!0})}});var s=function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=I(this).parent().parent().parent(),i=n.children(".csf-repeater-content").csf_clone(),a=n.children(".csf-repeater-helper").csf_clone(!0),s=I('<div class="csf-repeater-item" />');s.append(i),s.append(a),c.children().eq(n.index()).after(s),s.children(".csf-repeater-content").csf_reload_script(),T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh(),c.csf_customizer_listen({closest:!0})}};c.children(".csf-repeater-item").children(".csf-repeater-helper").on("click",".csf-repeater-clone",s),n.children(".csf-repeater-hidden").children(".csf-repeater-helper").on("click",".csf-repeater-clone",s);var d=function(e){e.preventDefault();var t=c.children(".csf-repeater-item").length;r.hide(),o.hide(),a&&t-1<a?o.show():(I(this).closest(".csf-repeater-item").remove(),T.helper.name_nested_replace(c.children(".csf-repeater-item"),f),c.csf_customizer_refresh())};c.children(".csf-repeater-item").children(".csf-repeater-helper").on("click",".csf-repeater-remove",d),n.children(".csf-repeater-hidden").children(".csf-repeater-helper").on("click",".csf-repeater-remove",d)})},I.fn.csf_field_slider=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".csf-slider-ui"),i=n.data(),a=n.val()||0;t.hasClass("ui-slider")&&t.empty(),t.slider({range:"min",value:a,min:i.min||0,max:i.max||100,step:i.step||1,slide:function(e,t){n.val(t.value).trigger("change")}}),n.on("keyup",function(){t.slider("value",n.val())})})},I.fn.csf_field_sortable=function(){return this.each(function(){var n=I(this).find(".csf-sortable");n.sortable({axis:"y",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){n.csf_customizer_refresh()}}),n.find(".csf-sortable-content").csf_reload_script()})},I.fn.csf_field_sorter=function(){return this.each(function(){var i=I(this),e=i.find(".csf-enabled"),t=i.find(".csf-disabled"),n=!!t.length&&t;e.sortable({connectWith:n,placeholder:"ui-sortable-placeholder",update:function(e,t){var n=t.item.find("input");t.item.parent().hasClass("csf-enabled")?n.attr("name",n.attr("name").replace("disabled","enabled")):n.attr("name",n.attr("name").replace("enabled","disabled")),i.csf_customizer_refresh()}}),n&&n.sortable({connectWith:e,placeholder:"ui-sortable-placeholder",update:function(e,t){i.csf_customizer_refresh()}})})},I.fn.csf_field_spinner=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ui-button"),i=n.data();t.length&&t.remove(),n.spinner({min:i.min||0,max:i.max||100,step:i.step||1,create:function(e,t){i.unit&&n.after('<span class="ui-button csf--unit">'+i.unit+"</span>")},spin:function(e,t){n.val(t.value).trigger("change")}})})},I.fn.csf_field_switcher=function(){return this.each(function(){var n=I(this).find(".csf--switcher");n.on("click",function(){var e=0,t=n.find("input");n.hasClass("csf--active")?n.removeClass("csf--active"):(e=1,n.addClass("csf--active")),t.val(e).trigger("change")})})},I.fn.csf_field_tabbed=function(){return this.each(function(){var e=I(this),t=e.find(".csf-tabbed-nav a"),a=e.find(".csf-tabbed-content");a.eq(0).csf_reload_script(),t.on("click",function(e){e.preventDefault();var t=I(this),n=t.index(),i=a.eq(n);t.addClass("csf-tabbed-active").siblings().removeClass("csf-tabbed-active"),i.csf_reload_script(),i.removeClass("hidden").siblings().addClass("hidden")})})},I.fn.csf_field_typography=function(){return this.each(function(){var j=this,L=I(this),i=[],A=csf_typography_json.webfonts,t=csf_typography_json.googlestyles,q=csf_typography_json.defaultstyles;j.sanitize_subset=function(e){return e=(e=e.replace("-ext"," Extended")).charAt(0).toUpperCase()+e.slice(1)},j.sanitize_style=function(e){return t[e]?t[e]:e},j.load_google_font=function(e,t,n){e&&"object"==typeof WebFont&&(t=t?t.replace("normal",""):"",n=n?n.replace("normal",""):"",(t||n)&&(e=e+":"+t+n),-1===i.indexOf(e)&&WebFont.load({google:{families:[e]}}),i.push(e))},j.append_select_options=function(e,t,a,s,c){e.find("option").not(":first").remove();var r="";I.each(t,function(e,t){var n,i=t;n=c?a&&-1!==a.indexOf(t)?" selected":"":a&&a===t?" selected":"","subset"===s?i=j.sanitize_subset(t):"style"===s&&(i=j.sanitize_style(t)),r+='<option value="'+t+'"'+n+">"+i+"</option>"}),e.append(r).trigger("csf.change").trigger("chosen:updated")},j.init=function(){var l=[],e=L.find(".csf--typography"),d=L.find(".csf--type"),h=L.find(".csf--block-font-style"),v=e.data("unit"),g=e.data("line-height-unit"),t=e.data("exclude")?e.data("exclude").split(","):[];L.find(".csf--chosen").length&&L.find("select").each(function(){var e=I(this),t=e.parent().find(".chosen-container");t.length&&t.remove(),e.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var m=L.find(".csf--font-family"),i=m.val();m.find("option").not(":first-child").remove();var a="";I.each(A,function(n,e){t&&-1!==t.indexOf(n)||(a+='<optgroup label="'+e.label+'">',I.each(e.fonts,function(e,t){a+='<option value="'+(t="object"==typeof t?e:t)+'" data-type="'+n+'"'+(t===i?" selected":"")+">"+t+"</option>"}),a+="</optgroup>")}),m.append(a).trigger("chosen:updated");var p=L.find(".csf--block-font-style");if(p.length){var u=L.find(".csf--font-style-select"),_=u.val()?u.val().replace(/normal/g,""):"";u.on("change csf.change",function(e){var t=u.val();!t&&l&&-1===l.indexOf("normal")&&(t=l[0]);var n=t&&"italic"!==t&&"normal"===t?"normal":"",i=t&&"italic"!==t&&"normal"!==t?t.replace("italic",""):n,a=t&&"italic"===t.substr(-6)?"italic":"";L.find(".csf--font-weight").val(i),L.find(".csf--font-style").val(a)});var b=L.find(".csf--block-extra-styles");if(b.length)var y=L.find(".csf--extra-styles"),w=y.val()}var C=L.find(".csf--block-subset");if(C.length)var k=L.find(".csf--subset"),x=k.val(),z=k.data("multiple")||!1;var D=L.find(".csf--block-backup-font-family");m.on("change csf.change",function(e){C.length&&C.addClass("hidden"),b.length&&b.addClass("hidden"),D.length&&D.addClass("hidden");var t=m.find(":selected"),n=t.val(),i=t.data("type");if(i&&n){if("google"!==i&&"custom"!==i||!D.length||D.removeClass("hidden"),p.length){var a=q;"google"===i&&A[i].fonts[n][0]?a=A[i].fonts[n][0]:"custom"===i&&A[i].fonts[n]&&(a=A[i].fonts[n]);var s=-1!==(l=a).indexOf("normal")?"normal":a[0],c=_&&-1!==a.indexOf(_)?_:s;j.append_select_options(u,a,c,"style"),_=!1,p.removeClass("hidden"),"google"===i&&b.length&&1<a.length&&(j.append_select_options(y,a,w,"style",!0),w=!1,b.removeClass("hidden"))}if("google"===i&&C.length&&A[i].fonts[n][1]){var r=A[i].fonts[n][1],o=r.length<2&&"latin"!==r[0]?r[0]:"",f=x&&-1!==r.indexOf(x)?x:o;f=z&&x?x:f,j.append_select_options(k,r,f,"subset",z),x=!1,C.removeClass("hidden")}}else h.find(":input").val(""),C.length&&(k.find("option").not(":first-child").remove(),k.trigger("chosen:updated")),p.length&&(u.find("option").not(":first-child").remove(),u.trigger("chosen:updated"));d.val(i)}).trigger("csf.change");var O=L.find(".csf--block-preview");if(O.length){var S=L.find(".csf--preview");L.on("change",T.helper.debounce(function(e){O.removeClass("hidden");var t=m.val(),n=L.find(".csf--font-weight").val(),i=L.find(".csf--font-style").val(),a=L.find(".csf--font-size").val(),s=L.find(".csf--font-variant").val(),c=L.find(".csf--line-height").val(),r=L.find(".csf--text-align").val(),o=L.find(".csf--text-transform").val(),f=L.find(".csf--text-decoration").val(),l=L.find(".csf--color").val(),d=L.find(".csf--word-spacing").val(),h=L.find(".csf--letter-spacing").val(),p=L.find(".csf--custom-style").val();"google"===L.find(".csf--type").val()&&j.load_google_font(t,n,i);var u={};t&&(u.fontFamily=t),n&&(u.fontWeight=n),i&&(u.fontStyle=i),s&&(u.fontVariant=s),a&&(u.fontSize=a+v),c&&(u.lineHeight=c+g),h&&(u.letterSpacing=h+v),d&&(u.wordSpacing=d+v),r&&(u.textAlign=r),o&&(u.textTransform=o),f&&(u.textDecoration=f),l&&(u.color=l),S.removeAttr("style"),p&&S.attr("style",p),S.css(u)},100)),O.on("click",function(){S.toggleClass("csf--black-background");var e=O.find(".csf--toggle");e.hasClass("fa-toggle-off")?e.removeClass("fa-toggle-off").addClass("fa-toggle-on"):e.removeClass("fa-toggle-on").addClass("fa-toggle-off")}),O.hasClass("hidden")||L.trigger("change")}},j.init()})},I.fn.csf_field_upload=function(){return this.each(function(){var t,e=I(this),n=e.find("input"),i=e.find(".csf--button"),a=e.find(".csf--remove"),s=e.find(".csf--preview"),c=e.find(".csf--src"),r=i.data("library")&&i.data("library").split(",")||"";i.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(t||(t=_.wp.media({library:{type:r}})).on("select",function(){var e=t.state().get("selection").first().attributes;r.length&&-1===r.indexOf(e.subtype)&&-1===r.indexOf(e.type)||n.val(e.url).trigger("change")}),t.open())}),a.on("click",function(e){e.preventDefault(),n.val("").trigger("change")}),n.on("change",function(e){var t=n.val();t?a.removeClass("hidden"):a.addClass("hidden"),s.length&&(-1!==I.inArray(t.split(".").pop().toLowerCase(),["jpg","jpeg","gif","png","svg","webp"])?(s.removeClass("hidden"),c.attr("src",t)):s.addClass("hidden"))})})},I.fn.csf_field_wp_editor=function(){return this.each(function(){if(void 0!==_.wp.editor&&void 0!==_.tinyMCEPreInit&&void 0!==_.tinyMCEPreInit.mceInit.csf_wp_editor){var e=I(this),t=e.find(".csf-wp-editor"),n=e.find("textarea");(e.find(".wp-editor-wrap").length||e.find(".mce-container").length)&&(t.empty(),t.append(n),n.css("display",""));var i=T.helper.uid("csf-editor-");n.attr("id",i);var a={tinymce:_.tinyMCEPreInit.mceInit.csf_wp_editor,quicktags:_.tinyMCEPreInit.qtInit.csf_wp_editor},s=t.data("editor-settings"),c=wp.oldEditor?wp.oldEditor:wp.editor;c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize);a.tinymce=I.extend({},a.tinymce,{selector:"#"+i,setup:function(t){t.on("change keyup",function(){var e=s.wpautop?t.getContent():wp.editor.removep(t.getContent());n.val(e).trigger("change")})}}),!1===s.tinymce&&(a.tinymce=!1,t.addClass("csf-no-tinymce")),!1===s.quicktags&&(a.quicktags=!1,t.addClass("csf-no-quicktags"));var r=setInterval(function(){e.is(":visible")&&(_.wp.editor.initialize(i,a),clearInterval(r))});if(s.media_buttons&&_.csf_media_buttons){var o=t.find(".wp-media-buttons");if(o.length)o.find(".csf-shortcode-button").data("editor-id",i);else{var f=I(_.csf_media_buttons);f.find(".csf-shortcode-button").data("editor-id",i),t.prepend(f)}}}})},I.fn.csf_confirm=function(){return this.each(function(){I(this).on("click",function(e){var t=I(this).data("confirm")||_.csf_vars.i18n.confirm;if(!confirm(t))return e.preventDefault(),!1;T.vars.is_confirm=!0,T.vars.form_modified=!1})})},I.fn.serializeObject=function(){var a={};return I.each(this.serializeArray(),function(e,t){var n=t.name,i=t.value;a[n]=a[n]===y?i:I.isArray(a[n])?a[n].concat(i):[a[n],i]}),a},I.fn.csf_save=function(){return this.each(function(){var i,a=I(this),c=I(".csf-save"),r=I(".csf-options"),o=!1;a.on("click",function(e){if(!o){var t=a.data("save"),n=a.val();c.attr("value",t),a.hasClass("csf-save-ajax")?(e.preventDefault(),r.addClass("csf-saving"),c.prop("disabled",!0),_.wp.ajax.post("csf_"+r.data("unique")+"_ajax_save",{data:I("#csf-form").serializeJSONCSF()}).done(function(e){if(I(".csf-error").remove(),Object.keys(e.errors).length){var s='<i class="csf-label-error csf-error">!</i>';I.each(e.errors,function(e,t){var n=I('[data-depend-id="'+e+'"]'),i=I('a[href="#tab='+n.closest(".csf-section").data("section-id")+'"]'),a=i.closest(".csf-tab-item");n.closest(".csf-fieldset").append('<p class="csf-error csf-error-text">'+t+"</p>"),i.find(".csf-error").length||i.append(s),a.find(".csf-arrow .csf-error").length||a.find(".csf-arrow").append(s)})}r.removeClass("csf-saving"),c.prop("disabled",!1).attr("value",n),o=!1,T.vars.form_modified=!1,T.vars.$form_warning.hide(),clearTimeout(i);var t=I(".csf-form-success");t.empty().append(e.notice).fadeIn("fast",function(){i=setTimeout(function(){t.fadeOut("fast")},1e3)})}).fail(function(e){alert(e.error)})):T.vars.form_modified=!1}o=!0})})},I.fn.csf_options=function(){return this.each(function(){var e=I(this),t=e.find(".csf-content"),n=e.find(".csf-form-success"),i=e.find(".csf-form-warning"),a=e.find(".csf-header .csf-save");(T.vars.$form_warning=i).length&&(_.onbeforeunload=function(){return!!T.vars.form_modified||y},t.on("change keypress",":input",function(){T.vars.form_modified||(n.hide(),i.fadeIn("fast"),T.vars.form_modified=!0)})),n.hasClass("csf-form-show")&&setTimeout(function(){n.fadeOut("fast")},1e3),I(b).keydown(function(e){if((e.ctrlKey||e.metaKey)&&83===e.which)return a.trigger("click"),e.preventDefault(),!1})})},I.fn.csf_taxonomy=function(){return this.each(function(){var e=I(this),t=e.parents("form");if("addtag"===t.attr("id")){var n=t.find("#submit"),i=e.find(".csf-field").csf_clone();n.on("click",function(){t.find(".form-required").hasClass("form-invalid")||(e.data("inited",!1),e.empty(),e.html(i),i=i.csf_clone(),e.csf_reload_script())})}})},I.fn.csf_shortcode=function(){var m=this;return m.shortcode_parse=function(e,n){var i="";return I.each(e,function(e,t){i+="["+(n=n||e),I.each(t,function(e,t){"content"===e?(i+="]",i+=t,i+="[/"+n):i+=m.shortcode_tags(e,t)}),i+="]"}),i},m.shortcode_tags=function(e,t){var n="";return""!==t&&("object"!=typeof t||I.isArray(t)?n+=" "+e+'="'+t.toString()+'"':I.each(t,function(e,t){switch(e){case"background-image":t=t.url?t.url:""}""!==t&&(n+=" "+e+'="'+t.toString()+'"')})),n},m.insertAtChars=function(e,t){var n=void 0!==e[0].name?e[0]:e;return n.value.length&&void 0!==n.selectionStart?(n.focus(),n.value.substring(0,n.selectionStart)+t+n.value.substring(n.selectionEnd,n.value.length)):(n.focus(),t)},m.send_to_editor=function(e,t){var n;if("undefined"!=typeof tinymce&&(n=tinymce.get(t)),n&&!n.isHidden())n.execCommand("mceInsertContent",!1,e);else{var i=I("#"+t);i.val(m.insertAtChars(i,e)).trigger("change")}},this.each(function(){var c,r,o,n,f,l,d,a,h,p=I(this),i=p.find(".csf-modal-load"),u=(p.find(".csf-modal-content"),p.find(".csf-modal-insert")),s=p.find(".csf-modal-loading"),t=p.find("select"),v=p.data("modal-id"),g=p.data("nonce");I(b).on("click",'.csf-shortcode-button[data-modal-id="'+v+'"]',function(e){e.preventDefault(),h=I(this),c=h.data("editor-id")||!1,r=h.data("target-id")||!1,o=h.data("gutenberg-id")||!1,p.removeClass("hidden"),p.hasClass("csf-shortcode-single")&&f===y&&t.trigger("change")}),t.on("change",function(){var e=I(this),t=e.find(":selected");n=e.val(),f=t.data("shortcode"),l=t.data("view")||"normal",d=t.data("group")||f,i.empty(),n?(s.show(),_.wp.ajax.post("csf-get-shortcode-"+v,{shortcode_key:n,nonce:g}).done(function(e){s.hide();var t=I(e.content).appendTo(i);u.parent().removeClass("hidden"),a=t.find(".csf--repeat-shortcode").csf_clone(),t.csf_reload_script(),t.find(".csf-fields").csf_reload_script()})):u.parent().addClass("hidden")}),u.on("click",function(e){if(e.preventDefault(),!u.prop("disabled")&&!u.attr("disabled")){var i="",t=p.find(".csf-field:not(.csf-depend-on)").find(":input:not(.ignore)").serializeObjectCSF();switch(l){case"contents":var n=f?t[f]:t;I.each(n,function(e,t){var n=f||e;i+="["+n+"]"+t+"[/"+n+"]"});break;case"group":i+="["+f,I.each(t[f],function(e,t){i+=m.shortcode_tags(e,t)}),i+="]",i+=m.shortcode_parse(t[d],d),i+="[/"+f+"]";break;case"repeater":i+=m.shortcode_parse(t[d],d);break;default:i+=m.shortcode_parse(t)}if(i=""===i?"["+f+"]":i,o){var a=_.csf_gutenberg_props.attributes.hasOwnProperty("shortcode")?_.csf_gutenberg_props.attributes.shortcode:"";_.csf_gutenberg_props.setAttributes({shortcode:a+i})}else if(c)m.send_to_editor(i,c);else{var s=r?I(r):h.parent().find("textarea");s.val(m.insertAtChars(s,i)).trigger("change")}p.addClass("hidden")}}),p.on("click",".csf--repeat-button",function(e){e.preventDefault();var t=p.find(".csf--repeatable"),n=a.csf_clone(),i=n.find(".csf-repeat-remove");n.appendTo(t);n.find(".csf-fields").csf_reload_script(),T.helper.name_nested_replace(p.find(".csf--repeat-shortcode"),d),i.on("click",function(){n.remove(),T.helper.name_nested_replace(p.find(".csf--repeat-shortcode"),d)})}),p.on("click",".csf-modal-close, .csf-modal-overlay",function(){p.addClass("hidden")})})},"function"==typeof Color&&(Color.prototype.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e}),T.funcs.parse_color=function(e){var t=e.replace(/\s+/g,""),n=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100;return{value:t,transparent:n,rgba:n<100}},I.fn.csf_color=function(){return this.each(function(){var c,r=I(this),o=T.funcs.parse_color(r.val()),e=!_.csf_vars.color_palette.length||_.csf_vars.color_palette;r.hasClass("wp-color-picker")&&r.closest(".wp-picker-container").after(r).remove(),r.wpColorPicker({palettes:e,change:function(e,t){var n=t.color.toString();c.removeClass("csf--transparent-active"),c.find(".csf--transparent-offset").css("background-color",n),r.val(n).trigger("change")},create:function(){c=r.closest(".wp-picker-container");var i=r.data("a8cIris"),e=I('<div class="csf--transparent-wrap"><div class="csf--transparent-slider"></div><div class="csf--transparent-offset"></div><div class="csf--transparent-text"></div><div class="csf--transparent-button">transparent <i class="fas fa-toggle-off"></i></div></div>').appendTo(c.find(".wp-picker-holder")),a=e.find(".csf--transparent-slider"),s=e.find(".csf--transparent-text"),n=e.find(".csf--transparent-offset"),t=e.find(".csf--transparent-button");"transparent"===r.val()&&c.addClass("csf--transparent-active"),t.on("click",function(){"transparent"!==r.val()?(r.val("transparent").trigger("change").removeClass("iris-error"),c.addClass("csf--transparent-active")):(r.val(i._color.toString()).trigger("change"),c.removeClass("csf--transparent-active"))}),a.slider({value:o.transparent,step:1,min:0,max:100,slide:function(e,t){var n=parseFloat(t.value/100);i._color._alpha=n,r.wpColorPicker("color",i._color.toString()),s.text(1===n||0===n?"":n)},create:function(){var e=parseFloat(o.transparent/100),t=e<1?e:"";s.text(t),n.css("background-color",o.value),c.on("click",".wp-picker-clear",function(){i._color._alpha=1,s.text(""),a.slider("option","value",100),c.removeClass("csf--transparent-active"),r.trigger("change")}),c.on("click",".wp-picker-default",function(){var e=T.funcs.parse_color(r.data("default-color")),t=parseFloat(e.transparent/100),n=t<1?t:"";i._color._alpha=t,s.text(n),a.slider("option","value",e.transparent),"transparent"===e.value&&(r.removeClass("iris-error"),c.addClass("csf--transparent-active"))})}})}})})},I.fn.csf_chosen=function(){return this.each(function(){var s=I(this),e=s.parent().find(".chosen-container"),t=s.hasClass("csf-chosen-sortable")||!1,n=s.hasClass("csf-chosen-ajax")||!1,i=s.attr("multiple")||!1,a=i?"100%":"auto",c=I.extend({allow_single_deselect:!0,disable_search_threshold:10,width:a,no_results_text:_.csf_vars.i18n.no_results_text},s.data("chosen-settings"));if(e.length&&e.remove(),n){var r=I.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:_.csf_vars.i18n.typing_text,searching_text:_.csf_vars.i18n.searching_text,no_results_text:_.csf_vars.i18n.no_results_text},s.data("chosen-settings"));s.CSFAjaxChosen(r)}else s.chosen(c);if(i){var o=s.parent().find(".csf-hide-select"),f=o.val()||[];s.on("change",function(e,t){t&&t.selected?o.append('<option value="'+t.selected+'" selected="selected">'+t.selected+"</option>"):t&&t.deselected&&o.find('option[value="'+t.deselected+'"]').remove(),_.wp.customize!==y&&0===o.children().length&&o.data("customize-setting-link")&&_.wp.customize.control(o.data("customize-setting-link")).setting.set(""),o.trigger("change")}),s.CSFChosenOrder(f,!0)}if(t){var l=s.parent().find(".chosen-container").find(".chosen-choices");l.bind("mousedown",function(e){I(e.target).is("span")&&e.stopPropagation()}),l.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,t){t.placeholder.width(t.item.innerWidth()),t.placeholder.height(t.item.innerHeight())},update:function(e,t){var i="",a=s.data("chosen"),n=s.parent().find(".csf-hide-select");l.find(".search-choice-close").each(function(){var n=I(this).data("option-array-index");I.each(a.results_data,function(e,t){t.array_index===n&&(i+='<option value="'+t.value+'" selected>'+t.value+"</option>")})}),n.children().remove(),n.append(i),n.trigger("change")}})}})},I.fn.csf_checkbox=function(){return this.each(function(){var e=I(this),t=e.find(".csf--input"),n=e.find(".csf--checkbox");n.on("click",function(){t.val(Number(n.prop("checked"))).trigger("change")})})},I.fn.csf_siblings=function(){return this.each(function(){var t=I(this),e=t.find(".csf--sibling"),n=t.data("multiple")||!1;e.on("click",function(){var e=I(this);n?e.hasClass("csf--active")?(e.removeClass("csf--active"),e.find("input").prop("checked",!1).trigger("change")):(e.addClass("csf--active"),e.find("input").prop("checked",!0).trigger("change")):(t.find("input").prop("checked",!1),e.find("input").prop("checked",!0).trigger("change"),e.addClass("csf--active").siblings().removeClass("csf--active"))})})},I.fn.csf_help=function(){return this.each(function(){var e,t,n=I(this);n.on({mouseenter:function(){e=I('<div class="csf-tooltip"></div>').html(n.find(".csf-help-text").html()).appendTo("body"),t=T.vars.is_rtl?n.offset().left+24:n.offset().left-e.outerWidth(),e.css({top:n.offset().top-(e.outerHeight()/2-14),left:t})},mouseleave:function(){e!==y&&e.remove()}})})},I.fn.csf_customizer_refresh=function(){return this.each(function(){var e=I(this),t=e.closest(".csf-customize-complex");if(t.length){var n=t.data("unique-id");if(n===y)return;var i=t.find(":input"),a=t.data("option-id"),s=i.serializeObjectCSF(),c=!I.isEmptyObject(s)&&s[n]&&s[n][a]?s[n][a]:"",r=_.wp.customize.control(n+"["+a+"]");r.setting._value=null,r.setting.set(c)}else e.find(":input").first().trigger("change");I(b).trigger("csf-customizer-refresh",e)})},I.fn.csf_customizer_listen=function(e){var t=I.extend({closest:!1},e);return this.each(function(){if(_.wp.customize!==y){var n=t.closest?I(this).closest(".csf-customize-complex"):I(this),e=n.find(":input"),i=n.data("unique-id"),a=n.data("option-id");i!==y&&e.on("change keyup csf.change",function(){var e=n.find(":input").serializeObjectCSF(),t=!I.isEmptyObject(e)&&e[i]&&e[i][a]?e[i][a]:"";_.wp.customize.control(i+"["+a+"]").setting.set(t)})}})},I(b).on("expanded",".control-section",function(){var e=I(this);if(e.hasClass("open")&&!e.data("inited")){var t=e.find(".csf-customize-field"),n=e.find(".csf-customize-complex");t.length&&(e.csf_dependency(),t.csf_reload_script({dependency:!1}),n.csf_customizer_listen()),e.data("inited",!0)}}),T.vars.$window.on("resize csf.resize",T.helper.debounce(function(e){(-1<navigator.userAgent.indexOf("AppleWebKit/")?T.vars.$window.width():_.innerWidth)<=782&&!T.vars.onloaded&&(I(".csf-section").csf_reload_script(),T.vars.onloaded=!0)},200)).trigger("csf.resize"),I.fn.csf_widgets=function(){return this.each(function(){I(b).on("widget-added widget-updated",function(e,t){var n=t.find(".csf-fields");n.length&&n.csf_reload_script()}),I(b).on("click",".widget-top",function(e){var t=I(this).parent().find(".csf-fields");t.length&&t.csf_reload_script()}),I(".widgets-sortables, .control-section-sidebar").on("sortstop",function(e,t){t.item.find(".csf-fields").csf_reload_script_retry()})})},I.fn.csf_nav_menu=function(){return this.each(function(){var e=I(this);e.on("click","a.item-edit",function(){I(this).closest("li.menu-item").find(".csf-fields").csf_reload_script()}),e.on("sortstop",function(e,t){t.item.find(".csf-fields").csf_reload_script_retry()})})},I.fn.csf_reload_script_retry=function(){return this.each(function(){var e=I(this);e.data("inited")&&e.children(".csf-field-wp_editor").csf_field_wp_editor()})},I.fn.csf_reload_script=function(e){var t=I.extend({dependency:!0},e);return this.each(function(){var e=I(this);e.data("inited")||(e.children(".csf-field-accordion").csf_field_accordion(),e.children(".csf-field-backup").csf_field_backup(),e.children(".csf-field-background").csf_field_background(),e.children(".csf-field-code_editor").csf_field_code_editor(),e.children(".csf-field-date").csf_field_date(),e.children(".csf-field-datetime").csf_field_datetime(),e.children(".csf-field-fieldset").csf_field_fieldset(),e.children(".csf-field-gallery").csf_field_gallery(),e.children(".csf-field-group").csf_field_group(),e.children(".csf-field-icon").csf_field_icon(),e.children(".csf-field-link").csf_field_link(),e.children(".csf-field-media").csf_field_media(),e.children(".csf-field-map").csf_field_map(),e.children(".csf-field-repeater").csf_field_repeater(),e.children(".csf-field-slider").csf_field_slider(),e.children(".csf-field-sortable").csf_field_sortable(),e.children(".csf-field-sorter").csf_field_sorter(),e.children(".csf-field-spinner").csf_field_spinner(),e.children(".csf-field-switcher").csf_field_switcher(),e.children(".csf-field-tabbed").csf_field_tabbed(),e.children(".csf-field-typography").csf_field_typography(),e.children(".csf-field-upload").csf_field_upload(),e.children(".csf-field-wp_editor").csf_field_wp_editor(),e.children(".csf-field-border").find(".csf-color").csf_color(),e.children(".csf-field-background").find(".csf-color").csf_color(),e.children(".csf-field-color").find(".csf-color").csf_color(),e.children(".csf-field-color_group").find(".csf-color").csf_color(),e.children(".csf-field-link_color").find(".csf-color").csf_color(),e.children(".csf-field-typography").find(".csf-color").csf_color(),e.children(".csf-field-select").find(".csf-chosen").csf_chosen(),e.children(".csf-field-checkbox").find(".csf-checkbox").csf_checkbox(),e.children(".csf-field-button_set").find(".csf-siblings").csf_siblings(),e.children(".csf-field-image_select").find(".csf-siblings").csf_siblings(),e.children(".csf-field-palette").find(".csf-siblings").csf_siblings(),e.children(".csf-field").find(".csf-help").csf_help(),t.dependency&&e.csf_dependency(),e.data("inited",!0),I(b).trigger("csf-reload-script",e))})},I(b).ready(function(){I(".csf-save").csf_save(),I(".csf-options").csf_options(),I(".csf-sticky-header").csf_sticky(),I(".csf-nav-options").csf_nav_options(),I(".csf-nav-metabox").csf_nav_metabox(),I(".csf-taxonomy").csf_taxonomy(),I(".csf-page-templates").csf_page_templates(),I(".csf-post-formats").csf_post_formats(),I(".csf-shortcode").csf_shortcode(),I(".csf-search").csf_search(),I(".csf-confirm").csf_confirm(),I(".csf-expand-all").csf_expand_all(),I(".csf-onload").csf_reload_script(),I("#widgets-editor").csf_widgets(),I("#widgets-right").csf_widgets(),I("#menu-to-edit").csf_nav_menu()})}(jQuery,window,document);
|
vendor/codestar-framework/assets/js/plugins.js
CHANGED
@@ -1,4765 +1,4765 @@
|
|
1 |
-
/* flatpickr v4.6.9, @license MIT */
|
2 |
-
(function (global, factory) {
|
3 |
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
4 |
-
typeof define === 'function' && define.amd ? define(factory) :
|
5 |
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.flatpickr = factory());
|
6 |
-
}(this, (function () { 'use strict';
|
7 |
-
|
8 |
-
/*! *****************************************************************************
|
9 |
-
Copyright (c) Microsoft Corporation.
|
10 |
-
|
11 |
-
Permission to use, copy, modify, and/or distribute this software for any
|
12 |
-
purpose with or without fee is hereby granted.
|
13 |
-
|
14 |
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
15 |
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
16 |
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
17 |
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
18 |
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
19 |
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
20 |
-
PERFORMANCE OF THIS SOFTWARE.
|
21 |
-
***************************************************************************** */
|
22 |
-
|
23 |
-
var __assign = function() {
|
24 |
-
__assign = Object.assign || function __assign(t) {
|
25 |
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
26 |
-
s = arguments[i];
|
27 |
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
28 |
-
}
|
29 |
-
return t;
|
30 |
-
};
|
31 |
-
return __assign.apply(this, arguments);
|
32 |
-
};
|
33 |
-
|
34 |
-
function __spreadArrays() {
|
35 |
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
36 |
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
37 |
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
38 |
-
r[k] = a[j];
|
39 |
-
return r;
|
40 |
-
}
|
41 |
-
|
42 |
-
var HOOKS = [
|
43 |
-
"onChange",
|
44 |
-
"onClose",
|
45 |
-
"onDayCreate",
|
46 |
-
"onDestroy",
|
47 |
-
"onKeyDown",
|
48 |
-
"onMonthChange",
|
49 |
-
"onOpen",
|
50 |
-
"onParseConfig",
|
51 |
-
"onReady",
|
52 |
-
"onValueUpdate",
|
53 |
-
"onYearChange",
|
54 |
-
"onPreCalendarPosition",
|
55 |
-
];
|
56 |
-
var defaults = {
|
57 |
-
_disable: [],
|
58 |
-
allowInput: false,
|
59 |
-
allowInvalidPreload: false,
|
60 |
-
altFormat: "F j, Y",
|
61 |
-
altInput: false,
|
62 |
-
altInputClass: "form-control input",
|
63 |
-
animate: typeof window === "object" &&
|
64 |
-
window.navigator.userAgent.indexOf("MSIE") === -1,
|
65 |
-
ariaDateFormat: "F j, Y",
|
66 |
-
autoFillDefaultTime: true,
|
67 |
-
clickOpens: true,
|
68 |
-
closeOnSelect: true,
|
69 |
-
conjunction: ", ",
|
70 |
-
dateFormat: "Y-m-d",
|
71 |
-
defaultHour: 12,
|
72 |
-
defaultMinute: 0,
|
73 |
-
defaultSeconds: 0,
|
74 |
-
disable: [],
|
75 |
-
disableMobile: false,
|
76 |
-
enableSeconds: false,
|
77 |
-
enableTime: false,
|
78 |
-
errorHandler: function (err) {
|
79 |
-
return typeof console !== "undefined" && console.warn(err);
|
80 |
-
},
|
81 |
-
getWeek: function (givenDate) {
|
82 |
-
var date = new Date(givenDate.getTime());
|
83 |
-
date.setHours(0, 0, 0, 0);
|
84 |
-
// Thursday in current week decides the year.
|
85 |
-
date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
|
86 |
-
// January 4 is always in week 1.
|
87 |
-
var week1 = new Date(date.getFullYear(), 0, 4);
|
88 |
-
// Adjust to Thursday in week 1 and count number of weeks from date to week1.
|
89 |
-
return (1 +
|
90 |
-
Math.round(((date.getTime() - week1.getTime()) / 86400000 -
|
91 |
-
3 +
|
92 |
-
((week1.getDay() + 6) % 7)) /
|
93 |
-
7));
|
94 |
-
},
|
95 |
-
hourIncrement: 1,
|
96 |
-
ignoredFocusElements: [],
|
97 |
-
inline: false,
|
98 |
-
locale: "default",
|
99 |
-
minuteIncrement: 5,
|
100 |
-
mode: "single",
|
101 |
-
monthSelectorType: "dropdown",
|
102 |
-
nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
|
103 |
-
noCalendar: false,
|
104 |
-
now: new Date(),
|
105 |
-
onChange: [],
|
106 |
-
onClose: [],
|
107 |
-
onDayCreate: [],
|
108 |
-
onDestroy: [],
|
109 |
-
onKeyDown: [],
|
110 |
-
onMonthChange: [],
|
111 |
-
onOpen: [],
|
112 |
-
onParseConfig: [],
|
113 |
-
onReady: [],
|
114 |
-
onValueUpdate: [],
|
115 |
-
onYearChange: [],
|
116 |
-
onPreCalendarPosition: [],
|
117 |
-
plugins: [],
|
118 |
-
position: "auto",
|
119 |
-
positionElement: undefined,
|
120 |
-
prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
|
121 |
-
shorthandCurrentMonth: false,
|
122 |
-
showMonths: 1,
|
123 |
-
static: false,
|
124 |
-
time_24hr: false,
|
125 |
-
weekNumbers: false,
|
126 |
-
wrap: false,
|
127 |
-
};
|
128 |
-
|
129 |
-
var english = {
|
130 |
-
weekdays: {
|
131 |
-
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
132 |
-
longhand: [
|
133 |
-
"Sunday",
|
134 |
-
"Monday",
|
135 |
-
"Tuesday",
|
136 |
-
"Wednesday",
|
137 |
-
"Thursday",
|
138 |
-
"Friday",
|
139 |
-
"Saturday",
|
140 |
-
],
|
141 |
-
},
|
142 |
-
months: {
|
143 |
-
shorthand: [
|
144 |
-
"Jan",
|
145 |
-
"Feb",
|
146 |
-
"Mar",
|
147 |
-
"Apr",
|
148 |
-
"May",
|
149 |
-
"Jun",
|
150 |
-
"Jul",
|
151 |
-
"Aug",
|
152 |
-
"Sep",
|
153 |
-
"Oct",
|
154 |
-
"Nov",
|
155 |
-
"Dec",
|
156 |
-
],
|
157 |
-
longhand: [
|
158 |
-
"January",
|
159 |
-
"February",
|
160 |
-
"March",
|
161 |
-
"April",
|
162 |
-
"May",
|
163 |
-
"June",
|
164 |
-
"July",
|
165 |
-
"August",
|
166 |
-
"September",
|
167 |
-
"October",
|
168 |
-
"November",
|
169 |
-
"December",
|
170 |
-
],
|
171 |
-
},
|
172 |
-
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
173 |
-
firstDayOfWeek: 0,
|
174 |
-
ordinal: function (nth) {
|
175 |
-
var s = nth % 100;
|
176 |
-
if (s > 3 && s < 21)
|
177 |
-
return "th";
|
178 |
-
switch (s % 10) {
|
179 |
-
case 1:
|
180 |
-
return "st";
|
181 |
-
case 2:
|
182 |
-
return "nd";
|
183 |
-
case 3:
|
184 |
-
return "rd";
|
185 |
-
default:
|
186 |
-
return "th";
|
187 |
-
}
|
188 |
-
},
|
189 |
-
rangeSeparator: " to ",
|
190 |
-
weekAbbreviation: "Wk",
|
191 |
-
scrollTitle: "Scroll to increment",
|
192 |
-
toggleTitle: "Click to toggle",
|
193 |
-
amPM: ["AM", "PM"],
|
194 |
-
yearAriaLabel: "Year",
|
195 |
-
monthAriaLabel: "Month",
|
196 |
-
hourAriaLabel: "Hour",
|
197 |
-
minuteAriaLabel: "Minute",
|
198 |
-
time_24hr: false,
|
199 |
-
};
|
200 |
-
|
201 |
-
var pad = function (number, length) {
|
202 |
-
if (length === void 0) { length = 2; }
|
203 |
-
return ("000" + number).slice(length * -1);
|
204 |
-
};
|
205 |
-
var int = function (bool) { return (bool === true ? 1 : 0); };
|
206 |
-
/* istanbul ignore next */
|
207 |
-
function debounce(fn, wait) {
|
208 |
-
var t;
|
209 |
-
return function () {
|
210 |
-
var _this = this;
|
211 |
-
clearTimeout(t);
|
212 |
-
t = setTimeout(function () { return fn.apply(_this, arguments); }, wait);
|
213 |
-
};
|
214 |
-
}
|
215 |
-
var arrayify = function (obj) {
|
216 |
-
return obj instanceof Array ? obj : [obj];
|
217 |
-
};
|
218 |
-
|
219 |
-
function toggleClass(elem, className, bool) {
|
220 |
-
if (bool === true)
|
221 |
-
return elem.classList.add(className);
|
222 |
-
elem.classList.remove(className);
|
223 |
-
}
|
224 |
-
function createElement(tag, className, content) {
|
225 |
-
var e = window.document.createElement(tag);
|
226 |
-
className = className || "";
|
227 |
-
content = content || "";
|
228 |
-
e.className = className;
|
229 |
-
if (content !== undefined)
|
230 |
-
e.textContent = content;
|
231 |
-
return e;
|
232 |
-
}
|
233 |
-
function clearNode(node) {
|
234 |
-
while (node.firstChild)
|
235 |
-
node.removeChild(node.firstChild);
|
236 |
-
}
|
237 |
-
function findParent(node, condition) {
|
238 |
-
if (condition(node))
|
239 |
-
return node;
|
240 |
-
else if (node.parentNode)
|
241 |
-
return findParent(node.parentNode, condition);
|
242 |
-
return undefined; // nothing found
|
243 |
-
}
|
244 |
-
function createNumberInput(inputClassName, opts) {
|
245 |
-
var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown");
|
246 |
-
if (navigator.userAgent.indexOf("MSIE 9.0") === -1) {
|
247 |
-
numInput.type = "number";
|
248 |
-
}
|
249 |
-
else {
|
250 |
-
numInput.type = "text";
|
251 |
-
numInput.pattern = "\\d*";
|
252 |
-
}
|
253 |
-
if (opts !== undefined)
|
254 |
-
for (var key in opts)
|
255 |
-
numInput.setAttribute(key, opts[key]);
|
256 |
-
wrapper.appendChild(numInput);
|
257 |
-
wrapper.appendChild(arrowUp);
|
258 |
-
wrapper.appendChild(arrowDown);
|
259 |
-
return wrapper;
|
260 |
-
}
|
261 |
-
function getEventTarget(event) {
|
262 |
-
try {
|
263 |
-
if (typeof event.composedPath === "function") {
|
264 |
-
var path = event.composedPath();
|
265 |
-
return path[0];
|
266 |
-
}
|
267 |
-
return event.target;
|
268 |
-
}
|
269 |
-
catch (error) {
|
270 |
-
return event.target;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
|
274 |
-
var doNothing = function () { return undefined; };
|
275 |
-
var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
|
276 |
-
var revFormat = {
|
277 |
-
D: doNothing,
|
278 |
-
F: function (dateObj, monthName, locale) {
|
279 |
-
dateObj.setMonth(locale.months.longhand.indexOf(monthName));
|
280 |
-
},
|
281 |
-
G: function (dateObj, hour) {
|
282 |
-
dateObj.setHours(parseFloat(hour));
|
283 |
-
},
|
284 |
-
H: function (dateObj, hour) {
|
285 |
-
dateObj.setHours(parseFloat(hour));
|
286 |
-
},
|
287 |
-
J: function (dateObj, day) {
|
288 |
-
dateObj.setDate(parseFloat(day));
|
289 |
-
},
|
290 |
-
K: function (dateObj, amPM, locale) {
|
291 |
-
dateObj.setHours((dateObj.getHours() % 12) +
|
292 |
-
12 * int(new RegExp(locale.amPM[1], "i").test(amPM)));
|
293 |
-
},
|
294 |
-
M: function (dateObj, shortMonth, locale) {
|
295 |
-
dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));
|
296 |
-
},
|
297 |
-
S: function (dateObj, seconds) {
|
298 |
-
dateObj.setSeconds(parseFloat(seconds));
|
299 |
-
},
|
300 |
-
U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },
|
301 |
-
W: function (dateObj, weekNum, locale) {
|
302 |
-
var weekNumber = parseInt(weekNum);
|
303 |
-
var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);
|
304 |
-
date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);
|
305 |
-
return date;
|
306 |
-
},
|
307 |
-
Y: function (dateObj, year) {
|
308 |
-
dateObj.setFullYear(parseFloat(year));
|
309 |
-
},
|
310 |
-
Z: function (_, ISODate) { return new Date(ISODate); },
|
311 |
-
d: function (dateObj, day) {
|
312 |
-
dateObj.setDate(parseFloat(day));
|
313 |
-
},
|
314 |
-
h: function (dateObj, hour) {
|
315 |
-
dateObj.setHours(parseFloat(hour));
|
316 |
-
},
|
317 |
-
i: function (dateObj, minutes) {
|
318 |
-
dateObj.setMinutes(parseFloat(minutes));
|
319 |
-
},
|
320 |
-
j: function (dateObj, day) {
|
321 |
-
dateObj.setDate(parseFloat(day));
|
322 |
-
},
|
323 |
-
l: doNothing,
|
324 |
-
m: function (dateObj, month) {
|
325 |
-
dateObj.setMonth(parseFloat(month) - 1);
|
326 |
-
},
|
327 |
-
n: function (dateObj, month) {
|
328 |
-
dateObj.setMonth(parseFloat(month) - 1);
|
329 |
-
},
|
330 |
-
s: function (dateObj, seconds) {
|
331 |
-
dateObj.setSeconds(parseFloat(seconds));
|
332 |
-
},
|
333 |
-
u: function (_, unixMillSeconds) {
|
334 |
-
return new Date(parseFloat(unixMillSeconds));
|
335 |
-
},
|
336 |
-
w: doNothing,
|
337 |
-
y: function (dateObj, year) {
|
338 |
-
dateObj.setFullYear(2000 + parseFloat(year));
|
339 |
-
},
|
340 |
-
};
|
341 |
-
var tokenRegex = {
|
342 |
-
D: "(\\w+)",
|
343 |
-
F: "(\\w+)",
|
344 |
-
G: "(\\d\\d|\\d)",
|
345 |
-
H: "(\\d\\d|\\d)",
|
346 |
-
J: "(\\d\\d|\\d)\\w+",
|
347 |
-
K: "",
|
348 |
-
M: "(\\w+)",
|
349 |
-
S: "(\\d\\d|\\d)",
|
350 |
-
U: "(.+)",
|
351 |
-
W: "(\\d\\d|\\d)",
|
352 |
-
Y: "(\\d{4})",
|
353 |
-
Z: "(.+)",
|
354 |
-
d: "(\\d\\d|\\d)",
|
355 |
-
h: "(\\d\\d|\\d)",
|
356 |
-
i: "(\\d\\d|\\d)",
|
357 |
-
j: "(\\d\\d|\\d)",
|
358 |
-
l: "(\\w+)",
|
359 |
-
m: "(\\d\\d|\\d)",
|
360 |
-
n: "(\\d\\d|\\d)",
|
361 |
-
s: "(\\d\\d|\\d)",
|
362 |
-
u: "(.+)",
|
363 |
-
w: "(\\d\\d|\\d)",
|
364 |
-
y: "(\\d{2})",
|
365 |
-
};
|
366 |
-
var formats = {
|
367 |
-
// get the date in UTC
|
368 |
-
Z: function (date) { return date.toISOString(); },
|
369 |
-
// weekday name, short, e.g. Thu
|
370 |
-
D: function (date, locale, options) {
|
371 |
-
return locale.weekdays.shorthand[formats.w(date, locale, options)];
|
372 |
-
},
|
373 |
-
// full month name e.g. January
|
374 |
-
F: function (date, locale, options) {
|
375 |
-
return monthToStr(formats.n(date, locale, options) - 1, false, locale);
|
376 |
-
},
|
377 |
-
// padded hour 1-12
|
378 |
-
G: function (date, locale, options) {
|
379 |
-
return pad(formats.h(date, locale, options));
|
380 |
-
},
|
381 |
-
// hours with leading zero e.g. 03
|
382 |
-
H: function (date) { return pad(date.getHours()); },
|
383 |
-
// day (1-30) with ordinal suffix e.g. 1st, 2nd
|
384 |
-
J: function (date, locale) {
|
385 |
-
return locale.ordinal !== undefined
|
386 |
-
? date.getDate() + locale.ordinal(date.getDate())
|
387 |
-
: date.getDate();
|
388 |
-
},
|
389 |
-
// AM/PM
|
390 |
-
K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },
|
391 |
-
// shorthand month e.g. Jan, Sep, Oct, etc
|
392 |
-
M: function (date, locale) {
|
393 |
-
return monthToStr(date.getMonth(), true, locale);
|
394 |
-
},
|
395 |
-
// seconds 00-59
|
396 |
-
S: function (date) { return pad(date.getSeconds()); },
|
397 |
-
// unix timestamp
|
398 |
-
U: function (date) { return date.getTime() / 1000; },
|
399 |
-
W: function (date, _, options) {
|
400 |
-
return options.getWeek(date);
|
401 |
-
},
|
402 |
-
// full year e.g. 2016, padded (0001-9999)
|
403 |
-
Y: function (date) { return pad(date.getFullYear(), 4); },
|
404 |
-
// day in month, padded (01-30)
|
405 |
-
d: function (date) { return pad(date.getDate()); },
|
406 |
-
// hour from 1-12 (am/pm)
|
407 |
-
h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },
|
408 |
-
// minutes, padded with leading zero e.g. 09
|
409 |
-
i: function (date) { return pad(date.getMinutes()); },
|
410 |
-
// day in month (1-30)
|
411 |
-
j: function (date) { return date.getDate(); },
|
412 |
-
// weekday name, full, e.g. Thursday
|
413 |
-
l: function (date, locale) {
|
414 |
-
return locale.weekdays.longhand[date.getDay()];
|
415 |
-
},
|
416 |
-
// padded month number (01-12)
|
417 |
-
m: function (date) { return pad(date.getMonth() + 1); },
|
418 |
-
// the month number (1-12)
|
419 |
-
n: function (date) { return date.getMonth() + 1; },
|
420 |
-
// seconds 0-59
|
421 |
-
s: function (date) { return date.getSeconds(); },
|
422 |
-
// Unix Milliseconds
|
423 |
-
u: function (date) { return date.getTime(); },
|
424 |
-
// number of the day of the week
|
425 |
-
w: function (date) { return date.getDay(); },
|
426 |
-
// last two digits of year e.g. 16 for 2016
|
427 |
-
y: function (date) { return String(date.getFullYear()).substring(2); },
|
428 |
-
};
|
429 |
-
|
430 |
-
var createDateFormatter = function (_a) {
|
431 |
-
var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;
|
432 |
-
return function (dateObj, frmt, overrideLocale) {
|
433 |
-
var locale = overrideLocale || l10n;
|
434 |
-
if (config.formatDate !== undefined && !isMobile) {
|
435 |
-
return config.formatDate(dateObj, frmt, locale);
|
436 |
-
}
|
437 |
-
return frmt
|
438 |
-
.split("")
|
439 |
-
.map(function (c, i, arr) {
|
440 |
-
return formats[c] && arr[i - 1] !== "\\"
|
441 |
-
? formats[c](dateObj, locale, config)
|
442 |
-
: c !== "\\"
|
443 |
-
? c
|
444 |
-
: "";
|
445 |
-
})
|
446 |
-
.join("");
|
447 |
-
};
|
448 |
-
};
|
449 |
-
var createDateParser = function (_a) {
|
450 |
-
var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
|
451 |
-
return function (date, givenFormat, timeless, customLocale) {
|
452 |
-
if (date !== 0 && !date)
|
453 |
-
return undefined;
|
454 |
-
var locale = customLocale || l10n;
|
455 |
-
var parsedDate;
|
456 |
-
var dateOrig = date;
|
457 |
-
if (date instanceof Date)
|
458 |
-
parsedDate = new Date(date.getTime());
|
459 |
-
else if (typeof date !== "string" &&
|
460 |
-
date.toFixed !== undefined // timestamp
|
461 |
-
)
|
462 |
-
// create a copy
|
463 |
-
parsedDate = new Date(date);
|
464 |
-
else if (typeof date === "string") {
|
465 |
-
// date string
|
466 |
-
var format = givenFormat || (config || defaults).dateFormat;
|
467 |
-
var datestr = String(date).trim();
|
468 |
-
if (datestr === "today") {
|
469 |
-
parsedDate = new Date();
|
470 |
-
timeless = true;
|
471 |
-
}
|
472 |
-
else if (/Z$/.test(datestr) ||
|
473 |
-
/GMT$/.test(datestr) // datestrings w/ timezone
|
474 |
-
)
|
475 |
-
parsedDate = new Date(date);
|
476 |
-
else if (config && config.parseDate)
|
477 |
-
parsedDate = config.parseDate(date, format);
|
478 |
-
else {
|
479 |
-
parsedDate =
|
480 |
-
!config || !config.noCalendar
|
481 |
-
? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)
|
482 |
-
: new Date(new Date().setHours(0, 0, 0, 0));
|
483 |
-
var matched = void 0, ops = [];
|
484 |
-
for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
|
485 |
-
var token_1 = format[i];
|
486 |
-
var isBackSlash = token_1 === "\\";
|
487 |
-
var escaped = format[i - 1] === "\\" || isBackSlash;
|
488 |
-
if (tokenRegex[token_1] && !escaped) {
|
489 |
-
regexStr += tokenRegex[token_1];
|
490 |
-
var match = new RegExp(regexStr).exec(date);
|
491 |
-
if (match && (matched = true)) {
|
492 |
-
ops[token_1 !== "Y" ? "push" : "unshift"]({
|
493 |
-
fn: revFormat[token_1],
|
494 |
-
val: match[++matchIndex],
|
495 |
-
});
|
496 |
-
}
|
497 |
-
}
|
498 |
-
else if (!isBackSlash)
|
499 |
-
regexStr += "."; // don't really care
|
500 |
-
ops.forEach(function (_a) {
|
501 |
-
var fn = _a.fn, val = _a.val;
|
502 |
-
return (parsedDate = fn(parsedDate, val, locale) || parsedDate);
|
503 |
-
});
|
504 |
-
}
|
505 |
-
parsedDate = matched ? parsedDate : undefined;
|
506 |
-
}
|
507 |
-
}
|
508 |
-
/* istanbul ignore next */
|
509 |
-
if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {
|
510 |
-
config.errorHandler(new Error("Invalid date provided: " + dateOrig));
|
511 |
-
return undefined;
|
512 |
-
}
|
513 |
-
if (timeless === true)
|
514 |
-
parsedDate.setHours(0, 0, 0, 0);
|
515 |
-
return parsedDate;
|
516 |
-
};
|
517 |
-
};
|
518 |
-
/**
|
519 |
-
* Compute the difference in dates, measured in ms
|
520 |
-
*/
|
521 |
-
function compareDates(date1, date2, timeless) {
|
522 |
-
if (timeless === void 0) { timeless = true; }
|
523 |
-
if (timeless !== false) {
|
524 |
-
return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -
|
525 |
-
new Date(date2.getTime()).setHours(0, 0, 0, 0));
|
526 |
-
}
|
527 |
-
return date1.getTime() - date2.getTime();
|
528 |
-
}
|
529 |
-
var isBetween = function (ts, ts1, ts2) {
|
530 |
-
return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
|
531 |
-
};
|
532 |
-
var duration = {
|
533 |
-
DAY: 86400000,
|
534 |
-
};
|
535 |
-
function getDefaultHours(config) {
|
536 |
-
var hours = config.defaultHour;
|
537 |
-
var minutes = config.defaultMinute;
|
538 |
-
var seconds = config.defaultSeconds;
|
539 |
-
if (config.minDate !== undefined) {
|
540 |
-
var minHour = config.minDate.getHours();
|
541 |
-
var minMinutes = config.minDate.getMinutes();
|
542 |
-
var minSeconds = config.minDate.getSeconds();
|
543 |
-
if (hours < minHour) {
|
544 |
-
hours = minHour;
|
545 |
-
}
|
546 |
-
if (hours === minHour && minutes < minMinutes) {
|
547 |
-
minutes = minMinutes;
|
548 |
-
}
|
549 |
-
if (hours === minHour && minutes === minMinutes && seconds < minSeconds)
|
550 |
-
seconds = config.minDate.getSeconds();
|
551 |
-
}
|
552 |
-
if (config.maxDate !== undefined) {
|
553 |
-
var maxHr = config.maxDate.getHours();
|
554 |
-
var maxMinutes = config.maxDate.getMinutes();
|
555 |
-
hours = Math.min(hours, maxHr);
|
556 |
-
if (hours === maxHr)
|
557 |
-
minutes = Math.min(maxMinutes, minutes);
|
558 |
-
if (hours === maxHr && minutes === maxMinutes)
|
559 |
-
seconds = config.maxDate.getSeconds();
|
560 |
-
}
|
561 |
-
return { hours: hours, minutes: minutes, seconds: seconds };
|
562 |
-
}
|
563 |
-
|
564 |
-
if (typeof Object.assign !== "function") {
|
565 |
-
Object.assign = function (target) {
|
566 |
-
var args = [];
|
567 |
-
for (var _i = 1; _i < arguments.length; _i++) {
|
568 |
-
args[_i - 1] = arguments[_i];
|
569 |
-
}
|
570 |
-
if (!target) {
|
571 |
-
throw TypeError("Cannot convert undefined or null to object");
|
572 |
-
}
|
573 |
-
var _loop_1 = function (source) {
|
574 |
-
if (source) {
|
575 |
-
Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });
|
576 |
-
}
|
577 |
-
};
|
578 |
-
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
579 |
-
var source = args_1[_a];
|
580 |
-
_loop_1(source);
|
581 |
-
}
|
582 |
-
return target;
|
583 |
-
};
|
584 |
-
}
|
585 |
-
|
586 |
-
var DEBOUNCED_CHANGE_MS = 300;
|
587 |
-
function FlatpickrInstance(element, instanceConfig) {
|
588 |
-
var self = {
|
589 |
-
config: __assign(__assign({}, defaults), flatpickr.defaultConfig),
|
590 |
-
l10n: english,
|
591 |
-
};
|
592 |
-
self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
|
593 |
-
self._handlers = [];
|
594 |
-
self.pluginElements = [];
|
595 |
-
self.loadedPlugins = [];
|
596 |
-
self._bind = bind;
|
597 |
-
self._setHoursFromDate = setHoursFromDate;
|
598 |
-
self._positionCalendar = positionCalendar;
|
599 |
-
self.changeMonth = changeMonth;
|
600 |
-
self.changeYear = changeYear;
|
601 |
-
self.clear = clear;
|
602 |
-
self.close = close;
|
603 |
-
self._createElement = createElement;
|
604 |
-
self.destroy = destroy;
|
605 |
-
self.isEnabled = isEnabled;
|
606 |
-
self.jumpToDate = jumpToDate;
|
607 |
-
self.open = open;
|
608 |
-
self.redraw = redraw;
|
609 |
-
self.set = set;
|
610 |
-
self.setDate = setDate;
|
611 |
-
self.toggle = toggle;
|
612 |
-
function setupHelperFunctions() {
|
613 |
-
self.utils = {
|
614 |
-
getDaysInMonth: function (month, yr) {
|
615 |
-
if (month === void 0) { month = self.currentMonth; }
|
616 |
-
if (yr === void 0) { yr = self.currentYear; }
|
617 |
-
if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))
|
618 |
-
return 29;
|
619 |
-
return self.l10n.daysInMonth[month];
|
620 |
-
},
|
621 |
-
};
|
622 |
-
}
|
623 |
-
function init() {
|
624 |
-
self.element = self.input = element;
|
625 |
-
self.isOpen = false;
|
626 |
-
parseConfig();
|
627 |
-
setupLocale();
|
628 |
-
setupInputs();
|
629 |
-
setupDates();
|
630 |
-
setupHelperFunctions();
|
631 |
-
if (!self.isMobile)
|
632 |
-
build();
|
633 |
-
bindEvents();
|
634 |
-
if (self.selectedDates.length || self.config.noCalendar) {
|
635 |
-
if (self.config.enableTime) {
|
636 |
-
setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);
|
637 |
-
}
|
638 |
-
updateValue(false);
|
639 |
-
}
|
640 |
-
setCalendarWidth();
|
641 |
-
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
642 |
-
/* TODO: investigate this further
|
643 |
-
|
644 |
-
Currently, there is weird positioning behavior in safari causing pages
|
645 |
-
to scroll up. https://github.com/chmln/flatpickr/issues/563
|
646 |
-
|
647 |
-
However, most browsers are not Safari and positioning is expensive when used
|
648 |
-
in scale. https://github.com/chmln/flatpickr/issues/1096
|
649 |
-
*/
|
650 |
-
if (!self.isMobile && isSafari) {
|
651 |
-
positionCalendar();
|
652 |
-
}
|
653 |
-
triggerEvent("onReady");
|
654 |
-
}
|
655 |
-
function bindToInstance(fn) {
|
656 |
-
return fn.bind(self);
|
657 |
-
}
|
658 |
-
function setCalendarWidth() {
|
659 |
-
var config = self.config;
|
660 |
-
if (config.weekNumbers === false && config.showMonths === 1) {
|
661 |
-
return;
|
662 |
-
}
|
663 |
-
else if (config.noCalendar !== true) {
|
664 |
-
window.requestAnimationFrame(function () {
|
665 |
-
if (self.calendarContainer !== undefined) {
|
666 |
-
self.calendarContainer.style.visibility = "hidden";
|
667 |
-
self.calendarContainer.style.display = "block";
|
668 |
-
}
|
669 |
-
if (self.daysContainer !== undefined) {
|
670 |
-
var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;
|
671 |
-
self.daysContainer.style.width = daysWidth + "px";
|
672 |
-
self.calendarContainer.style.width =
|
673 |
-
daysWidth +
|
674 |
-
(self.weekWrapper !== undefined
|
675 |
-
? self.weekWrapper.offsetWidth
|
676 |
-
: 0) +
|
677 |
-
"px";
|
678 |
-
self.calendarContainer.style.removeProperty("visibility");
|
679 |
-
|
680 |
-
}
|
681 |
-
});
|
682 |
-
}
|
683 |
-
}
|
684 |
-
/**
|
685 |
-
* The handler for all events targeting the time inputs
|
686 |
-
*/
|
687 |
-
function updateTime(e) {
|
688 |
-
if (self.selectedDates.length === 0) {
|
689 |
-
var defaultDate = self.config.minDate === undefined ||
|
690 |
-
compareDates(new Date(), self.config.minDate) >= 0
|
691 |
-
? new Date()
|
692 |
-
: new Date(self.config.minDate.getTime());
|
693 |
-
var defaults = getDefaultHours(self.config);
|
694 |
-
defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());
|
695 |
-
self.selectedDates = [defaultDate];
|
696 |
-
self.latestSelectedDateObj = defaultDate;
|
697 |
-
}
|
698 |
-
if (e !== undefined && e.type !== "blur") {
|
699 |
-
timeWrapper(e);
|
700 |
-
}
|
701 |
-
var prevValue = self._input.value;
|
702 |
-
setHoursFromInputs();
|
703 |
-
updateValue();
|
704 |
-
if (self._input.value !== prevValue) {
|
705 |
-
self._debouncedChange();
|
706 |
-
}
|
707 |
-
}
|
708 |
-
function ampm2military(hour, amPM) {
|
709 |
-
return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);
|
710 |
-
}
|
711 |
-
function military2ampm(hour) {
|
712 |
-
switch (hour % 24) {
|
713 |
-
case 0:
|
714 |
-
case 12:
|
715 |
-
return 12;
|
716 |
-
default:
|
717 |
-
return hour % 12;
|
718 |
-
}
|
719 |
-
}
|
720 |
-
/**
|
721 |
-
* Syncs the selected date object time with user's time input
|
722 |
-
*/
|
723 |
-
function setHoursFromInputs() {
|
724 |
-
if (self.hourElement === undefined || self.minuteElement === undefined)
|
725 |
-
return;
|
726 |
-
var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined
|
727 |
-
? (parseInt(self.secondElement.value, 10) || 0) % 60
|
728 |
-
: 0;
|
729 |
-
if (self.amPM !== undefined) {
|
730 |
-
hours = ampm2military(hours, self.amPM.textContent);
|
731 |
-
}
|
732 |
-
var limitMinHours = self.config.minTime !== undefined ||
|
733 |
-
(self.config.minDate &&
|
734 |
-
self.minDateHasTime &&
|
735 |
-
self.latestSelectedDateObj &&
|
736 |
-
compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===
|
737 |
-
0);
|
738 |
-
var limitMaxHours = self.config.maxTime !== undefined ||
|
739 |
-
(self.config.maxDate &&
|
740 |
-
self.maxDateHasTime &&
|
741 |
-
self.latestSelectedDateObj &&
|
742 |
-
compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===
|
743 |
-
0);
|
744 |
-
if (limitMaxHours) {
|
745 |
-
var maxTime = self.config.maxTime !== undefined
|
746 |
-
? self.config.maxTime
|
747 |
-
: self.config.maxDate;
|
748 |
-
hours = Math.min(hours, maxTime.getHours());
|
749 |
-
if (hours === maxTime.getHours())
|
750 |
-
minutes = Math.min(minutes, maxTime.getMinutes());
|
751 |
-
if (minutes === maxTime.getMinutes())
|
752 |
-
seconds = Math.min(seconds, maxTime.getSeconds());
|
753 |
-
}
|
754 |
-
if (limitMinHours) {
|
755 |
-
var minTime = self.config.minTime !== undefined
|
756 |
-
? self.config.minTime
|
757 |
-
: self.config.minDate;
|
758 |
-
hours = Math.max(hours, minTime.getHours());
|
759 |
-
if (hours === minTime.getHours() && minutes < minTime.getMinutes())
|
760 |
-
minutes = minTime.getMinutes();
|
761 |
-
if (minutes === minTime.getMinutes())
|
762 |
-
seconds = Math.max(seconds, minTime.getSeconds());
|
763 |
-
}
|
764 |
-
setHours(hours, minutes, seconds);
|
765 |
-
}
|
766 |
-
/**
|
767 |
-
* Syncs time input values with a date
|
768 |
-
*/
|
769 |
-
function setHoursFromDate(dateObj) {
|
770 |
-
var date = dateObj || self.latestSelectedDateObj;
|
771 |
-
if (date) {
|
772 |
-
setHours(date.getHours(), date.getMinutes(), date.getSeconds());
|
773 |
-
}
|
774 |
-
}
|
775 |
-
/**
|
776 |
-
* Sets the hours, minutes, and optionally seconds
|
777 |
-
* of the latest selected date object and the
|
778 |
-
* corresponding time inputs
|
779 |
-
* @param {Number} hours the hour. whether its military
|
780 |
-
* or am-pm gets inferred from config
|
781 |
-
* @param {Number} minutes the minutes
|
782 |
-
* @param {Number} seconds the seconds (optional)
|
783 |
-
*/
|
784 |
-
function setHours(hours, minutes, seconds) {
|
785 |
-
if (self.latestSelectedDateObj !== undefined) {
|
786 |
-
self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);
|
787 |
-
}
|
788 |
-
if (!self.hourElement || !self.minuteElement || self.isMobile)
|
789 |
-
return;
|
790 |
-
self.hourElement.value = pad(!self.config.time_24hr
|
791 |
-
? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)
|
792 |
-
: hours);
|
793 |
-
self.minuteElement.value = pad(minutes);
|
794 |
-
if (self.amPM !== undefined)
|
795 |
-
self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];
|
796 |
-
if (self.secondElement !== undefined)
|
797 |
-
self.secondElement.value = pad(seconds);
|
798 |
-
}
|
799 |
-
/**
|
800 |
-
* Handles the year input and incrementing events
|
801 |
-
* @param {Event} event the keyup or increment event
|
802 |
-
*/
|
803 |
-
function onYearInput(event) {
|
804 |
-
var eventTarget = getEventTarget(event);
|
805 |
-
var year = parseInt(eventTarget.value) + (event.delta || 0);
|
806 |
-
if (year / 1000 > 1 ||
|
807 |
-
(event.key === "Enter" && !/[^\d]/.test(year.toString()))) {
|
808 |
-
changeYear(year);
|
809 |
-
}
|
810 |
-
}
|
811 |
-
/**
|
812 |
-
* Essentially addEventListener + tracking
|
813 |
-
* @param {Element} element the element to addEventListener to
|
814 |
-
* @param {String} event the event name
|
815 |
-
* @param {Function} handler the event handler
|
816 |
-
*/
|
817 |
-
function bind(element, event, handler, options) {
|
818 |
-
if (event instanceof Array)
|
819 |
-
return event.forEach(function (ev) { return bind(element, ev, handler, options); });
|
820 |
-
if (element instanceof Array)
|
821 |
-
return element.forEach(function (el) { return bind(el, event, handler, options); });
|
822 |
-
element.addEventListener(event, handler, options);
|
823 |
-
self._handlers.push({
|
824 |
-
remove: function () { return element.removeEventListener(event, handler); },
|
825 |
-
});
|
826 |
-
}
|
827 |
-
function triggerChange() {
|
828 |
-
triggerEvent("onChange");
|
829 |
-
}
|
830 |
-
/**
|
831 |
-
* Adds all the necessary event listeners
|
832 |
-
*/
|
833 |
-
function bindEvents() {
|
834 |
-
if (self.config.wrap) {
|
835 |
-
["open", "close", "toggle", "clear"].forEach(function (evt) {
|
836 |
-
Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) {
|
837 |
-
return bind(el, "click", self[evt]);
|
838 |
-
});
|
839 |
-
});
|
840 |
-
}
|
841 |
-
if (self.isMobile) {
|
842 |
-
setupMobile();
|
843 |
-
return;
|
844 |
-
}
|
845 |
-
var debouncedResize = debounce(onResize, 50);
|
846 |
-
self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);
|
847 |
-
if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))
|
848 |
-
bind(self.daysContainer, "mouseover", function (e) {
|
849 |
-
if (self.config.mode === "range")
|
850 |
-
onMouseOver(getEventTarget(e));
|
851 |
-
});
|
852 |
-
bind(window.document.body, "keydown", onKeyDown);
|
853 |
-
if (!self.config.inline && !self.config.static)
|
854 |
-
bind(window, "resize", debouncedResize);
|
855 |
-
if (window.ontouchstart !== undefined)
|
856 |
-
bind(window.document, "touchstart", documentClick);
|
857 |
-
else
|
858 |
-
bind(window.document, "mousedown", documentClick);
|
859 |
-
bind(window.document, "focus", documentClick, { capture: true });
|
860 |
-
if (self.config.clickOpens === true) {
|
861 |
-
bind(self._input, "focus", self.open);
|
862 |
-
bind(self._input, "click", self.open);
|
863 |
-
}
|
864 |
-
if (self.daysContainer !== undefined) {
|
865 |
-
bind(self.monthNav, "click", onMonthNavClick);
|
866 |
-
bind(self.monthNav, ["keyup", "increment"], onYearInput);
|
867 |
-
bind(self.daysContainer, "click", selectDate);
|
868 |
-
}
|
869 |
-
if (self.timeContainer !== undefined &&
|
870 |
-
self.minuteElement !== undefined &&
|
871 |
-
self.hourElement !== undefined) {
|
872 |
-
var selText = function (e) {
|
873 |
-
return getEventTarget(e).select();
|
874 |
-
};
|
875 |
-
bind(self.timeContainer, ["increment"], updateTime);
|
876 |
-
bind(self.timeContainer, "blur", updateTime, { capture: true });
|
877 |
-
bind(self.timeContainer, "click", timeIncrement);
|
878 |
-
bind([self.hourElement, self.minuteElement], ["focus", "click"], selText);
|
879 |
-
if (self.secondElement !== undefined)
|
880 |
-
bind(self.secondElement, "focus", function () { return self.secondElement && self.secondElement.select(); });
|
881 |
-
if (self.amPM !== undefined) {
|
882 |
-
bind(self.amPM, "click", function (e) {
|
883 |
-
updateTime(e);
|
884 |
-
triggerChange();
|
885 |
-
});
|
886 |
-
}
|
887 |
-
}
|
888 |
-
if (self.config.allowInput) {
|
889 |
-
bind(self._input, "blur", onBlur);
|
890 |
-
}
|
891 |
-
}
|
892 |
-
/**
|
893 |
-
* Set the calendar view to a particular date.
|
894 |
-
* @param {Date} jumpDate the date to set the view to
|
895 |
-
* @param {boolean} triggerChange if change events should be triggered
|
896 |
-
*/
|
897 |
-
function jumpToDate(jumpDate, triggerChange) {
|
898 |
-
var jumpTo = jumpDate !== undefined
|
899 |
-
? self.parseDate(jumpDate)
|
900 |
-
: self.latestSelectedDateObj ||
|
901 |
-
(self.config.minDate && self.config.minDate > self.now
|
902 |
-
? self.config.minDate
|
903 |
-
: self.config.maxDate && self.config.maxDate < self.now
|
904 |
-
? self.config.maxDate
|
905 |
-
: self.now);
|
906 |
-
var oldYear = self.currentYear;
|
907 |
-
var oldMonth = self.currentMonth;
|
908 |
-
try {
|
909 |
-
if (jumpTo !== undefined) {
|
910 |
-
self.currentYear = jumpTo.getFullYear();
|
911 |
-
self.currentMonth = jumpTo.getMonth();
|
912 |
-
}
|
913 |
-
}
|
914 |
-
catch (e) {
|
915 |
-
/* istanbul ignore next */
|
916 |
-
e.message = "Invalid date supplied: " + jumpTo;
|
917 |
-
self.config.errorHandler(e);
|
918 |
-
}
|
919 |
-
if (triggerChange && self.currentYear !== oldYear) {
|
920 |
-
triggerEvent("onYearChange");
|
921 |
-
buildMonthSwitch();
|
922 |
-
}
|
923 |
-
if (triggerChange &&
|
924 |
-
(self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {
|
925 |
-
triggerEvent("onMonthChange");
|
926 |
-
}
|
927 |
-
self.redraw();
|
928 |
-
}
|
929 |
-
/**
|
930 |
-
* The up/down arrow handler for time inputs
|
931 |
-
* @param {Event} e the click event
|
932 |
-
*/
|
933 |
-
function timeIncrement(e) {
|
934 |
-
var eventTarget = getEventTarget(e);
|
935 |
-
if (~eventTarget.className.indexOf("arrow"))
|
936 |
-
incrementNumInput(e, eventTarget.classList.contains("arrowUp") ? 1 : -1);
|
937 |
-
}
|
938 |
-
/**
|
939 |
-
* Increments/decrements the value of input associ-
|
940 |
-
* ated with the up/down arrow by dispatching an
|
941 |
-
* "increment" event on the input.
|
942 |
-
*
|
943 |
-
* @param {Event} e the click event
|
944 |
-
* @param {Number} delta the diff (usually 1 or -1)
|
945 |
-
* @param {Element} inputElem the input element
|
946 |
-
*/
|
947 |
-
function incrementNumInput(e, delta, inputElem) {
|
948 |
-
var target = e && getEventTarget(e);
|
949 |
-
var input = inputElem ||
|
950 |
-
(target && target.parentNode && target.parentNode.firstChild);
|
951 |
-
var event = createEvent("increment");
|
952 |
-
event.delta = delta;
|
953 |
-
input && input.dispatchEvent(event);
|
954 |
-
}
|
955 |
-
function build() {
|
956 |
-
var fragment = window.document.createDocumentFragment();
|
957 |
-
self.calendarContainer = createElement("div", "flatpickr-calendar");
|
958 |
-
self.calendarContainer.tabIndex = -1;
|
959 |
-
if (!self.config.noCalendar) {
|
960 |
-
fragment.appendChild(buildMonthNav());
|
961 |
-
self.innerContainer = createElement("div", "flatpickr-innerContainer");
|
962 |
-
if (self.config.weekNumbers) {
|
963 |
-
var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;
|
964 |
-
self.innerContainer.appendChild(weekWrapper);
|
965 |
-
self.weekNumbers = weekNumbers;
|
966 |
-
self.weekWrapper = weekWrapper;
|
967 |
-
}
|
968 |
-
self.rContainer = createElement("div", "flatpickr-rContainer");
|
969 |
-
self.rContainer.appendChild(buildWeekdays());
|
970 |
-
if (!self.daysContainer) {
|
971 |
-
self.daysContainer = createElement("div", "flatpickr-days");
|
972 |
-
self.daysContainer.tabIndex = -1;
|
973 |
-
}
|
974 |
-
buildDays();
|
975 |
-
self.rContainer.appendChild(self.daysContainer);
|
976 |
-
self.innerContainer.appendChild(self.rContainer);
|
977 |
-
fragment.appendChild(self.innerContainer);
|
978 |
-
}
|
979 |
-
if (self.config.enableTime) {
|
980 |
-
fragment.appendChild(buildTime());
|
981 |
-
}
|
982 |
-
toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range");
|
983 |
-
toggleClass(self.calendarContainer, "animate", self.config.animate === true);
|
984 |
-
toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1);
|
985 |
-
self.calendarContainer.appendChild(fragment);
|
986 |
-
var customAppend = self.config.appendTo !== undefined &&
|
987 |
-
self.config.appendTo.nodeType !== undefined;
|
988 |
-
if (self.config.inline || self.config.static) {
|
989 |
-
self.calendarContainer.classList.add(self.config.inline ? "inline" : "static");
|
990 |
-
if (self.config.inline) {
|
991 |
-
if (!customAppend && self.element.parentNode)
|
992 |
-
self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);
|
993 |
-
else if (self.config.appendTo !== undefined)
|
994 |
-
self.config.appendTo.appendChild(self.calendarContainer);
|
995 |
-
}
|
996 |
-
if (self.config.static) {
|
997 |
-
var wrapper = createElement("div", "flatpickr-wrapper");
|
998 |
-
if (self.element.parentNode)
|
999 |
-
self.element.parentNode.insertBefore(wrapper, self.element);
|
1000 |
-
wrapper.appendChild(self.element);
|
1001 |
-
if (self.altInput)
|
1002 |
-
wrapper.appendChild(self.altInput);
|
1003 |
-
wrapper.appendChild(self.calendarContainer);
|
1004 |
-
}
|
1005 |
-
}
|
1006 |
-
if (!self.config.static && !self.config.inline)
|
1007 |
-
(self.config.appendTo !== undefined
|
1008 |
-
? self.config.appendTo
|
1009 |
-
: window.document.body).appendChild(self.calendarContainer);
|
1010 |
-
}
|
1011 |
-
function createDay(className, date, dayNumber, i) {
|
1012 |
-
var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString());
|
1013 |
-
dayElement.dateObj = date;
|
1014 |
-
dayElement.$i = i;
|
1015 |
-
dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat));
|
1016 |
-
if (className.indexOf("hidden") === -1 &&
|
1017 |
-
compareDates(date, self.now) === 0) {
|
1018 |
-
self.todayDateElem = dayElement;
|
1019 |
-
dayElement.classList.add("today");
|
1020 |
-
dayElement.setAttribute("aria-current", "date");
|
1021 |
-
}
|
1022 |
-
if (dateIsEnabled) {
|
1023 |
-
dayElement.tabIndex = -1;
|
1024 |
-
if (isDateSelected(date)) {
|
1025 |
-
dayElement.classList.add("selected");
|
1026 |
-
self.selectedDateElem = dayElement;
|
1027 |
-
if (self.config.mode === "range") {
|
1028 |
-
toggleClass(dayElement, "startRange", self.selectedDates[0] &&
|
1029 |
-
compareDates(date, self.selectedDates[0], true) === 0);
|
1030 |
-
toggleClass(dayElement, "endRange", self.selectedDates[1] &&
|
1031 |
-
compareDates(date, self.selectedDates[1], true) === 0);
|
1032 |
-
if (className === "nextMonthDay")
|
1033 |
-
dayElement.classList.add("inRange");
|
1034 |
-
}
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
else {
|
1038 |
-
dayElement.classList.add("flatpickr-disabled");
|
1039 |
-
}
|
1040 |
-
if (self.config.mode === "range") {
|
1041 |
-
if (isDateInRange(date) && !isDateSelected(date))
|
1042 |
-
dayElement.classList.add("inRange");
|
1043 |
-
}
|
1044 |
-
if (self.weekNumbers &&
|
1045 |
-
self.config.showMonths === 1 &&
|
1046 |
-
className !== "prevMonthDay" &&
|
1047 |
-
dayNumber % 7 === 1) {
|
1048 |
-
self.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + self.config.getWeek(date) + "</span>");
|
1049 |
-
}
|
1050 |
-
triggerEvent("onDayCreate", dayElement);
|
1051 |
-
return dayElement;
|
1052 |
-
}
|
1053 |
-
function focusOnDayElem(targetNode) {
|
1054 |
-
targetNode.focus();
|
1055 |
-
if (self.config.mode === "range")
|
1056 |
-
onMouseOver(targetNode);
|
1057 |
-
}
|
1058 |
-
function getFirstAvailableDay(delta) {
|
1059 |
-
var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;
|
1060 |
-
var endMonth = delta > 0 ? self.config.showMonths : -1;
|
1061 |
-
for (var m = startMonth; m != endMonth; m += delta) {
|
1062 |
-
var month = self.daysContainer.children[m];
|
1063 |
-
var startIndex = delta > 0 ? 0 : month.children.length - 1;
|
1064 |
-
var endIndex = delta > 0 ? month.children.length : -1;
|
1065 |
-
for (var i = startIndex; i != endIndex; i += delta) {
|
1066 |
-
var c = month.children[i];
|
1067 |
-
if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj))
|
1068 |
-
return c;
|
1069 |
-
}
|
1070 |
-
}
|
1071 |
-
return undefined;
|
1072 |
-
}
|
1073 |
-
function getNextAvailableDay(current, delta) {
|
1074 |
-
var givenMonth = current.className.indexOf("Month") === -1
|
1075 |
-
? current.dateObj.getMonth()
|
1076 |
-
: self.currentMonth;
|
1077 |
-
var endMonth = delta > 0 ? self.config.showMonths : -1;
|
1078 |
-
var loopDelta = delta > 0 ? 1 : -1;
|
1079 |
-
for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {
|
1080 |
-
var month = self.daysContainer.children[m];
|
1081 |
-
var startIndex = givenMonth - self.currentMonth === m
|
1082 |
-
? current.$i + delta
|
1083 |
-
: delta < 0
|
1084 |
-
? month.children.length - 1
|
1085 |
-
: 0;
|
1086 |
-
var numMonthDays = month.children.length;
|
1087 |
-
for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {
|
1088 |
-
var c = month.children[i];
|
1089 |
-
if (c.className.indexOf("hidden") === -1 &&
|
1090 |
-
isEnabled(c.dateObj) &&
|
1091 |
-
Math.abs(current.$i - i) >= Math.abs(delta))
|
1092 |
-
return focusOnDayElem(c);
|
1093 |
-
}
|
1094 |
-
}
|
1095 |
-
self.changeMonth(loopDelta);
|
1096 |
-
focusOnDay(getFirstAvailableDay(loopDelta), 0);
|
1097 |
-
return undefined;
|
1098 |
-
}
|
1099 |
-
function focusOnDay(current, offset) {
|
1100 |
-
var dayFocused = isInView(document.activeElement || document.body);
|
1101 |
-
var startElem = current !== undefined
|
1102 |
-
? current
|
1103 |
-
: dayFocused
|
1104 |
-
? document.activeElement
|
1105 |
-
: self.selectedDateElem !== undefined && isInView(self.selectedDateElem)
|
1106 |
-
? self.selectedDateElem
|
1107 |
-
: self.todayDateElem !== undefined && isInView(self.todayDateElem)
|
1108 |
-
? self.todayDateElem
|
1109 |
-
: getFirstAvailableDay(offset > 0 ? 1 : -1);
|
1110 |
-
if (startElem === undefined) {
|
1111 |
-
self._input.focus();
|
1112 |
-
}
|
1113 |
-
else if (!dayFocused) {
|
1114 |
-
focusOnDayElem(startElem);
|
1115 |
-
}
|
1116 |
-
else {
|
1117 |
-
getNextAvailableDay(startElem, offset);
|
1118 |
-
}
|
1119 |
-
}
|
1120 |
-
function buildMonthDays(year, month) {
|
1121 |
-
var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;
|
1122 |
-
var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);
|
1123 |
-
var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay", nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay";
|
1124 |
-
var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;
|
1125 |
-
// prepend days from the ending of previous month
|
1126 |
-
for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {
|
1127 |
-
days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));
|
1128 |
-
}
|
1129 |
-
// Start at 1 since there is no 0th day
|
1130 |
-
for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {
|
1131 |
-
days.appendChild(createDay("", new Date(year, month, dayNumber), dayNumber, dayIndex));
|
1132 |
-
}
|
1133 |
-
// append days from the next month
|
1134 |
-
for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&
|
1135 |
-
(self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {
|
1136 |
-
days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));
|
1137 |
-
}
|
1138 |
-
//updateNavigationCurrentMonth();
|
1139 |
-
var dayContainer = createElement("div", "dayContainer");
|
1140 |
-
dayContainer.appendChild(days);
|
1141 |
-
return dayContainer;
|
1142 |
-
}
|
1143 |
-
function buildDays() {
|
1144 |
-
if (self.daysContainer === undefined) {
|
1145 |
-
return;
|
1146 |
-
}
|
1147 |
-
clearNode(self.daysContainer);
|
1148 |
-
// TODO: week numbers for each month
|
1149 |
-
if (self.weekNumbers)
|
1150 |
-
clearNode(self.weekNumbers);
|
1151 |
-
var frag = document.createDocumentFragment();
|
1152 |
-
for (var i = 0; i < self.config.showMonths; i++) {
|
1153 |
-
var d = new Date(self.currentYear, self.currentMonth, 1);
|
1154 |
-
d.setMonth(self.currentMonth + i);
|
1155 |
-
frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));
|
1156 |
-
}
|
1157 |
-
self.daysContainer.appendChild(frag);
|
1158 |
-
self.days = self.daysContainer.firstChild;
|
1159 |
-
if (self.config.mode === "range" && self.selectedDates.length === 1) {
|
1160 |
-
onMouseOver();
|
1161 |
-
}
|
1162 |
-
}
|
1163 |
-
function buildMonthSwitch() {
|
1164 |
-
if (self.config.showMonths > 1 ||
|
1165 |
-
self.config.monthSelectorType !== "dropdown")
|
1166 |
-
return;
|
1167 |
-
var shouldBuildMonth = function (month) {
|
1168 |
-
if (self.config.minDate !== undefined &&
|
1169 |
-
self.currentYear === self.config.minDate.getFullYear() &&
|
1170 |
-
month < self.config.minDate.getMonth()) {
|
1171 |
-
return false;
|
1172 |
-
}
|
1173 |
-
return !(self.config.maxDate !== undefined &&
|
1174 |
-
self.currentYear === self.config.maxDate.getFullYear() &&
|
1175 |
-
month > self.config.maxDate.getMonth());
|
1176 |
-
};
|
1177 |
-
self.monthsDropdownContainer.tabIndex = -1;
|
1178 |
-
self.monthsDropdownContainer.innerHTML = "";
|
1179 |
-
for (var i = 0; i < 12; i++) {
|
1180 |
-
if (!shouldBuildMonth(i))
|
1181 |
-
continue;
|
1182 |
-
var month = createElement("option", "flatpickr-monthDropdown-month");
|
1183 |
-
month.value = new Date(self.currentYear, i).getMonth().toString();
|
1184 |
-
month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);
|
1185 |
-
month.tabIndex = -1;
|
1186 |
-
if (self.currentMonth === i) {
|
1187 |
-
month.selected = true;
|
1188 |
-
}
|
1189 |
-
self.monthsDropdownContainer.appendChild(month);
|
1190 |
-
}
|
1191 |
-
}
|
1192 |
-
function buildMonth() {
|
1193 |
-
var container = createElement("div", "flatpickr-month");
|
1194 |
-
var monthNavFragment = window.document.createDocumentFragment();
|
1195 |
-
var monthElement;
|
1196 |
-
if (self.config.showMonths > 1 ||
|
1197 |
-
self.config.monthSelectorType === "static") {
|
1198 |
-
monthElement = createElement("span", "cur-month");
|
1199 |
-
}
|
1200 |
-
else {
|
1201 |
-
self.monthsDropdownContainer = createElement("select", "flatpickr-monthDropdown-months");
|
1202 |
-
self.monthsDropdownContainer.setAttribute("aria-label", self.l10n.monthAriaLabel);
|
1203 |
-
bind(self.monthsDropdownContainer, "change", function (e) {
|
1204 |
-
var target = getEventTarget(e);
|
1205 |
-
var selectedMonth = parseInt(target.value, 10);
|
1206 |
-
self.changeMonth(selectedMonth - self.currentMonth);
|
1207 |
-
triggerEvent("onMonthChange");
|
1208 |
-
});
|
1209 |
-
buildMonthSwitch();
|
1210 |
-
monthElement = self.monthsDropdownContainer;
|
1211 |
-
}
|
1212 |
-
var yearInput = createNumberInput("cur-year", { tabindex: "-1" });
|
1213 |
-
var yearElement = yearInput.getElementsByTagName("input")[0];
|
1214 |
-
yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel);
|
1215 |
-
if (self.config.minDate) {
|
1216 |
-
yearElement.setAttribute("min", self.config.minDate.getFullYear().toString());
|
1217 |
-
}
|
1218 |
-
if (self.config.maxDate) {
|
1219 |
-
yearElement.setAttribute("max", self.config.maxDate.getFullYear().toString());
|
1220 |
-
yearElement.disabled =
|
1221 |
-
!!self.config.minDate &&
|
1222 |
-
self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
|
1223 |
-
}
|
1224 |
-
var currentMonth = createElement("div", "flatpickr-current-month");
|
1225 |
-
currentMonth.appendChild(monthElement);
|
1226 |
-
currentMonth.appendChild(yearInput);
|
1227 |
-
monthNavFragment.appendChild(currentMonth);
|
1228 |
-
container.appendChild(monthNavFragment);
|
1229 |
-
return {
|
1230 |
-
container: container,
|
1231 |
-
yearElement: yearElement,
|
1232 |
-
monthElement: monthElement,
|
1233 |
-
};
|
1234 |
-
}
|
1235 |
-
function buildMonths() {
|
1236 |
-
clearNode(self.monthNav);
|
1237 |
-
self.monthNav.appendChild(self.prevMonthNav);
|
1238 |
-
if (self.config.showMonths) {
|
1239 |
-
self.yearElements = [];
|
1240 |
-
self.monthElements = [];
|
1241 |
-
}
|
1242 |
-
for (var m = self.config.showMonths; m--;) {
|
1243 |
-
var month = buildMonth();
|
1244 |
-
self.yearElements.push(month.yearElement);
|
1245 |
-
self.monthElements.push(month.monthElement);
|
1246 |
-
self.monthNav.appendChild(month.container);
|
1247 |
-
}
|
1248 |
-
self.monthNav.appendChild(self.nextMonthNav);
|
1249 |
-
}
|
1250 |
-
function buildMonthNav() {
|
1251 |
-
self.monthNav = createElement("div", "flatpickr-months");
|
1252 |
-
self.yearElements = [];
|
1253 |
-
self.monthElements = [];
|
1254 |
-
self.prevMonthNav = createElement("span", "flatpickr-prev-month");
|
1255 |
-
self.prevMonthNav.innerHTML = self.config.prevArrow;
|
1256 |
-
self.nextMonthNav = createElement("span", "flatpickr-next-month");
|
1257 |
-
self.nextMonthNav.innerHTML = self.config.nextArrow;
|
1258 |
-
buildMonths();
|
1259 |
-
Object.defineProperty(self, "_hidePrevMonthArrow", {
|
1260 |
-
get: function () { return self.__hidePrevMonthArrow; },
|
1261 |
-
set: function (bool) {
|
1262 |
-
if (self.__hidePrevMonthArrow !== bool) {
|
1263 |
-
toggleClass(self.prevMonthNav, "flatpickr-disabled", bool);
|
1264 |
-
self.__hidePrevMonthArrow = bool;
|
1265 |
-
}
|
1266 |
-
},
|
1267 |
-
});
|
1268 |
-
Object.defineProperty(self, "_hideNextMonthArrow", {
|
1269 |
-
get: function () { return self.__hideNextMonthArrow; },
|
1270 |
-
set: function (bool) {
|
1271 |
-
if (self.__hideNextMonthArrow !== bool) {
|
1272 |
-
toggleClass(self.nextMonthNav, "flatpickr-disabled", bool);
|
1273 |
-
self.__hideNextMonthArrow = bool;
|
1274 |
-
}
|
1275 |
-
},
|
1276 |
-
});
|
1277 |
-
self.currentYearElement = self.yearElements[0];
|
1278 |
-
updateNavigationCurrentMonth();
|
1279 |
-
return self.monthNav;
|
1280 |
-
}
|
1281 |
-
function buildTime() {
|
1282 |
-
self.calendarContainer.classList.add("hasTime");
|
1283 |
-
if (self.config.noCalendar)
|
1284 |
-
self.calendarContainer.classList.add("noCalendar");
|
1285 |
-
var defaults = getDefaultHours(self.config);
|
1286 |
-
self.timeContainer = createElement("div", "flatpickr-time");
|
1287 |
-
self.timeContainer.tabIndex = -1;
|
1288 |
-
var separator = createElement("span", "flatpickr-time-separator", ":");
|
1289 |
-
var hourInput = createNumberInput("flatpickr-hour", {
|
1290 |
-
"aria-label": self.l10n.hourAriaLabel,
|
1291 |
-
});
|
1292 |
-
self.hourElement = hourInput.getElementsByTagName("input")[0];
|
1293 |
-
var minuteInput = createNumberInput("flatpickr-minute", {
|
1294 |
-
"aria-label": self.l10n.minuteAriaLabel,
|
1295 |
-
});
|
1296 |
-
self.minuteElement = minuteInput.getElementsByTagName("input")[0];
|
1297 |
-
self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;
|
1298 |
-
self.hourElement.value = pad(self.latestSelectedDateObj
|
1299 |
-
? self.latestSelectedDateObj.getHours()
|
1300 |
-
: self.config.time_24hr
|
1301 |
-
? defaults.hours
|
1302 |
-
: military2ampm(defaults.hours));
|
1303 |
-
self.minuteElement.value = pad(self.latestSelectedDateObj
|
1304 |
-
? self.latestSelectedDateObj.getMinutes()
|
1305 |
-
: defaults.minutes);
|
1306 |
-
self.hourElement.setAttribute("step", self.config.hourIncrement.toString());
|
1307 |
-
self.minuteElement.setAttribute("step", self.config.minuteIncrement.toString());
|
1308 |
-
self.hourElement.setAttribute("min", self.config.time_24hr ? "0" : "1");
|
1309 |
-
self.hourElement.setAttribute("max", self.config.time_24hr ? "23" : "12");
|
1310 |
-
self.hourElement.setAttribute("maxlength", "2");
|
1311 |
-
self.minuteElement.setAttribute("min", "0");
|
1312 |
-
self.minuteElement.setAttribute("max", "59");
|
1313 |
-
self.minuteElement.setAttribute("maxlength", "2");
|
1314 |
-
self.timeContainer.appendChild(hourInput);
|
1315 |
-
self.timeContainer.appendChild(separator);
|
1316 |
-
self.timeContainer.appendChild(minuteInput);
|
1317 |
-
if (self.config.time_24hr)
|
1318 |
-
self.timeContainer.classList.add("time24hr");
|
1319 |
-
if (self.config.enableSeconds) {
|
1320 |
-
self.timeContainer.classList.add("hasSeconds");
|
1321 |
-
var secondInput = createNumberInput("flatpickr-second");
|
1322 |
-
self.secondElement = secondInput.getElementsByTagName("input")[0];
|
1323 |
-
self.secondElement.value = pad(self.latestSelectedDateObj
|
1324 |
-
? self.latestSelectedDateObj.getSeconds()
|
1325 |
-
: defaults.seconds);
|
1326 |
-
self.secondElement.setAttribute("step", self.minuteElement.getAttribute("step"));
|
1327 |
-
self.secondElement.setAttribute("min", "0");
|
1328 |
-
self.secondElement.setAttribute("max", "59");
|
1329 |
-
self.secondElement.setAttribute("maxlength", "2");
|
1330 |
-
self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
|
1331 |
-
self.timeContainer.appendChild(secondInput);
|
1332 |
-
}
|
1333 |
-
if (!self.config.time_24hr) {
|
1334 |
-
// add self.amPM if appropriate
|
1335 |
-
self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj
|
1336 |
-
? self.hourElement.value
|
1337 |
-
: self.config.defaultHour) > 11)]);
|
1338 |
-
self.amPM.title = self.l10n.toggleTitle;
|
1339 |
-
self.amPM.tabIndex = -1;
|
1340 |
-
self.timeContainer.appendChild(self.amPM);
|
1341 |
-
}
|
1342 |
-
return self.timeContainer;
|
1343 |
-
}
|
1344 |
-
function buildWeekdays() {
|
1345 |
-
if (!self.weekdayContainer)
|
1346 |
-
self.weekdayContainer = createElement("div", "flatpickr-weekdays");
|
1347 |
-
else
|
1348 |
-
clearNode(self.weekdayContainer);
|
1349 |
-
for (var i = self.config.showMonths; i--;) {
|
1350 |
-
var container = createElement("div", "flatpickr-weekdaycontainer");
|
1351 |
-
self.weekdayContainer.appendChild(container);
|
1352 |
-
}
|
1353 |
-
updateWeekdays();
|
1354 |
-
return self.weekdayContainer;
|
1355 |
-
}
|
1356 |
-
function updateWeekdays() {
|
1357 |
-
if (!self.weekdayContainer) {
|
1358 |
-
return;
|
1359 |
-
}
|
1360 |
-
var firstDayOfWeek = self.l10n.firstDayOfWeek;
|
1361 |
-
var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);
|
1362 |
-
if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {
|
1363 |
-
weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));
|
1364 |
-
}
|
1365 |
-
for (var i = self.config.showMonths; i--;) {
|
1366 |
-
self.weekdayContainer.children[i].innerHTML = "\n <span class='flatpickr-weekday'>\n " + weekdays.join("</span><span class='flatpickr-weekday'>") + "\n </span>\n ";
|
1367 |
-
}
|
1368 |
-
}
|
1369 |
-
/* istanbul ignore next */
|
1370 |
-
function buildWeeks() {
|
1371 |
-
self.calendarContainer.classList.add("hasWeeks");
|
1372 |
-
var weekWrapper = createElement("div", "flatpickr-weekwrapper");
|
1373 |
-
weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
|
1374 |
-
var weekNumbers = createElement("div", "flatpickr-weeks");
|
1375 |
-
weekWrapper.appendChild(weekNumbers);
|
1376 |
-
return {
|
1377 |
-
weekWrapper: weekWrapper,
|
1378 |
-
weekNumbers: weekNumbers,
|
1379 |
-
};
|
1380 |
-
}
|
1381 |
-
function changeMonth(value, isOffset) {
|
1382 |
-
if (isOffset === void 0) { isOffset = true; }
|
1383 |
-
var delta = isOffset ? value : value - self.currentMonth;
|
1384 |
-
if ((delta < 0 && self._hidePrevMonthArrow === true) ||
|
1385 |
-
(delta > 0 && self._hideNextMonthArrow === true))
|
1386 |
-
return;
|
1387 |
-
self.currentMonth += delta;
|
1388 |
-
if (self.currentMonth < 0 || self.currentMonth > 11) {
|
1389 |
-
self.currentYear += self.currentMonth > 11 ? 1 : -1;
|
1390 |
-
self.currentMonth = (self.currentMonth + 12) % 12;
|
1391 |
-
triggerEvent("onYearChange");
|
1392 |
-
buildMonthSwitch();
|
1393 |
-
}
|
1394 |
-
buildDays();
|
1395 |
-
triggerEvent("onMonthChange");
|
1396 |
-
updateNavigationCurrentMonth();
|
1397 |
-
}
|
1398 |
-
function clear(triggerChangeEvent, toInitial) {
|
1399 |
-
if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }
|
1400 |
-
if (toInitial === void 0) { toInitial = true; }
|
1401 |
-
self.input.value = "";
|
1402 |
-
if (self.altInput !== undefined)
|
1403 |
-
self.altInput.value = "";
|
1404 |
-
if (self.mobileInput !== undefined)
|
1405 |
-
self.mobileInput.value = "";
|
1406 |
-
self.selectedDates = [];
|
1407 |
-
self.latestSelectedDateObj = undefined;
|
1408 |
-
if (toInitial === true) {
|
1409 |
-
self.currentYear = self._initialDate.getFullYear();
|
1410 |
-
self.currentMonth = self._initialDate.getMonth();
|
1411 |
-
}
|
1412 |
-
if (self.config.enableTime === true) {
|
1413 |
-
var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;
|
1414 |
-
setHours(hours, minutes, seconds);
|
1415 |
-
}
|
1416 |
-
self.redraw();
|
1417 |
-
if (triggerChangeEvent)
|
1418 |
-
// triggerChangeEvent is true (default) or an Event
|
1419 |
-
triggerEvent("onChange");
|
1420 |
-
}
|
1421 |
-
function close() {
|
1422 |
-
self.isOpen = false;
|
1423 |
-
if (!self.isMobile) {
|
1424 |
-
if (self.calendarContainer !== undefined) {
|
1425 |
-
self.calendarContainer.classList.remove("open");
|
1426 |
-
}
|
1427 |
-
if (self._input !== undefined) {
|
1428 |
-
self._input.classList.remove("active");
|
1429 |
-
}
|
1430 |
-
}
|
1431 |
-
triggerEvent("onClose");
|
1432 |
-
}
|
1433 |
-
function destroy() {
|
1434 |
-
if (self.config !== undefined)
|
1435 |
-
triggerEvent("onDestroy");
|
1436 |
-
for (var i = self._handlers.length; i--;) {
|
1437 |
-
self._handlers[i].remove();
|
1438 |
-
}
|
1439 |
-
self._handlers = [];
|
1440 |
-
if (self.mobileInput) {
|
1441 |
-
if (self.mobileInput.parentNode)
|
1442 |
-
self.mobileInput.parentNode.removeChild(self.mobileInput);
|
1443 |
-
self.mobileInput = undefined;
|
1444 |
-
}
|
1445 |
-
else if (self.calendarContainer && self.calendarContainer.parentNode) {
|
1446 |
-
if (self.config.static && self.calendarContainer.parentNode) {
|
1447 |
-
var wrapper = self.calendarContainer.parentNode;
|
1448 |
-
wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);
|
1449 |
-
if (wrapper.parentNode) {
|
1450 |
-
while (wrapper.firstChild)
|
1451 |
-
wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);
|
1452 |
-
wrapper.parentNode.removeChild(wrapper);
|
1453 |
-
}
|
1454 |
-
}
|
1455 |
-
else
|
1456 |
-
self.calendarContainer.parentNode.removeChild(self.calendarContainer);
|
1457 |
-
}
|
1458 |
-
if (self.altInput) {
|
1459 |
-
self.input.type = "text";
|
1460 |
-
if (self.altInput.parentNode)
|
1461 |
-
self.altInput.parentNode.removeChild(self.altInput);
|
1462 |
-
delete self.altInput;
|
1463 |
-
}
|
1464 |
-
if (self.input) {
|
1465 |
-
self.input.type = self.input._type;
|
1466 |
-
self.input.classList.remove("flatpickr-input");
|
1467 |
-
self.input.removeAttribute("readonly");
|
1468 |
-
}
|
1469 |
-
[
|
1470 |
-
"_showTimeInput",
|
1471 |
-
"latestSelectedDateObj",
|
1472 |
-
"_hideNextMonthArrow",
|
1473 |
-
"_hidePrevMonthArrow",
|
1474 |
-
"__hideNextMonthArrow",
|
1475 |
-
"__hidePrevMonthArrow",
|
1476 |
-
"isMobile",
|
1477 |
-
"isOpen",
|
1478 |
-
"selectedDateElem",
|
1479 |
-
"minDateHasTime",
|
1480 |
-
"maxDateHasTime",
|
1481 |
-
"days",
|
1482 |
-
"daysContainer",
|
1483 |
-
"_input",
|
1484 |
-
"_positionElement",
|
1485 |
-
"innerContainer",
|
1486 |
-
"rContainer",
|
1487 |
-
"monthNav",
|
1488 |
-
"todayDateElem",
|
1489 |
-
"calendarContainer",
|
1490 |
-
"weekdayContainer",
|
1491 |
-
"prevMonthNav",
|
1492 |
-
"nextMonthNav",
|
1493 |
-
"monthsDropdownContainer",
|
1494 |
-
"currentMonthElement",
|
1495 |
-
"currentYearElement",
|
1496 |
-
"navigationCurrentMonth",
|
1497 |
-
"selectedDateElem",
|
1498 |
-
"config",
|
1499 |
-
].forEach(function (k) {
|
1500 |
-
try {
|
1501 |
-
delete self[k];
|
1502 |
-
}
|
1503 |
-
catch (_) { }
|
1504 |
-
});
|
1505 |
-
}
|
1506 |
-
function isCalendarElem(elem) {
|
1507 |
-
if (self.config.appendTo && self.config.appendTo.contains(elem))
|
1508 |
-
return true;
|
1509 |
-
return self.calendarContainer.contains(elem);
|
1510 |
-
}
|
1511 |
-
function documentClick(e) {
|
1512 |
-
if (self.isOpen && !self.config.inline) {
|
1513 |
-
var eventTarget_1 = getEventTarget(e);
|
1514 |
-
var isCalendarElement = isCalendarElem(eventTarget_1);
|
1515 |
-
var isInput = eventTarget_1 === self.input ||
|
1516 |
-
eventTarget_1 === self.altInput ||
|
1517 |
-
self.element.contains(eventTarget_1) ||
|
1518 |
-
// web components
|
1519 |
-
// e.path is not present in all browsers. circumventing typechecks
|
1520 |
-
(e.path &&
|
1521 |
-
e.path.indexOf &&
|
1522 |
-
(~e.path.indexOf(self.input) ||
|
1523 |
-
~e.path.indexOf(self.altInput)));
|
1524 |
-
var lostFocus = e.type === "blur"
|
1525 |
-
? isInput &&
|
1526 |
-
e.relatedTarget &&
|
1527 |
-
!isCalendarElem(e.relatedTarget)
|
1528 |
-
: !isInput &&
|
1529 |
-
!isCalendarElement &&
|
1530 |
-
!isCalendarElem(e.relatedTarget);
|
1531 |
-
var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {
|
1532 |
-
return elem.contains(eventTarget_1);
|
1533 |
-
});
|
1534 |
-
if (lostFocus && isIgnored) {
|
1535 |
-
if (self.timeContainer !== undefined &&
|
1536 |
-
self.minuteElement !== undefined &&
|
1537 |
-
self.hourElement !== undefined &&
|
1538 |
-
self.input.value !== "" &&
|
1539 |
-
self.input.value !== undefined) {
|
1540 |
-
updateTime();
|
1541 |
-
}
|
1542 |
-
self.close();
|
1543 |
-
if (self.config &&
|
1544 |
-
self.config.mode === "range" &&
|
1545 |
-
self.selectedDates.length === 1) {
|
1546 |
-
self.clear(false);
|
1547 |
-
self.redraw();
|
1548 |
-
}
|
1549 |
-
}
|
1550 |
-
}
|
1551 |
-
}
|
1552 |
-
function changeYear(newYear) {
|
1553 |
-
if (!newYear ||
|
1554 |
-
(self.config.minDate && newYear < self.config.minDate.getFullYear()) ||
|
1555 |
-
(self.config.maxDate && newYear > self.config.maxDate.getFullYear()))
|
1556 |
-
return;
|
1557 |
-
var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;
|
1558 |
-
self.currentYear = newYearNum || self.currentYear;
|
1559 |
-
if (self.config.maxDate &&
|
1560 |
-
self.currentYear === self.config.maxDate.getFullYear()) {
|
1561 |
-
self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);
|
1562 |
-
}
|
1563 |
-
else if (self.config.minDate &&
|
1564 |
-
self.currentYear === self.config.minDate.getFullYear()) {
|
1565 |
-
self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);
|
1566 |
-
}
|
1567 |
-
if (isNewYear) {
|
1568 |
-
self.redraw();
|
1569 |
-
triggerEvent("onYearChange");
|
1570 |
-
buildMonthSwitch();
|
1571 |
-
}
|
1572 |
-
}
|
1573 |
-
function isEnabled(date, timeless) {
|
1574 |
-
var _a;
|
1575 |
-
if (timeless === void 0) { timeless = true; }
|
1576 |
-
var dateToCheck = self.parseDate(date, undefined, timeless); // timeless
|
1577 |
-
if ((self.config.minDate &&
|
1578 |
-
dateToCheck &&
|
1579 |
-
compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||
|
1580 |
-
(self.config.maxDate &&
|
1581 |
-
dateToCheck &&
|
1582 |
-
compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))
|
1583 |
-
return false;
|
1584 |
-
if (!self.config.enable && self.config.disable.length === 0)
|
1585 |
-
return true;
|
1586 |
-
if (dateToCheck === undefined)
|
1587 |
-
return false;
|
1588 |
-
var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;
|
1589 |
-
for (var i = 0, d = void 0; i < array.length; i++) {
|
1590 |
-
d = array[i];
|
1591 |
-
if (typeof d === "function" &&
|
1592 |
-
d(dateToCheck) // disabled by function
|
1593 |
-
)
|
1594 |
-
return bool;
|
1595 |
-
else if (d instanceof Date &&
|
1596 |
-
dateToCheck !== undefined &&
|
1597 |
-
d.getTime() === dateToCheck.getTime())
|
1598 |
-
// disabled by date
|
1599 |
-
return bool;
|
1600 |
-
else if (typeof d === "string") {
|
1601 |
-
// disabled by date string
|
1602 |
-
var parsed = self.parseDate(d, undefined, true);
|
1603 |
-
return parsed && parsed.getTime() === dateToCheck.getTime()
|
1604 |
-
? bool
|
1605 |
-
: !bool;
|
1606 |
-
}
|
1607 |
-
else if (
|
1608 |
-
// disabled by range
|
1609 |
-
typeof d === "object" &&
|
1610 |
-
dateToCheck !== undefined &&
|
1611 |
-
d.from &&
|
1612 |
-
d.to &&
|
1613 |
-
dateToCheck.getTime() >= d.from.getTime() &&
|
1614 |
-
dateToCheck.getTime() <= d.to.getTime())
|
1615 |
-
return bool;
|
1616 |
-
}
|
1617 |
-
return !bool;
|
1618 |
-
}
|
1619 |
-
function isInView(elem) {
|
1620 |
-
if (self.daysContainer !== undefined)
|
1621 |
-
return (elem.className.indexOf("hidden") === -1 &&
|
1622 |
-
elem.className.indexOf("flatpickr-disabled") === -1 &&
|
1623 |
-
self.daysContainer.contains(elem));
|
1624 |
-
return false;
|
1625 |
-
}
|
1626 |
-
function onBlur(e) {
|
1627 |
-
var isInput = e.target === self._input;
|
1628 |
-
if (isInput &&
|
1629 |
-
(self.selectedDates.length > 0 || self._input.value.length > 0) &&
|
1630 |
-
!(e.relatedTarget && isCalendarElem(e.relatedTarget))) {
|
1631 |
-
self.setDate(self._input.value, true, e.target === self.altInput
|
1632 |
-
? self.config.altFormat
|
1633 |
-
: self.config.dateFormat);
|
1634 |
-
}
|
1635 |
-
}
|
1636 |
-
function onKeyDown(e) {
|
1637 |
-
// e.key e.keyCode
|
1638 |
-
// "Backspace" 8
|
1639 |
-
// "Tab" 9
|
1640 |
-
// "Enter" 13
|
1641 |
-
// "Escape" (IE "Esc") 27
|
1642 |
-
// "ArrowLeft" (IE "Left") 37
|
1643 |
-
// "ArrowUp" (IE "Up") 38
|
1644 |
-
// "ArrowRight" (IE "Right") 39
|
1645 |
-
// "ArrowDown" (IE "Down") 40
|
1646 |
-
// "Delete" (IE "Del") 46
|
1647 |
-
var eventTarget = getEventTarget(e);
|
1648 |
-
var isInput = self.config.wrap
|
1649 |
-
? element.contains(eventTarget)
|
1650 |
-
: eventTarget === self._input;
|
1651 |
-
var allowInput = self.config.allowInput;
|
1652 |
-
var allowKeydown = self.isOpen && (!allowInput || !isInput);
|
1653 |
-
var allowInlineKeydown = self.config.inline && isInput && !allowInput;
|
1654 |
-
if (e.keyCode === 13 && isInput) {
|
1655 |
-
if (allowInput) {
|
1656 |
-
self.setDate(self._input.value, true, eventTarget === self.altInput
|
1657 |
-
? self.config.altFormat
|
1658 |
-
: self.config.dateFormat);
|
1659 |
-
return eventTarget.blur();
|
1660 |
-
}
|
1661 |
-
else {
|
1662 |
-
self.open();
|
1663 |
-
}
|
1664 |
-
}
|
1665 |
-
else if (isCalendarElem(eventTarget) ||
|
1666 |
-
allowKeydown ||
|
1667 |
-
allowInlineKeydown) {
|
1668 |
-
var isTimeObj = !!self.timeContainer &&
|
1669 |
-
self.timeContainer.contains(eventTarget);
|
1670 |
-
switch (e.keyCode) {
|
1671 |
-
case 13:
|
1672 |
-
if (isTimeObj) {
|
1673 |
-
e.preventDefault();
|
1674 |
-
updateTime();
|
1675 |
-
focusAndClose();
|
1676 |
-
}
|
1677 |
-
else
|
1678 |
-
selectDate(e);
|
1679 |
-
break;
|
1680 |
-
case 27: // escape
|
1681 |
-
e.preventDefault();
|
1682 |
-
focusAndClose();
|
1683 |
-
break;
|
1684 |
-
case 8:
|
1685 |
-
case 46:
|
1686 |
-
if (isInput && !self.config.allowInput) {
|
1687 |
-
e.preventDefault();
|
1688 |
-
self.clear();
|
1689 |
-
}
|
1690 |
-
break;
|
1691 |
-
case 37:
|
1692 |
-
case 39:
|
1693 |
-
if (!isTimeObj && !isInput) {
|
1694 |
-
e.preventDefault();
|
1695 |
-
if (self.daysContainer !== undefined &&
|
1696 |
-
(allowInput === false ||
|
1697 |
-
(document.activeElement && isInView(document.activeElement)))) {
|
1698 |
-
var delta_1 = e.keyCode === 39 ? 1 : -1;
|
1699 |
-
if (!e.ctrlKey)
|
1700 |
-
focusOnDay(undefined, delta_1);
|
1701 |
-
else {
|
1702 |
-
e.stopPropagation();
|
1703 |
-
changeMonth(delta_1);
|
1704 |
-
focusOnDay(getFirstAvailableDay(1), 0);
|
1705 |
-
}
|
1706 |
-
}
|
1707 |
-
}
|
1708 |
-
else if (self.hourElement)
|
1709 |
-
self.hourElement.focus();
|
1710 |
-
break;
|
1711 |
-
case 38:
|
1712 |
-
case 40:
|
1713 |
-
e.preventDefault();
|
1714 |
-
var delta = e.keyCode === 40 ? 1 : -1;
|
1715 |
-
if ((self.daysContainer &&
|
1716 |
-
eventTarget.$i !== undefined) ||
|
1717 |
-
eventTarget === self.input ||
|
1718 |
-
eventTarget === self.altInput) {
|
1719 |
-
if (e.ctrlKey) {
|
1720 |
-
e.stopPropagation();
|
1721 |
-
changeYear(self.currentYear - delta);
|
1722 |
-
focusOnDay(getFirstAvailableDay(1), 0);
|
1723 |
-
}
|
1724 |
-
else if (!isTimeObj)
|
1725 |
-
focusOnDay(undefined, delta * 7);
|
1726 |
-
}
|
1727 |
-
else if (eventTarget === self.currentYearElement) {
|
1728 |
-
changeYear(self.currentYear - delta);
|
1729 |
-
}
|
1730 |
-
else if (self.config.enableTime) {
|
1731 |
-
if (!isTimeObj && self.hourElement)
|
1732 |
-
self.hourElement.focus();
|
1733 |
-
updateTime(e);
|
1734 |
-
self._debouncedChange();
|
1735 |
-
}
|
1736 |
-
break;
|
1737 |
-
case 9:
|
1738 |
-
if (isTimeObj) {
|
1739 |
-
var elems = [
|
1740 |
-
self.hourElement,
|
1741 |
-
self.minuteElement,
|
1742 |
-
self.secondElement,
|
1743 |
-
self.amPM,
|
1744 |
-
]
|
1745 |
-
.concat(self.pluginElements)
|
1746 |
-
.filter(function (x) { return x; });
|
1747 |
-
var i = elems.indexOf(eventTarget);
|
1748 |
-
if (i !== -1) {
|
1749 |
-
var target = elems[i + (e.shiftKey ? -1 : 1)];
|
1750 |
-
e.preventDefault();
|
1751 |
-
(target || self._input).focus();
|
1752 |
-
}
|
1753 |
-
}
|
1754 |
-
else if (!self.config.noCalendar &&
|
1755 |
-
self.daysContainer &&
|
1756 |
-
self.daysContainer.contains(eventTarget) &&
|
1757 |
-
e.shiftKey) {
|
1758 |
-
e.preventDefault();
|
1759 |
-
self._input.focus();
|
1760 |
-
}
|
1761 |
-
break;
|
1762 |
-
}
|
1763 |
-
}
|
1764 |
-
if (self.amPM !== undefined && eventTarget === self.amPM) {
|
1765 |
-
switch (e.key) {
|
1766 |
-
case self.l10n.amPM[0].charAt(0):
|
1767 |
-
case self.l10n.amPM[0].charAt(0).toLowerCase():
|
1768 |
-
self.amPM.textContent = self.l10n.amPM[0];
|
1769 |
-
setHoursFromInputs();
|
1770 |
-
updateValue();
|
1771 |
-
break;
|
1772 |
-
case self.l10n.amPM[1].charAt(0):
|
1773 |
-
case self.l10n.amPM[1].charAt(0).toLowerCase():
|
1774 |
-
self.amPM.textContent = self.l10n.amPM[1];
|
1775 |
-
setHoursFromInputs();
|
1776 |
-
updateValue();
|
1777 |
-
break;
|
1778 |
-
}
|
1779 |
-
}
|
1780 |
-
if (isInput || isCalendarElem(eventTarget)) {
|
1781 |
-
triggerEvent("onKeyDown", e);
|
1782 |
-
}
|
1783 |
-
}
|
1784 |
-
function onMouseOver(elem) {
|
1785 |
-
if (self.selectedDates.length !== 1 ||
|
1786 |
-
(elem &&
|
1787 |
-
(!elem.classList.contains("flatpickr-day") ||
|
1788 |
-
elem.classList.contains("flatpickr-disabled"))))
|
1789 |
-
return;
|
1790 |
-
var hoverDate = elem
|
1791 |
-
? elem.dateObj.getTime()
|
1792 |
-
: self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());
|
1793 |
-
var containsDisabled = false;
|
1794 |
-
var minRange = 0, maxRange = 0;
|
1795 |
-
for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {
|
1796 |
-
if (!isEnabled(new Date(t), true)) {
|
1797 |
-
containsDisabled =
|
1798 |
-
containsDisabled || (t > rangeStartDate && t < rangeEndDate);
|
1799 |
-
if (t < initialDate && (!minRange || t > minRange))
|
1800 |
-
minRange = t;
|
1801 |
-
else if (t > initialDate && (!maxRange || t < maxRange))
|
1802 |
-
maxRange = t;
|
1803 |
-
}
|
1804 |
-
}
|
1805 |
-
for (var m = 0; m < self.config.showMonths; m++) {
|
1806 |
-
var month = self.daysContainer.children[m];
|
1807 |
-
var _loop_1 = function (i, l) {
|
1808 |
-
var dayElem = month.children[i], date = dayElem.dateObj;
|
1809 |
-
var timestamp = date.getTime();
|
1810 |
-
var outOfRange = (minRange > 0 && timestamp < minRange) ||
|
1811 |
-
(maxRange > 0 && timestamp > maxRange);
|
1812 |
-
if (outOfRange) {
|
1813 |
-
dayElem.classList.add("notAllowed");
|
1814 |
-
["inRange", "startRange", "endRange"].forEach(function (c) {
|
1815 |
-
dayElem.classList.remove(c);
|
1816 |
-
});
|
1817 |
-
return "continue";
|
1818 |
-
}
|
1819 |
-
else if (containsDisabled && !outOfRange)
|
1820 |
-
return "continue";
|
1821 |
-
["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) {
|
1822 |
-
dayElem.classList.remove(c);
|
1823 |
-
});
|
1824 |
-
if (elem !== undefined) {
|
1825 |
-
elem.classList.add(hoverDate <= self.selectedDates[0].getTime()
|
1826 |
-
? "startRange"
|
1827 |
-
: "endRange");
|
1828 |
-
if (initialDate < hoverDate && timestamp === initialDate)
|
1829 |
-
dayElem.classList.add("startRange");
|
1830 |
-
else if (initialDate > hoverDate && timestamp === initialDate)
|
1831 |
-
dayElem.classList.add("endRange");
|
1832 |
-
if (timestamp >= minRange &&
|
1833 |
-
(maxRange === 0 || timestamp <= maxRange) &&
|
1834 |
-
isBetween(timestamp, initialDate, hoverDate))
|
1835 |
-
dayElem.classList.add("inRange");
|
1836 |
-
}
|
1837 |
-
};
|
1838 |
-
for (var i = 0, l = month.children.length; i < l; i++) {
|
1839 |
-
_loop_1(i, l);
|
1840 |
-
}
|
1841 |
-
}
|
1842 |
-
}
|
1843 |
-
function onResize() {
|
1844 |
-
if (self.isOpen && !self.config.static && !self.config.inline)
|
1845 |
-
positionCalendar();
|
1846 |
-
}
|
1847 |
-
function open(e, positionElement) {
|
1848 |
-
if (positionElement === void 0) { positionElement = self._positionElement; }
|
1849 |
-
if (self.isMobile === true) {
|
1850 |
-
if (e) {
|
1851 |
-
e.preventDefault();
|
1852 |
-
var eventTarget = getEventTarget(e);
|
1853 |
-
if (eventTarget) {
|
1854 |
-
eventTarget.blur();
|
1855 |
-
}
|
1856 |
-
}
|
1857 |
-
if (self.mobileInput !== undefined) {
|
1858 |
-
self.mobileInput.focus();
|
1859 |
-
self.mobileInput.click();
|
1860 |
-
}
|
1861 |
-
triggerEvent("onOpen");
|
1862 |
-
return;
|
1863 |
-
}
|
1864 |
-
else if (self._input.disabled || self.config.inline) {
|
1865 |
-
return;
|
1866 |
-
}
|
1867 |
-
var wasOpen = self.isOpen;
|
1868 |
-
self.isOpen = true;
|
1869 |
-
if (!wasOpen) {
|
1870 |
-
self.calendarContainer.classList.add("open");
|
1871 |
-
self._input.classList.add("active");
|
1872 |
-
triggerEvent("onOpen");
|
1873 |
-
positionCalendar(positionElement);
|
1874 |
-
}
|
1875 |
-
if (self.config.enableTime === true && self.config.noCalendar === true) {
|
1876 |
-
if (self.config.allowInput === false &&
|
1877 |
-
(e === undefined ||
|
1878 |
-
!self.timeContainer.contains(e.relatedTarget))) {
|
1879 |
-
setTimeout(function () { return self.hourElement.select(); }, 50);
|
1880 |
-
}
|
1881 |
-
}
|
1882 |
-
}
|
1883 |
-
function minMaxDateSetter(type) {
|
1884 |
-
return function (date) {
|
1885 |
-
var dateObj = (self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat));
|
1886 |
-
var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"];
|
1887 |
-
if (dateObj !== undefined) {
|
1888 |
-
self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] =
|
1889 |
-
dateObj.getHours() > 0 ||
|
1890 |
-
dateObj.getMinutes() > 0 ||
|
1891 |
-
dateObj.getSeconds() > 0;
|
1892 |
-
}
|
1893 |
-
if (self.selectedDates) {
|
1894 |
-
self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });
|
1895 |
-
if (!self.selectedDates.length && type === "min")
|
1896 |
-
setHoursFromDate(dateObj);
|
1897 |
-
updateValue();
|
1898 |
-
}
|
1899 |
-
if (self.daysContainer) {
|
1900 |
-
redraw();
|
1901 |
-
if (dateObj !== undefined)
|
1902 |
-
self.currentYearElement[type] = dateObj.getFullYear().toString();
|
1903 |
-
else
|
1904 |
-
self.currentYearElement.removeAttribute(type);
|
1905 |
-
self.currentYearElement.disabled =
|
1906 |
-
!!inverseDateObj &&
|
1907 |
-
dateObj !== undefined &&
|
1908 |
-
inverseDateObj.getFullYear() === dateObj.getFullYear();
|
1909 |
-
}
|
1910 |
-
};
|
1911 |
-
}
|
1912 |
-
function parseConfig() {
|
1913 |
-
var boolOpts = [
|
1914 |
-
"wrap",
|
1915 |
-
"weekNumbers",
|
1916 |
-
"allowInput",
|
1917 |
-
"allowInvalidPreload",
|
1918 |
-
"clickOpens",
|
1919 |
-
"time_24hr",
|
1920 |
-
"enableTime",
|
1921 |
-
"noCalendar",
|
1922 |
-
"altInput",
|
1923 |
-
"shorthandCurrentMonth",
|
1924 |
-
"inline",
|
1925 |
-
"static",
|
1926 |
-
"enableSeconds",
|
1927 |
-
"disableMobile",
|
1928 |
-
];
|
1929 |
-
var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);
|
1930 |
-
var formats = {};
|
1931 |
-
self.config.parseDate = userConfig.parseDate;
|
1932 |
-
self.config.formatDate = userConfig.formatDate;
|
1933 |
-
Object.defineProperty(self.config, "enable", {
|
1934 |
-
get: function () { return self.config._enable; },
|
1935 |
-
set: function (dates) {
|
1936 |
-
self.config._enable = parseDateRules(dates);
|
1937 |
-
},
|
1938 |
-
});
|
1939 |
-
Object.defineProperty(self.config, "disable", {
|
1940 |
-
get: function () { return self.config._disable; },
|
1941 |
-
set: function (dates) {
|
1942 |
-
self.config._disable = parseDateRules(dates);
|
1943 |
-
},
|
1944 |
-
});
|
1945 |
-
var timeMode = userConfig.mode === "time";
|
1946 |
-
if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {
|
1947 |
-
var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;
|
1948 |
-
formats.dateFormat =
|
1949 |
-
userConfig.noCalendar || timeMode
|
1950 |
-
? "H:i" + (userConfig.enableSeconds ? ":S" : "")
|
1951 |
-
: defaultDateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : "");
|
1952 |
-
}
|
1953 |
-
if (userConfig.altInput &&
|
1954 |
-
(userConfig.enableTime || timeMode) &&
|
1955 |
-
!userConfig.altFormat) {
|
1956 |
-
var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;
|
1957 |
-
formats.altFormat =
|
1958 |
-
userConfig.noCalendar || timeMode
|
1959 |
-
? "h:i" + (userConfig.enableSeconds ? ":S K" : " K")
|
1960 |
-
: defaultAltFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K");
|
1961 |
-
}
|
1962 |
-
Object.defineProperty(self.config, "minDate", {
|
1963 |
-
get: function () { return self.config._minDate; },
|
1964 |
-
set: minMaxDateSetter("min"),
|
1965 |
-
});
|
1966 |
-
Object.defineProperty(self.config, "maxDate", {
|
1967 |
-
get: function () { return self.config._maxDate; },
|
1968 |
-
set: minMaxDateSetter("max"),
|
1969 |
-
});
|
1970 |
-
var minMaxTimeSetter = function (type) { return function (val) {
|
1971 |
-
self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i:S");
|
1972 |
-
}; };
|
1973 |
-
Object.defineProperty(self.config, "minTime", {
|
1974 |
-
get: function () { return self.config._minTime; },
|
1975 |
-
set: minMaxTimeSetter("min"),
|
1976 |
-
});
|
1977 |
-
Object.defineProperty(self.config, "maxTime", {
|
1978 |
-
get: function () { return self.config._maxTime; },
|
1979 |
-
set: minMaxTimeSetter("max"),
|
1980 |
-
});
|
1981 |
-
if (userConfig.mode === "time") {
|
1982 |
-
self.config.noCalendar = true;
|
1983 |
-
self.config.enableTime = true;
|
1984 |
-
}
|
1985 |
-
Object.assign(self.config, formats, userConfig);
|
1986 |
-
for (var i = 0; i < boolOpts.length; i++)
|
1987 |
-
// https://github.com/microsoft/TypeScript/issues/31663
|
1988 |
-
self.config[boolOpts[i]] =
|
1989 |
-
self.config[boolOpts[i]] === true ||
|
1990 |
-
self.config[boolOpts[i]] === "true";
|
1991 |
-
HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {
|
1992 |
-
self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);
|
1993 |
-
});
|
1994 |
-
self.isMobile =
|
1995 |
-
!self.config.disableMobile &&
|
1996 |
-
!self.config.inline &&
|
1997 |
-
self.config.mode === "single" &&
|
1998 |
-
!self.config.disable.length &&
|
1999 |
-
!self.config.enable &&
|
2000 |
-
!self.config.weekNumbers &&
|
2001 |
-
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
2002 |
-
for (var i = 0; i < self.config.plugins.length; i++) {
|
2003 |
-
var pluginConf = self.config.plugins[i](self) || {};
|
2004 |
-
for (var key in pluginConf) {
|
2005 |
-
if (HOOKS.indexOf(key) > -1) {
|
2006 |
-
self.config[key] = arrayify(pluginConf[key])
|
2007 |
-
.map(bindToInstance)
|
2008 |
-
.concat(self.config[key]);
|
2009 |
-
}
|
2010 |
-
else if (typeof userConfig[key] === "undefined")
|
2011 |
-
self.config[key] = pluginConf[key];
|
2012 |
-
}
|
2013 |
-
}
|
2014 |
-
if (!userConfig.altInputClass) {
|
2015 |
-
self.config.altInputClass =
|
2016 |
-
getInputElem().className + " " + self.config.altInputClass;
|
2017 |
-
}
|
2018 |
-
triggerEvent("onParseConfig");
|
2019 |
-
}
|
2020 |
-
function getInputElem() {
|
2021 |
-
return self.config.wrap
|
2022 |
-
? element.querySelector("[data-input]")
|
2023 |
-
: element;
|
2024 |
-
}
|
2025 |
-
function setupLocale() {
|
2026 |
-
if (typeof self.config.locale !== "object" &&
|
2027 |
-
typeof flatpickr.l10ns[self.config.locale] === "undefined")
|
2028 |
-
self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale));
|
2029 |
-
self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === "object"
|
2030 |
-
? self.config.locale
|
2031 |
-
: self.config.locale !== "default"
|
2032 |
-
? flatpickr.l10ns[self.config.locale]
|
2033 |
-
: undefined));
|
2034 |
-
tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")";
|
2035 |
-
var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));
|
2036 |
-
if (userConfig.time_24hr === undefined &&
|
2037 |
-
flatpickr.defaultConfig.time_24hr === undefined) {
|
2038 |
-
self.config.time_24hr = self.l10n.time_24hr;
|
2039 |
-
}
|
2040 |
-
self.formatDate = createDateFormatter(self);
|
2041 |
-
self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
|
2042 |
-
}
|
2043 |
-
function positionCalendar(customPositionElement) {
|
2044 |
-
if (typeof self.config.position === "function") {
|
2045 |
-
return void self.config.position(self, customPositionElement);
|
2046 |
-
}
|
2047 |
-
if (self.calendarContainer === undefined)
|
2048 |
-
return;
|
2049 |
-
triggerEvent("onPreCalendarPosition");
|
2050 |
-
var positionElement = customPositionElement || self._positionElement;
|
2051 |
-
var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(" "), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === "above" ||
|
2052 |
-
(configPosVertical !== "below" &&
|
2053 |
-
distanceFromBottom < calendarHeight &&
|
2054 |
-
inputBounds.top > calendarHeight);
|
2055 |
-
var top = window.pageYOffset +
|
2056 |
-
inputBounds.top +
|
2057 |
-
(!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);
|
2058 |
-
toggleClass(self.calendarContainer, "arrowTop", !showOnTop);
|
2059 |
-
toggleClass(self.calendarContainer, "arrowBottom", showOnTop);
|
2060 |
-
if (self.config.inline)
|
2061 |
-
return;
|
2062 |
-
var left = window.pageXOffset + inputBounds.left;
|
2063 |
-
var isCenter = false;
|
2064 |
-
var isRight = false;
|
2065 |
-
if (configPosHorizontal === "center") {
|
2066 |
-
left -= (calendarWidth - inputBounds.width) / 2;
|
2067 |
-
isCenter = true;
|
2068 |
-
}
|
2069 |
-
else if (configPosHorizontal === "right") {
|
2070 |
-
left -= calendarWidth - inputBounds.width;
|
2071 |
-
isRight = true;
|
2072 |
-
}
|
2073 |
-
toggleClass(self.calendarContainer, "arrowLeft", !isCenter && !isRight);
|
2074 |
-
toggleClass(self.calendarContainer, "arrowCenter", isCenter);
|
2075 |
-
toggleClass(self.calendarContainer, "arrowRight", isRight);
|
2076 |
-
var right = window.document.body.offsetWidth -
|
2077 |
-
(window.pageXOffset + inputBounds.right);
|
2078 |
-
var rightMost = left + calendarWidth > window.document.body.offsetWidth;
|
2079 |
-
var centerMost = right + calendarWidth > window.document.body.offsetWidth;
|
2080 |
-
toggleClass(self.calendarContainer, "rightMost", rightMost);
|
2081 |
-
if (self.config.static)
|
2082 |
-
return;
|
2083 |
-
self.calendarContainer.style.top = top + "px";
|
2084 |
-
if (!rightMost) {
|
2085 |
-
self.calendarContainer.style.left = left + "px";
|
2086 |
-
self.calendarContainer.style.right = "auto";
|
2087 |
-
}
|
2088 |
-
else if (!centerMost) {
|
2089 |
-
self.calendarContainer.style.left = "auto";
|
2090 |
-
self.calendarContainer.style.right = right + "px";
|
2091 |
-
}
|
2092 |
-
else {
|
2093 |
-
var doc = getDocumentStyleSheet();
|
2094 |
-
// some testing environments don't have css support
|
2095 |
-
if (doc === undefined)
|
2096 |
-
return;
|
2097 |
-
var bodyWidth = window.document.body.offsetWidth;
|
2098 |
-
var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);
|
2099 |
-
var centerBefore = ".flatpickr-calendar.centerMost:before";
|
2100 |
-
var centerAfter = ".flatpickr-calendar.centerMost:after";
|
2101 |
-
var centerIndex = doc.cssRules.length;
|
2102 |
-
var centerStyle = "{left:" + inputBounds.left + "px;right:auto;}";
|
2103 |
-
toggleClass(self.calendarContainer, "rightMost", false);
|
2104 |
-
toggleClass(self.calendarContainer, "centerMost", true);
|
2105 |
-
doc.insertRule(centerBefore + "," + centerAfter + centerStyle, centerIndex);
|
2106 |
-
self.calendarContainer.style.left = centerLeft + "px";
|
2107 |
-
self.calendarContainer.style.right = "auto";
|
2108 |
-
}
|
2109 |
-
}
|
2110 |
-
function getDocumentStyleSheet() {
|
2111 |
-
var editableSheet = null;
|
2112 |
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
2113 |
-
var sheet = document.styleSheets[i];
|
2114 |
-
try {
|
2115 |
-
sheet.cssRules;
|
2116 |
-
}
|
2117 |
-
catch (err) {
|
2118 |
-
continue;
|
2119 |
-
}
|
2120 |
-
editableSheet = sheet;
|
2121 |
-
break;
|
2122 |
-
}
|
2123 |
-
return editableSheet != null ? editableSheet : createStyleSheet();
|
2124 |
-
}
|
2125 |
-
function createStyleSheet() {
|
2126 |
-
var style = document.createElement("style");
|
2127 |
-
document.head.appendChild(style);
|
2128 |
-
return style.sheet;
|
2129 |
-
}
|
2130 |
-
function redraw() {
|
2131 |
-
if (self.config.noCalendar || self.isMobile)
|
2132 |
-
return;
|
2133 |
-
buildMonthSwitch();
|
2134 |
-
updateNavigationCurrentMonth();
|
2135 |
-
buildDays();
|
2136 |
-
}
|
2137 |
-
function focusAndClose() {
|
2138 |
-
self._input.focus();
|
2139 |
-
if (window.navigator.userAgent.indexOf("MSIE") !== -1 ||
|
2140 |
-
navigator.msMaxTouchPoints !== undefined) {
|
2141 |
-
// hack - bugs in the way IE handles focus keeps the calendar open
|
2142 |
-
setTimeout(self.close, 0);
|
2143 |
-
}
|
2144 |
-
else {
|
2145 |
-
self.close();
|
2146 |
-
}
|
2147 |
-
}
|
2148 |
-
function selectDate(e) {
|
2149 |
-
e.preventDefault();
|
2150 |
-
e.stopPropagation();
|
2151 |
-
var isSelectable = function (day) {
|
2152 |
-
return day.classList &&
|
2153 |
-
day.classList.contains("flatpickr-day") &&
|
2154 |
-
!day.classList.contains("flatpickr-disabled") &&
|
2155 |
-
!day.classList.contains("notAllowed");
|
2156 |
-
};
|
2157 |
-
var t = findParent(getEventTarget(e), isSelectable);
|
2158 |
-
if (t === undefined)
|
2159 |
-
return;
|
2160 |
-
var target = t;
|
2161 |
-
var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));
|
2162 |
-
var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||
|
2163 |
-
selectedDate.getMonth() >
|
2164 |
-
self.currentMonth + self.config.showMonths - 1) &&
|
2165 |
-
self.config.mode !== "range";
|
2166 |
-
self.selectedDateElem = target;
|
2167 |
-
if (self.config.mode === "single")
|
2168 |
-
self.selectedDates = [selectedDate];
|
2169 |
-
else if (self.config.mode === "multiple") {
|
2170 |
-
var selectedIndex = isDateSelected(selectedDate);
|
2171 |
-
if (selectedIndex)
|
2172 |
-
self.selectedDates.splice(parseInt(selectedIndex), 1);
|
2173 |
-
else
|
2174 |
-
self.selectedDates.push(selectedDate);
|
2175 |
-
}
|
2176 |
-
else if (self.config.mode === "range") {
|
2177 |
-
if (self.selectedDates.length === 2) {
|
2178 |
-
self.clear(false, false);
|
2179 |
-
}
|
2180 |
-
self.latestSelectedDateObj = selectedDate;
|
2181 |
-
self.selectedDates.push(selectedDate);
|
2182 |
-
// unless selecting same date twice, sort ascendingly
|
2183 |
-
if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)
|
2184 |
-
self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
|
2185 |
-
}
|
2186 |
-
setHoursFromInputs();
|
2187 |
-
if (shouldChangeMonth) {
|
2188 |
-
var isNewYear = self.currentYear !== selectedDate.getFullYear();
|
2189 |
-
self.currentYear = selectedDate.getFullYear();
|
2190 |
-
self.currentMonth = selectedDate.getMonth();
|
2191 |
-
if (isNewYear) {
|
2192 |
-
triggerEvent("onYearChange");
|
2193 |
-
buildMonthSwitch();
|
2194 |
-
}
|
2195 |
-
triggerEvent("onMonthChange");
|
2196 |
-
}
|
2197 |
-
updateNavigationCurrentMonth();
|
2198 |
-
buildDays();
|
2199 |
-
updateValue();
|
2200 |
-
// maintain focus
|
2201 |
-
if (!shouldChangeMonth &&
|
2202 |
-
self.config.mode !== "range" &&
|
2203 |
-
self.config.showMonths === 1)
|
2204 |
-
focusOnDayElem(target);
|
2205 |
-
else if (self.selectedDateElem !== undefined &&
|
2206 |
-
self.hourElement === undefined) {
|
2207 |
-
self.selectedDateElem && self.selectedDateElem.focus();
|
2208 |
-
}
|
2209 |
-
if (self.hourElement !== undefined)
|
2210 |
-
self.hourElement !== undefined && self.hourElement.focus();
|
2211 |
-
if (self.config.closeOnSelect) {
|
2212 |
-
var single = self.config.mode === "single" && !self.config.enableTime;
|
2213 |
-
var range = self.config.mode === "range" &&
|
2214 |
-
self.selectedDates.length === 2 &&
|
2215 |
-
!self.config.enableTime;
|
2216 |
-
if (single || range) {
|
2217 |
-
focusAndClose();
|
2218 |
-
}
|
2219 |
-
}
|
2220 |
-
triggerChange();
|
2221 |
-
}
|
2222 |
-
var CALLBACKS = {
|
2223 |
-
locale: [setupLocale, updateWeekdays],
|
2224 |
-
showMonths: [buildMonths, setCalendarWidth, buildWeekdays],
|
2225 |
-
minDate: [jumpToDate],
|
2226 |
-
maxDate: [jumpToDate],
|
2227 |
-
clickOpens: [
|
2228 |
-
function () {
|
2229 |
-
if (self.config.clickOpens === true) {
|
2230 |
-
bind(self._input, "focus", self.open);
|
2231 |
-
bind(self._input, "click", self.open);
|
2232 |
-
}
|
2233 |
-
else {
|
2234 |
-
self._input.removeEventListener("focus", self.open);
|
2235 |
-
self._input.removeEventListener("click", self.open);
|
2236 |
-
}
|
2237 |
-
},
|
2238 |
-
],
|
2239 |
-
};
|
2240 |
-
function set(option, value) {
|
2241 |
-
if (option !== null && typeof option === "object") {
|
2242 |
-
Object.assign(self.config, option);
|
2243 |
-
for (var key in option) {
|
2244 |
-
if (CALLBACKS[key] !== undefined)
|
2245 |
-
CALLBACKS[key].forEach(function (x) { return x(); });
|
2246 |
-
}
|
2247 |
-
}
|
2248 |
-
else {
|
2249 |
-
self.config[option] = value;
|
2250 |
-
if (CALLBACKS[option] !== undefined)
|
2251 |
-
CALLBACKS[option].forEach(function (x) { return x(); });
|
2252 |
-
else if (HOOKS.indexOf(option) > -1)
|
2253 |
-
self.config[option] = arrayify(value);
|
2254 |
-
}
|
2255 |
-
self.redraw();
|
2256 |
-
updateValue(true);
|
2257 |
-
}
|
2258 |
-
function setSelectedDate(inputDate, format) {
|
2259 |
-
var dates = [];
|
2260 |
-
if (inputDate instanceof Array)
|
2261 |
-
dates = inputDate.map(function (d) { return self.parseDate(d, format); });
|
2262 |
-
else if (inputDate instanceof Date || typeof inputDate === "number")
|
2263 |
-
dates = [self.parseDate(inputDate, format)];
|
2264 |
-
else if (typeof inputDate === "string") {
|
2265 |
-
switch (self.config.mode) {
|
2266 |
-
case "single":
|
2267 |
-
case "time":
|
2268 |
-
dates = [self.parseDate(inputDate, format)];
|
2269 |
-
break;
|
2270 |
-
case "multiple":
|
2271 |
-
dates = inputDate
|
2272 |
-
.split(self.config.conjunction)
|
2273 |
-
.map(function (date) { return self.parseDate(date, format); });
|
2274 |
-
break;
|
2275 |
-
case "range":
|
2276 |
-
dates = inputDate
|
2277 |
-
.split(self.l10n.rangeSeparator)
|
2278 |
-
.map(function (date) { return self.parseDate(date, format); });
|
2279 |
-
break;
|
2280 |
-
}
|
2281 |
-
}
|
2282 |
-
else
|
2283 |
-
self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate)));
|
2284 |
-
self.selectedDates = (self.config.allowInvalidPreload
|
2285 |
-
? dates
|
2286 |
-
: dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));
|
2287 |
-
if (self.config.mode === "range")
|
2288 |
-
self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });
|
2289 |
-
}
|
2290 |
-
function setDate(date, triggerChange, format) {
|
2291 |
-
if (triggerChange === void 0) { triggerChange = false; }
|
2292 |
-
if (format === void 0) { format = self.config.dateFormat; }
|
2293 |
-
if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))
|
2294 |
-
return self.clear(triggerChange);
|
2295 |
-
setSelectedDate(date, format);
|
2296 |
-
self.latestSelectedDateObj =
|
2297 |
-
self.selectedDates[self.selectedDates.length - 1];
|
2298 |
-
self.redraw();
|
2299 |
-
jumpToDate(undefined, triggerChange);
|
2300 |
-
setHoursFromDate();
|
2301 |
-
if (self.selectedDates.length === 0) {
|
2302 |
-
self.clear(false);
|
2303 |
-
}
|
2304 |
-
updateValue(triggerChange);
|
2305 |
-
if (triggerChange)
|
2306 |
-
triggerEvent("onChange");
|
2307 |
-
}
|
2308 |
-
function parseDateRules(arr) {
|
2309 |
-
return arr
|
2310 |
-
.slice()
|
2311 |
-
.map(function (rule) {
|
2312 |
-
if (typeof rule === "string" ||
|
2313 |
-
typeof rule === "number" ||
|
2314 |
-
rule instanceof Date) {
|
2315 |
-
return self.parseDate(rule, undefined, true);
|
2316 |
-
}
|
2317 |
-
else if (rule &&
|
2318 |
-
typeof rule === "object" &&
|
2319 |
-
rule.from &&
|
2320 |
-
rule.to)
|
2321 |
-
return {
|
2322 |
-
from: self.parseDate(rule.from, undefined),
|
2323 |
-
to: self.parseDate(rule.to, undefined),
|
2324 |
-
};
|
2325 |
-
return rule;
|
2326 |
-
})
|
2327 |
-
.filter(function (x) { return x; }); // remove falsy values
|
2328 |
-
}
|
2329 |
-
function setupDates() {
|
2330 |
-
self.selectedDates = [];
|
2331 |
-
self.now = self.parseDate(self.config.now) || new Date();
|
2332 |
-
// Workaround IE11 setting placeholder as the input's value
|
2333 |
-
var preloadedDate = self.config.defaultDate ||
|
2334 |
-
((self.input.nodeName === "INPUT" ||
|
2335 |
-
self.input.nodeName === "TEXTAREA") &&
|
2336 |
-
self.input.placeholder &&
|
2337 |
-
self.input.value === self.input.placeholder
|
2338 |
-
? null
|
2339 |
-
: self.input.value);
|
2340 |
-
if (preloadedDate)
|
2341 |
-
setSelectedDate(preloadedDate, self.config.dateFormat);
|
2342 |
-
self._initialDate =
|
2343 |
-
self.selectedDates.length > 0
|
2344 |
-
? self.selectedDates[0]
|
2345 |
-
: self.config.minDate &&
|
2346 |
-
self.config.minDate.getTime() > self.now.getTime()
|
2347 |
-
? self.config.minDate
|
2348 |
-
: self.config.maxDate &&
|
2349 |
-
self.config.maxDate.getTime() < self.now.getTime()
|
2350 |
-
? self.config.maxDate
|
2351 |
-
: self.now;
|
2352 |
-
self.currentYear = self._initialDate.getFullYear();
|
2353 |
-
self.currentMonth = self._initialDate.getMonth();
|
2354 |
-
if (self.selectedDates.length > 0)
|
2355 |
-
self.latestSelectedDateObj = self.selectedDates[0];
|
2356 |
-
if (self.config.minTime !== undefined)
|
2357 |
-
self.config.minTime = self.parseDate(self.config.minTime, "H:i");
|
2358 |
-
if (self.config.maxTime !== undefined)
|
2359 |
-
self.config.maxTime = self.parseDate(self.config.maxTime, "H:i");
|
2360 |
-
self.minDateHasTime =
|
2361 |
-
!!self.config.minDate &&
|
2362 |
-
(self.config.minDate.getHours() > 0 ||
|
2363 |
-
self.config.minDate.getMinutes() > 0 ||
|
2364 |
-
self.config.minDate.getSeconds() > 0);
|
2365 |
-
self.maxDateHasTime =
|
2366 |
-
!!self.config.maxDate &&
|
2367 |
-
(self.config.maxDate.getHours() > 0 ||
|
2368 |
-
self.config.maxDate.getMinutes() > 0 ||
|
2369 |
-
self.config.maxDate.getSeconds() > 0);
|
2370 |
-
}
|
2371 |
-
function setupInputs() {
|
2372 |
-
self.input = getInputElem();
|
2373 |
-
/* istanbul ignore next */
|
2374 |
-
if (!self.input) {
|
2375 |
-
self.config.errorHandler(new Error("Invalid input element specified"));
|
2376 |
-
return;
|
2377 |
-
}
|
2378 |
-
// hack: store previous type to restore it after destroy()
|
2379 |
-
self.input._type = self.input.type;
|
2380 |
-
self.input.type = "text";
|
2381 |
-
self.input.classList.add("flatpickr-input");
|
2382 |
-
self._input = self.input;
|
2383 |
-
if (self.config.altInput) {
|
2384 |
-
// replicate self.element
|
2385 |
-
self.altInput = createElement(self.input.nodeName, self.config.altInputClass);
|
2386 |
-
self._input = self.altInput;
|
2387 |
-
self.altInput.placeholder = self.input.placeholder;
|
2388 |
-
self.altInput.disabled = self.input.disabled;
|
2389 |
-
self.altInput.required = self.input.required;
|
2390 |
-
self.altInput.tabIndex = self.input.tabIndex;
|
2391 |
-
self.altInput.type = "text";
|
2392 |
-
self.input.setAttribute("type", "hidden");
|
2393 |
-
if (!self.config.static && self.input.parentNode)
|
2394 |
-
self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);
|
2395 |
-
}
|
2396 |
-
if (!self.config.allowInput)
|
2397 |
-
self._input.setAttribute("readonly", "readonly");
|
2398 |
-
self._positionElement = self.config.positionElement || self._input;
|
2399 |
-
}
|
2400 |
-
function setupMobile() {
|
2401 |
-
var inputType = self.config.enableTime
|
2402 |
-
? self.config.noCalendar
|
2403 |
-
? "time"
|
2404 |
-
: "datetime-local"
|
2405 |
-
: "date";
|
2406 |
-
self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
|
2407 |
-
self.mobileInput.tabIndex = 1;
|
2408 |
-
self.mobileInput.type = inputType;
|
2409 |
-
self.mobileInput.disabled = self.input.disabled;
|
2410 |
-
self.mobileInput.required = self.input.required;
|
2411 |
-
self.mobileInput.placeholder = self.input.placeholder;
|
2412 |
-
self.mobileFormatStr =
|
2413 |
-
inputType === "datetime-local"
|
2414 |
-
? "Y-m-d\\TH:i:S"
|
2415 |
-
: inputType === "date"
|
2416 |
-
? "Y-m-d"
|
2417 |
-
: "H:i:S";
|
2418 |
-
if (self.selectedDates.length > 0) {
|
2419 |
-
self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);
|
2420 |
-
}
|
2421 |
-
if (self.config.minDate)
|
2422 |
-
self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d");
|
2423 |
-
if (self.config.maxDate)
|
2424 |
-
self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d");
|
2425 |
-
if (self.input.getAttribute("step"))
|
2426 |
-
self.mobileInput.step = String(self.input.getAttribute("step"));
|
2427 |
-
self.input.type = "hidden";
|
2428 |
-
if (self.altInput !== undefined)
|
2429 |
-
self.altInput.type = "hidden";
|
2430 |
-
try {
|
2431 |
-
if (self.input.parentNode)
|
2432 |
-
self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);
|
2433 |
-
}
|
2434 |
-
catch (_a) { }
|
2435 |
-
bind(self.mobileInput, "change", function (e) {
|
2436 |
-
self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);
|
2437 |
-
triggerEvent("onChange");
|
2438 |
-
triggerEvent("onClose");
|
2439 |
-
});
|
2440 |
-
}
|
2441 |
-
function toggle(e) {
|
2442 |
-
if (self.isOpen === true)
|
2443 |
-
return self.close();
|
2444 |
-
self.open(e);
|
2445 |
-
}
|
2446 |
-
function triggerEvent(event, data) {
|
2447 |
-
// If the instance has been destroyed already, all hooks have been removed
|
2448 |
-
if (self.config === undefined)
|
2449 |
-
return;
|
2450 |
-
var hooks = self.config[event];
|
2451 |
-
if (hooks !== undefined && hooks.length > 0) {
|
2452 |
-
for (var i = 0; hooks[i] && i < hooks.length; i++)
|
2453 |
-
hooks[i](self.selectedDates, self.input.value, self, data);
|
2454 |
-
}
|
2455 |
-
if (event === "onChange") {
|
2456 |
-
self.input.dispatchEvent(createEvent("change"));
|
2457 |
-
// many front-end frameworks bind to the input event
|
2458 |
-
self.input.dispatchEvent(createEvent("input"));
|
2459 |
-
}
|
2460 |
-
}
|
2461 |
-
function createEvent(name) {
|
2462 |
-
var e = document.createEvent("Event");
|
2463 |
-
e.initEvent(name, true, true);
|
2464 |
-
return e;
|
2465 |
-
}
|
2466 |
-
function isDateSelected(date) {
|
2467 |
-
for (var i = 0; i < self.selectedDates.length; i++) {
|
2468 |
-
if (compareDates(self.selectedDates[i], date) === 0)
|
2469 |
-
return "" + i;
|
2470 |
-
}
|
2471 |
-
return false;
|
2472 |
-
}
|
2473 |
-
function isDateInRange(date) {
|
2474 |
-
if (self.config.mode !== "range" || self.selectedDates.length < 2)
|
2475 |
-
return false;
|
2476 |
-
return (compareDates(date, self.selectedDates[0]) >= 0 &&
|
2477 |
-
compareDates(date, self.selectedDates[1]) <= 0);
|
2478 |
-
}
|
2479 |
-
function updateNavigationCurrentMonth() {
|
2480 |
-
if (self.config.noCalendar || self.isMobile || !self.monthNav)
|
2481 |
-
return;
|
2482 |
-
self.yearElements.forEach(function (yearElement, i) {
|
2483 |
-
var d = new Date(self.currentYear, self.currentMonth, 1);
|
2484 |
-
d.setMonth(self.currentMonth + i);
|
2485 |
-
if (self.config.showMonths > 1 ||
|
2486 |
-
self.config.monthSelectorType === "static") {
|
2487 |
-
self.monthElements[i].textContent =
|
2488 |
-
monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " ";
|
2489 |
-
}
|
2490 |
-
else {
|
2491 |
-
self.monthsDropdownContainer.value = d.getMonth().toString();
|
2492 |
-
}
|
2493 |
-
yearElement.value = d.getFullYear().toString();
|
2494 |
-
});
|
2495 |
-
self._hidePrevMonthArrow =
|
2496 |
-
self.config.minDate !== undefined &&
|
2497 |
-
(self.currentYear === self.config.minDate.getFullYear()
|
2498 |
-
? self.currentMonth <= self.config.minDate.getMonth()
|
2499 |
-
: self.currentYear < self.config.minDate.getFullYear());
|
2500 |
-
self._hideNextMonthArrow =
|
2501 |
-
self.config.maxDate !== undefined &&
|
2502 |
-
(self.currentYear === self.config.maxDate.getFullYear()
|
2503 |
-
? self.currentMonth + 1 > self.config.maxDate.getMonth()
|
2504 |
-
: self.currentYear > self.config.maxDate.getFullYear());
|
2505 |
-
}
|
2506 |
-
function getDateStr(format) {
|
2507 |
-
return self.selectedDates
|
2508 |
-
.map(function (dObj) { return self.formatDate(dObj, format); })
|
2509 |
-
.filter(function (d, i, arr) {
|
2510 |
-
return self.config.mode !== "range" ||
|
2511 |
-
self.config.enableTime ||
|
2512 |
-
arr.indexOf(d) === i;
|
2513 |
-
})
|
2514 |
-
.join(self.config.mode !== "range"
|
2515 |
-
? self.config.conjunction
|
2516 |
-
: self.l10n.rangeSeparator);
|
2517 |
-
}
|
2518 |
-
/**
|
2519 |
-
* Updates the values of inputs associated with the calendar
|
2520 |
-
*/
|
2521 |
-
function updateValue(triggerChange) {
|
2522 |
-
if (triggerChange === void 0) { triggerChange = true; }
|
2523 |
-
if (self.mobileInput !== undefined && self.mobileFormatStr) {
|
2524 |
-
self.mobileInput.value =
|
2525 |
-
self.latestSelectedDateObj !== undefined
|
2526 |
-
? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)
|
2527 |
-
: "";
|
2528 |
-
}
|
2529 |
-
self.input.value = getDateStr(self.config.dateFormat);
|
2530 |
-
if (self.altInput !== undefined) {
|
2531 |
-
self.altInput.value = getDateStr(self.config.altFormat);
|
2532 |
-
}
|
2533 |
-
if (triggerChange !== false)
|
2534 |
-
triggerEvent("onValueUpdate");
|
2535 |
-
}
|
2536 |
-
function onMonthNavClick(e) {
|
2537 |
-
var eventTarget = getEventTarget(e);
|
2538 |
-
var isPrevMonth = self.prevMonthNav.contains(eventTarget);
|
2539 |
-
var isNextMonth = self.nextMonthNav.contains(eventTarget);
|
2540 |
-
if (isPrevMonth || isNextMonth) {
|
2541 |
-
changeMonth(isPrevMonth ? -1 : 1);
|
2542 |
-
}
|
2543 |
-
else if (self.yearElements.indexOf(eventTarget) >= 0) {
|
2544 |
-
eventTarget.select();
|
2545 |
-
}
|
2546 |
-
else if (eventTarget.classList.contains("arrowUp")) {
|
2547 |
-
self.changeYear(self.currentYear + 1);
|
2548 |
-
}
|
2549 |
-
else if (eventTarget.classList.contains("arrowDown")) {
|
2550 |
-
self.changeYear(self.currentYear - 1);
|
2551 |
-
}
|
2552 |
-
}
|
2553 |
-
function timeWrapper(e) {
|
2554 |
-
e.preventDefault();
|
2555 |
-
var isKeyDown = e.type === "keydown", eventTarget = getEventTarget(e), input = eventTarget;
|
2556 |
-
if (self.amPM !== undefined && eventTarget === self.amPM) {
|
2557 |
-
self.amPM.textContent =
|
2558 |
-
self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
|
2559 |
-
}
|
2560 |
-
var min = parseFloat(input.getAttribute("min")), max = parseFloat(input.getAttribute("max")), step = parseFloat(input.getAttribute("step")), curValue = parseInt(input.value, 10), delta = e.delta ||
|
2561 |
-
(isKeyDown ? (e.which === 38 ? 1 : -1) : 0);
|
2562 |
-
var newValue = curValue + step * delta;
|
2563 |
-
if (typeof input.value !== "undefined" && input.value.length === 2) {
|
2564 |
-
var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;
|
2565 |
-
if (newValue < min) {
|
2566 |
-
newValue =
|
2567 |
-
max +
|
2568 |
-
newValue +
|
2569 |
-
int(!isHourElem) +
|
2570 |
-
(int(isHourElem) && int(!self.amPM));
|
2571 |
-
if (isMinuteElem)
|
2572 |
-
incrementNumInput(undefined, -1, self.hourElement);
|
2573 |
-
}
|
2574 |
-
else if (newValue > max) {
|
2575 |
-
newValue =
|
2576 |
-
input === self.hourElement ? newValue - max - int(!self.amPM) : min;
|
2577 |
-
if (isMinuteElem)
|
2578 |
-
incrementNumInput(undefined, 1, self.hourElement);
|
2579 |
-
}
|
2580 |
-
if (self.amPM &&
|
2581 |
-
isHourElem &&
|
2582 |
-
(step === 1
|
2583 |
-
? newValue + curValue === 23
|
2584 |
-
: Math.abs(newValue - curValue) > step)) {
|
2585 |
-
self.amPM.textContent =
|
2586 |
-
self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];
|
2587 |
-
}
|
2588 |
-
input.value = pad(newValue);
|
2589 |
-
}
|
2590 |
-
}
|
2591 |
-
init();
|
2592 |
-
return self;
|
2593 |
-
}
|
2594 |
-
/* istanbul ignore next */
|
2595 |
-
function _flatpickr(nodeList, config) {
|
2596 |
-
// static list
|
2597 |
-
var nodes = Array.prototype.slice
|
2598 |
-
.call(nodeList)
|
2599 |
-
.filter(function (x) { return x instanceof HTMLElement; });
|
2600 |
-
var instances = [];
|
2601 |
-
for (var i = 0; i < nodes.length; i++) {
|
2602 |
-
var node = nodes[i];
|
2603 |
-
try {
|
2604 |
-
if (node.getAttribute("data-fp-omit") !== null)
|
2605 |
-
continue;
|
2606 |
-
if (node._flatpickr !== undefined) {
|
2607 |
-
node._flatpickr.destroy();
|
2608 |
-
node._flatpickr = undefined;
|
2609 |
-
}
|
2610 |
-
node._flatpickr = FlatpickrInstance(node, config || {});
|
2611 |
-
instances.push(node._flatpickr);
|
2612 |
-
}
|
2613 |
-
catch (e) {
|
2614 |
-
console.error(e);
|
2615 |
-
}
|
2616 |
-
}
|
2617 |
-
return instances.length === 1 ? instances[0] : instances;
|
2618 |
-
}
|
2619 |
-
/* istanbul ignore next */
|
2620 |
-
if (typeof HTMLElement !== "undefined" &&
|
2621 |
-
typeof HTMLCollection !== "undefined" &&
|
2622 |
-
typeof NodeList !== "undefined") {
|
2623 |
-
// browser env
|
2624 |
-
HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {
|
2625 |
-
return _flatpickr(this, config);
|
2626 |
-
};
|
2627 |
-
HTMLElement.prototype.flatpickr = function (config) {
|
2628 |
-
return _flatpickr([this], config);
|
2629 |
-
};
|
2630 |
-
}
|
2631 |
-
/* istanbul ignore next */
|
2632 |
-
var flatpickr = function (selector, config) {
|
2633 |
-
if (typeof selector === "string") {
|
2634 |
-
return _flatpickr(window.document.querySelectorAll(selector), config);
|
2635 |
-
}
|
2636 |
-
else if (selector instanceof Node) {
|
2637 |
-
return _flatpickr([selector], config);
|
2638 |
-
}
|
2639 |
-
else {
|
2640 |
-
return _flatpickr(selector, config);
|
2641 |
-
}
|
2642 |
-
};
|
2643 |
-
/* istanbul ignore next */
|
2644 |
-
flatpickr.defaultConfig = {};
|
2645 |
-
flatpickr.l10ns = {
|
2646 |
-
en: __assign({}, english),
|
2647 |
-
default: __assign({}, english),
|
2648 |
-
};
|
2649 |
-
flatpickr.localize = function (l10n) {
|
2650 |
-
flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);
|
2651 |
-
};
|
2652 |
-
flatpickr.setDefaults = function (config) {
|
2653 |
-
flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);
|
2654 |
-
};
|
2655 |
-
flatpickr.parseDate = createDateParser({});
|
2656 |
-
flatpickr.formatDate = createDateFormatter({});
|
2657 |
-
flatpickr.compareDates = compareDates;
|
2658 |
-
/* istanbul ignore next */
|
2659 |
-
if (typeof jQuery !== "undefined" && typeof jQuery.fn !== "undefined") {
|
2660 |
-
jQuery.fn.flatpickr = function (config) {
|
2661 |
-
return _flatpickr(this, config);
|
2662 |
-
};
|
2663 |
-
}
|
2664 |
-
Date.prototype.fp_incr = function (days) {
|
2665 |
-
return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days));
|
2666 |
-
};
|
2667 |
-
if (typeof window !== "undefined") {
|
2668 |
-
window.flatpickr = flatpickr;
|
2669 |
-
}
|
2670 |
-
|
2671 |
-
return flatpickr;
|
2672 |
-
|
2673 |
-
})));
|
2674 |
-
;/**
|
2675 |
-
*
|
2676 |
-
* jQuery Chosen AJAX Autocomplete Library
|
2677 |
-
*
|
2678 |
-
* https://github.com/meltingice/ajax-chosen
|
2679 |
-
* https://github.com/michaelperrin/ajax-chosen
|
2680 |
-
*
|
2681 |
-
* MIT License
|
2682 |
-
*
|
2683 |
-
* Customized by Codestar
|
2684 |
-
*
|
2685 |
-
*/
|
2686 |
-
(function($) {
|
2687 |
-
|
2688 |
-
function CSFAjaxChosen(element, options) {
|
2689 |
-
this.element = $(element);
|
2690 |
-
this.options = options;
|
2691 |
-
this.init();
|
2692 |
-
};
|
2693 |
-
|
2694 |
-
CSFAjaxChosen.prototype.init = function() {
|
2695 |
-
this.element.chosen(this.options);
|
2696 |
-
this.container = this.element.next('.chosen-container');
|
2697 |
-
this.search_field = this.container.find('.chosen-search-input');
|
2698 |
-
this.is_multiple = this.container.hasClass('chosen-container-multi');
|
2699 |
-
this.is_typing = false;
|
2700 |
-
this.chosenXhr = null;
|
2701 |
-
this.events();
|
2702 |
-
};
|
2703 |
-
|
2704 |
-
CSFAjaxChosen.prototype.events = function() {
|
2705 |
-
|
2706 |
-
var _this = this;
|
2707 |
-
|
2708 |
-
this.search_field.on('compositionstart', function() {
|
2709 |
-
_this.is_typing = true;
|
2710 |
-
});
|
2711 |
-
|
2712 |
-
this.search_field.on('compositionend', function() {
|
2713 |
-
_this.is_typing = false;
|
2714 |
-
_this.update_list();
|
2715 |
-
});
|
2716 |
-
|
2717 |
-
this.search_field.on('keyup', function() {
|
2718 |
-
_this.update_list();
|
2719 |
-
});
|
2720 |
-
|
2721 |
-
this.search_field.on('focus', function() {
|
2722 |
-
_this.search_field_focused();
|
2723 |
-
});
|
2724 |
-
|
2725 |
-
};
|
2726 |
-
|
2727 |
-
CSFAjaxChosen.prototype.search_field_focused = function() {
|
2728 |
-
this.search_welcome_message();
|
2729 |
-
if ( this.options.min_length === 0 && this.search_field.val().length === 0 ) {
|
2730 |
-
this.update_list();
|
2731 |
-
}
|
2732 |
-
};
|
2733 |
-
|
2734 |
-
CSFAjaxChosen.prototype.search_welcome_message = function() {
|
2735 |
-
|
2736 |
-
var value = $.trim(this.search_field.val());
|
2737 |
-
var results = this.container.find('.chosen-results');
|
2738 |
-
|
2739 |
-
if ( results.children().length === 0 && value.length === 0 ) {
|
2740 |
-
results.html('<li class="no-results">' + this.options.typing_text.replace('%s', this.options.min_length - value.length) + '</li>');
|
2741 |
-
}
|
2742 |
-
|
2743 |
-
};
|
2744 |
-
|
2745 |
-
CSFAjaxChosen.prototype.update_list = function() {
|
2746 |
-
|
2747 |
-
var _this = this;
|
2748 |
-
|
2749 |
-
this.search_welcome_message();
|
2750 |
-
|
2751 |
-
if ( this.is_typing ) { return; }
|
2752 |
-
|
2753 |
-
var value = $.trim(this.search_field.val());
|
2754 |
-
var message = ( value.length < this.options.min_length ) ? this.options.typing_text.replace('%s', this.options.min_length - value.length) : this.options.searching_text;
|
2755 |
-
|
2756 |
-
this.container.find('.no-results').text(message);
|
2757 |
-
|
2758 |
-
if ( value === this.search_field.data('prevVal') ) { return; }
|
2759 |
-
|
2760 |
-
this.search_field.data('prevVal', value);
|
2761 |
-
|
2762 |
-
if (this.timer) {
|
2763 |
-
clearTimeout(this.timer);
|
2764 |
-
}
|
2765 |
-
|
2766 |
-
if ( value.length < this.options.min_length ) { return; }
|
2767 |
-
|
2768 |
-
this.timer = setTimeout( function() {
|
2769 |
-
|
2770 |
-
if ( _this.chosenXhr ) {
|
2771 |
-
_this.chosenXhr.abort();
|
2772 |
-
}
|
2773 |
-
|
2774 |
-
_this.options.data['term'] = value;
|
2775 |
-
|
2776 |
-
_this.chosenXhr = window.wp.ajax.post('csf-chosen', _this.options.data).done( function( response ) {
|
2777 |
-
_this.show_results( response );
|
2778 |
-
}).fail( function( response ) {
|
2779 |
-
_this.container.find('.no-results').text(response.error);
|
2780 |
-
});
|
2781 |
-
|
2782 |
-
}, this.options.type_delay );
|
2783 |
-
|
2784 |
-
};
|
2785 |
-
|
2786 |
-
CSFAjaxChosen.prototype.show_results = function( items ) {
|
2787 |
-
|
2788 |
-
var _this = this;
|
2789 |
-
|
2790 |
-
if ( this.is_typing || items === null ) { return; }
|
2791 |
-
|
2792 |
-
if ( items.length === 0 ) {
|
2793 |
-
this.element.data().chosen.no_results_clear();
|
2794 |
-
this.element.data().chosen.no_results(this.search_field.val());
|
2795 |
-
return;
|
2796 |
-
}
|
2797 |
-
|
2798 |
-
var selected_values = [];
|
2799 |
-
|
2800 |
-
this.element.find('option').each(function() {
|
2801 |
-
if ( $(this).is(':selected') ) {
|
2802 |
-
selected_values.push( $(this).val() + "-" + $(this).text() );
|
2803 |
-
} else {
|
2804 |
-
if( $(this).attr('value').length ) {
|
2805 |
-
$(this).remove();
|
2806 |
-
}
|
2807 |
-
}
|
2808 |
-
});
|
2809 |
-
|
2810 |
-
$.each(items, function(i, item) {
|
2811 |
-
if ( $.inArray( item.value + "-" + item.text, selected_values ) === -1 ) {
|
2812 |
-
$('<option />').attr('value', item.value).html(item.text).appendTo(_this.element);
|
2813 |
-
}
|
2814 |
-
});
|
2815 |
-
|
2816 |
-
var value_before_trigger = this.search_field.val();
|
2817 |
-
var width_before_trigger = this.search_field.innerWidth();
|
2818 |
-
|
2819 |
-
this.element.trigger('chosen:updated');
|
2820 |
-
|
2821 |
-
if( this.is_multiple ) {
|
2822 |
-
|
2823 |
-
var $hidden_select = this.element.parent().find('.csf-hide-select');
|
2824 |
-
var $hidden_value = $hidden_select.val() || [];
|
2825 |
-
|
2826 |
-
this.element.CSFChosenOrder($hidden_value, true);
|
2827 |
-
this.search_field.css('width', width_before_trigger);
|
2828 |
-
|
2829 |
-
}
|
2830 |
-
|
2831 |
-
this.search_field.val(value_before_trigger);
|
2832 |
-
|
2833 |
-
if ( this.chosenXhr.done !== null ) {
|
2834 |
-
this.chosenXhr.done(items);
|
2835 |
-
}
|
2836 |
-
|
2837 |
-
};
|
2838 |
-
|
2839 |
-
$.fn.CSFAjaxChosen = function(chosenOptions) {
|
2840 |
-
return this.each(function() {
|
2841 |
-
new CSFAjaxChosen(this, chosenOptions);
|
2842 |
-
});
|
2843 |
-
};
|
2844 |
-
|
2845 |
-
})(jQuery);
|
2846 |
-
;// Chosen Order v1.2.1
|
2847 |
-
// This plugin allows you to handle the order of the selection for Chosen multiple <select> dropdowns
|
2848 |
-
// Full source at https://github.com/tristanjahier/chosen-order
|
2849 |
-
// Copyright (c) 2013 - Tristan Jahier, http://tristan-jahier.fr
|
2850 |
-
(function() {
|
2851 |
-
var $, CSFAbstractChosenOrder, _ref,
|
2852 |
-
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
2853 |
-
__hasProp = {}.hasOwnProperty,
|
2854 |
-
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
2855 |
-
|
2856 |
-
CSFAbstractChosenOrder = (function() {
|
2857 |
-
|
2858 |
-
function CSFAbstractChosenOrder() {}
|
2859 |
-
|
2860 |
-
CSFAbstractChosenOrder.insertAt = function(node, index, parentNode) {
|
2861 |
-
return parentNode.insertBefore(node, parentNode.children[index].nextSibling);
|
2862 |
-
};
|
2863 |
-
|
2864 |
-
CSFAbstractChosenOrder.getFlattenedOptionsAndGroups = function(select) {
|
2865 |
-
var flattened_options, opt, options, sub_opt, sub_options, _i, _j, _len, _len1;
|
2866 |
-
options = Array.prototype.filter.call(select.childNodes, function(o) {
|
2867 |
-
var _ref;
|
2868 |
-
return (_ref = o.nodeName.toUpperCase()) === 'OPTION' || _ref === 'OPTGROUP';
|
2869 |
-
});
|
2870 |
-
flattened_options = [];
|
2871 |
-
for (_i = 0, _len = options.length; _i < _len; _i++) {
|
2872 |
-
opt = options[_i];
|
2873 |
-
flattened_options.push(opt);
|
2874 |
-
if (opt.nodeName.toUpperCase() === 'OPTGROUP') {
|
2875 |
-
sub_options = Array.prototype.filter.call(opt.childNodes, function(o) {
|
2876 |
-
return o.nodeName.toUpperCase() === 'OPTION';
|
2877 |
-
});
|
2878 |
-
for (_j = 0, _len1 = sub_options.length; _j < _len1; _j++) {
|
2879 |
-
sub_opt = sub_options[_j];
|
2880 |
-
flattened_options.push(sub_opt);
|
2881 |
-
}
|
2882 |
-
}
|
2883 |
-
}
|
2884 |
-
return flattened_options;
|
2885 |
-
};
|
2886 |
-
|
2887 |
-
CSFAbstractChosenOrder.isValidMultipleSelectElement = function(element) {
|
2888 |
-
return element !== null && typeof element !== "undefined" && element.nodeName === "SELECT" && element.multiple;
|
2889 |
-
};
|
2890 |
-
|
2891 |
-
CSFAbstractChosenOrder.getChosenUIContainer = function(select) {
|
2892 |
-
if (select.id !== "") {
|
2893 |
-
return document.getElementById(select.id.replace(/-/g, "_") + "_chosen");
|
2894 |
-
} else {
|
2895 |
-
return this.searchChosenUIContainer(select);
|
2896 |
-
}
|
2897 |
-
};
|
2898 |
-
|
2899 |
-
CSFAbstractChosenOrder.isChosenified = function(select) {
|
2900 |
-
return this.getChosenUIContainer(select) != null;
|
2901 |
-
};
|
2902 |
-
|
2903 |
-
CSFAbstractChosenOrder.forceSelection = function(select, selection) {
|
2904 |
-
var i, opt, options, _ref;
|
2905 |
-
options = this.getFlattenedOptionsAndGroups(select);
|
2906 |
-
i = 0;
|
2907 |
-
while (i < options.length) {
|
2908 |
-
opt = options[i];
|
2909 |
-
if (_ref = opt.getAttribute("value"), __indexOf.call(selection, _ref) >= 0) {
|
2910 |
-
opt.selected = true;
|
2911 |
-
opt.setAttribute("selected", "");
|
2912 |
-
} else {
|
2913 |
-
opt.selected = false;
|
2914 |
-
opt.removeAttribute("selected");
|
2915 |
-
}
|
2916 |
-
i++;
|
2917 |
-
}
|
2918 |
-
return this.triggerEvent(select, "chosen:updated");
|
2919 |
-
};
|
2920 |
-
|
2921 |
-
CSFAbstractChosenOrder.CSFChosenOrder = function(select, order, force) {
|
2922 |
-
var chosen_choices, chosen_options, chosen_ui, i, j, opt, opt_val, option, options, rel, relAttributeName, _i, _j, _len, _len1, _results;
|
2923 |
-
if (this.getDOMElement != null) {
|
2924 |
-
select = this.getDOMElement(select);
|
2925 |
-
}
|
2926 |
-
if (!this.isValidMultipleSelectElement(select)) {
|
2927 |
-
return;
|
2928 |
-
}
|
2929 |
-
chosen_ui = this.getChosenUIContainer(select);
|
2930 |
-
if (chosen_ui == null) {
|
2931 |
-
return;
|
2932 |
-
}
|
2933 |
-
if (order instanceof Array) {
|
2934 |
-
order = order.map(Function.prototype.call, String.prototype.trim);
|
2935 |
-
options = this.getFlattenedOptionsAndGroups(select);
|
2936 |
-
if ((force != null) && force === true) {
|
2937 |
-
this.forceSelection(select, order);
|
2938 |
-
}
|
2939 |
-
_results = [];
|
2940 |
-
for (i = _i = 0, _len = order.length; _i < _len; i = ++_i) {
|
2941 |
-
opt_val = order[i];
|
2942 |
-
rel = null;
|
2943 |
-
for (j = _j = 0, _len1 = options.length; _j < _len1; j = ++_j) {
|
2944 |
-
opt = options[j];
|
2945 |
-
if (opt.value === opt_val) {
|
2946 |
-
rel = j;
|
2947 |
-
}
|
2948 |
-
}
|
2949 |
-
chosen_options = chosen_ui.querySelectorAll('.search-choice');
|
2950 |
-
relAttributeName = this.relAttributeName;
|
2951 |
-
option = Array.prototype.filter.call(chosen_options, function(o) {
|
2952 |
-
return o.querySelector("a.search-choice-close[" + relAttributeName + "=\"" + rel + "\"]") != null;
|
2953 |
-
})[0];
|
2954 |
-
if (option == null) {
|
2955 |
-
continue;
|
2956 |
-
}
|
2957 |
-
chosen_choices = chosen_ui.querySelector("ul.chosen-choices");
|
2958 |
-
_results.push(this.insertAt(option, i, chosen_ui.querySelector('ul.chosen-choices')));
|
2959 |
-
}
|
2960 |
-
return _results;
|
2961 |
-
} else {
|
2962 |
-
return;
|
2963 |
-
}
|
2964 |
-
};
|
2965 |
-
|
2966 |
-
return CSFAbstractChosenOrder;
|
2967 |
-
|
2968 |
-
})();
|
2969 |
-
|
2970 |
-
$ = jQuery;
|
2971 |
-
|
2972 |
-
$.fn.extend({
|
2973 |
-
CSFChosenOrder: function(order, force) {
|
2974 |
-
return _CSFChosenOrder.CSFChosenOrder(this, order, force);
|
2975 |
-
}
|
2976 |
-
});
|
2977 |
-
|
2978 |
-
this._CSFChosenOrder = (function(_super) {
|
2979 |
-
__extends(_CSFChosenOrder, _super);
|
2980 |
-
|
2981 |
-
function _CSFChosenOrder() {
|
2982 |
-
_ref = _CSFChosenOrder.__super__.constructor.apply(this, arguments);
|
2983 |
-
return _ref;
|
2984 |
-
}
|
2985 |
-
|
2986 |
-
_CSFChosenOrder.relAttributeName = 'data-option-array-index';
|
2987 |
-
|
2988 |
-
_CSFChosenOrder.isjQueryObject = function(obj) {
|
2989 |
-
return (typeof jQuery !== "undefined" && jQuery !== null) && obj instanceof jQuery;
|
2990 |
-
};
|
2991 |
-
|
2992 |
-
_CSFChosenOrder.getDOMElement = function(element) {
|
2993 |
-
if (this.isjQueryObject(element)) {
|
2994 |
-
return element.get(0);
|
2995 |
-
} else {
|
2996 |
-
return element;
|
2997 |
-
}
|
2998 |
-
};
|
2999 |
-
|
3000 |
-
_CSFChosenOrder.searchChosenUIContainer = function(element) {
|
3001 |
-
if ($(element).data("chosen") != null) {
|
3002 |
-
return $(element).data("chosen").container[0];
|
3003 |
-
} else {
|
3004 |
-
return $(element).next(".chosen-container.chosen-container-multi").get(0);
|
3005 |
-
}
|
3006 |
-
};
|
3007 |
-
|
3008 |
-
_CSFChosenOrder.triggerEvent = function(target, event_name) {
|
3009 |
-
return $(target).trigger(event_name);
|
3010 |
-
};
|
3011 |
-
|
3012 |
-
return _CSFChosenOrder;
|
3013 |
-
|
3014 |
-
})(CSFAbstractChosenOrder);
|
3015 |
-
|
3016 |
-
}).call(this);
|
3017 |
-
;(function() {
|
3018 |
-
var $, AbstractChosen, Chosen, SelectParser,
|
3019 |
-
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
3020 |
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
3021 |
-
hasProp = {}.hasOwnProperty;
|
3022 |
-
|
3023 |
-
SelectParser = (function() {
|
3024 |
-
function SelectParser() {
|
3025 |
-
this.options_index = 0;
|
3026 |
-
this.parsed = [];
|
3027 |
-
}
|
3028 |
-
|
3029 |
-
SelectParser.prototype.add_node = function(child) {
|
3030 |
-
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
3031 |
-
return this.add_group(child);
|
3032 |
-
} else {
|
3033 |
-
return this.add_option(child);
|
3034 |
-
}
|
3035 |
-
};
|
3036 |
-
|
3037 |
-
SelectParser.prototype.add_group = function(group) {
|
3038 |
-
var group_position, i, len, option, ref, results1;
|
3039 |
-
group_position = this.parsed.length;
|
3040 |
-
this.parsed.push({
|
3041 |
-
array_index: group_position,
|
3042 |
-
group: true,
|
3043 |
-
label: group.label,
|
3044 |
-
title: group.title ? group.title : void 0,
|
3045 |
-
children: 0,
|
3046 |
-
disabled: group.disabled,
|
3047 |
-
classes: group.className
|
3048 |
-
});
|
3049 |
-
ref = group.childNodes;
|
3050 |
-
results1 = [];
|
3051 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3052 |
-
option = ref[i];
|
3053 |
-
results1.push(this.add_option(option, group_position, group.disabled));
|
3054 |
-
}
|
3055 |
-
return results1;
|
3056 |
-
};
|
3057 |
-
|
3058 |
-
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
3059 |
-
if (option.nodeName.toUpperCase() === "OPTION") {
|
3060 |
-
if (option.text !== "") {
|
3061 |
-
if (group_position != null) {
|
3062 |
-
this.parsed[group_position].children += 1;
|
3063 |
-
}
|
3064 |
-
this.parsed.push({
|
3065 |
-
array_index: this.parsed.length,
|
3066 |
-
options_index: this.options_index,
|
3067 |
-
value: option.value,
|
3068 |
-
text: option.text,
|
3069 |
-
html: option.innerHTML,
|
3070 |
-
title: option.title ? option.title : void 0,
|
3071 |
-
selected: option.selected,
|
3072 |
-
disabled: group_disabled === true ? group_disabled : option.disabled,
|
3073 |
-
group_array_index: group_position,
|
3074 |
-
group_label: group_position != null ? this.parsed[group_position].label : null,
|
3075 |
-
classes: option.className,
|
3076 |
-
style: option.style.cssText
|
3077 |
-
});
|
3078 |
-
} else {
|
3079 |
-
this.parsed.push({
|
3080 |
-
array_index: this.parsed.length,
|
3081 |
-
options_index: this.options_index,
|
3082 |
-
empty: true
|
3083 |
-
});
|
3084 |
-
}
|
3085 |
-
return this.options_index += 1;
|
3086 |
-
}
|
3087 |
-
};
|
3088 |
-
|
3089 |
-
return SelectParser;
|
3090 |
-
|
3091 |
-
})();
|
3092 |
-
|
3093 |
-
SelectParser.select_to_array = function(select) {
|
3094 |
-
var child, i, len, parser, ref;
|
3095 |
-
parser = new SelectParser();
|
3096 |
-
ref = select.childNodes;
|
3097 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3098 |
-
child = ref[i];
|
3099 |
-
parser.add_node(child);
|
3100 |
-
}
|
3101 |
-
return parser.parsed;
|
3102 |
-
};
|
3103 |
-
|
3104 |
-
AbstractChosen = (function() {
|
3105 |
-
function AbstractChosen(form_field, options1) {
|
3106 |
-
this.form_field = form_field;
|
3107 |
-
this.options = options1 != null ? options1 : {};
|
3108 |
-
this.label_click_handler = bind(this.label_click_handler, this);
|
3109 |
-
if (!AbstractChosen.browser_is_supported()) {
|
3110 |
-
return;
|
3111 |
-
}
|
3112 |
-
this.is_multiple = this.form_field.multiple;
|
3113 |
-
this.set_default_text();
|
3114 |
-
this.set_default_values();
|
3115 |
-
this.setup();
|
3116 |
-
this.set_up_html();
|
3117 |
-
this.register_observers();
|
3118 |
-
this.on_ready();
|
3119 |
-
}
|
3120 |
-
|
3121 |
-
AbstractChosen.prototype.set_default_values = function() {
|
3122 |
-
this.click_test_action = (function(_this) {
|
3123 |
-
return function(evt) {
|
3124 |
-
return _this.test_active_click(evt);
|
3125 |
-
};
|
3126 |
-
})(this);
|
3127 |
-
this.activate_action = (function(_this) {
|
3128 |
-
return function(evt) {
|
3129 |
-
return _this.activate_field(evt);
|
3130 |
-
};
|
3131 |
-
})(this);
|
3132 |
-
this.active_field = false;
|
3133 |
-
this.mouse_on_container = false;
|
3134 |
-
this.results_showing = false;
|
3135 |
-
this.result_highlighted = null;
|
3136 |
-
this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
|
3137 |
-
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
3138 |
-
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
3139 |
-
this.disable_search = this.options.disable_search || false;
|
3140 |
-
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
3141 |
-
this.group_search = this.options.group_search != null ? this.options.group_search : true;
|
3142 |
-
this.search_contains = this.options.search_contains || false;
|
3143 |
-
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
|
3144 |
-
this.max_selected_options = this.options.max_selected_options || Infinity;
|
3145 |
-
this.inherit_select_classes = this.options.inherit_select_classes || false;
|
3146 |
-
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
|
3147 |
-
this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
|
3148 |
-
this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
|
3149 |
-
this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
|
3150 |
-
this.case_sensitive_search = this.options.case_sensitive_search || false;
|
3151 |
-
return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
|
3152 |
-
};
|
3153 |
-
|
3154 |
-
AbstractChosen.prototype.set_default_text = function() {
|
3155 |
-
if (this.form_field.getAttribute("data-placeholder")) {
|
3156 |
-
this.default_text = this.form_field.getAttribute("data-placeholder");
|
3157 |
-
} else if (this.is_multiple) {
|
3158 |
-
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
|
3159 |
-
} else {
|
3160 |
-
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
|
3161 |
-
}
|
3162 |
-
this.default_text = this.escape_html(this.default_text);
|
3163 |
-
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
|
3164 |
-
};
|
3165 |
-
|
3166 |
-
AbstractChosen.prototype.choice_label = function(item) {
|
3167 |
-
if (this.include_group_label_in_selected && (item.group_label != null)) {
|
3168 |
-
return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
|
3169 |
-
} else {
|
3170 |
-
return item.html;
|
3171 |
-
}
|
3172 |
-
};
|
3173 |
-
|
3174 |
-
AbstractChosen.prototype.mouse_enter = function() {
|
3175 |
-
return this.mouse_on_container = true;
|
3176 |
-
};
|
3177 |
-
|
3178 |
-
AbstractChosen.prototype.mouse_leave = function() {
|
3179 |
-
return this.mouse_on_container = false;
|
3180 |
-
};
|
3181 |
-
|
3182 |
-
AbstractChosen.prototype.input_focus = function(evt) {
|
3183 |
-
if (this.is_multiple) {
|
3184 |
-
if (!this.active_field) {
|
3185 |
-
return setTimeout(((function(_this) {
|
3186 |
-
return function() {
|
3187 |
-
return _this.container_mousedown();
|
3188 |
-
};
|
3189 |
-
})(this)), 50);
|
3190 |
-
}
|
3191 |
-
} else {
|
3192 |
-
if (!this.active_field) {
|
3193 |
-
return this.activate_field();
|
3194 |
-
}
|
3195 |
-
}
|
3196 |
-
};
|
3197 |
-
|
3198 |
-
AbstractChosen.prototype.input_blur = function(evt) {
|
3199 |
-
if (!this.mouse_on_container) {
|
3200 |
-
this.active_field = false;
|
3201 |
-
return setTimeout(((function(_this) {
|
3202 |
-
return function() {
|
3203 |
-
return _this.blur_test();
|
3204 |
-
};
|
3205 |
-
})(this)), 100);
|
3206 |
-
}
|
3207 |
-
};
|
3208 |
-
|
3209 |
-
AbstractChosen.prototype.label_click_handler = function(evt) {
|
3210 |
-
if (this.is_multiple) {
|
3211 |
-
return this.container_mousedown(evt);
|
3212 |
-
} else {
|
3213 |
-
return this.activate_field();
|
3214 |
-
}
|
3215 |
-
};
|
3216 |
-
|
3217 |
-
AbstractChosen.prototype.results_option_build = function(options) {
|
3218 |
-
var content, data, data_content, i, len, ref, shown_results;
|
3219 |
-
content = '';
|
3220 |
-
shown_results = 0;
|
3221 |
-
ref = this.results_data;
|
3222 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3223 |
-
data = ref[i];
|
3224 |
-
data_content = '';
|
3225 |
-
if (data.group) {
|
3226 |
-
data_content = this.result_add_group(data);
|
3227 |
-
} else {
|
3228 |
-
data_content = this.result_add_option(data);
|
3229 |
-
}
|
3230 |
-
if (data_content !== '') {
|
3231 |
-
shown_results++;
|
3232 |
-
content += data_content;
|
3233 |
-
}
|
3234 |
-
if (options != null ? options.first : void 0) {
|
3235 |
-
if (data.selected && this.is_multiple) {
|
3236 |
-
this.choice_build(data);
|
3237 |
-
} else if (data.selected && !this.is_multiple) {
|
3238 |
-
this.single_set_selected_text(this.choice_label(data));
|
3239 |
-
}
|
3240 |
-
}
|
3241 |
-
if (shown_results >= this.max_shown_results) {
|
3242 |
-
break;
|
3243 |
-
}
|
3244 |
-
}
|
3245 |
-
return content;
|
3246 |
-
};
|
3247 |
-
|
3248 |
-
AbstractChosen.prototype.result_add_option = function(option) {
|
3249 |
-
var classes, option_el;
|
3250 |
-
if (!option.search_match) {
|
3251 |
-
return '';
|
3252 |
-
}
|
3253 |
-
if (!this.include_option_in_results(option)) {
|
3254 |
-
return '';
|
3255 |
-
}
|
3256 |
-
classes = [];
|
3257 |
-
if (!option.disabled && !(option.selected && this.is_multiple)) {
|
3258 |
-
classes.push("active-result");
|
3259 |
-
}
|
3260 |
-
if (option.disabled && !(option.selected && this.is_multiple)) {
|
3261 |
-
classes.push("disabled-result");
|
3262 |
-
}
|
3263 |
-
if (option.selected) {
|
3264 |
-
classes.push("result-selected");
|
3265 |
-
}
|
3266 |
-
if (option.group_array_index != null) {
|
3267 |
-
classes.push("group-option");
|
3268 |
-
}
|
3269 |
-
if (option.classes !== "") {
|
3270 |
-
classes.push(option.classes);
|
3271 |
-
}
|
3272 |
-
option_el = document.createElement("li");
|
3273 |
-
option_el.className = classes.join(" ");
|
3274 |
-
if (option.style) {
|
3275 |
-
option_el.style.cssText = option.style;
|
3276 |
-
}
|
3277 |
-
option_el.setAttribute("data-option-array-index", option.array_index);
|
3278 |
-
option_el.innerHTML = option.highlighted_html || option.html;
|
3279 |
-
if (option.title) {
|
3280 |
-
option_el.title = option.title;
|
3281 |
-
}
|
3282 |
-
return this.outerHTML(option_el);
|
3283 |
-
};
|
3284 |
-
|
3285 |
-
AbstractChosen.prototype.result_add_group = function(group) {
|
3286 |
-
var classes, group_el;
|
3287 |
-
if (!(group.search_match || group.group_match)) {
|
3288 |
-
return '';
|
3289 |
-
}
|
3290 |
-
if (!(group.active_options > 0)) {
|
3291 |
-
return '';
|
3292 |
-
}
|
3293 |
-
classes = [];
|
3294 |
-
classes.push("group-result");
|
3295 |
-
if (group.classes) {
|
3296 |
-
classes.push(group.classes);
|
3297 |
-
}
|
3298 |
-
group_el = document.createElement("li");
|
3299 |
-
group_el.className = classes.join(" ");
|
3300 |
-
group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
|
3301 |
-
if (group.title) {
|
3302 |
-
group_el.title = group.title;
|
3303 |
-
}
|
3304 |
-
return this.outerHTML(group_el);
|
3305 |
-
};
|
3306 |
-
|
3307 |
-
AbstractChosen.prototype.results_update_field = function() {
|
3308 |
-
this.set_default_text();
|
3309 |
-
if (!this.is_multiple) {
|
3310 |
-
this.results_reset_cleanup();
|
3311 |
-
}
|
3312 |
-
this.result_clear_highlight();
|
3313 |
-
this.results_build();
|
3314 |
-
if (this.results_showing) {
|
3315 |
-
return this.winnow_results();
|
3316 |
-
}
|
3317 |
-
};
|
3318 |
-
|
3319 |
-
AbstractChosen.prototype.reset_single_select_options = function() {
|
3320 |
-
var i, len, ref, result, results1;
|
3321 |
-
ref = this.results_data;
|
3322 |
-
results1 = [];
|
3323 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3324 |
-
result = ref[i];
|
3325 |
-
if (result.selected) {
|
3326 |
-
results1.push(result.selected = false);
|
3327 |
-
} else {
|
3328 |
-
results1.push(void 0);
|
3329 |
-
}
|
3330 |
-
}
|
3331 |
-
return results1;
|
3332 |
-
};
|
3333 |
-
|
3334 |
-
AbstractChosen.prototype.results_toggle = function() {
|
3335 |
-
if (this.results_showing) {
|
3336 |
-
return this.results_hide();
|
3337 |
-
} else {
|
3338 |
-
return this.results_show();
|
3339 |
-
}
|
3340 |
-
};
|
3341 |
-
|
3342 |
-
AbstractChosen.prototype.results_search = function(evt) {
|
3343 |
-
if (this.results_showing) {
|
3344 |
-
return this.winnow_results();
|
3345 |
-
} else {
|
3346 |
-
return this.results_show();
|
3347 |
-
}
|
3348 |
-
};
|
3349 |
-
|
3350 |
-
AbstractChosen.prototype.winnow_results = function(options) {
|
3351 |
-
var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
|
3352 |
-
this.no_results_clear();
|
3353 |
-
results = 0;
|
3354 |
-
query = this.get_search_text();
|
3355 |
-
escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
3356 |
-
regex = this.get_search_regex(escapedQuery);
|
3357 |
-
ref = this.results_data;
|
3358 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3359 |
-
option = ref[i];
|
3360 |
-
option.search_match = false;
|
3361 |
-
results_group = null;
|
3362 |
-
search_match = null;
|
3363 |
-
option.highlighted_html = '';
|
3364 |
-
if (this.include_option_in_results(option)) {
|
3365 |
-
if (option.group) {
|
3366 |
-
option.group_match = false;
|
3367 |
-
option.active_options = 0;
|
3368 |
-
}
|
3369 |
-
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
|
3370 |
-
results_group = this.results_data[option.group_array_index];
|
3371 |
-
if (results_group.active_options === 0 && results_group.search_match) {
|
3372 |
-
results += 1;
|
3373 |
-
}
|
3374 |
-
results_group.active_options += 1;
|
3375 |
-
}
|
3376 |
-
text = option.group ? option.label : option.text;
|
3377 |
-
if (!(option.group && !this.group_search)) {
|
3378 |
-
search_match = this.search_string_match(text, regex);
|
3379 |
-
option.search_match = search_match != null;
|
3380 |
-
if (option.search_match && !option.group) {
|
3381 |
-
results += 1;
|
3382 |
-
}
|
3383 |
-
if (option.search_match) {
|
3384 |
-
if (query.length) {
|
3385 |
-
startpos = search_match.index;
|
3386 |
-
prefix = text.slice(0, startpos);
|
3387 |
-
fix = text.slice(startpos, startpos + query.length);
|
3388 |
-
suffix = text.slice(startpos + query.length);
|
3389 |
-
option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
|
3390 |
-
}
|
3391 |
-
if (results_group != null) {
|
3392 |
-
results_group.group_match = true;
|
3393 |
-
}
|
3394 |
-
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
|
3395 |
-
option.search_match = true;
|
3396 |
-
}
|
3397 |
-
}
|
3398 |
-
}
|
3399 |
-
}
|
3400 |
-
this.result_clear_highlight();
|
3401 |
-
if (results < 1 && query.length) {
|
3402 |
-
this.update_results_content("");
|
3403 |
-
return this.no_results(query);
|
3404 |
-
} else {
|
3405 |
-
this.update_results_content(this.results_option_build());
|
3406 |
-
if (!(options != null ? options.skip_highlight : void 0)) {
|
3407 |
-
return this.winnow_results_set_highlight();
|
3408 |
-
}
|
3409 |
-
}
|
3410 |
-
};
|
3411 |
-
|
3412 |
-
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
|
3413 |
-
var regex_flag, regex_string;
|
3414 |
-
regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
|
3415 |
-
if (!(this.enable_split_word_search || this.search_contains)) {
|
3416 |
-
regex_string = "^" + regex_string;
|
3417 |
-
}
|
3418 |
-
regex_flag = this.case_sensitive_search ? "" : "i";
|
3419 |
-
return new RegExp(regex_string, regex_flag);
|
3420 |
-
};
|
3421 |
-
|
3422 |
-
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
3423 |
-
var match;
|
3424 |
-
match = regex.exec(search_string);
|
3425 |
-
if (!this.search_contains && (match != null ? match[1] : void 0)) {
|
3426 |
-
match.index += 1;
|
3427 |
-
}
|
3428 |
-
return match;
|
3429 |
-
};
|
3430 |
-
|
3431 |
-
AbstractChosen.prototype.choices_count = function() {
|
3432 |
-
var i, len, option, ref;
|
3433 |
-
if (this.selected_option_count != null) {
|
3434 |
-
return this.selected_option_count;
|
3435 |
-
}
|
3436 |
-
this.selected_option_count = 0;
|
3437 |
-
ref = this.form_field.options;
|
3438 |
-
for (i = 0, len = ref.length; i < len; i++) {
|
3439 |
-
option = ref[i];
|
3440 |
-
if (option.selected) {
|
3441 |
-
this.selected_option_count += 1;
|
3442 |
-
}
|
3443 |
-
}
|
3444 |
-
return this.selected_option_count;
|
3445 |
-
};
|
3446 |
-
|
3447 |
-
AbstractChosen.prototype.choices_click = function(evt) {
|
3448 |
-
evt.preventDefault();
|
3449 |
-
this.activate_field();
|
3450 |
-
if (!(this.results_showing || this.is_disabled)) {
|
3451 |
-
return this.results_show();
|
3452 |
-
}
|
3453 |
-
};
|
3454 |
-
|
3455 |
-
AbstractChosen.prototype.keydown_checker = function(evt) {
|
3456 |
-
var ref, stroke;
|
3457 |
-
stroke = (ref = evt.which) != null ? ref : evt.keyCode;
|
3458 |
-
this.search_field_scale();
|
3459 |
-
if (stroke !== 8 && this.pending_backstroke) {
|
3460 |
-
this.clear_backstroke();
|
3461 |
-
}
|
3462 |
-
switch (stroke) {
|
3463 |
-
case 8:
|
3464 |
-
this.backstroke_length = this.get_search_field_value().length;
|
3465 |
-
break;
|
3466 |
-
case 9:
|
3467 |
-
if (this.results_showing && !this.is_multiple) {
|
3468 |
-
this.result_select(evt);
|
3469 |
-
}
|
3470 |
-
this.mouse_on_container = false;
|
3471 |
-
break;
|
3472 |
-
case 13:
|
3473 |
-
if (this.results_showing) {
|
3474 |
-
evt.preventDefault();
|
3475 |
-
}
|
3476 |
-
break;
|
3477 |
-
case 27:
|
3478 |
-
if (this.results_showing) {
|
3479 |
-
evt.preventDefault();
|
3480 |
-
}
|
3481 |
-
break;
|
3482 |
-
case 32:
|
3483 |
-
if (this.disable_search) {
|
3484 |
-
evt.preventDefault();
|
3485 |
-
}
|
3486 |
-
break;
|
3487 |
-
case 38:
|
3488 |
-
evt.preventDefault();
|
3489 |
-
this.keyup_arrow();
|
3490 |
-
break;
|
3491 |
-
case 40:
|
3492 |
-
evt.preventDefault();
|
3493 |
-
this.keydown_arrow();
|
3494 |
-
break;
|
3495 |
-
}
|
3496 |
-
};
|
3497 |
-
|
3498 |
-
AbstractChosen.prototype.keyup_checker = function(evt) {
|
3499 |
-
var ref, stroke;
|
3500 |
-
stroke = (ref = evt.which) != null ? ref : evt.keyCode;
|
3501 |
-
this.search_field_scale();
|
3502 |
-
switch (stroke) {
|
3503 |
-
case 8:
|
3504 |
-
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
|
3505 |
-
this.keydown_backstroke();
|
3506 |
-
} else if (!this.pending_backstroke) {
|
3507 |
-
this.result_clear_highlight();
|
3508 |
-
this.results_search();
|
3509 |
-
}
|
3510 |
-
break;
|
3511 |
-
case 13:
|
3512 |
-
evt.preventDefault();
|
3513 |
-
if (this.results_showing) {
|
3514 |
-
this.result_select(evt);
|
3515 |
-
}
|
3516 |
-
break;
|
3517 |
-
case 27:
|
3518 |
-
if (this.results_showing) {
|
3519 |
-
this.results_hide();
|
3520 |
-
}
|
3521 |
-
break;
|
3522 |
-
case 9:
|
3523 |
-
case 16:
|
3524 |
-
case 17:
|
3525 |
-
case 18:
|
3526 |
-
case 38:
|
3527 |
-
case 40:
|
3528 |
-
case 91:
|
3529 |
-
break;
|
3530 |
-
default:
|
3531 |
-
this.results_search();
|
3532 |
-
break;
|
3533 |
-
}
|
3534 |
-
};
|
3535 |
-
|
3536 |
-
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
3537 |
-
if (this.is_disabled) {
|
3538 |
-
return;
|
3539 |
-
}
|
3540 |
-
return setTimeout(((function(_this) {
|
3541 |
-
return function() {
|
3542 |
-
return _this.results_search();
|
3543 |
-
};
|
3544 |
-
})(this)), 50);
|
3545 |
-
};
|
3546 |
-
|
3547 |
-
AbstractChosen.prototype.container_width = function() {
|
3548 |
-
if (this.options.width != null) {
|
3549 |
-
return this.options.width;
|
3550 |
-
} else {
|
3551 |
-
return this.form_field.offsetWidth + "px";
|
3552 |
-
}
|
3553 |
-
};
|
3554 |
-
|
3555 |
-
AbstractChosen.prototype.include_option_in_results = function(option) {
|
3556 |
-
if (this.is_multiple && (!this.display_selected_options && option.selected)) {
|
3557 |
-
return false;
|
3558 |
-
}
|
3559 |
-
if (!this.display_disabled_options && option.disabled) {
|
3560 |
-
return false;
|
3561 |
-
}
|
3562 |
-
if (option.empty) {
|
3563 |
-
return false;
|
3564 |
-
}
|
3565 |
-
return true;
|
3566 |
-
};
|
3567 |
-
|
3568 |
-
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
3569 |
-
this.touch_started = true;
|
3570 |
-
return this.search_results_mouseover(evt);
|
3571 |
-
};
|
3572 |
-
|
3573 |
-
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
3574 |
-
this.touch_started = false;
|
3575 |
-
return this.search_results_mouseout(evt);
|
3576 |
-
};
|
3577 |
-
|
3578 |
-
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
3579 |
-
if (this.touch_started) {
|
3580 |
-
return this.search_results_mouseup(evt);
|
3581 |
-
}
|
3582 |
-
};
|
3583 |
-
|
3584 |
-
AbstractChosen.prototype.outerHTML = function(element) {
|
3585 |
-
var tmp;
|
3586 |
-
if (element.outerHTML) {
|
3587 |
-
return element.outerHTML;
|
3588 |
-
}
|
3589 |
-
tmp = document.createElement("div");
|
3590 |
-
tmp.appendChild(element);
|
3591 |
-
return tmp.innerHTML;
|
3592 |
-
};
|
3593 |
-
|
3594 |
-
AbstractChosen.prototype.get_single_html = function() {
|
3595 |
-
return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
|
3596 |
-
};
|
3597 |
-
|
3598 |
-
AbstractChosen.prototype.get_multi_html = function() {
|
3599 |
-
return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
|
3600 |
-
};
|
3601 |
-
|
3602 |
-
AbstractChosen.prototype.get_no_results_html = function(terms) {
|
3603 |
-
return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
|
3604 |
-
};
|
3605 |
-
|
3606 |
-
AbstractChosen.browser_is_supported = function() {
|
3607 |
-
if ("Microsoft Internet Explorer" === window.navigator.appName) {
|
3608 |
-
return document.documentMode >= 8;
|
3609 |
-
}
|
3610 |
-
if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
|
3611 |
-
return false;
|
3612 |
-
}
|
3613 |
-
return true;
|
3614 |
-
};
|
3615 |
-
|
3616 |
-
AbstractChosen.default_multiple_text = "Select Some Options";
|
3617 |
-
|
3618 |
-
AbstractChosen.default_single_text = "Select an Option";
|
3619 |
-
|
3620 |
-
AbstractChosen.default_no_result_text = "No results match";
|
3621 |
-
|
3622 |
-
return AbstractChosen;
|
3623 |
-
|
3624 |
-
})();
|
3625 |
-
|
3626 |
-
$ = jQuery;
|
3627 |
-
|
3628 |
-
$.fn.extend({
|
3629 |
-
chosen: function(options) {
|
3630 |
-
if (!AbstractChosen.browser_is_supported()) {
|
3631 |
-
return this;
|
3632 |
-
}
|
3633 |
-
return this.each(function(input_field) {
|
3634 |
-
var $this, chosen;
|
3635 |
-
$this = $(this);
|
3636 |
-
chosen = $this.data('chosen');
|
3637 |
-
if (options === 'destroy') {
|
3638 |
-
if (chosen instanceof Chosen) {
|
3639 |
-
chosen.destroy();
|
3640 |
-
}
|
3641 |
-
return;
|
3642 |
-
}
|
3643 |
-
if (!(chosen instanceof Chosen)) {
|
3644 |
-
$this.data('chosen', new Chosen(this, options));
|
3645 |
-
}
|
3646 |
-
});
|
3647 |
-
}
|
3648 |
-
});
|
3649 |
-
|
3650 |
-
Chosen = (function(superClass) {
|
3651 |
-
extend(Chosen, superClass);
|
3652 |
-
|
3653 |
-
function Chosen() {
|
3654 |
-
return Chosen.__super__.constructor.apply(this, arguments);
|
3655 |
-
}
|
3656 |
-
|
3657 |
-
Chosen.prototype.setup = function() {
|
3658 |
-
this.form_field_jq = $(this.form_field);
|
3659 |
-
return this.current_selectedIndex = this.form_field.selectedIndex;
|
3660 |
-
};
|
3661 |
-
|
3662 |
-
Chosen.prototype.set_up_html = function() {
|
3663 |
-
var container_classes, container_props;
|
3664 |
-
container_classes = ["chosen-container"];
|
3665 |
-
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
|
3666 |
-
if (this.inherit_select_classes && this.form_field.className) {
|
3667 |
-
container_classes.push(this.form_field.className);
|
3668 |
-
}
|
3669 |
-
if (this.is_rtl) {
|
3670 |
-
container_classes.push("chosen-rtl");
|
3671 |
-
}
|
3672 |
-
container_props = {
|
3673 |
-
'class': container_classes.join(' '),
|
3674 |
-
'title': this.form_field.title
|
3675 |
-
};
|
3676 |
-
if (this.form_field.id.length) {
|
3677 |
-
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
|
3678 |
-
}
|
3679 |
-
this.container = $("<div />", container_props);
|
3680 |
-
this.container.width(this.container_width());
|
3681 |
-
if (this.is_multiple) {
|
3682 |
-
this.container.html(this.get_multi_html());
|
3683 |
-
} else {
|
3684 |
-
this.container.html(this.get_single_html());
|
3685 |
-
}
|
3686 |
-
this.form_field_jq.hide().after(this.container);
|
3687 |
-
this.dropdown = this.container.find('div.chosen-drop').first();
|
3688 |
-
this.search_field = this.container.find('input').first();
|
3689 |
-
this.search_results = this.container.find('ul.chosen-results').first();
|
3690 |
-
this.search_field_scale();
|
3691 |
-
this.search_no_results = this.container.find('li.no-results').first();
|
3692 |
-
if (this.is_multiple) {
|
3693 |
-
this.search_choices = this.container.find('ul.chosen-choices').first();
|
3694 |
-
this.search_container = this.container.find('li.search-field').first();
|
3695 |
-
} else {
|
3696 |
-
this.search_container = this.container.find('div.chosen-search').first();
|
3697 |
-
this.selected_item = this.container.find('.chosen-single').first();
|
3698 |
-
}
|
3699 |
-
this.results_build();
|
3700 |
-
this.set_tab_index();
|
3701 |
-
return this.set_label_behavior();
|
3702 |
-
};
|
3703 |
-
|
3704 |
-
Chosen.prototype.on_ready = function() {
|
3705 |
-
return this.form_field_jq.trigger("chosen:ready", {
|
3706 |
-
chosen: this
|
3707 |
-
});
|
3708 |
-
};
|
3709 |
-
|
3710 |
-
Chosen.prototype.register_observers = function() {
|
3711 |
-
this.container.on('touchstart.chosen', (function(_this) {
|
3712 |
-
return function(evt) {
|
3713 |
-
_this.container_mousedown(evt);
|
3714 |
-
};
|
3715 |
-
})(this));
|
3716 |
-
this.container.on('touchend.chosen', (function(_this) {
|
3717 |
-
return function(evt) {
|
3718 |
-
_this.container_mouseup(evt);
|
3719 |
-
};
|
3720 |
-
})(this));
|
3721 |
-
this.container.on('mousedown.chosen', (function(_this) {
|
3722 |
-
return function(evt) {
|
3723 |
-
_this.container_mousedown(evt);
|
3724 |
-
};
|
3725 |
-
})(this));
|
3726 |
-
this.container.on('mouseup.chosen', (function(_this) {
|
3727 |
-
return function(evt) {
|
3728 |
-
_this.container_mouseup(evt);
|
3729 |
-
};
|
3730 |
-
})(this));
|
3731 |
-
this.container.on('mouseenter.chosen', (function(_this) {
|
3732 |
-
return function(evt) {
|
3733 |
-
_this.mouse_enter(evt);
|
3734 |
-
};
|
3735 |
-
})(this));
|
3736 |
-
this.container.on('mouseleave.chosen', (function(_this) {
|
3737 |
-
return function(evt) {
|
3738 |
-
_this.mouse_leave(evt);
|
3739 |
-
};
|
3740 |
-
})(this));
|
3741 |
-
this.search_results.on('mouseup.chosen', (function(_this) {
|
3742 |
-
return function(evt) {
|
3743 |
-
_this.search_results_mouseup(evt);
|
3744 |
-
};
|
3745 |
-
})(this));
|
3746 |
-
this.search_results.on('mouseover.chosen', (function(_this) {
|
3747 |
-
return function(evt) {
|
3748 |
-
_this.search_results_mouseover(evt);
|
3749 |
-
};
|
3750 |
-
})(this));
|
3751 |
-
this.search_results.on('mouseout.chosen', (function(_this) {
|
3752 |
-
return function(evt) {
|
3753 |
-
_this.search_results_mouseout(evt);
|
3754 |
-
};
|
3755 |
-
})(this));
|
3756 |
-
this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
|
3757 |
-
return function(evt) {
|
3758 |
-
_this.search_results_mousewheel(evt);
|
3759 |
-
};
|
3760 |
-
})(this));
|
3761 |
-
this.search_results.on('touchstart.chosen', (function(_this) {
|
3762 |
-
return function(evt) {
|
3763 |
-
_this.search_results_touchstart(evt);
|
3764 |
-
};
|
3765 |
-
})(this));
|
3766 |
-
this.search_results.on('touchmove.chosen', (function(_this) {
|
3767 |
-
return function(evt) {
|
3768 |
-
_this.search_results_touchmove(evt);
|
3769 |
-
};
|
3770 |
-
})(this));
|
3771 |
-
this.search_results.on('touchend.chosen', (function(_this) {
|
3772 |
-
return function(evt) {
|
3773 |
-
_this.search_results_touchend(evt);
|
3774 |
-
};
|
3775 |
-
})(this));
|
3776 |
-
this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
|
3777 |
-
return function(evt) {
|
3778 |
-
_this.results_update_field(evt);
|
3779 |
-
};
|
3780 |
-
})(this));
|
3781 |
-
this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
|
3782 |
-
return function(evt) {
|
3783 |
-
_this.activate_field(evt);
|
3784 |
-
};
|
3785 |
-
})(this));
|
3786 |
-
this.form_field_jq.on("chosen:open.chosen", (function(_this) {
|
3787 |
-
return function(evt) {
|
3788 |
-
_this.container_mousedown(evt);
|
3789 |
-
};
|
3790 |
-
})(this));
|
3791 |
-
this.form_field_jq.on("chosen:close.chosen", (function(_this) {
|
3792 |
-
return function(evt) {
|
3793 |
-
_this.close_field(evt);
|
3794 |
-
};
|
3795 |
-
})(this));
|
3796 |
-
this.search_field.on('blur.chosen', (function(_this) {
|
3797 |
-
return function(evt) {
|
3798 |
-
_this.input_blur(evt);
|
3799 |
-
};
|
3800 |
-
})(this));
|
3801 |
-
this.search_field.on('keyup.chosen', (function(_this) {
|
3802 |
-
return function(evt) {
|
3803 |
-
_this.keyup_checker(evt);
|
3804 |
-
};
|
3805 |
-
})(this));
|
3806 |
-
this.search_field.on('keydown.chosen', (function(_this) {
|
3807 |
-
return function(evt) {
|
3808 |
-
_this.keydown_checker(evt);
|
3809 |
-
};
|
3810 |
-
})(this));
|
3811 |
-
this.search_field.on('focus.chosen', (function(_this) {
|
3812 |
-
return function(evt) {
|
3813 |
-
_this.input_focus(evt);
|
3814 |
-
};
|
3815 |
-
})(this));
|
3816 |
-
this.search_field.on('cut.chosen', (function(_this) {
|
3817 |
-
return function(evt) {
|
3818 |
-
_this.clipboard_event_checker(evt);
|
3819 |
-
};
|
3820 |
-
})(this));
|
3821 |
-
this.search_field.on('paste.chosen', (function(_this) {
|
3822 |
-
return function(evt) {
|
3823 |
-
_this.clipboard_event_checker(evt);
|
3824 |
-
};
|
3825 |
-
})(this));
|
3826 |
-
if (this.is_multiple) {
|
3827 |
-
return this.search_choices.on('click.chosen', (function(_this) {
|
3828 |
-
return function(evt) {
|
3829 |
-
_this.choices_click(evt);
|
3830 |
-
};
|
3831 |
-
})(this));
|
3832 |
-
} else {
|
3833 |
-
return this.container.on('click.chosen', function(evt) {
|
3834 |
-
evt.preventDefault();
|
3835 |
-
});
|
3836 |
-
}
|
3837 |
-
};
|
3838 |
-
|
3839 |
-
Chosen.prototype.destroy = function() {
|
3840 |
-
$(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
|
3841 |
-
if (this.form_field_label.length > 0) {
|
3842 |
-
this.form_field_label.off('click.chosen');
|
3843 |
-
}
|
3844 |
-
if (this.search_field[0].tabIndex) {
|
3845 |
-
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
3846 |
-
}
|
3847 |
-
this.container.remove();
|
3848 |
-
this.form_field_jq.removeData('chosen');
|
3849 |
-
return this.form_field_jq.show();
|
3850 |
-
};
|
3851 |
-
|
3852 |
-
Chosen.prototype.search_field_disabled = function() {
|
3853 |
-
this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
|
3854 |
-
this.container.toggleClass('chosen-disabled', this.is_disabled);
|
3855 |
-
this.search_field[0].disabled = this.is_disabled;
|
3856 |
-
if (!this.is_multiple) {
|
3857 |
-
this.selected_item.off('focus.chosen', this.activate_field);
|
3858 |
-
}
|
3859 |
-
if (this.is_disabled) {
|
3860 |
-
return this.close_field();
|
3861 |
-
} else if (!this.is_multiple) {
|
3862 |
-
return this.selected_item.on('focus.chosen', this.activate_field);
|
3863 |
-
}
|
3864 |
-
};
|
3865 |
-
|
3866 |
-
Chosen.prototype.container_mousedown = function(evt) {
|
3867 |
-
var ref;
|
3868 |
-
if (this.is_disabled) {
|
3869 |
-
return;
|
3870 |
-
}
|
3871 |
-
if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
|
3872 |
-
evt.preventDefault();
|
3873 |
-
}
|
3874 |
-
if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
|
3875 |
-
if (!this.active_field) {
|
3876 |
-
if (this.is_multiple) {
|
3877 |
-
this.search_field.val("");
|
3878 |
-
}
|
3879 |
-
$(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
|
3880 |
-
this.results_show();
|
3881 |
-
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
|
3882 |
-
evt.preventDefault();
|
3883 |
-
this.results_toggle();
|
3884 |
-
}
|
3885 |
-
return this.activate_field();
|
3886 |
-
}
|
3887 |
-
};
|
3888 |
-
|
3889 |
-
Chosen.prototype.container_mouseup = function(evt) {
|
3890 |
-
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
3891 |
-
return this.results_reset(evt);
|
3892 |
-
}
|
3893 |
-
};
|
3894 |
-
|
3895 |
-
Chosen.prototype.search_results_mousewheel = function(evt) {
|
3896 |
-
var delta;
|
3897 |
-
if (evt.originalEvent) {
|
3898 |
-
delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
3899 |
-
}
|
3900 |
-
if (delta != null) {
|
3901 |
-
evt.preventDefault();
|
3902 |
-
if (evt.type === 'DOMMouseScroll') {
|
3903 |
-
delta = delta * 40;
|
3904 |
-
}
|
3905 |
-
return this.search_results.scrollTop(delta + this.search_results.scrollTop());
|
3906 |
-
}
|
3907 |
-
};
|
3908 |
-
|
3909 |
-
Chosen.prototype.blur_test = function(evt) {
|
3910 |
-
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
|
3911 |
-
return this.close_field();
|
3912 |
-
}
|
3913 |
-
};
|
3914 |
-
|
3915 |
-
Chosen.prototype.close_field = function() {
|
3916 |
-
$(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
|
3917 |
-
this.active_field = false;
|
3918 |
-
this.results_hide();
|
3919 |
-
this.container.removeClass("chosen-container-active");
|
3920 |
-
this.clear_backstroke();
|
3921 |
-
this.show_search_field_default();
|
3922 |
-
this.search_field_scale();
|
3923 |
-
return this.search_field.blur();
|
3924 |
-
};
|
3925 |
-
|
3926 |
-
Chosen.prototype.activate_field = function() {
|
3927 |
-
if (this.is_disabled) {
|
3928 |
-
return;
|
3929 |
-
}
|
3930 |
-
this.container.addClass("chosen-container-active");
|
3931 |
-
this.active_field = true;
|
3932 |
-
this.search_field.val(this.search_field.val());
|
3933 |
-
return this.search_field.focus();
|
3934 |
-
};
|
3935 |
-
|
3936 |
-
Chosen.prototype.test_active_click = function(evt) {
|
3937 |
-
var active_container;
|
3938 |
-
active_container = $(evt.target).closest('.chosen-container');
|
3939 |
-
if (active_container.length && this.container[0] === active_container[0]) {
|
3940 |
-
return this.active_field = true;
|
3941 |
-
} else {
|
3942 |
-
return this.close_field();
|
3943 |
-
}
|
3944 |
-
};
|
3945 |
-
|
3946 |
-
Chosen.prototype.results_build = function() {
|
3947 |
-
this.parsing = true;
|
3948 |
-
this.selected_option_count = null;
|
3949 |
-
this.results_data = SelectParser.select_to_array(this.form_field);
|
3950 |
-
if (this.is_multiple) {
|
3951 |
-
this.search_choices.find("li.search-choice").remove();
|
3952 |
-
} else {
|
3953 |
-
this.single_set_selected_text();
|
3954 |
-
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
3955 |
-
this.search_field[0].readOnly = true;
|
3956 |
-
this.container.addClass("chosen-container-single-nosearch");
|
3957 |
-
} else {
|
3958 |
-
this.search_field[0].readOnly = false;
|
3959 |
-
this.container.removeClass("chosen-container-single-nosearch");
|
3960 |
-
}
|
3961 |
-
}
|
3962 |
-
this.update_results_content(this.results_option_build({
|
3963 |
-
first: true
|
3964 |
-
}));
|
3965 |
-
this.search_field_disabled();
|
3966 |
-
this.show_search_field_default();
|
3967 |
-
this.search_field_scale();
|
3968 |
-
return this.parsing = false;
|
3969 |
-
};
|
3970 |
-
|
3971 |
-
Chosen.prototype.result_do_highlight = function(el) {
|
3972 |
-
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
3973 |
-
if (el.length) {
|
3974 |
-
this.result_clear_highlight();
|
3975 |
-
this.result_highlight = el;
|
3976 |
-
this.result_highlight.addClass("highlighted");
|
3977 |
-
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
3978 |
-
visible_top = this.search_results.scrollTop();
|
3979 |
-
visible_bottom = maxHeight + visible_top;
|
3980 |
-
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
3981 |
-
high_bottom = high_top + this.result_highlight.outerHeight();
|
3982 |
-
if (high_bottom >= visible_bottom) {
|
3983 |
-
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
3984 |
-
} else if (high_top < visible_top) {
|
3985 |
-
return this.search_results.scrollTop(high_top);
|
3986 |
-
}
|
3987 |
-
}
|
3988 |
-
};
|
3989 |
-
|
3990 |
-
Chosen.prototype.result_clear_highlight = function() {
|
3991 |
-
if (this.result_highlight) {
|
3992 |
-
this.result_highlight.removeClass("highlighted");
|
3993 |
-
}
|
3994 |
-
return this.result_highlight = null;
|
3995 |
-
};
|
3996 |
-
|
3997 |
-
Chosen.prototype.results_show = function() {
|
3998 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
3999 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
4000 |
-
chosen: this
|
4001 |
-
});
|
4002 |
-
return false;
|
4003 |
-
}
|
4004 |
-
this.container.addClass("chosen-with-drop");
|
4005 |
-
this.results_showing = true;
|
4006 |
-
this.search_field.focus();
|
4007 |
-
this.search_field.val(this.get_search_field_value());
|
4008 |
-
this.winnow_results();
|
4009 |
-
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
4010 |
-
chosen: this
|
4011 |
-
});
|
4012 |
-
};
|
4013 |
-
|
4014 |
-
Chosen.prototype.update_results_content = function(content) {
|
4015 |
-
return this.search_results.html(content);
|
4016 |
-
};
|
4017 |
-
|
4018 |
-
Chosen.prototype.results_hide = function() {
|
4019 |
-
if (this.results_showing) {
|
4020 |
-
this.result_clear_highlight();
|
4021 |
-
this.container.removeClass("chosen-with-drop");
|
4022 |
-
this.form_field_jq.trigger("chosen:hiding_dropdown", {
|
4023 |
-
chosen: this
|
4024 |
-
});
|
4025 |
-
}
|
4026 |
-
return this.results_showing = false;
|
4027 |
-
};
|
4028 |
-
|
4029 |
-
Chosen.prototype.set_tab_index = function(el) {
|
4030 |
-
var ti;
|
4031 |
-
if (this.form_field.tabIndex) {
|
4032 |
-
ti = this.form_field.tabIndex;
|
4033 |
-
this.form_field.tabIndex = -1;
|
4034 |
-
return this.search_field[0].tabIndex = ti;
|
4035 |
-
}
|
4036 |
-
};
|
4037 |
-
|
4038 |
-
Chosen.prototype.set_label_behavior = function() {
|
4039 |
-
this.form_field_label = this.form_field_jq.parents("label");
|
4040 |
-
if (!this.form_field_label.length && this.form_field.id.length) {
|
4041 |
-
this.form_field_label = $("label[for='" + this.form_field.id + "']");
|
4042 |
-
}
|
4043 |
-
if (this.form_field_label.length > 0) {
|
4044 |
-
return this.form_field_label.on('click.chosen', this.label_click_handler);
|
4045 |
-
}
|
4046 |
-
};
|
4047 |
-
|
4048 |
-
Chosen.prototype.show_search_field_default = function() {
|
4049 |
-
if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
|
4050 |
-
this.search_field.val(this.default_text);
|
4051 |
-
return this.search_field.addClass("default");
|
4052 |
-
} else {
|
4053 |
-
this.search_field.val("");
|
4054 |
-
return this.search_field.removeClass("default");
|
4055 |
-
}
|
4056 |
-
};
|
4057 |
-
|
4058 |
-
Chosen.prototype.search_results_mouseup = function(evt) {
|
4059 |
-
var target;
|
4060 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
4061 |
-
if (target.length) {
|
4062 |
-
this.result_highlight = target;
|
4063 |
-
this.result_select(evt);
|
4064 |
-
return this.search_field.focus();
|
4065 |
-
}
|
4066 |
-
};
|
4067 |
-
|
4068 |
-
Chosen.prototype.search_results_mouseover = function(evt) {
|
4069 |
-
var target;
|
4070 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
4071 |
-
if (target) {
|
4072 |
-
return this.result_do_highlight(target);
|
4073 |
-
}
|
4074 |
-
};
|
4075 |
-
|
4076 |
-
Chosen.prototype.search_results_mouseout = function(evt) {
|
4077 |
-
if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
|
4078 |
-
return this.result_clear_highlight();
|
4079 |
-
}
|
4080 |
-
};
|
4081 |
-
|
4082 |
-
Chosen.prototype.choice_build = function(item) {
|
4083 |
-
var choice, close_link;
|
4084 |
-
choice = $('<li />', {
|
4085 |
-
"class": "search-choice"
|
4086 |
-
}).html("<span>" + (this.choice_label(item)) + "</span>");
|
4087 |
-
if (item.disabled) {
|
4088 |
-
choice.addClass('search-choice-disabled');
|
4089 |
-
} else {
|
4090 |
-
close_link = $('<a />', {
|
4091 |
-
"class": 'search-choice-close',
|
4092 |
-
'data-option-array-index': item.array_index
|
4093 |
-
});
|
4094 |
-
close_link.on('click.chosen', (function(_this) {
|
4095 |
-
return function(evt) {
|
4096 |
-
return _this.choice_destroy_link_click(evt);
|
4097 |
-
};
|
4098 |
-
})(this));
|
4099 |
-
choice.append(close_link);
|
4100 |
-
}
|
4101 |
-
return this.search_container.before(choice);
|
4102 |
-
};
|
4103 |
-
|
4104 |
-
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
4105 |
-
evt.preventDefault();
|
4106 |
-
evt.stopPropagation();
|
4107 |
-
if (!this.is_disabled) {
|
4108 |
-
return this.choice_destroy($(evt.target));
|
4109 |
-
}
|
4110 |
-
};
|
4111 |
-
|
4112 |
-
Chosen.prototype.choice_destroy = function(link) {
|
4113 |
-
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
|
4114 |
-
if (this.active_field) {
|
4115 |
-
this.search_field.focus();
|
4116 |
-
} else {
|
4117 |
-
this.show_search_field_default();
|
4118 |
-
}
|
4119 |
-
if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
|
4120 |
-
this.results_hide();
|
4121 |
-
}
|
4122 |
-
link.parents('li').first().remove();
|
4123 |
-
return this.search_field_scale();
|
4124 |
-
}
|
4125 |
-
};
|
4126 |
-
|
4127 |
-
Chosen.prototype.results_reset = function() {
|
4128 |
-
this.reset_single_select_options();
|
4129 |
-
this.form_field.options[0].selected = true;
|
4130 |
-
this.single_set_selected_text();
|
4131 |
-
this.show_search_field_default();
|
4132 |
-
this.results_reset_cleanup();
|
4133 |
-
this.trigger_form_field_change();
|
4134 |
-
if (this.active_field) {
|
4135 |
-
return this.results_hide();
|
4136 |
-
}
|
4137 |
-
};
|
4138 |
-
|
4139 |
-
Chosen.prototype.results_reset_cleanup = function() {
|
4140 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
4141 |
-
return this.selected_item.find("abbr").remove();
|
4142 |
-
};
|
4143 |
-
|
4144 |
-
Chosen.prototype.result_select = function(evt) {
|
4145 |
-
var high, item;
|
4146 |
-
if (this.result_highlight) {
|
4147 |
-
high = this.result_highlight;
|
4148 |
-
this.result_clear_highlight();
|
4149 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
4150 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
4151 |
-
chosen: this
|
4152 |
-
});
|
4153 |
-
return false;
|
4154 |
-
}
|
4155 |
-
if (this.is_multiple) {
|
4156 |
-
high.removeClass("active-result");
|
4157 |
-
} else {
|
4158 |
-
this.reset_single_select_options();
|
4159 |
-
}
|
4160 |
-
high.addClass("result-selected");
|
4161 |
-
item = this.results_data[high[0].getAttribute("data-option-array-index")];
|
4162 |
-
item.selected = true;
|
4163 |
-
this.form_field.options[item.options_index].selected = true;
|
4164 |
-
this.selected_option_count = null;
|
4165 |
-
if (this.is_multiple) {
|
4166 |
-
this.choice_build(item);
|
4167 |
-
} else {
|
4168 |
-
this.single_set_selected_text(this.choice_label(item));
|
4169 |
-
}
|
4170 |
-
if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
|
4171 |
-
if (evt.metaKey || evt.ctrlKey) {
|
4172 |
-
this.winnow_results({
|
4173 |
-
skip_highlight: true
|
4174 |
-
});
|
4175 |
-
} else {
|
4176 |
-
this.search_field.val("");
|
4177 |
-
this.winnow_results();
|
4178 |
-
}
|
4179 |
-
} else {
|
4180 |
-
this.results_hide();
|
4181 |
-
this.show_search_field_default();
|
4182 |
-
}
|
4183 |
-
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
|
4184 |
-
this.trigger_form_field_change({
|
4185 |
-
selected: this.form_field.options[item.options_index].value
|
4186 |
-
});
|
4187 |
-
}
|
4188 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
4189 |
-
evt.preventDefault();
|
4190 |
-
return this.search_field_scale();
|
4191 |
-
}
|
4192 |
-
};
|
4193 |
-
|
4194 |
-
Chosen.prototype.single_set_selected_text = function(text) {
|
4195 |
-
if (text == null) {
|
4196 |
-
text = this.default_text;
|
4197 |
-
}
|
4198 |
-
if (text === this.default_text) {
|
4199 |
-
this.selected_item.addClass("chosen-default");
|
4200 |
-
} else {
|
4201 |
-
this.single_deselect_control_build();
|
4202 |
-
this.selected_item.removeClass("chosen-default");
|
4203 |
-
}
|
4204 |
-
return this.selected_item.find("span").html(text);
|
4205 |
-
};
|
4206 |
-
|
4207 |
-
Chosen.prototype.result_deselect = function(pos) {
|
4208 |
-
var result_data;
|
4209 |
-
result_data = this.results_data[pos];
|
4210 |
-
if (!this.form_field.options[result_data.options_index].disabled) {
|
4211 |
-
result_data.selected = false;
|
4212 |
-
this.form_field.options[result_data.options_index].selected = false;
|
4213 |
-
this.selected_option_count = null;
|
4214 |
-
this.result_clear_highlight();
|
4215 |
-
if (this.results_showing) {
|
4216 |
-
this.winnow_results();
|
4217 |
-
}
|
4218 |
-
this.trigger_form_field_change({
|
4219 |
-
deselected: this.form_field.options[result_data.options_index].value
|
4220 |
-
});
|
4221 |
-
this.search_field_scale();
|
4222 |
-
return true;
|
4223 |
-
} else {
|
4224 |
-
return false;
|
4225 |
-
}
|
4226 |
-
};
|
4227 |
-
|
4228 |
-
Chosen.prototype.single_deselect_control_build = function() {
|
4229 |
-
if (!this.allow_single_deselect) {
|
4230 |
-
return;
|
4231 |
-
}
|
4232 |
-
if (!this.selected_item.find("abbr").length) {
|
4233 |
-
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
4234 |
-
}
|
4235 |
-
return this.selected_item.addClass("chosen-single-with-deselect");
|
4236 |
-
};
|
4237 |
-
|
4238 |
-
Chosen.prototype.get_search_field_value = function() {
|
4239 |
-
return this.search_field.val();
|
4240 |
-
};
|
4241 |
-
|
4242 |
-
Chosen.prototype.get_search_text = function() {
|
4243 |
-
return $.trim(this.get_search_field_value());
|
4244 |
-
};
|
4245 |
-
|
4246 |
-
Chosen.prototype.escape_html = function(text) {
|
4247 |
-
return $('<div/>').text(text).html();
|
4248 |
-
};
|
4249 |
-
|
4250 |
-
Chosen.prototype.winnow_results_set_highlight = function() {
|
4251 |
-
var do_high, selected_results;
|
4252 |
-
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
4253 |
-
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
4254 |
-
if (do_high != null) {
|
4255 |
-
return this.result_do_highlight(do_high);
|
4256 |
-
}
|
4257 |
-
};
|
4258 |
-
|
4259 |
-
Chosen.prototype.no_results = function(terms) {
|
4260 |
-
var no_results_html;
|
4261 |
-
no_results_html = this.get_no_results_html(terms);
|
4262 |
-
this.search_results.append(no_results_html);
|
4263 |
-
return this.form_field_jq.trigger("chosen:no_results", {
|
4264 |
-
chosen: this
|
4265 |
-
});
|
4266 |
-
};
|
4267 |
-
|
4268 |
-
Chosen.prototype.no_results_clear = function() {
|
4269 |
-
return this.search_results.find(".no-results").remove();
|
4270 |
-
};
|
4271 |
-
|
4272 |
-
Chosen.prototype.keydown_arrow = function() {
|
4273 |
-
var next_sib;
|
4274 |
-
if (this.results_showing && this.result_highlight) {
|
4275 |
-
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
4276 |
-
if (next_sib) {
|
4277 |
-
return this.result_do_highlight(next_sib);
|
4278 |
-
}
|
4279 |
-
} else {
|
4280 |
-
return this.results_show();
|
4281 |
-
}
|
4282 |
-
};
|
4283 |
-
|
4284 |
-
Chosen.prototype.keyup_arrow = function() {
|
4285 |
-
var prev_sibs;
|
4286 |
-
if (!this.results_showing && !this.is_multiple) {
|
4287 |
-
return this.results_show();
|
4288 |
-
} else if (this.result_highlight) {
|
4289 |
-
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
4290 |
-
if (prev_sibs.length) {
|
4291 |
-
return this.result_do_highlight(prev_sibs.first());
|
4292 |
-
} else {
|
4293 |
-
if (this.choices_count() > 0) {
|
4294 |
-
this.results_hide();
|
4295 |
-
}
|
4296 |
-
return this.result_clear_highlight();
|
4297 |
-
}
|
4298 |
-
}
|
4299 |
-
};
|
4300 |
-
|
4301 |
-
Chosen.prototype.keydown_backstroke = function() {
|
4302 |
-
var next_available_destroy;
|
4303 |
-
if (this.pending_backstroke) {
|
4304 |
-
this.choice_destroy(this.pending_backstroke.find("a").first());
|
4305 |
-
return this.clear_backstroke();
|
4306 |
-
} else {
|
4307 |
-
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
4308 |
-
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
4309 |
-
this.pending_backstroke = next_available_destroy;
|
4310 |
-
if (this.single_backstroke_delete) {
|
4311 |
-
return this.keydown_backstroke();
|
4312 |
-
} else {
|
4313 |
-
return this.pending_backstroke.addClass("search-choice-focus");
|
4314 |
-
}
|
4315 |
-
}
|
4316 |
-
}
|
4317 |
-
};
|
4318 |
-
|
4319 |
-
Chosen.prototype.clear_backstroke = function() {
|
4320 |
-
if (this.pending_backstroke) {
|
4321 |
-
this.pending_backstroke.removeClass("search-choice-focus");
|
4322 |
-
}
|
4323 |
-
return this.pending_backstroke = null;
|
4324 |
-
};
|
4325 |
-
|
4326 |
-
Chosen.prototype.search_field_scale = function() {
|
4327 |
-
var div, i, len, style, style_block, styles, width;
|
4328 |
-
if (!this.is_multiple) {
|
4329 |
-
return;
|
4330 |
-
}
|
4331 |
-
style_block = {
|
4332 |
-
position: 'absolute',
|
4333 |
-
left: '-1000px',
|
4334 |
-
top: '-1000px',
|
4335 |
-
display: 'none',
|
4336 |
-
whiteSpace: 'pre'
|
4337 |
-
};
|
4338 |
-
styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
|
4339 |
-
for (i = 0, len = styles.length; i < len; i++) {
|
4340 |
-
style = styles[i];
|
4341 |
-
style_block[style] = this.search_field.css(style);
|
4342 |
-
}
|
4343 |
-
div = $('<div />').css(style_block);
|
4344 |
-
div.text(this.get_search_field_value());
|
4345 |
-
$('body').append(div);
|
4346 |
-
width = div.width() + 25;
|
4347 |
-
div.remove();
|
4348 |
-
if (this.container.is(':visible')) {
|
4349 |
-
width = Math.min(this.container.outerWidth() - 10, width);
|
4350 |
-
}
|
4351 |
-
return this.search_field.width(width);
|
4352 |
-
};
|
4353 |
-
|
4354 |
-
Chosen.prototype.trigger_form_field_change = function(extra) {
|
4355 |
-
this.form_field_jq.trigger("input", extra);
|
4356 |
-
return this.form_field_jq.trigger("change", extra);
|
4357 |
-
};
|
4358 |
-
|
4359 |
-
return Chosen;
|
4360 |
-
|
4361 |
-
})(AbstractChosen);
|
4362 |
-
|
4363 |
-
}).call(this);
|
4364 |
-
;/**
|
4365 |
-
*
|
4366 |
-
* jQuery Interdependencies library
|
4367 |
-
* http://miohtama.github.com/jquery-interdependencies/
|
4368 |
-
* Copyright 2012-2013 Mikko Ohtamaa, others
|
4369 |
-
*
|
4370 |
-
* Customized by Codestar
|
4371 |
-
*
|
4372 |
-
*/
|
4373 |
-
(function($) {
|
4374 |
-
|
4375 |
-
'use strict';
|
4376 |
-
|
4377 |
-
function Rule(controller, condition, value) {
|
4378 |
-
this.init(controller, condition, value);
|
4379 |
-
}
|
4380 |
-
|
4381 |
-
$.extend(Rule.prototype, {
|
4382 |
-
|
4383 |
-
init: function(controller, condition, value) {
|
4384 |
-
|
4385 |
-
this.controller = controller;
|
4386 |
-
this.condition = condition;
|
4387 |
-
this.value = value;
|
4388 |
-
this.rules = [];
|
4389 |
-
this.controls = [];
|
4390 |
-
|
4391 |
-
},
|
4392 |
-
|
4393 |
-
evalCondition: function(context, control, condition, val1, val2) {
|
4394 |
-
|
4395 |
-
if( condition == '==' ) {
|
4396 |
-
|
4397 |
-
return this.checkBoolean(val1) == this.checkBoolean(val2);
|
4398 |
-
|
4399 |
-
} else if( condition == '!=' ) {
|
4400 |
-
|
4401 |
-
return this.checkBoolean(val1) != this.checkBoolean(val2);
|
4402 |
-
|
4403 |
-
} else if( condition == '>=' ) {
|
4404 |
-
|
4405 |
-
return Number(val2) >= Number(val1);
|
4406 |
-
|
4407 |
-
} else if( condition == '<=' ) {
|
4408 |
-
|
4409 |
-
return Number(val2) <= Number(val1);
|
4410 |
-
|
4411 |
-
} else if( condition == '>' ) {
|
4412 |
-
|
4413 |
-
return Number(val2) > Number(val1);
|
4414 |
-
|
4415 |
-
} else if( condition == '<' ) {
|
4416 |
-
|
4417 |
-
return Number(val2) < Number(val1);
|
4418 |
-
|
4419 |
-
} else if( condition == '()' ) {
|
4420 |
-
|
4421 |
-
return window[val1](context, control, val2);
|
4422 |
-
|
4423 |
-
} else if( condition == 'any' ) {
|
4424 |
-
|
4425 |
-
if( $.isArray( val2 ) ) {
|
4426 |
-
for (var i = val2.length - 1; i >= 0; i--) {
|
4427 |
-
if( $.inArray( val2[i], val1.split(',') ) !== -1 ) {
|
4428 |
-
return true;
|
4429 |
-
}
|
4430 |
-
}
|
4431 |
-
} else {
|
4432 |
-
if( $.inArray( val2, val1.split(',') ) !== -1 ) {
|
4433 |
-
return true;
|
4434 |
-
}
|
4435 |
-
}
|
4436 |
-
|
4437 |
-
} else if( condition == 'not-any' ) {
|
4438 |
-
|
4439 |
-
if( $.isArray( val2 ) ) {
|
4440 |
-
for (var i = val2.length - 1; i >= 0; i--) {
|
4441 |
-
if( $.inArray( val2[i], val1.split(',') ) == -1 ) {
|
4442 |
-
return true;
|
4443 |
-
}
|
4444 |
-
}
|
4445 |
-
} else {
|
4446 |
-
if( $.inArray( val2, val1.split(',') ) == -1 ) {
|
4447 |
-
return true;
|
4448 |
-
}
|
4449 |
-
}
|
4450 |
-
|
4451 |
-
}
|
4452 |
-
|
4453 |
-
return false;
|
4454 |
-
|
4455 |
-
},
|
4456 |
-
|
4457 |
-
checkBoolean: function(value) {
|
4458 |
-
|
4459 |
-
switch( value ) {
|
4460 |
-
|
4461 |
-
case true:
|
4462 |
-
case 'true':
|
4463 |
-
case 1:
|
4464 |
-
case '1':
|
4465 |
-
value = true;
|
4466 |
-
break;
|
4467 |
-
|
4468 |
-
case null:
|
4469 |
-
case false:
|
4470 |
-
case 'false':
|
4471 |
-
case 0:
|
4472 |
-
case '0':
|
4473 |
-
value = false;
|
4474 |
-
break;
|
4475 |
-
|
4476 |
-
}
|
4477 |
-
|
4478 |
-
return value;
|
4479 |
-
},
|
4480 |
-
|
4481 |
-
checkCondition: function( context ) {
|
4482 |
-
|
4483 |
-
if( !this.condition ) {
|
4484 |
-
return true;
|
4485 |
-
}
|
4486 |
-
|
4487 |
-
var control = context.find(this.controller);
|
4488 |
-
|
4489 |
-
var control_value = this.getControlValue(context, control);
|
4490 |
-
|
4491 |
-
if( control_value === undefined ) {
|
4492 |
-
return false;
|
4493 |
-
}
|
4494 |
-
|
4495 |
-
control_value = this.normalizeValue(control, this.value, control_value);
|
4496 |
-
|
4497 |
-
return this.evalCondition(context, control, this.condition, this.value, control_value);
|
4498 |
-
},
|
4499 |
-
|
4500 |
-
normalizeValue: function( control, baseValue, control_value ) {
|
4501 |
-
|
4502 |
-
if( typeof baseValue == 'number' ) {
|
4503 |
-
return parseFloat( control_value );
|
4504 |
-
}
|
4505 |
-
|
4506 |
-
return control_value;
|
4507 |
-
},
|
4508 |
-
|
4509 |
-
getControlValue: function(context, control) {
|
4510 |
-
|
4511 |
-
if( control.length > 1 && ( control.attr('type') == 'radio' || control.attr('type') == 'checkbox' ) ) {
|
4512 |
-
|
4513 |
-
return control.filter(':checked').map(function() { return this.value; }).get();
|
4514 |
-
|
4515 |
-
} else if ( control.attr('type') == 'checkbox' || control.attr('type') == 'radio' ) {
|
4516 |
-
|
4517 |
-
return control.is(':checked');
|
4518 |
-
|
4519 |
-
}
|
4520 |
-
|
4521 |
-
return control.val();
|
4522 |
-
|
4523 |
-
},
|
4524 |
-
|
4525 |
-
createRule: function(controller, condition, value) {
|
4526 |
-
var rule = new Rule(controller, condition, value);
|
4527 |
-
this.rules.push(rule);
|
4528 |
-
return rule;
|
4529 |
-
},
|
4530 |
-
|
4531 |
-
include: function(input) {
|
4532 |
-
this.controls.push(input);
|
4533 |
-
},
|
4534 |
-
|
4535 |
-
applyRule: function(context, enforced) {
|
4536 |
-
|
4537 |
-
var result;
|
4538 |
-
|
4539 |
-
if( typeof( enforced ) == 'undefined' ) {
|
4540 |
-
result = this.checkCondition(context);
|
4541 |
-
} else {
|
4542 |
-
result = enforced;
|
4543 |
-
}
|
4544 |
-
|
4545 |
-
var controls = $.map(this.controls, function(elem, idx) {
|
4546 |
-
return context.find(elem);
|
4547 |
-
});
|
4548 |
-
|
4549 |
-
if( result ) {
|
4550 |
-
|
4551 |
-
$(controls).each(function() {
|
4552 |
-
$(this).removeClass('csf-depend-on');
|
4553 |
-
});
|
4554 |
-
|
4555 |
-
$(this.rules).each(function() {
|
4556 |
-
this.applyRule(context);
|
4557 |
-
});
|
4558 |
-
|
4559 |
-
} else {
|
4560 |
-
|
4561 |
-
$(controls).each(function() {
|
4562 |
-
$(this).addClass('csf-depend-on');
|
4563 |
-
});
|
4564 |
-
|
4565 |
-
$(this.rules).each(function() {
|
4566 |
-
this.applyRule(context, false);
|
4567 |
-
});
|
4568 |
-
|
4569 |
-
}
|
4570 |
-
}
|
4571 |
-
});
|
4572 |
-
|
4573 |
-
function Ruleset() {
|
4574 |
-
this.rules = [];
|
4575 |
-
};
|
4576 |
-
|
4577 |
-
$.extend(Ruleset.prototype, {
|
4578 |
-
|
4579 |
-
createRule: function(controller, condition, value) {
|
4580 |
-
var rule = new Rule(controller, condition, value);
|
4581 |
-
this.rules.push(rule);
|
4582 |
-
return rule;
|
4583 |
-
},
|
4584 |
-
|
4585 |
-
applyRules: function(context) {
|
4586 |
-
$(this.rules).each(function() {
|
4587 |
-
this.applyRule(context);
|
4588 |
-
});
|
4589 |
-
}
|
4590 |
-
});
|
4591 |
-
|
4592 |
-
$.csf_deps = {
|
4593 |
-
|
4594 |
-
createRuleset: function() {
|
4595 |
-
return new Ruleset();
|
4596 |
-
},
|
4597 |
-
|
4598 |
-
enable: function(selection, ruleset, depends) {
|
4599 |
-
|
4600 |
-
selection.on('change keyup', function(elem) {
|
4601 |
-
|
4602 |
-
var depend_id = elem.target.getAttribute('data-depend-id') || elem.target.getAttribute('data-sub-depend-id');
|
4603 |
-
|
4604 |
-
if( depends.indexOf( depend_id ) !== -1 ) {
|
4605 |
-
ruleset.applyRules(selection);
|
4606 |
-
}
|
4607 |
-
|
4608 |
-
});
|
4609 |
-
|
4610 |
-
ruleset.applyRules(selection);
|
4611 |
-
|
4612 |
-
return true;
|
4613 |
-
}
|
4614 |
-
};
|
4615 |
-
|
4616 |
-
})(jQuery);
|
4617 |
-
;/**
|
4618 |
-
*
|
4619 |
-
* jQuery serializeObject
|
4620 |
-
*
|
4621 |
-
* @copyright 2014, macek <paulmacek@gmail.com>
|
4622 |
-
* @link https://github.com/macek/jquery-serialize-object
|
4623 |
-
* @license BSD
|
4624 |
-
* @version 2.5.0
|
4625 |
-
*
|
4626 |
-
* Customized by Codestar
|
4627 |
-
*
|
4628 |
-
*/
|
4629 |
-
(function(root, factory) {
|
4630 |
-
|
4631 |
-
// AMD
|
4632 |
-
if (typeof define === "function" && define.amd) {
|
4633 |
-
define(["exports", "jquery"], function(exports, $) {
|
4634 |
-
return factory(exports, $);
|
4635 |
-
});
|
4636 |
-
}
|
4637 |
-
|
4638 |
-
// CommonJS
|
4639 |
-
else if (typeof exports !== "undefined") {
|
4640 |
-
var $ = require("jquery");
|
4641 |
-
factory(exports, $);
|
4642 |
-
}
|
4643 |
-
|
4644 |
-
// Browser
|
4645 |
-
else {
|
4646 |
-
factory(root, (root.jQuery || root.Zepto || root.ender || root.$));
|
4647 |
-
}
|
4648 |
-
|
4649 |
-
}(this, function(exports, $) {
|
4650 |
-
|
4651 |
-
//
|
4652 |
-
// Codestar: Added custom patterns for spesific validate
|
4653 |
-
//
|
4654 |
-
var patterns = {
|
4655 |
-
validate: /^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,
|
4656 |
-
key: /[a-zA-Z0-9_-]+|(?=\[\])/g,
|
4657 |
-
named: /^[a-zA-Z0-9_-]+$/,
|
4658 |
-
push: /^$/,
|
4659 |
-
fixed: /^\d+$/
|
4660 |
-
};
|
4661 |
-
|
4662 |
-
function FormSerializer(helper, $form) {
|
4663 |
-
|
4664 |
-
// private variables
|
4665 |
-
var data = {},
|
4666 |
-
pushes = {};
|
4667 |
-
|
4668 |
-
// private API
|
4669 |
-
function build(base, key, value) {
|
4670 |
-
base[key] = value;
|
4671 |
-
return base;
|
4672 |
-
}
|
4673 |
-
|
4674 |
-
function makeObject(root, value) {
|
4675 |
-
|
4676 |
-
var keys = root.match(patterns.key), k;
|
4677 |
-
|
4678 |
-
// nest, nest, ..., nest
|
4679 |
-
while ((k = keys.pop()) !== undefined) {
|
4680 |
-
// foo[]
|
4681 |
-
if (patterns.push.test(k)) {
|
4682 |
-
var idx = incrementPush(root.replace(/\[\]$/, ''));
|
4683 |
-
value = build([], idx, value);
|
4684 |
-
}
|
4685 |
-
|
4686 |
-
// foo[n]
|
4687 |
-
else if (patterns.fixed.test(k)) {
|
4688 |
-
value = build([], k, value);
|
4689 |
-
}
|
4690 |
-
|
4691 |
-
// foo; foo[bar]
|
4692 |
-
else if (patterns.named.test(k)) {
|
4693 |
-
value = build({}, k, value);
|
4694 |
-
}
|
4695 |
-
}
|
4696 |
-
|
4697 |
-
return value;
|
4698 |
-
}
|
4699 |
-
|
4700 |
-
function incrementPush(key) {
|
4701 |
-
if (pushes[key] === undefined) {
|
4702 |
-
pushes[key] = 0;
|
4703 |
-
}
|
4704 |
-
return pushes[key]++;
|
4705 |
-
}
|
4706 |
-
|
4707 |
-
function addPair(pair) {
|
4708 |
-
if (!patterns.validate.test(pair.name)) return this;
|
4709 |
-
var obj = makeObject(pair.name, pair.value);
|
4710 |
-
data = helper.extend(true, data, obj);
|
4711 |
-
return this;
|
4712 |
-
}
|
4713 |
-
|
4714 |
-
function addPairs(pairs) {
|
4715 |
-
if (!helper.isArray(pairs)) {
|
4716 |
-
throw new Error("formSerializer.addPairs expects an Array");
|
4717 |
-
}
|
4718 |
-
for (var i=0, len=pairs.length; i<len; i++) {
|
4719 |
-
this.addPair(pairs[i]);
|
4720 |
-
}
|
4721 |
-
return this;
|
4722 |
-
}
|
4723 |
-
|
4724 |
-
function serialize() {
|
4725 |
-
return data;
|
4726 |
-
}
|
4727 |
-
|
4728 |
-
function serializeJSON() {
|
4729 |
-
return JSON.stringify(serialize());
|
4730 |
-
}
|
4731 |
-
|
4732 |
-
// public API
|
4733 |
-
this.addPair = addPair;
|
4734 |
-
this.addPairs = addPairs;
|
4735 |
-
this.serialize = serialize;
|
4736 |
-
this.serializeJSON = serializeJSON;
|
4737 |
-
}
|
4738 |
-
|
4739 |
-
FormSerializer.patterns = patterns;
|
4740 |
-
|
4741 |
-
FormSerializer.serializeObject = function serializeObject() {
|
4742 |
-
return new FormSerializer($, this).
|
4743 |
-
addPairs(this.serializeArray()).
|
4744 |
-
serialize();
|
4745 |
-
};
|
4746 |
-
|
4747 |
-
FormSerializer.serializeJSON = function serializeJSON() {
|
4748 |
-
return new FormSerializer($, this).
|
4749 |
-
addPairs(this.serializeArray()).
|
4750 |
-
serializeJSON();
|
4751 |
-
};
|
4752 |
-
|
4753 |
-
//
|
4754 |
-
// Codestar: Renamed function names for avoid conflicts
|
4755 |
-
//
|
4756 |
-
|
4757 |
-
if (typeof $.fn !== "undefined") {
|
4758 |
-
$.fn.serializeObjectCSF = FormSerializer.serializeObject;
|
4759 |
-
$.fn.serializeJSONCSF = FormSerializer.serializeJSON;
|
4760 |
-
}
|
4761 |
-
|
4762 |
-
exports.FormSerializer = FormSerializer;
|
4763 |
-
|
4764 |
-
return FormSerializer;
|
4765 |
-
}));
|
1 |
+
/* flatpickr v4.6.9, @license MIT */
|
2 |
+
(function (global, factory) {
|
3 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
4 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
5 |
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.flatpickr = factory());
|
6 |
+
}(this, (function () { 'use strict';
|
7 |
+
|
8 |
+
/*! *****************************************************************************
|
9 |
+
Copyright (c) Microsoft Corporation.
|
10 |
+
|
11 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
12 |
+
purpose with or without fee is hereby granted.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
15 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
16 |
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
17 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
18 |
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
19 |
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
20 |
+
PERFORMANCE OF THIS SOFTWARE.
|
21 |
+
***************************************************************************** */
|
22 |
+
|
23 |
+
var __assign = function() {
|
24 |
+
__assign = Object.assign || function __assign(t) {
|
25 |
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
26 |
+
s = arguments[i];
|
27 |
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
28 |
+
}
|
29 |
+
return t;
|
30 |
+
};
|
31 |
+
return __assign.apply(this, arguments);
|
32 |
+
};
|
33 |
+
|
34 |
+
function __spreadArrays() {
|
35 |
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
36 |
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
37 |
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
38 |
+
r[k] = a[j];
|
39 |
+
return r;
|
40 |
+
}
|
41 |
+
|
42 |
+
var HOOKS = [
|
43 |
+
"onChange",
|
44 |
+
"onClose",
|
45 |
+
"onDayCreate",
|
46 |
+
"onDestroy",
|
47 |
+
"onKeyDown",
|
48 |
+
"onMonthChange",
|
49 |
+
"onOpen",
|
50 |
+
"onParseConfig",
|
51 |
+
"onReady",
|
52 |
+
"onValueUpdate",
|
53 |
+
"onYearChange",
|
54 |
+
"onPreCalendarPosition",
|
55 |
+
];
|
56 |
+
var defaults = {
|
57 |
+
_disable: [],
|
58 |
+
allowInput: false,
|
59 |
+
allowInvalidPreload: false,
|
60 |
+
altFormat: "F j, Y",
|
61 |
+
altInput: false,
|
62 |
+
altInputClass: "form-control input",
|
63 |
+
animate: typeof window === "object" &&
|
64 |
+
window.navigator.userAgent.indexOf("MSIE") === -1,
|
65 |
+
ariaDateFormat: "F j, Y",
|
66 |
+
autoFillDefaultTime: true,
|
67 |
+
clickOpens: true,
|
68 |
+
closeOnSelect: true,
|
69 |
+
conjunction: ", ",
|
70 |
+
dateFormat: "Y-m-d",
|
71 |
+
defaultHour: 12,
|
72 |
+
defaultMinute: 0,
|
73 |
+
defaultSeconds: 0,
|
74 |
+
disable: [],
|
75 |
+
disableMobile: false,
|
76 |
+
enableSeconds: false,
|
77 |
+
enableTime: false,
|
78 |
+
errorHandler: function (err) {
|
79 |
+
return typeof console !== "undefined" && console.warn(err);
|
80 |
+
},
|
81 |
+
getWeek: function (givenDate) {
|
82 |
+
var date = new Date(givenDate.getTime());
|
83 |
+
date.setHours(0, 0, 0, 0);
|
84 |
+
// Thursday in current week decides the year.
|
85 |
+
date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));
|
86 |
+
// January 4 is always in week 1.
|
87 |
+
var week1 = new Date(date.getFullYear(), 0, 4);
|
88 |
+
// Adjust to Thursday in week 1 and count number of weeks from date to week1.
|
89 |
+
return (1 +
|
90 |
+
Math.round(((date.getTime() - week1.getTime()) / 86400000 -
|
91 |
+
3 +
|
92 |
+
((week1.getDay() + 6) % 7)) /
|
93 |
+
7));
|
94 |
+
},
|
95 |
+
hourIncrement: 1,
|
96 |
+
ignoredFocusElements: [],
|
97 |
+
inline: false,
|
98 |
+
locale: "default",
|
99 |
+
minuteIncrement: 5,
|
100 |
+
mode: "single",
|
101 |
+
monthSelectorType: "dropdown",
|
102 |
+
nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
|
103 |
+
noCalendar: false,
|
104 |
+
now: new Date(),
|
105 |
+
onChange: [],
|
106 |
+
onClose: [],
|
107 |
+
onDayCreate: [],
|
108 |
+
onDestroy: [],
|
109 |
+
onKeyDown: [],
|
110 |
+
onMonthChange: [],
|
111 |
+
onOpen: [],
|
112 |
+
onParseConfig: [],
|
113 |
+
onReady: [],
|
114 |
+
onValueUpdate: [],
|
115 |
+
onYearChange: [],
|
116 |
+
onPreCalendarPosition: [],
|
117 |
+
plugins: [],
|
118 |
+
position: "auto",
|
119 |
+
positionElement: undefined,
|
120 |
+
prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
|
121 |
+
shorthandCurrentMonth: false,
|
122 |
+
showMonths: 1,
|
123 |
+
static: false,
|
124 |
+
time_24hr: false,
|
125 |
+
weekNumbers: false,
|
126 |
+
wrap: false,
|
127 |
+
};
|
128 |
+
|
129 |
+
var english = {
|
130 |
+
weekdays: {
|
131 |
+
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
132 |
+
longhand: [
|
133 |
+
"Sunday",
|
134 |
+
"Monday",
|
135 |
+
"Tuesday",
|
136 |
+
"Wednesday",
|
137 |
+
"Thursday",
|
138 |
+
"Friday",
|
139 |
+
"Saturday",
|
140 |
+
],
|
141 |
+
},
|
142 |
+
months: {
|
143 |
+
shorthand: [
|
144 |
+
"Jan",
|
145 |
+
"Feb",
|
146 |
+
"Mar",
|
147 |
+
"Apr",
|
148 |
+
"May",
|
149 |
+
"Jun",
|
150 |
+
"Jul",
|
151 |
+
"Aug",
|
152 |
+
"Sep",
|
153 |
+
"Oct",
|
154 |
+
"Nov",
|
155 |
+
"Dec",
|
156 |
+
],
|
157 |
+
longhand: [
|
158 |
+
"January",
|
159 |
+
"February",
|
160 |
+
"March",
|
161 |
+
"April",
|
162 |
+
"May",
|
163 |
+
"June",
|
164 |
+
"July",
|
165 |
+
"August",
|
166 |
+
"September",
|
167 |
+
"October",
|
168 |
+
"November",
|
169 |
+
"December",
|
170 |
+
],
|
171 |
+
},
|
172 |
+
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
173 |
+
firstDayOfWeek: 0,
|
174 |
+
ordinal: function (nth) {
|
175 |
+
var s = nth % 100;
|
176 |
+
if (s > 3 && s < 21)
|
177 |
+
return "th";
|
178 |
+
switch (s % 10) {
|
179 |
+
case 1:
|
180 |
+
return "st";
|
181 |
+
case 2:
|
182 |
+
return "nd";
|
183 |
+
case 3:
|
184 |
+
return "rd";
|
185 |
+
default:
|
186 |
+
return "th";
|
187 |
+
}
|
188 |
+
},
|
189 |
+
rangeSeparator: " to ",
|
190 |
+
weekAbbreviation: "Wk",
|
191 |
+
scrollTitle: "Scroll to increment",
|
192 |
+
toggleTitle: "Click to toggle",
|
193 |
+
amPM: ["AM", "PM"],
|
194 |
+
yearAriaLabel: "Year",
|
195 |
+
monthAriaLabel: "Month",
|
196 |
+
hourAriaLabel: "Hour",
|
197 |
+
minuteAriaLabel: "Minute",
|
198 |
+
time_24hr: false,
|
199 |
+
};
|
200 |
+
|
201 |
+
var pad = function (number, length) {
|
202 |
+
if (length === void 0) { length = 2; }
|
203 |
+
return ("000" + number).slice(length * -1);
|
204 |
+
};
|
205 |
+
var int = function (bool) { return (bool === true ? 1 : 0); };
|
206 |
+
/* istanbul ignore next */
|
207 |
+
function debounce(fn, wait) {
|
208 |
+
var t;
|
209 |
+
return function () {
|
210 |
+
var _this = this;
|
211 |
+
clearTimeout(t);
|
212 |
+
t = setTimeout(function () { return fn.apply(_this, arguments); }, wait);
|
213 |
+
};
|
214 |
+
}
|
215 |
+
var arrayify = function (obj) {
|
216 |
+
return obj instanceof Array ? obj : [obj];
|
217 |
+
};
|
218 |
+
|
219 |
+
function toggleClass(elem, className, bool) {
|
220 |
+
if (bool === true)
|
221 |
+
return elem.classList.add(className);
|
222 |
+
elem.classList.remove(className);
|
223 |
+
}
|
224 |
+
function createElement(tag, className, content) {
|
225 |
+
var e = window.document.createElement(tag);
|
226 |
+
className = className || "";
|
227 |
+
content = content || "";
|
228 |
+
e.className = className;
|
229 |
+
if (content !== undefined)
|
230 |
+
e.textContent = content;
|
231 |
+
return e;
|
232 |
+
}
|
233 |
+
function clearNode(node) {
|
234 |
+
while (node.firstChild)
|
235 |
+
node.removeChild(node.firstChild);
|
236 |
+
}
|
237 |
+
function findParent(node, condition) {
|
238 |
+
if (condition(node))
|
239 |
+
return node;
|
240 |
+
else if (node.parentNode)
|
241 |
+
return findParent(node.parentNode, condition);
|
242 |
+
return undefined; // nothing found
|
243 |
+
}
|
244 |
+
function createNumberInput(inputClassName, opts) {
|
245 |
+
var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown");
|
246 |
+
if (navigator.userAgent.indexOf("MSIE 9.0") === -1) {
|
247 |
+
numInput.type = "number";
|
248 |
+
}
|
249 |
+
else {
|
250 |
+
numInput.type = "text";
|
251 |
+
numInput.pattern = "\\d*";
|
252 |
+
}
|
253 |
+
if (opts !== undefined)
|
254 |
+
for (var key in opts)
|
255 |
+
numInput.setAttribute(key, opts[key]);
|
256 |
+
wrapper.appendChild(numInput);
|
257 |
+
wrapper.appendChild(arrowUp);
|
258 |
+
wrapper.appendChild(arrowDown);
|
259 |
+
return wrapper;
|
260 |
+
}
|
261 |
+
function getEventTarget(event) {
|
262 |
+
try {
|
263 |
+
if (typeof event.composedPath === "function") {
|
264 |
+
var path = event.composedPath();
|
265 |
+
return path[0];
|
266 |
+
}
|
267 |
+
return event.target;
|
268 |
+
}
|
269 |
+
catch (error) {
|
270 |
+
return event.target;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
var doNothing = function () { return undefined; };
|
275 |
+
var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; };
|
276 |
+
var revFormat = {
|
277 |
+
D: doNothing,
|
278 |
+
F: function (dateObj, monthName, locale) {
|
279 |
+
dateObj.setMonth(locale.months.longhand.indexOf(monthName));
|
280 |
+
},
|
281 |
+
G: function (dateObj, hour) {
|
282 |
+
dateObj.setHours(parseFloat(hour));
|
283 |
+
},
|
284 |
+
H: function (dateObj, hour) {
|
285 |
+
dateObj.setHours(parseFloat(hour));
|
286 |
+
},
|
287 |
+
J: function (dateObj, day) {
|
288 |
+
dateObj.setDate(parseFloat(day));
|
289 |
+
},
|
290 |
+
K: function (dateObj, amPM, locale) {
|
291 |
+
dateObj.setHours((dateObj.getHours() % 12) +
|
292 |
+
12 * int(new RegExp(locale.amPM[1], "i").test(amPM)));
|
293 |
+
},
|
294 |
+
M: function (dateObj, shortMonth, locale) {
|
295 |
+
dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));
|
296 |
+
},
|
297 |
+
S: function (dateObj, seconds) {
|
298 |
+
dateObj.setSeconds(parseFloat(seconds));
|
299 |
+
},
|
300 |
+
U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },
|
301 |
+
W: function (dateObj, weekNum, locale) {
|
302 |
+
var weekNumber = parseInt(weekNum);
|
303 |
+
var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);
|
304 |
+
date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);
|
305 |
+
return date;
|
306 |
+
},
|
307 |
+
Y: function (dateObj, year) {
|
308 |
+
dateObj.setFullYear(parseFloat(year));
|
309 |
+
},
|
310 |
+
Z: function (_, ISODate) { return new Date(ISODate); },
|
311 |
+
d: function (dateObj, day) {
|
312 |
+
dateObj.setDate(parseFloat(day));
|
313 |
+
},
|
314 |
+
h: function (dateObj, hour) {
|
315 |
+
dateObj.setHours(parseFloat(hour));
|
316 |
+
},
|
317 |
+
i: function (dateObj, minutes) {
|
318 |
+
dateObj.setMinutes(parseFloat(minutes));
|
319 |
+
},
|
320 |
+
j: function (dateObj, day) {
|
321 |
+
dateObj.setDate(parseFloat(day));
|
322 |
+
},
|
323 |
+
l: doNothing,
|
324 |
+
m: function (dateObj, month) {
|
325 |
+
dateObj.setMonth(parseFloat(month) - 1);
|
326 |
+
},
|
327 |
+
n: function (dateObj, month) {
|
328 |
+
dateObj.setMonth(parseFloat(month) - 1);
|
329 |
+
},
|
330 |
+
s: function (dateObj, seconds) {
|
331 |
+
dateObj.setSeconds(parseFloat(seconds));
|
332 |
+
},
|
333 |
+
u: function (_, unixMillSeconds) {
|
334 |
+
return new Date(parseFloat(unixMillSeconds));
|
335 |
+
},
|
336 |
+
w: doNothing,
|
337 |
+
y: function (dateObj, year) {
|
338 |
+
dateObj.setFullYear(2000 + parseFloat(year));
|
339 |
+
},
|
340 |
+
};
|
341 |
+
var tokenRegex = {
|
342 |
+
D: "(\\w+)",
|
343 |
+
F: "(\\w+)",
|
344 |
+
G: "(\\d\\d|\\d)",
|
345 |
+
H: "(\\d\\d|\\d)",
|
346 |
+
J: "(\\d\\d|\\d)\\w+",
|
347 |
+
K: "",
|
348 |
+
M: "(\\w+)",
|
349 |
+
S: "(\\d\\d|\\d)",
|
350 |
+
U: "(.+)",
|
351 |
+
W: "(\\d\\d|\\d)",
|
352 |
+
Y: "(\\d{4})",
|
353 |
+
Z: "(.+)",
|
354 |
+
d: "(\\d\\d|\\d)",
|
355 |
+
h: "(\\d\\d|\\d)",
|
356 |
+
i: "(\\d\\d|\\d)",
|
357 |
+
j: "(\\d\\d|\\d)",
|
358 |
+
l: "(\\w+)",
|
359 |
+
m: "(\\d\\d|\\d)",
|
360 |
+
n: "(\\d\\d|\\d)",
|
361 |
+
s: "(\\d\\d|\\d)",
|
362 |
+
u: "(.+)",
|
363 |
+
w: "(\\d\\d|\\d)",
|
364 |
+
y: "(\\d{2})",
|
365 |
+
};
|
366 |
+
var formats = {
|
367 |
+
// get the date in UTC
|
368 |
+
Z: function (date) { return date.toISOString(); },
|
369 |
+
// weekday name, short, e.g. Thu
|
370 |
+
D: function (date, locale, options) {
|
371 |
+
return locale.weekdays.shorthand[formats.w(date, locale, options)];
|
372 |
+
},
|
373 |
+
// full month name e.g. January
|
374 |
+
F: function (date, locale, options) {
|
375 |
+
return monthToStr(formats.n(date, locale, options) - 1, false, locale);
|
376 |
+
},
|
377 |
+
// padded hour 1-12
|
378 |
+
G: function (date, locale, options) {
|
379 |
+
return pad(formats.h(date, locale, options));
|
380 |
+
},
|
381 |
+
// hours with leading zero e.g. 03
|
382 |
+
H: function (date) { return pad(date.getHours()); },
|
383 |
+
// day (1-30) with ordinal suffix e.g. 1st, 2nd
|
384 |
+
J: function (date, locale) {
|
385 |
+
return locale.ordinal !== undefined
|
386 |
+
? date.getDate() + locale.ordinal(date.getDate())
|
387 |
+
: date.getDate();
|
388 |
+
},
|
389 |
+
// AM/PM
|
390 |
+
K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },
|
391 |
+
// shorthand month e.g. Jan, Sep, Oct, etc
|
392 |
+
M: function (date, locale) {
|
393 |
+
return monthToStr(date.getMonth(), true, locale);
|
394 |
+
},
|
395 |
+
// seconds 00-59
|
396 |
+
S: function (date) { return pad(date.getSeconds()); },
|
397 |
+
// unix timestamp
|
398 |
+
U: function (date) { return date.getTime() / 1000; },
|
399 |
+
W: function (date, _, options) {
|
400 |
+
return options.getWeek(date);
|
401 |
+
},
|
402 |
+
// full year e.g. 2016, padded (0001-9999)
|
403 |
+
Y: function (date) { return pad(date.getFullYear(), 4); },
|
404 |
+
// day in month, padded (01-30)
|
405 |
+
d: function (date) { return pad(date.getDate()); },
|
406 |
+
// hour from 1-12 (am/pm)
|
407 |
+
h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },
|
408 |
+
// minutes, padded with leading zero e.g. 09
|
409 |
+
i: function (date) { return pad(date.getMinutes()); },
|
410 |
+
// day in month (1-30)
|
411 |
+
j: function (date) { return date.getDate(); },
|
412 |
+
// weekday name, full, e.g. Thursday
|
413 |
+
l: function (date, locale) {
|
414 |
+
return locale.weekdays.longhand[date.getDay()];
|
415 |
+
},
|
416 |
+
// padded month number (01-12)
|
417 |
+
m: function (date) { return pad(date.getMonth() + 1); },
|
418 |
+
// the month number (1-12)
|
419 |
+
n: function (date) { return date.getMonth() + 1; },
|
420 |
+
// seconds 0-59
|
421 |
+
s: function (date) { return date.getSeconds(); },
|
422 |
+
// Unix Milliseconds
|
423 |
+
u: function (date) { return date.getTime(); },
|
424 |
+
// number of the day of the week
|
425 |
+
w: function (date) { return date.getDay(); },
|
426 |
+
// last two digits of year e.g. 16 for 2016
|
427 |
+
y: function (date) { return String(date.getFullYear()).substring(2); },
|
428 |
+
};
|
429 |
+
|
430 |
+
var createDateFormatter = function (_a) {
|
431 |
+
var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;
|
432 |
+
return function (dateObj, frmt, overrideLocale) {
|
433 |
+
var locale = overrideLocale || l10n;
|
434 |
+
if (config.formatDate !== undefined && !isMobile) {
|
435 |
+
return config.formatDate(dateObj, frmt, locale);
|
436 |
+
}
|
437 |
+
return frmt
|
438 |
+
.split("")
|
439 |
+
.map(function (c, i, arr) {
|
440 |
+
return formats[c] && arr[i - 1] !== "\\"
|
441 |
+
? formats[c](dateObj, locale, config)
|
442 |
+
: c !== "\\"
|
443 |
+
? c
|
444 |
+
: "";
|
445 |
+
})
|
446 |
+
.join("");
|
447 |
+
};
|
448 |
+
};
|
449 |
+
var createDateParser = function (_a) {
|
450 |
+
var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;
|
451 |
+
return function (date, givenFormat, timeless, customLocale) {
|
452 |
+
if (date !== 0 && !date)
|
453 |
+
return undefined;
|
454 |
+
var locale = customLocale || l10n;
|
455 |
+
var parsedDate;
|
456 |
+
var dateOrig = date;
|
457 |
+
if (date instanceof Date)
|
458 |
+
parsedDate = new Date(date.getTime());
|
459 |
+
else if (typeof date !== "string" &&
|
460 |
+
date.toFixed !== undefined // timestamp
|
461 |
+
)
|
462 |
+
// create a copy
|
463 |
+
parsedDate = new Date(date);
|
464 |
+
else if (typeof date === "string") {
|
465 |
+
// date string
|
466 |
+
var format = givenFormat || (config || defaults).dateFormat;
|
467 |
+
var datestr = String(date).trim();
|
468 |
+
if (datestr === "today") {
|
469 |
+
parsedDate = new Date();
|
470 |
+
timeless = true;
|
471 |
+
}
|
472 |
+
else if (/Z$/.test(datestr) ||
|
473 |
+
/GMT$/.test(datestr) // datestrings w/ timezone
|
474 |
+
)
|
475 |
+
parsedDate = new Date(date);
|
476 |
+
else if (config && config.parseDate)
|
477 |
+
parsedDate = config.parseDate(date, format);
|
478 |
+
else {
|
479 |
+
parsedDate =
|
480 |
+
!config || !config.noCalendar
|
481 |
+
? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)
|
482 |
+
: new Date(new Date().setHours(0, 0, 0, 0));
|
483 |
+
var matched = void 0, ops = [];
|
484 |
+
for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) {
|
485 |
+
var token_1 = format[i];
|
486 |
+
var isBackSlash = token_1 === "\\";
|
487 |
+
var escaped = format[i - 1] === "\\" || isBackSlash;
|
488 |
+
if (tokenRegex[token_1] && !escaped) {
|
489 |
+
regexStr += tokenRegex[token_1];
|
490 |
+
var match = new RegExp(regexStr).exec(date);
|
491 |
+
if (match && (matched = true)) {
|
492 |
+
ops[token_1 !== "Y" ? "push" : "unshift"]({
|
493 |
+
fn: revFormat[token_1],
|
494 |
+
val: match[++matchIndex],
|
495 |
+
});
|
496 |
+
}
|
497 |
+
}
|
498 |
+
else if (!isBackSlash)
|
499 |
+
regexStr += "."; // don't really care
|
500 |
+
ops.forEach(function (_a) {
|
501 |
+
var fn = _a.fn, val = _a.val;
|
502 |
+
return (parsedDate = fn(parsedDate, val, locale) || parsedDate);
|
503 |
+
});
|
504 |
+
}
|
505 |
+
parsedDate = matched ? parsedDate : undefined;
|
506 |
+
}
|
507 |
+
}
|
508 |
+
/* istanbul ignore next */
|
509 |
+
if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {
|
510 |
+
config.errorHandler(new Error("Invalid date provided: " + dateOrig));
|
511 |
+
return undefined;
|
512 |
+
}
|
513 |
+
if (timeless === true)
|
514 |
+
parsedDate.setHours(0, 0, 0, 0);
|
515 |
+
return parsedDate;
|
516 |
+
};
|
517 |
+
};
|
518 |
+
/**
|
519 |
+
* Compute the difference in dates, measured in ms
|
520 |
+
*/
|
521 |
+
function compareDates(date1, date2, timeless) {
|
522 |
+
if (timeless === void 0) { timeless = true; }
|
523 |
+
if (timeless !== false) {
|
524 |
+
return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -
|
525 |
+
new Date(date2.getTime()).setHours(0, 0, 0, 0));
|
526 |
+
}
|
527 |
+
return date1.getTime() - date2.getTime();
|
528 |
+
}
|
529 |
+
var isBetween = function (ts, ts1, ts2) {
|
530 |
+
return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);
|
531 |
+
};
|
532 |
+
var duration = {
|
533 |
+
DAY: 86400000,
|
534 |
+
};
|
535 |
+
function getDefaultHours(config) {
|
536 |
+
var hours = config.defaultHour;
|
537 |
+
var minutes = config.defaultMinute;
|
538 |
+
var seconds = config.defaultSeconds;
|
539 |
+
if (config.minDate !== undefined) {
|
540 |
+
var minHour = config.minDate.getHours();
|
541 |
+
var minMinutes = config.minDate.getMinutes();
|
542 |
+
var minSeconds = config.minDate.getSeconds();
|
543 |
+
if (hours < minHour) {
|
544 |
+
hours = minHour;
|
545 |
+
}
|
546 |
+
if (hours === minHour && minutes < minMinutes) {
|
547 |
+
minutes = minMinutes;
|
548 |
+
}
|
549 |
+
if (hours === minHour && minutes === minMinutes && seconds < minSeconds)
|
550 |
+
seconds = config.minDate.getSeconds();
|
551 |
+
}
|
552 |
+
if (config.maxDate !== undefined) {
|
553 |
+
var maxHr = config.maxDate.getHours();
|
554 |
+
var maxMinutes = config.maxDate.getMinutes();
|
555 |
+
hours = Math.min(hours, maxHr);
|
556 |
+
if (hours === maxHr)
|
557 |
+
minutes = Math.min(maxMinutes, minutes);
|
558 |
+
if (hours === maxHr && minutes === maxMinutes)
|
559 |
+
seconds = config.maxDate.getSeconds();
|
560 |
+
}
|
561 |
+
return { hours: hours, minutes: minutes, seconds: seconds };
|
562 |
+
}
|
563 |
+
|
564 |
+
if (typeof Object.assign !== "function") {
|
565 |
+
Object.assign = function (target) {
|
566 |
+
var args = [];
|
567 |
+
for (var _i = 1; _i < arguments.length; _i++) {
|
568 |
+
args[_i - 1] = arguments[_i];
|
569 |
+
}
|
570 |
+
if (!target) {
|
571 |
+
throw TypeError("Cannot convert undefined or null to object");
|
572 |
+
}
|
573 |
+
var _loop_1 = function (source) {
|
574 |
+
if (source) {
|
575 |
+
Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });
|
576 |
+
}
|
577 |
+
};
|
578 |
+
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
579 |
+
var source = args_1[_a];
|
580 |
+
_loop_1(source);
|
581 |
+
}
|
582 |
+
return target;
|
583 |
+
};
|
584 |
+
}
|
585 |
+
|
586 |
+
var DEBOUNCED_CHANGE_MS = 300;
|
587 |
+
function FlatpickrInstance(element, instanceConfig) {
|
588 |
+
var self = {
|
589 |
+
config: __assign(__assign({}, defaults), flatpickr.defaultConfig),
|
590 |
+
l10n: english,
|
591 |
+
};
|
592 |
+
self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });
|
593 |
+
self._handlers = [];
|
594 |
+
self.pluginElements = [];
|
595 |
+
self.loadedPlugins = [];
|
596 |
+
self._bind = bind;
|
597 |
+
self._setHoursFromDate = setHoursFromDate;
|
598 |
+
self._positionCalendar = positionCalendar;
|
599 |
+
self.changeMonth = changeMonth;
|
600 |
+
self.changeYear = changeYear;
|
601 |
+
self.clear = clear;
|
602 |
+
self.close = close;
|
603 |
+
self._createElement = createElement;
|
604 |
+
self.destroy = destroy;
|
605 |
+
self.isEnabled = isEnabled;
|
606 |
+
self.jumpToDate = jumpToDate;
|
607 |
+
self.open = open;
|
608 |
+
self.redraw = redraw;
|
609 |
+
self.set = set;
|
610 |
+
self.setDate = setDate;
|
611 |
+
self.toggle = toggle;
|
612 |
+
function setupHelperFunctions() {
|
613 |
+
self.utils = {
|
614 |
+
getDaysInMonth: function (month, yr) {
|
615 |
+
if (month === void 0) { month = self.currentMonth; }
|
616 |
+
if (yr === void 0) { yr = self.currentYear; }
|
617 |
+
if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))
|
618 |
+
return 29;
|
619 |
+
return self.l10n.daysInMonth[month];
|
620 |
+
},
|
621 |
+
};
|
622 |
+
}
|
623 |
+
function init() {
|
624 |
+
self.element = self.input = element;
|
625 |
+
self.isOpen = false;
|
626 |
+
parseConfig();
|
627 |
+
setupLocale();
|
628 |
+
setupInputs();
|
629 |
+
setupDates();
|
630 |
+
setupHelperFunctions();
|
631 |
+
if (!self.isMobile)
|
632 |
+
build();
|
633 |
+
bindEvents();
|
634 |
+
if (self.selectedDates.length || self.config.noCalendar) {
|
635 |
+
if (self.config.enableTime) {
|
636 |
+
setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);
|
637 |
+
}
|
638 |
+
updateValue(false);
|
639 |
+
}
|
640 |
+
setCalendarWidth();
|
641 |
+
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
642 |
+
/* TODO: investigate this further
|
643 |
+
|
644 |
+
Currently, there is weird positioning behavior in safari causing pages
|
645 |
+
to scroll up. https://github.com/chmln/flatpickr/issues/563
|
646 |
+
|
647 |
+
However, most browsers are not Safari and positioning is expensive when used
|
648 |
+
in scale. https://github.com/chmln/flatpickr/issues/1096
|
649 |
+
*/
|
650 |
+
if (!self.isMobile && isSafari) {
|
651 |
+
positionCalendar();
|
652 |
+
}
|
653 |
+
triggerEvent("onReady");
|
654 |
+
}
|
655 |
+
function bindToInstance(fn) {
|
656 |
+
return fn.bind(self);
|
657 |
+
}
|
658 |
+
function setCalendarWidth() {
|
659 |
+
var config = self.config;
|
660 |
+
if (config.weekNumbers === false && config.showMonths === 1) {
|
661 |
+
return;
|
662 |
+
}
|
663 |
+
else if (config.noCalendar !== true) {
|
664 |
+
window.requestAnimationFrame(function () {
|
665 |
+
if (self.calendarContainer !== undefined) {
|
666 |
+
self.calendarContainer.style.visibility = "hidden";
|
667 |
+
self.calendarContainer.style.display = "block";
|
668 |
+
}
|
669 |
+
if (self.daysContainer !== undefined) {
|
670 |
+
var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;
|
671 |
+
self.daysContainer.style.width = daysWidth + "px";
|
672 |
+
self.calendarContainer.style.width =
|
673 |
+
daysWidth +
|
674 |
+
(self.weekWrapper !== undefined
|
675 |
+
? self.weekWrapper.offsetWidth
|
676 |
+
: 0) +
|
677 |
+
"px";
|
678 |
+
self.calendarContainer.style.removeProperty("visibility");
|
679 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|