diff --git a/footer.php b/footer.php
index adcde4c..9fc8d3d 100644
--- a/footer.php
+++ b/footer.php
@@ -8,9 +8,9 @@
-
-
+
+
-
+
diff --git a/functions.php b/functions.php
index 13ac446..27d2f77 100644
--- a/functions.php
+++ b/functions.php
@@ -7,16 +7,6 @@
// http://codex.wordpress.org/Child_Themes
-/* ------------------------------------------------------------------------- *
- * OptionTree framework integration: Use in theme mode
-/* ------------------------------------------------------------------------- */
-
- add_filter( 'ot_show_pages', '__return_false' );
- add_filter( 'ot_show_new_layout', '__return_false' );
- add_filter( 'ot_theme_mode', '__return_true' );
- include( get_template_directory() . '/option-tree/ot-loader.php' );
-
-
/* ------------------------------------------------------------------------- *
* Load theme files
/* ------------------------------------------------------------------------- */
@@ -28,6 +18,7 @@ if ( ! function_exists( 'alx_load' ) ) {
load_theme_textdomain( 'blogrow', get_template_directory().'/languages' );
// Load theme options and meta boxes
+ include( get_template_directory() . '/functions/kirki/kirki.php' );
include( get_template_directory() . '/functions/theme-options.php' );
include( get_template_directory() . '/functions/meta-boxes.php' );
@@ -35,9 +26,6 @@ if ( ! function_exists( 'alx_load' ) ) {
include( get_template_directory() . '/functions/widgets/alx-tabs.php' );
include( get_template_directory() . '/functions/widgets/alx-video.php' );
include( get_template_directory() . '/functions/widgets/alx-posts.php' );
-
- // Load custom shortcodes
- include( get_template_directory() . '/functions/shortcodes.php' );
// Load dynamic styles
include( get_template_directory() . '/functions/dynamic-styles.php' );
@@ -112,10 +100,10 @@ if ( ! function_exists( 'alx_sidebars' ) ) {
function alx_sidebars() {
register_sidebar(array( 'name' => 'Primary','id' => 'primary','description' => "Normal full width sidebar", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' '));
- if ( ot_get_option('footer-widgets') >= '1' ) { register_sidebar(array( 'name' => 'Footer 1','id' => 'footer-1', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
- if ( ot_get_option('footer-widgets') >= '2' ) { register_sidebar(array( 'name' => 'Footer 2','id' => 'footer-2', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
- if ( ot_get_option('footer-widgets') >= '3' ) { register_sidebar(array( 'name' => 'Footer 3','id' => 'footer-3', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
- if ( ot_get_option('footer-widgets') >= '4' ) { register_sidebar(array( 'name' => 'Footer 4','id' => 'footer-4', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
+ if ( get_theme_mod('footer-widgets') >= '1' ) { register_sidebar(array( 'name' => 'Footer 1','id' => 'footer-1', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
+ if ( get_theme_mod('footer-widgets') >= '2' ) { register_sidebar(array( 'name' => 'Footer 2','id' => 'footer-2', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
+ if ( get_theme_mod('footer-widgets') >= '3' ) { register_sidebar(array( 'name' => 'Footer 3','id' => 'footer-3', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
+ if ( get_theme_mod('footer-widgets') >= '4' ) { register_sidebar(array( 'name' => 'Footer 4','id' => 'footer-4', 'description' => "Widgetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '
','after_title' => ' ')); }
}
}
@@ -145,8 +133,8 @@ if ( ! function_exists( 'alx_styles' ) ) {
function alx_styles() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
- if ( ot_get_option('responsive') != 'off' ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); }
- if ( ot_get_option('custom') == 'on' ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
+ if ( get_theme_mod('responsive','on') =='on' ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); }
+ if ( get_theme_mod('custom','off') == 'on' ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome.min.css' );
}
@@ -159,9 +147,9 @@ add_action( 'wp_enqueue_scripts', 'alx_styles' );
if ( ! function_exists( 'alx_custom_sidebars' ) ) {
function alx_custom_sidebars() {
- if ( !ot_get_option('sidebar-areas') =='' ) {
+ if ( !get_theme_mod('sidebar-areas') =='' ) {
- $sidebars = ot_get_option('sidebar-areas', array());
+ $sidebars = get_theme_mod('sidebar-areas', array());
if ( !empty( $sidebars ) ) {
foreach( $sidebars as $sidebar ) {
@@ -200,21 +188,21 @@ if ( ! function_exists( 'alx_layout_class' ) ) {
// Get if set and not set to inherit
if ( isset($meta) && !empty($meta) && $meta != 'inherit' ) { $layout = $meta; }
// Else check for page-global / single-global
- elseif ( is_single() && ( ot_get_option('layout-single') !='inherit' ) ) $layout = ot_get_option('layout-single',''.$default.'');
- elseif ( is_page() && ( ot_get_option('layout-page') !='inherit' ) ) $layout = ot_get_option('layout-page',''.$default.'');
+ elseif ( is_single() && ( get_theme_mod('layout-single') !='inherit' ) ) $layout = get_theme_mod('layout-single',''.$default.'');
+ elseif ( is_page() && ( get_theme_mod('layout-page') !='inherit' ) ) $layout = get_theme_mod('layout-page',''.$default.'');
// Else get global option
- else $layout = ot_get_option('layout-global',''.$default.'');
+ else $layout = get_theme_mod('layout-global',''.$default.'');
}
// Set layout based on page
- elseif ( is_home() && ( ot_get_option('layout-home') !='inherit' ) ) $layout = ot_get_option('layout-home',''.$default.'');
- elseif ( is_category() && ( ot_get_option('layout-archive-category') !='inherit' ) ) $layout = ot_get_option('layout-archive-category',''.$default.'');
- elseif ( is_archive() && ( ot_get_option('layout-archive') !='inherit' ) ) $layout = ot_get_option('layout-archive',''.$default.'');
- elseif ( is_search() && ( ot_get_option('layout-search') !='inherit' ) ) $layout = ot_get_option('layout-search',''.$default.'');
- elseif ( is_404() && ( ot_get_option('layout-404') !='inherit' ) ) $layout = ot_get_option('layout-404',''.$default.'');
+ elseif ( is_home() && ( get_theme_mod('layout-home') !='inherit' ) ) $layout = get_theme_mod('layout-home',''.$default.'');
+ elseif ( is_category() && ( get_theme_mod('layout-archive-category') !='inherit' ) ) $layout = get_theme_mod('layout-archive-category',''.$default.'');
+ elseif ( is_archive() && ( get_theme_mod('layout-archive') !='inherit' ) ) $layout = get_theme_mod('layout-archive',''.$default.'');
+ elseif ( is_search() && ( get_theme_mod('layout-search') !='inherit' ) ) $layout = get_theme_mod('layout-search',''.$default.'');
+ elseif ( is_404() && ( get_theme_mod('layout-404') !='inherit' ) ) $layout = get_theme_mod('layout-404',''.$default.'');
// Global option
- else $layout = ot_get_option('layout-global',''.$default.'');
+ else $layout = get_theme_mod('layout-global',''.$default.'');
// Return layout class
return $layout;
@@ -232,13 +220,13 @@ if ( ! function_exists( 'alx_sidebar_primary' ) ) {
$sidebar = 'primary';
// Set sidebar based on page
- if ( is_home() && ot_get_option('s1-home') ) $sidebar = ot_get_option('s1-home');
- if ( is_single() && ot_get_option('s1-single') ) $sidebar = ot_get_option('s1-single');
- if ( is_archive() && ot_get_option('s1-archive') ) $sidebar = ot_get_option('s1-archive');
- if ( is_category() && ot_get_option('s1-archive-category') ) $sidebar = ot_get_option('s1-archive-category');
- if ( is_search() && ot_get_option('s1-search') ) $sidebar = ot_get_option('s1-search');
- if ( is_404() && ot_get_option('s1-404') ) $sidebar = ot_get_option('s1-404');
- if ( is_page() && ot_get_option('s1-page') ) $sidebar = ot_get_option('s1-page');
+ if ( is_home() && get_theme_mod('s1-home') ) $sidebar = get_theme_mod('s1-home');
+ if ( is_single() && get_theme_mod('s1-single') ) $sidebar = get_theme_mod('s1-single');
+ if ( is_archive() && get_theme_mod('s1-archive') ) $sidebar = get_theme_mod('s1-archive');
+ if ( is_category() && get_theme_mod('s1-archive-category') ) $sidebar = get_theme_mod('s1-archive-category');
+ if ( is_search() && get_theme_mod('s1-search') ) $sidebar = get_theme_mod('s1-search');
+ if ( is_404() && get_theme_mod('s1-404') ) $sidebar = get_theme_mod('s1-404');
+ if ( is_page() && get_theme_mod('s1-page') ) $sidebar = get_theme_mod('s1-page');
// Check for page/post specific sidebar
if ( is_page() || is_single() ) {
@@ -266,13 +254,13 @@ if ( ! function_exists( 'alx_sidebar_secondary' ) ) {
$sidebar = 'secondary';
// Set sidebar based on page
- if ( is_home() && ot_get_option('s2-home') ) $sidebar = ot_get_option('s2-home');
- if ( is_single() && ot_get_option('s2-single') ) $sidebar = ot_get_option('s2-single');
- if ( is_archive() && ot_get_option('s2-archive') ) $sidebar = ot_get_option('s2-archive');
- if ( is_category() && ot_get_option('s2-archive-category') ) $sidebar = ot_get_option('s2-archive-category');
- if ( is_search() && ot_get_option('s2-search') ) $sidebar = ot_get_option('s2-search');
- if ( is_404() && ot_get_option('s2-404') ) $sidebar = ot_get_option('s2-404');
- if ( is_page() && ot_get_option('s2-page') ) $sidebar = ot_get_option('s2-page');
+ if ( is_home() && get_theme_mod('s2-home') ) $sidebar = get_theme_mod('s2-home');
+ if ( is_single() && get_theme_mod('s2-single') ) $sidebar = get_theme_mod('s2-single');
+ if ( is_archive() && get_theme_mod('s2-archive') ) $sidebar = get_theme_mod('s2-archive');
+ if ( is_category() && get_theme_mod('s2-archive-category') ) $sidebar = get_theme_mod('s2-archive-category');
+ if ( is_search() && get_theme_mod('s2-search') ) $sidebar = get_theme_mod('s2-search');
+ if ( is_404() && get_theme_mod('s2-404') ) $sidebar = get_theme_mod('s2-404');
+ if ( is_page() && get_theme_mod('s2-page') ) $sidebar = get_theme_mod('s2-page');
// Check for page/post specific sidebar
if ( is_page() || is_single() ) {
@@ -296,15 +284,15 @@ if ( ! function_exists( 'alx_sidebar_secondary' ) ) {
if ( ! function_exists( 'alx_social_links' ) ) {
function alx_social_links() {
- if ( !ot_get_option('social-links') =='' ) {
- $links = ot_get_option('social-links', array());
+ if ( !get_theme_mod('social-links') =='' ) {
+ $links = get_theme_mod('social-links', array());
if ( !empty( $links ) ) {
echo '
';
foreach( $links as $item ) {
// Build each separate html-section only if set
- if ( isset($item['title']) && !empty($item['title']) )
- { $title = 'title="' .esc_attr( $item['title'] ). '"'; } else $title = '';
+ if ( isset($item['social-title']) && !empty($item['social-title']) )
+ { $title = 'title="' .esc_attr( $item['social-title'] ). '"'; } else $title = '';
if ( isset($item['social-link']) && !empty($item['social-link']) )
{ $link = 'href="' .esc_attr( $item['social-link'] ). '"'; } else $link = '';
if ( isset($item['social-target']) && !empty($item['social-target']) )
@@ -315,7 +303,7 @@ if ( ! function_exists( 'alx_social_links' ) ) {
{ $color = 'style="color: ' .$item['social-color']. ';"'; } else $color = '';
// Put them together
- if ( isset($item['title']) && !empty($item['title']) && isset($item['social-icon']) && !empty($item['social-icon']) && ($item['social-icon'] !='fa-') ) {
+ if ( isset($item['social-title']) && !empty($item['social-title']) && isset($item['social-icon']) && !empty($item['social-icon']) && ($item['social-icon'] !='fa-') ) {
echo ' ';
}
}
@@ -334,8 +322,8 @@ if ( ! function_exists( 'alx_site_title' ) ) {
function alx_site_title() {
// Text or image?
- if ( ot_get_option('custom-logo') ) {
- $logo = ' ';
+ if ( get_theme_mod('custom-logo') ) {
+ $logo = ' ';
} else {
$logo = get_bloginfo('name');
}
@@ -380,8 +368,8 @@ if ( ! function_exists( 'alx_blog_title' ) ) {
function alx_blog_title() {
global $post;
- $heading = esc_attr( ot_get_option('blog-heading') );
- $subheading = esc_attr( ot_get_option('blog-subheading') );
+ $heading = esc_attr( get_theme_mod('blog-heading') );
+ $subheading = esc_attr( get_theme_mod('blog-subheading') );
if($heading) {
$title = $heading;
} else {
@@ -416,7 +404,7 @@ if ( ! function_exists( 'alx_related_posts' ) ) {
'posts_per_page' => 3
);
// Related by categories
- if ( ot_get_option('related-posts') == 'categories' ) {
+ if ( get_theme_mod('related-posts') == 'categories' ) {
$cats = get_post_meta($post->ID, 'related-cat', true);
@@ -428,7 +416,7 @@ if ( ! function_exists( 'alx_related_posts' ) ) {
}
}
// Related by tags
- if ( ot_get_option('related-posts') == 'tags' ) {
+ if ( get_theme_mod('related-posts') == 'tags' ) {
$tags = get_post_meta($post->ID, 'related-tag', true);
@@ -478,8 +466,8 @@ if ( ! function_exists( 'alx_get_featured_post_ids' ) ) {
function alx_get_featured_post_ids() {
$args = array(
- 'category' => ot_get_option('featured-category'),
- 'numberposts' => ot_get_option('featured-posts-count')
+ 'category' => get_theme_mod('featured-category'),
+ 'numberposts' => get_theme_mod('featured-posts-count')
);
$posts = get_posts($args);
if ( !$posts ) return false;
@@ -520,12 +508,10 @@ if ( ! function_exists( 'alx_body_class' ) ) {
function alx_body_class( $classes ) {
$classes[] = alx_layout_class();
- if ( ot_get_option( 'boxed' ) != 'on' ) { $classes[] = 'full-width'; }
- if ( ot_get_option( 'boxed' ) == 'on' ) { $classes[] = 'boxed'; }
+ if ( get_theme_mod( 'boxed','off' ) != 'on' ) { $classes[] = 'full-width'; }
+ if ( get_theme_mod( 'boxed','off' ) == 'on' ) { $classes[] = 'boxed'; }
if ( has_nav_menu('topbar') ) { $classes[] = 'topbar-enabled'; }
- if ( ot_get_option( 'mobile-sidebar-hide' ) == 's1' ) { $classes[] = 'mobile-sidebar-hide-s1'; }
- if ( ot_get_option( 'mobile-sidebar-hide' ) == 's2' ) { $classes[] = 'mobile-sidebar-hide-s2'; }
- if ( ot_get_option( 'mobile-sidebar-hide' ) == 's1-s2' ) { $classes[] = 'mobile-sidebar-hide'; }
+ if ( get_theme_mod( 'mobile-sidebar-hide','on' ) != 'on' ) { $classes[] = 'mobile-sidebar-hide'; }
return $classes;
}
@@ -542,7 +528,7 @@ if ( ! function_exists( 'alx_feed_link' ) ) {
if ( strpos( $output, 'comments' ) )
return $output;
// Return feed url
- return esc_attr( ot_get_option('rss-feed',$output) );
+ return esc_attr( get_theme_mod('rss-feed',$output) );
}
}
@@ -566,7 +552,7 @@ add_filter( 'excerpt_more', 'alx_excerpt_more' );
if ( ! function_exists( 'alx_excerpt_length' ) ) {
function alx_excerpt_length( $length ) {
- return ot_get_option('excerpt-length',$length);
+ return get_theme_mod('excerpt-length',$length);
}
}
@@ -642,11 +628,11 @@ if ( ! function_exists( 'alx_pre_get_posts' ) ) {
if ( $query->is_home() ) {
// Featured posts enabled
- if ( ot_get_option('featured-posts-count') != '0' ) {
+ if ( get_theme_mod('featured-posts-count') != '0' ) {
// Get featured post ids
$featured_post_ids = alx_get_featured_post_ids();
// Exclude posts
- if ( $featured_post_ids && !ot_get_option('featured-posts-include') )
+ if ( $featured_post_ids && !get_theme_mod('featured-posts-include') )
$query->set('post__not_in', $featured_post_ids);
}
}
@@ -702,9 +688,16 @@ add_action( 'wp_footer', 'alx_ie_js_footer', 20 );
if ( ! function_exists( 'alx_plugins' ) ) {
function alx_plugins() {
- if ( ot_get_option('recommended-plugins') != 'off' ) {
+ if ( get_theme_mod('recommended-plugins','on') =='on' ) {
// Add the following plugins
$plugins = array(
+ array(
+ 'name' => 'Meta Box',
+ 'slug' => 'meta-box',
+ 'required' => true,
+ 'force_activation' => false,
+ 'force_deactivation'=> false,
+ ),
array(
'name' => 'Regenerate Thumbnails',
'slug' => 'regenerate-thumbnails',
@@ -757,3 +750,13 @@ remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wra
add_action('woocommerce_before_main_content', 'alx_wc_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'alx_wc_wrapper_end', 10);
+
+/* Admin panel css
+/* ------------------------------------ */
+function alx_admin_panel_css() {
+ echo '';
+}
+add_action('admin_head', 'alx_admin_panel_css');
\ No newline at end of file
diff --git a/functions/documentation/documentation.html b/functions/documentation/documentation.html
index 8564bee..5e54faa 100644
--- a/functions/documentation/documentation.html
+++ b/functions/documentation/documentation.html
@@ -356,8 +356,8 @@
function alx_styles() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
- if ( !ot_get_option('responsive') ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); }
- if ( ot_get_option('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
+ if ( !get_theme_mod('responsive') ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); }
+ if ( get_theme_mod('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome.min.css' );
}
@@ -365,8 +365,8 @@
function alx_styles() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
- if ( !ot_get_option('responsive') ) { wp_enqueue_style( 'responsive', get_stylesheet_directory_uri().'/responsive.css' ); }
- if ( ot_get_option('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
+ if ( !get_theme_mod('responsive') ) { wp_enqueue_style( 'responsive', get_stylesheet_directory_uri().'/responsive.css' ); }
+ if ( get_theme_mod('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome.min.css' );
}
@@ -423,7 +423,7 @@ load_theme_textdomain( 'themename', get_stylesheet_directory().'/languages' );
/js/ - Theme javascript. All custom theme scripts are in scripts.js
/js/ie/ - Javascript used for Internet Explorer compatibility
/languages/ - Contains a language file that you can use to translate or change texts in the theme
-
/option-tree/ - This folder is the OptionTree framework plugin running in fully-integrated theme mode. It ties in with /functions/meta-boxes.php and /functions/theme-options.php and the ot_get_option() function used in template files. Relates to the admin panel, to create theme options. It's best to leave this folder alone.
+
/option-tree/ - This folder is the OptionTree framework plugin running in fully-integrated theme mode. It ties in with /functions/meta-boxes.php and /functions/theme-options.php and the get_theme_mod() function used in template files. Relates to the admin panel, to create theme options. It's best to leave this folder alone.
/page-templates/ - Contains all page templates for the theme, such as Child Menu
diff --git a/functions/dynamic-styles.php b/functions/dynamic-styles.php
index 4a4229f..97f8258 100644
--- a/functions/dynamic-styles.php
+++ b/functions/dynamic-styles.php
@@ -33,26 +33,26 @@ if ( ! function_exists( 'alx_hex2rgb' ) ) {
if ( ! function_exists( 'alx_google_fonts' ) ) {
function alx_google_fonts () {
- if ( ot_get_option('dynamic-styles') != 'off' ) {
- if ( ot_get_option( 'font' ) == 'titillium-web-ext' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'droid-serif' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'source-sans-pro' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'lato' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'raleway' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'ubuntu' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'ubuntu-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto-condensed' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto-condensed-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto-slab' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'roboto-slab-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'playfair-display' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'playfair-display-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'open-sans' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'open-sans-cyr' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'pt-serif' ) { echo '
'. "\n"; }
- if ( ot_get_option( 'font' ) == 'pt-serif-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
+ if ( get_theme_mod( 'font' ) == 'titillium-web-ext' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'droid-serif' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'source-sans-pro' ) { echo '
'. "\n"; }
+ /*default*/ if ( ( get_theme_mod( 'font' ) == '' ) || ( get_theme_mod( 'font' ) == 'lato' ) ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'raleway' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'ubuntu' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'ubuntu-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto-condensed' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto-condensed-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto-slab' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'roboto-slab-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'playfair-display' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'playfair-display-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'open-sans' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'open-sans-cyr' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'pt-serif' ) { echo '
'. "\n"; }
+ if ( get_theme_mod( 'font' ) == 'pt-serif-cyr' ) { echo '
'. "\n"; }
}
}
@@ -65,10 +65,10 @@ add_action( 'wp_head', 'alx_google_fonts', 2 );
if ( ! function_exists( 'alx_dynamic_css' ) ) {
function alx_dynamic_css() {
- if ( ot_get_option('dynamic-styles') != 'off' ) {
+ if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
// rgb values
- $color_1 = ot_get_option('color-1');
+ $color_1 = get_theme_mod('color-1');
$color_1_rgb = alx_hex2rgb($color_1);
// start output
@@ -76,37 +76,37 @@ if ( ! function_exists( 'alx_dynamic_css' ) ) {
$styles .= '/* Dynamic CSS: For no styles in head, copy and put the css below in your custom.css or child theme\'s style.css, disable dynamic styles */'."\n";
// google fonts
- if ( ot_get_option( 'font' ) == 'titillium-web-ext' ) { $styles .= 'body { font-family: "Titillium Web", Arial, sans-serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'droid-serif' ) { $styles .= 'body { font-family: "Droid Serif", serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'source-sans-pro' ) { $styles .= 'body { font-family: "Source Sans Pro", Arial, sans-serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'lato' ) { $styles .= 'body { font-family: "Lato", Arial, sans-serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'raleway' ) { $styles .= 'body { font-family: "Raleway", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'ubuntu' ) || ( ot_get_option( 'font' ) == 'ubuntu-cyr' ) ) { $styles .= 'body { font-family: "Ubuntu", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'roboto' ) || ( ot_get_option( 'font' ) == 'roboto-cyr' ) ) { $styles .= 'body { font-family: "Roboto", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'roboto-condensed' ) || ( ot_get_option( 'font' ) == 'roboto-condensed-cyr' ) ) { $styles .= 'body { font-family: "Roboto Condensed", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'roboto-slab' ) || ( ot_get_option( 'font' ) == 'roboto-slab-cyr' ) ) { $styles .= 'body { font-family: "Roboto Slab", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'playfair-display' ) || ( ot_get_option( 'font' ) == 'playfair-display-cyr' ) ) { $styles .= 'body { font-family: "Playfair Display", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'open-sans' ) || ( ot_get_option( 'font' ) == 'open-sans-cyr' ) ) { $styles .= 'body { font-family: "Open Sans", Arial, sans-serif; }'."\n"; }
- if ( ( ot_get_option( 'font' ) == 'pt-serif' ) || ( ot_get_option( 'font' ) == 'pt-serif-cyr' ) ) { $styles .= 'body { font-family: "PT Serif", serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'arial' ) { $styles .= 'body { font-family: Arial, sans-serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'georgia' ) { $styles .= 'body { font-family: Georgia, serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'verdana' ) { $styles .= 'body { font-family: Verdana, sans-serif; }'."\n"; }
- if ( ot_get_option( 'font' ) == 'tahoma' ) { $styles .= 'body { font-family: Tahoma, sans-serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'titillium-web-ext' ) { $styles .= 'body { font-family: "Titillium Web", Arial, sans-serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'droid-serif' ) { $styles .= 'body { font-family: "Droid Serif", serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'source-sans-pro' ) { $styles .= 'body { font-family: "Source Sans Pro", Arial, sans-serif; }'."\n"; }
+ /*default*/ if ( ( get_theme_mod( 'font' ) == '' ) || ( get_theme_mod( 'font' ) == 'lato' ) ) { $styles .= 'body { font-family: "Lato", Arial, sans-serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'raleway' ) { $styles .= 'body { font-family: "Raleway", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'ubuntu' ) || ( get_theme_mod( 'font' ) == 'ubuntu-cyr' ) ) { $styles .= 'body { font-family: "Ubuntu", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'roboto' ) || ( get_theme_mod( 'font' ) == 'roboto-cyr' ) ) { $styles .= 'body { font-family: "Roboto", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'roboto-condensed' ) || ( get_theme_mod( 'font' ) == 'roboto-condensed-cyr' ) ) { $styles .= 'body { font-family: "Roboto Condensed", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'roboto-slab' ) || ( get_theme_mod( 'font' ) == 'roboto-slab-cyr' ) ) { $styles .= 'body { font-family: "Roboto Slab", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'playfair-display' ) || ( get_theme_mod( 'font' ) == 'playfair-display-cyr' ) ) { $styles .= 'body { font-family: "Playfair Display", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'open-sans' ) || ( get_theme_mod( 'font' ) == 'open-sans-cyr' ) ) { $styles .= 'body { font-family: "Open Sans", Arial, sans-serif; }'."\n"; }
+ if ( ( get_theme_mod( 'font' ) == 'pt-serif' ) || ( get_theme_mod( 'font' ) == 'pt-serif-cyr' ) ) { $styles .= 'body { font-family: "PT Serif", serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'arial' ) { $styles .= 'body { font-family: Arial, sans-serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'georgia' ) { $styles .= 'body { font-family: Georgia, serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'verdana' ) { $styles .= 'body { font-family: Verdana, sans-serif; }'."\n"; }
+ if ( get_theme_mod( 'font' ) == 'tahoma' ) { $styles .= 'body { font-family: Tahoma, sans-serif; }'."\n"; }
// container width
- if ( ot_get_option('container-width') != '1380' ) {
- if ( ot_get_option( 'boxed' ) ) {
- $styles .= '.boxed #wrapper, .container { max-width: '.ot_get_option('container-width').'px; }'."\n";
+ if ( get_theme_mod('container-width', '1160') != '1160' ) {
+ if ( get_theme_mod( 'boxed' ) ) {
+ $styles .= '.boxed #wrapper, .container { max-width: '.get_theme_mod('container-width').'px; }'."\n";
}
else {
- $styles .= '.container { max-width: '.ot_get_option('container-width').'px; }'."\n";
+ $styles .= '.container { max-width: '.get_theme_mod('container-width').'px; }'."\n";
}
}
// primary color
- if ( ot_get_option('color-1') != '#ceac41' ) {
+ if ( get_theme_mod('color-1','#ceac41') != '#ceac41' ) {
$styles .= '
-::selection { background-color: '.ot_get_option('color-1').'; }
-::-moz-selection { background-color: '.ot_get_option('color-1').'; }
+::selection { background-color: '.get_theme_mod('color-1').'; }
+::-moz-selection { background-color: '.get_theme_mod('color-1').'; }
a,
.themeform label .required,
@@ -124,7 +124,7 @@ a,
.comment-awaiting-moderation,
.child-menu a:hover,
.child-menu .current_page_item > a,
-.wp-pagenavi a { color: '.ot_get_option('color-1').'; }
+.wp-pagenavi a { color: '.get_theme_mod('color-1').'; }
.themeform input[type="submit"],
.themeform button[type="submit"],
@@ -136,29 +136,29 @@ a,
.widget_calendar caption,
.commentlist li.bypostauthor > .comment-body:after,
.commentlist li.comment-author-admin > .comment-body:after,
-.front-button a span { background-color: '.ot_get_option('color-1').'; }
+.front-button a span { background-color: '.get_theme_mod('color-1').'; }
-.post-format .format-container { border-color: '.ot_get_option('color-1').'; }
+.post-format .format-container { border-color: '.get_theme_mod('color-1').'; }
.alx-tabs-nav li.active a,
.comment-tabs li.active a,
.wp-pagenavi a:hover,
.wp-pagenavi a:active,
-.wp-pagenavi span.current { border-bottom-color: '.ot_get_option('color-1').'!important; }
+.wp-pagenavi span.current { border-bottom-color: '.get_theme_mod('color-1').'!important; }
'."\n";
}
// header logo max-height
- if ( ot_get_option('logo-max-height') != '60' ) {
- $styles .= '.site-title a img { max-height: '.ot_get_option('logo-max-height').'px; }'."\n";
+ if ( get_theme_mod('logo-max-height','60') != '60' ) {
+ $styles .= '.site-title a img { max-height: '.get_theme_mod('logo-max-height').'px; }'."\n";
}
// image border radius
- if ( ot_get_option('image-border-radius') != '0' ) {
- $styles .= 'img { -webkit-border-radius: '.ot_get_option('image-border-radius').'px; border-radius: '.ot_get_option('image-border-radius').'px; }'."\n";
+ if ( get_theme_mod('image-border-radius') != '0' ) {
+ $styles .= 'img { -webkit-border-radius: '.get_theme_mod('image-border-radius').'px; border-radius: '.get_theme_mod('image-border-radius').'px; }'."\n";
}
// body background
- if ( ot_get_option('body-background') != '' ) {
+ if ( get_theme_mod('body-background','') != '' ) {
- $body_background = ot_get_option('body-background');
+ $body_background = get_theme_mod('body-background');
$body_color = $body_background['background-color'];
$body_image = $body_background['background-image'];
$body_position = $body_background['background-position'];
diff --git a/functions/kirki/LICENSE b/functions/kirki/LICENSE
new file mode 100644
index 0000000..a13701d
--- /dev/null
+++ b/functions/kirki/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Aristeides Stathopoulos
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/functions/kirki/assets/css/kirki-styles.css b/functions/kirki/assets/css/kirki-styles.css
new file mode 100644
index 0000000..e69de29
diff --git a/functions/kirki/assets/images/1c.png b/functions/kirki/assets/images/1c.png
new file mode 100644
index 0000000..dfc2520
Binary files /dev/null and b/functions/kirki/assets/images/1c.png differ
diff --git a/functions/kirki/assets/images/2cl.png b/functions/kirki/assets/images/2cl.png
new file mode 100644
index 0000000..69da9e6
Binary files /dev/null and b/functions/kirki/assets/images/2cl.png differ
diff --git a/functions/kirki/assets/images/2cr.png b/functions/kirki/assets/images/2cr.png
new file mode 100644
index 0000000..02da48f
Binary files /dev/null and b/functions/kirki/assets/images/2cr.png differ
diff --git a/functions/kirki/assets/images/3cl.png b/functions/kirki/assets/images/3cl.png
new file mode 100644
index 0000000..5950688
Binary files /dev/null and b/functions/kirki/assets/images/3cl.png differ
diff --git a/functions/kirki/assets/images/3cm.png b/functions/kirki/assets/images/3cm.png
new file mode 100644
index 0000000..97e0b09
Binary files /dev/null and b/functions/kirki/assets/images/3cm.png differ
diff --git a/functions/kirki/assets/images/3cr.png b/functions/kirki/assets/images/3cr.png
new file mode 100644
index 0000000..498c0ac
Binary files /dev/null and b/functions/kirki/assets/images/3cr.png differ
diff --git a/functions/kirki/assets/images/jquery.fs.stepper-arrows.png b/functions/kirki/assets/images/jquery.fs.stepper-arrows.png
new file mode 100644
index 0000000..3da69ca
Binary files /dev/null and b/functions/kirki/assets/images/jquery.fs.stepper-arrows.png differ
diff --git a/functions/kirki/assets/images/kirki-bottom.png b/functions/kirki/assets/images/kirki-bottom.png
new file mode 100644
index 0000000..c0a9aca
Binary files /dev/null and b/functions/kirki/assets/images/kirki-bottom.png differ
diff --git a/functions/kirki/assets/images/kirki-bottom.svg b/functions/kirki/assets/images/kirki-bottom.svg
new file mode 100644
index 0000000..94dbd6a
--- /dev/null
+++ b/functions/kirki/assets/images/kirki-bottom.svg
@@ -0,0 +1,91 @@
+
+
image/svg+xml toolkit
+KIRKI
+
\ No newline at end of file
diff --git a/functions/kirki/assets/images/kirki-logo.svg b/functions/kirki/assets/images/kirki-logo.svg
new file mode 100644
index 0000000..70af324
--- /dev/null
+++ b/functions/kirki/assets/images/kirki-logo.svg
@@ -0,0 +1,48 @@
+
+
image/svg+xml
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/fontawesome/css/font-awesome.css b/functions/kirki/assets/vendor/fontawesome/css/font-awesome.css
new file mode 100644
index 0000000..ee906a8
--- /dev/null
+++ b/functions/kirki/assets/vendor/fontawesome/css/font-awesome.css
@@ -0,0 +1,2337 @@
+/*!
+ * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+/* FONT PATH
+ * -------------------------- */
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
+ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome;
+ font-size: inherit;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+/* makes the font 33% larger relative to the icon container */
+.fa-lg {
+ font-size: 1.33333333em;
+ line-height: 0.75em;
+ vertical-align: -15%;
+}
+.fa-2x {
+ font-size: 2em;
+}
+.fa-3x {
+ font-size: 3em;
+}
+.fa-4x {
+ font-size: 4em;
+}
+.fa-5x {
+ font-size: 5em;
+}
+.fa-fw {
+ width: 1.28571429em;
+ text-align: center;
+}
+.fa-ul {
+ padding-left: 0;
+ margin-left: 2.14285714em;
+ list-style-type: none;
+}
+.fa-ul > li {
+ position: relative;
+}
+.fa-li {
+ position: absolute;
+ left: -2.14285714em;
+ width: 2.14285714em;
+ top: 0.14285714em;
+ text-align: center;
+}
+.fa-li.fa-lg {
+ left: -1.85714286em;
+}
+.fa-border {
+ padding: .2em .25em .15em;
+ border: solid 0.08em #eeeeee;
+ border-radius: .1em;
+}
+.fa-pull-left {
+ float: left;
+}
+.fa-pull-right {
+ float: right;
+}
+.fa.fa-pull-left {
+ margin-right: .3em;
+}
+.fa.fa-pull-right {
+ margin-left: .3em;
+}
+/* Deprecated as of 4.4.0 */
+.pull-right {
+ float: right;
+}
+.pull-left {
+ float: left;
+}
+.fa.pull-left {
+ margin-right: .3em;
+}
+.fa.pull-right {
+ margin-left: .3em;
+}
+.fa-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+.fa-pulse {
+ -webkit-animation: fa-spin 1s infinite steps(8);
+ animation: fa-spin 1s infinite steps(8);
+}
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+.fa-rotate-90 {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
+ -webkit-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ transform: rotate(90deg);
+}
+.fa-rotate-180 {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+.fa-rotate-270 {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
+ -webkit-transform: rotate(270deg);
+ -ms-transform: rotate(270deg);
+ transform: rotate(270deg);
+}
+.fa-flip-horizontal {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
+ -webkit-transform: scale(-1, 1);
+ -ms-transform: scale(-1, 1);
+ transform: scale(-1, 1);
+}
+.fa-flip-vertical {
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
+ -webkit-transform: scale(1, -1);
+ -ms-transform: scale(1, -1);
+ transform: scale(1, -1);
+}
+:root .fa-rotate-90,
+:root .fa-rotate-180,
+:root .fa-rotate-270,
+:root .fa-flip-horizontal,
+:root .fa-flip-vertical {
+ filter: none;
+}
+.fa-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.fa-stack-1x,
+.fa-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.fa-stack-1x {
+ line-height: inherit;
+}
+.fa-stack-2x {
+ font-size: 2em;
+}
+.fa-inverse {
+ color: #ffffff;
+}
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+.fa-glass:before {
+ content: "\f000";
+}
+.fa-music:before {
+ content: "\f001";
+}
+.fa-search:before {
+ content: "\f002";
+}
+.fa-envelope-o:before {
+ content: "\f003";
+}
+.fa-heart:before {
+ content: "\f004";
+}
+.fa-star:before {
+ content: "\f005";
+}
+.fa-star-o:before {
+ content: "\f006";
+}
+.fa-user:before {
+ content: "\f007";
+}
+.fa-film:before {
+ content: "\f008";
+}
+.fa-th-large:before {
+ content: "\f009";
+}
+.fa-th:before {
+ content: "\f00a";
+}
+.fa-th-list:before {
+ content: "\f00b";
+}
+.fa-check:before {
+ content: "\f00c";
+}
+.fa-remove:before,
+.fa-close:before,
+.fa-times:before {
+ content: "\f00d";
+}
+.fa-search-plus:before {
+ content: "\f00e";
+}
+.fa-search-minus:before {
+ content: "\f010";
+}
+.fa-power-off:before {
+ content: "\f011";
+}
+.fa-signal:before {
+ content: "\f012";
+}
+.fa-gear:before,
+.fa-cog:before {
+ content: "\f013";
+}
+.fa-trash-o:before {
+ content: "\f014";
+}
+.fa-home:before {
+ content: "\f015";
+}
+.fa-file-o:before {
+ content: "\f016";
+}
+.fa-clock-o:before {
+ content: "\f017";
+}
+.fa-road:before {
+ content: "\f018";
+}
+.fa-download:before {
+ content: "\f019";
+}
+.fa-arrow-circle-o-down:before {
+ content: "\f01a";
+}
+.fa-arrow-circle-o-up:before {
+ content: "\f01b";
+}
+.fa-inbox:before {
+ content: "\f01c";
+}
+.fa-play-circle-o:before {
+ content: "\f01d";
+}
+.fa-rotate-right:before,
+.fa-repeat:before {
+ content: "\f01e";
+}
+.fa-refresh:before {
+ content: "\f021";
+}
+.fa-list-alt:before {
+ content: "\f022";
+}
+.fa-lock:before {
+ content: "\f023";
+}
+.fa-flag:before {
+ content: "\f024";
+}
+.fa-headphones:before {
+ content: "\f025";
+}
+.fa-volume-off:before {
+ content: "\f026";
+}
+.fa-volume-down:before {
+ content: "\f027";
+}
+.fa-volume-up:before {
+ content: "\f028";
+}
+.fa-qrcode:before {
+ content: "\f029";
+}
+.fa-barcode:before {
+ content: "\f02a";
+}
+.fa-tag:before {
+ content: "\f02b";
+}
+.fa-tags:before {
+ content: "\f02c";
+}
+.fa-book:before {
+ content: "\f02d";
+}
+.fa-bookmark:before {
+ content: "\f02e";
+}
+.fa-print:before {
+ content: "\f02f";
+}
+.fa-camera:before {
+ content: "\f030";
+}
+.fa-font:before {
+ content: "\f031";
+}
+.fa-bold:before {
+ content: "\f032";
+}
+.fa-italic:before {
+ content: "\f033";
+}
+.fa-text-height:before {
+ content: "\f034";
+}
+.fa-text-width:before {
+ content: "\f035";
+}
+.fa-align-left:before {
+ content: "\f036";
+}
+.fa-align-center:before {
+ content: "\f037";
+}
+.fa-align-right:before {
+ content: "\f038";
+}
+.fa-align-justify:before {
+ content: "\f039";
+}
+.fa-list:before {
+ content: "\f03a";
+}
+.fa-dedent:before,
+.fa-outdent:before {
+ content: "\f03b";
+}
+.fa-indent:before {
+ content: "\f03c";
+}
+.fa-video-camera:before {
+ content: "\f03d";
+}
+.fa-photo:before,
+.fa-image:before,
+.fa-picture-o:before {
+ content: "\f03e";
+}
+.fa-pencil:before {
+ content: "\f040";
+}
+.fa-map-marker:before {
+ content: "\f041";
+}
+.fa-adjust:before {
+ content: "\f042";
+}
+.fa-tint:before {
+ content: "\f043";
+}
+.fa-edit:before,
+.fa-pencil-square-o:before {
+ content: "\f044";
+}
+.fa-share-square-o:before {
+ content: "\f045";
+}
+.fa-check-square-o:before {
+ content: "\f046";
+}
+.fa-arrows:before {
+ content: "\f047";
+}
+.fa-step-backward:before {
+ content: "\f048";
+}
+.fa-fast-backward:before {
+ content: "\f049";
+}
+.fa-backward:before {
+ content: "\f04a";
+}
+.fa-play:before {
+ content: "\f04b";
+}
+.fa-pause:before {
+ content: "\f04c";
+}
+.fa-stop:before {
+ content: "\f04d";
+}
+.fa-forward:before {
+ content: "\f04e";
+}
+.fa-fast-forward:before {
+ content: "\f050";
+}
+.fa-step-forward:before {
+ content: "\f051";
+}
+.fa-eject:before {
+ content: "\f052";
+}
+.fa-chevron-left:before {
+ content: "\f053";
+}
+.fa-chevron-right:before {
+ content: "\f054";
+}
+.fa-plus-circle:before {
+ content: "\f055";
+}
+.fa-minus-circle:before {
+ content: "\f056";
+}
+.fa-times-circle:before {
+ content: "\f057";
+}
+.fa-check-circle:before {
+ content: "\f058";
+}
+.fa-question-circle:before {
+ content: "\f059";
+}
+.fa-info-circle:before {
+ content: "\f05a";
+}
+.fa-crosshairs:before {
+ content: "\f05b";
+}
+.fa-times-circle-o:before {
+ content: "\f05c";
+}
+.fa-check-circle-o:before {
+ content: "\f05d";
+}
+.fa-ban:before {
+ content: "\f05e";
+}
+.fa-arrow-left:before {
+ content: "\f060";
+}
+.fa-arrow-right:before {
+ content: "\f061";
+}
+.fa-arrow-up:before {
+ content: "\f062";
+}
+.fa-arrow-down:before {
+ content: "\f063";
+}
+.fa-mail-forward:before,
+.fa-share:before {
+ content: "\f064";
+}
+.fa-expand:before {
+ content: "\f065";
+}
+.fa-compress:before {
+ content: "\f066";
+}
+.fa-plus:before {
+ content: "\f067";
+}
+.fa-minus:before {
+ content: "\f068";
+}
+.fa-asterisk:before {
+ content: "\f069";
+}
+.fa-exclamation-circle:before {
+ content: "\f06a";
+}
+.fa-gift:before {
+ content: "\f06b";
+}
+.fa-leaf:before {
+ content: "\f06c";
+}
+.fa-fire:before {
+ content: "\f06d";
+}
+.fa-eye:before {
+ content: "\f06e";
+}
+.fa-eye-slash:before {
+ content: "\f070";
+}
+.fa-warning:before,
+.fa-exclamation-triangle:before {
+ content: "\f071";
+}
+.fa-plane:before {
+ content: "\f072";
+}
+.fa-calendar:before {
+ content: "\f073";
+}
+.fa-random:before {
+ content: "\f074";
+}
+.fa-comment:before {
+ content: "\f075";
+}
+.fa-magnet:before {
+ content: "\f076";
+}
+.fa-chevron-up:before {
+ content: "\f077";
+}
+.fa-chevron-down:before {
+ content: "\f078";
+}
+.fa-retweet:before {
+ content: "\f079";
+}
+.fa-shopping-cart:before {
+ content: "\f07a";
+}
+.fa-folder:before {
+ content: "\f07b";
+}
+.fa-folder-open:before {
+ content: "\f07c";
+}
+.fa-arrows-v:before {
+ content: "\f07d";
+}
+.fa-arrows-h:before {
+ content: "\f07e";
+}
+.fa-bar-chart-o:before,
+.fa-bar-chart:before {
+ content: "\f080";
+}
+.fa-twitter-square:before {
+ content: "\f081";
+}
+.fa-facebook-square:before {
+ content: "\f082";
+}
+.fa-camera-retro:before {
+ content: "\f083";
+}
+.fa-key:before {
+ content: "\f084";
+}
+.fa-gears:before,
+.fa-cogs:before {
+ content: "\f085";
+}
+.fa-comments:before {
+ content: "\f086";
+}
+.fa-thumbs-o-up:before {
+ content: "\f087";
+}
+.fa-thumbs-o-down:before {
+ content: "\f088";
+}
+.fa-star-half:before {
+ content: "\f089";
+}
+.fa-heart-o:before {
+ content: "\f08a";
+}
+.fa-sign-out:before {
+ content: "\f08b";
+}
+.fa-linkedin-square:before {
+ content: "\f08c";
+}
+.fa-thumb-tack:before {
+ content: "\f08d";
+}
+.fa-external-link:before {
+ content: "\f08e";
+}
+.fa-sign-in:before {
+ content: "\f090";
+}
+.fa-trophy:before {
+ content: "\f091";
+}
+.fa-github-square:before {
+ content: "\f092";
+}
+.fa-upload:before {
+ content: "\f093";
+}
+.fa-lemon-o:before {
+ content: "\f094";
+}
+.fa-phone:before {
+ content: "\f095";
+}
+.fa-square-o:before {
+ content: "\f096";
+}
+.fa-bookmark-o:before {
+ content: "\f097";
+}
+.fa-phone-square:before {
+ content: "\f098";
+}
+.fa-twitter:before {
+ content: "\f099";
+}
+.fa-facebook-f:before,
+.fa-facebook:before {
+ content: "\f09a";
+}
+.fa-github:before {
+ content: "\f09b";
+}
+.fa-unlock:before {
+ content: "\f09c";
+}
+.fa-credit-card:before {
+ content: "\f09d";
+}
+.fa-feed:before,
+.fa-rss:before {
+ content: "\f09e";
+}
+.fa-hdd-o:before {
+ content: "\f0a0";
+}
+.fa-bullhorn:before {
+ content: "\f0a1";
+}
+.fa-bell:before {
+ content: "\f0f3";
+}
+.fa-certificate:before {
+ content: "\f0a3";
+}
+.fa-hand-o-right:before {
+ content: "\f0a4";
+}
+.fa-hand-o-left:before {
+ content: "\f0a5";
+}
+.fa-hand-o-up:before {
+ content: "\f0a6";
+}
+.fa-hand-o-down:before {
+ content: "\f0a7";
+}
+.fa-arrow-circle-left:before {
+ content: "\f0a8";
+}
+.fa-arrow-circle-right:before {
+ content: "\f0a9";
+}
+.fa-arrow-circle-up:before {
+ content: "\f0aa";
+}
+.fa-arrow-circle-down:before {
+ content: "\f0ab";
+}
+.fa-globe:before {
+ content: "\f0ac";
+}
+.fa-wrench:before {
+ content: "\f0ad";
+}
+.fa-tasks:before {
+ content: "\f0ae";
+}
+.fa-filter:before {
+ content: "\f0b0";
+}
+.fa-briefcase:before {
+ content: "\f0b1";
+}
+.fa-arrows-alt:before {
+ content: "\f0b2";
+}
+.fa-group:before,
+.fa-users:before {
+ content: "\f0c0";
+}
+.fa-chain:before,
+.fa-link:before {
+ content: "\f0c1";
+}
+.fa-cloud:before {
+ content: "\f0c2";
+}
+.fa-flask:before {
+ content: "\f0c3";
+}
+.fa-cut:before,
+.fa-scissors:before {
+ content: "\f0c4";
+}
+.fa-copy:before,
+.fa-files-o:before {
+ content: "\f0c5";
+}
+.fa-paperclip:before {
+ content: "\f0c6";
+}
+.fa-save:before,
+.fa-floppy-o:before {
+ content: "\f0c7";
+}
+.fa-square:before {
+ content: "\f0c8";
+}
+.fa-navicon:before,
+.fa-reorder:before,
+.fa-bars:before {
+ content: "\f0c9";
+}
+.fa-list-ul:before {
+ content: "\f0ca";
+}
+.fa-list-ol:before {
+ content: "\f0cb";
+}
+.fa-strikethrough:before {
+ content: "\f0cc";
+}
+.fa-underline:before {
+ content: "\f0cd";
+}
+.fa-table:before {
+ content: "\f0ce";
+}
+.fa-magic:before {
+ content: "\f0d0";
+}
+.fa-truck:before {
+ content: "\f0d1";
+}
+.fa-pinterest:before {
+ content: "\f0d2";
+}
+.fa-pinterest-square:before {
+ content: "\f0d3";
+}
+.fa-google-plus-square:before {
+ content: "\f0d4";
+}
+.fa-google-plus:before {
+ content: "\f0d5";
+}
+.fa-money:before {
+ content: "\f0d6";
+}
+.fa-caret-down:before {
+ content: "\f0d7";
+}
+.fa-caret-up:before {
+ content: "\f0d8";
+}
+.fa-caret-left:before {
+ content: "\f0d9";
+}
+.fa-caret-right:before {
+ content: "\f0da";
+}
+.fa-columns:before {
+ content: "\f0db";
+}
+.fa-unsorted:before,
+.fa-sort:before {
+ content: "\f0dc";
+}
+.fa-sort-down:before,
+.fa-sort-desc:before {
+ content: "\f0dd";
+}
+.fa-sort-up:before,
+.fa-sort-asc:before {
+ content: "\f0de";
+}
+.fa-envelope:before {
+ content: "\f0e0";
+}
+.fa-linkedin:before {
+ content: "\f0e1";
+}
+.fa-rotate-left:before,
+.fa-undo:before {
+ content: "\f0e2";
+}
+.fa-legal:before,
+.fa-gavel:before {
+ content: "\f0e3";
+}
+.fa-dashboard:before,
+.fa-tachometer:before {
+ content: "\f0e4";
+}
+.fa-comment-o:before {
+ content: "\f0e5";
+}
+.fa-comments-o:before {
+ content: "\f0e6";
+}
+.fa-flash:before,
+.fa-bolt:before {
+ content: "\f0e7";
+}
+.fa-sitemap:before {
+ content: "\f0e8";
+}
+.fa-umbrella:before {
+ content: "\f0e9";
+}
+.fa-paste:before,
+.fa-clipboard:before {
+ content: "\f0ea";
+}
+.fa-lightbulb-o:before {
+ content: "\f0eb";
+}
+.fa-exchange:before {
+ content: "\f0ec";
+}
+.fa-cloud-download:before {
+ content: "\f0ed";
+}
+.fa-cloud-upload:before {
+ content: "\f0ee";
+}
+.fa-user-md:before {
+ content: "\f0f0";
+}
+.fa-stethoscope:before {
+ content: "\f0f1";
+}
+.fa-suitcase:before {
+ content: "\f0f2";
+}
+.fa-bell-o:before {
+ content: "\f0a2";
+}
+.fa-coffee:before {
+ content: "\f0f4";
+}
+.fa-cutlery:before {
+ content: "\f0f5";
+}
+.fa-file-text-o:before {
+ content: "\f0f6";
+}
+.fa-building-o:before {
+ content: "\f0f7";
+}
+.fa-hospital-o:before {
+ content: "\f0f8";
+}
+.fa-ambulance:before {
+ content: "\f0f9";
+}
+.fa-medkit:before {
+ content: "\f0fa";
+}
+.fa-fighter-jet:before {
+ content: "\f0fb";
+}
+.fa-beer:before {
+ content: "\f0fc";
+}
+.fa-h-square:before {
+ content: "\f0fd";
+}
+.fa-plus-square:before {
+ content: "\f0fe";
+}
+.fa-angle-double-left:before {
+ content: "\f100";
+}
+.fa-angle-double-right:before {
+ content: "\f101";
+}
+.fa-angle-double-up:before {
+ content: "\f102";
+}
+.fa-angle-double-down:before {
+ content: "\f103";
+}
+.fa-angle-left:before {
+ content: "\f104";
+}
+.fa-angle-right:before {
+ content: "\f105";
+}
+.fa-angle-up:before {
+ content: "\f106";
+}
+.fa-angle-down:before {
+ content: "\f107";
+}
+.fa-desktop:before {
+ content: "\f108";
+}
+.fa-laptop:before {
+ content: "\f109";
+}
+.fa-tablet:before {
+ content: "\f10a";
+}
+.fa-mobile-phone:before,
+.fa-mobile:before {
+ content: "\f10b";
+}
+.fa-circle-o:before {
+ content: "\f10c";
+}
+.fa-quote-left:before {
+ content: "\f10d";
+}
+.fa-quote-right:before {
+ content: "\f10e";
+}
+.fa-spinner:before {
+ content: "\f110";
+}
+.fa-circle:before {
+ content: "\f111";
+}
+.fa-mail-reply:before,
+.fa-reply:before {
+ content: "\f112";
+}
+.fa-github-alt:before {
+ content: "\f113";
+}
+.fa-folder-o:before {
+ content: "\f114";
+}
+.fa-folder-open-o:before {
+ content: "\f115";
+}
+.fa-smile-o:before {
+ content: "\f118";
+}
+.fa-frown-o:before {
+ content: "\f119";
+}
+.fa-meh-o:before {
+ content: "\f11a";
+}
+.fa-gamepad:before {
+ content: "\f11b";
+}
+.fa-keyboard-o:before {
+ content: "\f11c";
+}
+.fa-flag-o:before {
+ content: "\f11d";
+}
+.fa-flag-checkered:before {
+ content: "\f11e";
+}
+.fa-terminal:before {
+ content: "\f120";
+}
+.fa-code:before {
+ content: "\f121";
+}
+.fa-mail-reply-all:before,
+.fa-reply-all:before {
+ content: "\f122";
+}
+.fa-star-half-empty:before,
+.fa-star-half-full:before,
+.fa-star-half-o:before {
+ content: "\f123";
+}
+.fa-location-arrow:before {
+ content: "\f124";
+}
+.fa-crop:before {
+ content: "\f125";
+}
+.fa-code-fork:before {
+ content: "\f126";
+}
+.fa-unlink:before,
+.fa-chain-broken:before {
+ content: "\f127";
+}
+.fa-question:before {
+ content: "\f128";
+}
+.fa-info:before {
+ content: "\f129";
+}
+.fa-exclamation:before {
+ content: "\f12a";
+}
+.fa-superscript:before {
+ content: "\f12b";
+}
+.fa-subscript:before {
+ content: "\f12c";
+}
+.fa-eraser:before {
+ content: "\f12d";
+}
+.fa-puzzle-piece:before {
+ content: "\f12e";
+}
+.fa-microphone:before {
+ content: "\f130";
+}
+.fa-microphone-slash:before {
+ content: "\f131";
+}
+.fa-shield:before {
+ content: "\f132";
+}
+.fa-calendar-o:before {
+ content: "\f133";
+}
+.fa-fire-extinguisher:before {
+ content: "\f134";
+}
+.fa-rocket:before {
+ content: "\f135";
+}
+.fa-maxcdn:before {
+ content: "\f136";
+}
+.fa-chevron-circle-left:before {
+ content: "\f137";
+}
+.fa-chevron-circle-right:before {
+ content: "\f138";
+}
+.fa-chevron-circle-up:before {
+ content: "\f139";
+}
+.fa-chevron-circle-down:before {
+ content: "\f13a";
+}
+.fa-html5:before {
+ content: "\f13b";
+}
+.fa-css3:before {
+ content: "\f13c";
+}
+.fa-anchor:before {
+ content: "\f13d";
+}
+.fa-unlock-alt:before {
+ content: "\f13e";
+}
+.fa-bullseye:before {
+ content: "\f140";
+}
+.fa-ellipsis-h:before {
+ content: "\f141";
+}
+.fa-ellipsis-v:before {
+ content: "\f142";
+}
+.fa-rss-square:before {
+ content: "\f143";
+}
+.fa-play-circle:before {
+ content: "\f144";
+}
+.fa-ticket:before {
+ content: "\f145";
+}
+.fa-minus-square:before {
+ content: "\f146";
+}
+.fa-minus-square-o:before {
+ content: "\f147";
+}
+.fa-level-up:before {
+ content: "\f148";
+}
+.fa-level-down:before {
+ content: "\f149";
+}
+.fa-check-square:before {
+ content: "\f14a";
+}
+.fa-pencil-square:before {
+ content: "\f14b";
+}
+.fa-external-link-square:before {
+ content: "\f14c";
+}
+.fa-share-square:before {
+ content: "\f14d";
+}
+.fa-compass:before {
+ content: "\f14e";
+}
+.fa-toggle-down:before,
+.fa-caret-square-o-down:before {
+ content: "\f150";
+}
+.fa-toggle-up:before,
+.fa-caret-square-o-up:before {
+ content: "\f151";
+}
+.fa-toggle-right:before,
+.fa-caret-square-o-right:before {
+ content: "\f152";
+}
+.fa-euro:before,
+.fa-eur:before {
+ content: "\f153";
+}
+.fa-gbp:before {
+ content: "\f154";
+}
+.fa-dollar:before,
+.fa-usd:before {
+ content: "\f155";
+}
+.fa-rupee:before,
+.fa-inr:before {
+ content: "\f156";
+}
+.fa-cny:before,
+.fa-rmb:before,
+.fa-yen:before,
+.fa-jpy:before {
+ content: "\f157";
+}
+.fa-ruble:before,
+.fa-rouble:before,
+.fa-rub:before {
+ content: "\f158";
+}
+.fa-won:before,
+.fa-krw:before {
+ content: "\f159";
+}
+.fa-bitcoin:before,
+.fa-btc:before {
+ content: "\f15a";
+}
+.fa-file:before {
+ content: "\f15b";
+}
+.fa-file-text:before {
+ content: "\f15c";
+}
+.fa-sort-alpha-asc:before {
+ content: "\f15d";
+}
+.fa-sort-alpha-desc:before {
+ content: "\f15e";
+}
+.fa-sort-amount-asc:before {
+ content: "\f160";
+}
+.fa-sort-amount-desc:before {
+ content: "\f161";
+}
+.fa-sort-numeric-asc:before {
+ content: "\f162";
+}
+.fa-sort-numeric-desc:before {
+ content: "\f163";
+}
+.fa-thumbs-up:before {
+ content: "\f164";
+}
+.fa-thumbs-down:before {
+ content: "\f165";
+}
+.fa-youtube-square:before {
+ content: "\f166";
+}
+.fa-youtube:before {
+ content: "\f167";
+}
+.fa-xing:before {
+ content: "\f168";
+}
+.fa-xing-square:before {
+ content: "\f169";
+}
+.fa-youtube-play:before {
+ content: "\f16a";
+}
+.fa-dropbox:before {
+ content: "\f16b";
+}
+.fa-stack-overflow:before {
+ content: "\f16c";
+}
+.fa-instagram:before {
+ content: "\f16d";
+}
+.fa-flickr:before {
+ content: "\f16e";
+}
+.fa-adn:before {
+ content: "\f170";
+}
+.fa-bitbucket:before {
+ content: "\f171";
+}
+.fa-bitbucket-square:before {
+ content: "\f172";
+}
+.fa-tumblr:before {
+ content: "\f173";
+}
+.fa-tumblr-square:before {
+ content: "\f174";
+}
+.fa-long-arrow-down:before {
+ content: "\f175";
+}
+.fa-long-arrow-up:before {
+ content: "\f176";
+}
+.fa-long-arrow-left:before {
+ content: "\f177";
+}
+.fa-long-arrow-right:before {
+ content: "\f178";
+}
+.fa-apple:before {
+ content: "\f179";
+}
+.fa-windows:before {
+ content: "\f17a";
+}
+.fa-android:before {
+ content: "\f17b";
+}
+.fa-linux:before {
+ content: "\f17c";
+}
+.fa-dribbble:before {
+ content: "\f17d";
+}
+.fa-skype:before {
+ content: "\f17e";
+}
+.fa-foursquare:before {
+ content: "\f180";
+}
+.fa-trello:before {
+ content: "\f181";
+}
+.fa-female:before {
+ content: "\f182";
+}
+.fa-male:before {
+ content: "\f183";
+}
+.fa-gittip:before,
+.fa-gratipay:before {
+ content: "\f184";
+}
+.fa-sun-o:before {
+ content: "\f185";
+}
+.fa-moon-o:before {
+ content: "\f186";
+}
+.fa-archive:before {
+ content: "\f187";
+}
+.fa-bug:before {
+ content: "\f188";
+}
+.fa-vk:before {
+ content: "\f189";
+}
+.fa-weibo:before {
+ content: "\f18a";
+}
+.fa-renren:before {
+ content: "\f18b";
+}
+.fa-pagelines:before {
+ content: "\f18c";
+}
+.fa-stack-exchange:before {
+ content: "\f18d";
+}
+.fa-arrow-circle-o-right:before {
+ content: "\f18e";
+}
+.fa-arrow-circle-o-left:before {
+ content: "\f190";
+}
+.fa-toggle-left:before,
+.fa-caret-square-o-left:before {
+ content: "\f191";
+}
+.fa-dot-circle-o:before {
+ content: "\f192";
+}
+.fa-wheelchair:before {
+ content: "\f193";
+}
+.fa-vimeo-square:before {
+ content: "\f194";
+}
+.fa-turkish-lira:before,
+.fa-try:before {
+ content: "\f195";
+}
+.fa-plus-square-o:before {
+ content: "\f196";
+}
+.fa-space-shuttle:before {
+ content: "\f197";
+}
+.fa-slack:before {
+ content: "\f198";
+}
+.fa-envelope-square:before {
+ content: "\f199";
+}
+.fa-wordpress:before {
+ content: "\f19a";
+}
+.fa-openid:before {
+ content: "\f19b";
+}
+.fa-institution:before,
+.fa-bank:before,
+.fa-university:before {
+ content: "\f19c";
+}
+.fa-mortar-board:before,
+.fa-graduation-cap:before {
+ content: "\f19d";
+}
+.fa-yahoo:before {
+ content: "\f19e";
+}
+.fa-google:before {
+ content: "\f1a0";
+}
+.fa-reddit:before {
+ content: "\f1a1";
+}
+.fa-reddit-square:before {
+ content: "\f1a2";
+}
+.fa-stumbleupon-circle:before {
+ content: "\f1a3";
+}
+.fa-stumbleupon:before {
+ content: "\f1a4";
+}
+.fa-delicious:before {
+ content: "\f1a5";
+}
+.fa-digg:before {
+ content: "\f1a6";
+}
+.fa-pied-piper-pp:before {
+ content: "\f1a7";
+}
+.fa-pied-piper-alt:before {
+ content: "\f1a8";
+}
+.fa-drupal:before {
+ content: "\f1a9";
+}
+.fa-joomla:before {
+ content: "\f1aa";
+}
+.fa-language:before {
+ content: "\f1ab";
+}
+.fa-fax:before {
+ content: "\f1ac";
+}
+.fa-building:before {
+ content: "\f1ad";
+}
+.fa-child:before {
+ content: "\f1ae";
+}
+.fa-paw:before {
+ content: "\f1b0";
+}
+.fa-spoon:before {
+ content: "\f1b1";
+}
+.fa-cube:before {
+ content: "\f1b2";
+}
+.fa-cubes:before {
+ content: "\f1b3";
+}
+.fa-behance:before {
+ content: "\f1b4";
+}
+.fa-behance-square:before {
+ content: "\f1b5";
+}
+.fa-steam:before {
+ content: "\f1b6";
+}
+.fa-steam-square:before {
+ content: "\f1b7";
+}
+.fa-recycle:before {
+ content: "\f1b8";
+}
+.fa-automobile:before,
+.fa-car:before {
+ content: "\f1b9";
+}
+.fa-cab:before,
+.fa-taxi:before {
+ content: "\f1ba";
+}
+.fa-tree:before {
+ content: "\f1bb";
+}
+.fa-spotify:before {
+ content: "\f1bc";
+}
+.fa-deviantart:before {
+ content: "\f1bd";
+}
+.fa-soundcloud:before {
+ content: "\f1be";
+}
+.fa-database:before {
+ content: "\f1c0";
+}
+.fa-file-pdf-o:before {
+ content: "\f1c1";
+}
+.fa-file-word-o:before {
+ content: "\f1c2";
+}
+.fa-file-excel-o:before {
+ content: "\f1c3";
+}
+.fa-file-powerpoint-o:before {
+ content: "\f1c4";
+}
+.fa-file-photo-o:before,
+.fa-file-picture-o:before,
+.fa-file-image-o:before {
+ content: "\f1c5";
+}
+.fa-file-zip-o:before,
+.fa-file-archive-o:before {
+ content: "\f1c6";
+}
+.fa-file-sound-o:before,
+.fa-file-audio-o:before {
+ content: "\f1c7";
+}
+.fa-file-movie-o:before,
+.fa-file-video-o:before {
+ content: "\f1c8";
+}
+.fa-file-code-o:before {
+ content: "\f1c9";
+}
+.fa-vine:before {
+ content: "\f1ca";
+}
+.fa-codepen:before {
+ content: "\f1cb";
+}
+.fa-jsfiddle:before {
+ content: "\f1cc";
+}
+.fa-life-bouy:before,
+.fa-life-buoy:before,
+.fa-life-saver:before,
+.fa-support:before,
+.fa-life-ring:before {
+ content: "\f1cd";
+}
+.fa-circle-o-notch:before {
+ content: "\f1ce";
+}
+.fa-ra:before,
+.fa-resistance:before,
+.fa-rebel:before {
+ content: "\f1d0";
+}
+.fa-ge:before,
+.fa-empire:before {
+ content: "\f1d1";
+}
+.fa-git-square:before {
+ content: "\f1d2";
+}
+.fa-git:before {
+ content: "\f1d3";
+}
+.fa-y-combinator-square:before,
+.fa-yc-square:before,
+.fa-hacker-news:before {
+ content: "\f1d4";
+}
+.fa-tencent-weibo:before {
+ content: "\f1d5";
+}
+.fa-qq:before {
+ content: "\f1d6";
+}
+.fa-wechat:before,
+.fa-weixin:before {
+ content: "\f1d7";
+}
+.fa-send:before,
+.fa-paper-plane:before {
+ content: "\f1d8";
+}
+.fa-send-o:before,
+.fa-paper-plane-o:before {
+ content: "\f1d9";
+}
+.fa-history:before {
+ content: "\f1da";
+}
+.fa-circle-thin:before {
+ content: "\f1db";
+}
+.fa-header:before {
+ content: "\f1dc";
+}
+.fa-paragraph:before {
+ content: "\f1dd";
+}
+.fa-sliders:before {
+ content: "\f1de";
+}
+.fa-share-alt:before {
+ content: "\f1e0";
+}
+.fa-share-alt-square:before {
+ content: "\f1e1";
+}
+.fa-bomb:before {
+ content: "\f1e2";
+}
+.fa-soccer-ball-o:before,
+.fa-futbol-o:before {
+ content: "\f1e3";
+}
+.fa-tty:before {
+ content: "\f1e4";
+}
+.fa-binoculars:before {
+ content: "\f1e5";
+}
+.fa-plug:before {
+ content: "\f1e6";
+}
+.fa-slideshare:before {
+ content: "\f1e7";
+}
+.fa-twitch:before {
+ content: "\f1e8";
+}
+.fa-yelp:before {
+ content: "\f1e9";
+}
+.fa-newspaper-o:before {
+ content: "\f1ea";
+}
+.fa-wifi:before {
+ content: "\f1eb";
+}
+.fa-calculator:before {
+ content: "\f1ec";
+}
+.fa-paypal:before {
+ content: "\f1ed";
+}
+.fa-google-wallet:before {
+ content: "\f1ee";
+}
+.fa-cc-visa:before {
+ content: "\f1f0";
+}
+.fa-cc-mastercard:before {
+ content: "\f1f1";
+}
+.fa-cc-discover:before {
+ content: "\f1f2";
+}
+.fa-cc-amex:before {
+ content: "\f1f3";
+}
+.fa-cc-paypal:before {
+ content: "\f1f4";
+}
+.fa-cc-stripe:before {
+ content: "\f1f5";
+}
+.fa-bell-slash:before {
+ content: "\f1f6";
+}
+.fa-bell-slash-o:before {
+ content: "\f1f7";
+}
+.fa-trash:before {
+ content: "\f1f8";
+}
+.fa-copyright:before {
+ content: "\f1f9";
+}
+.fa-at:before {
+ content: "\f1fa";
+}
+.fa-eyedropper:before {
+ content: "\f1fb";
+}
+.fa-paint-brush:before {
+ content: "\f1fc";
+}
+.fa-birthday-cake:before {
+ content: "\f1fd";
+}
+.fa-area-chart:before {
+ content: "\f1fe";
+}
+.fa-pie-chart:before {
+ content: "\f200";
+}
+.fa-line-chart:before {
+ content: "\f201";
+}
+.fa-lastfm:before {
+ content: "\f202";
+}
+.fa-lastfm-square:before {
+ content: "\f203";
+}
+.fa-toggle-off:before {
+ content: "\f204";
+}
+.fa-toggle-on:before {
+ content: "\f205";
+}
+.fa-bicycle:before {
+ content: "\f206";
+}
+.fa-bus:before {
+ content: "\f207";
+}
+.fa-ioxhost:before {
+ content: "\f208";
+}
+.fa-angellist:before {
+ content: "\f209";
+}
+.fa-cc:before {
+ content: "\f20a";
+}
+.fa-shekel:before,
+.fa-sheqel:before,
+.fa-ils:before {
+ content: "\f20b";
+}
+.fa-meanpath:before {
+ content: "\f20c";
+}
+.fa-buysellads:before {
+ content: "\f20d";
+}
+.fa-connectdevelop:before {
+ content: "\f20e";
+}
+.fa-dashcube:before {
+ content: "\f210";
+}
+.fa-forumbee:before {
+ content: "\f211";
+}
+.fa-leanpub:before {
+ content: "\f212";
+}
+.fa-sellsy:before {
+ content: "\f213";
+}
+.fa-shirtsinbulk:before {
+ content: "\f214";
+}
+.fa-simplybuilt:before {
+ content: "\f215";
+}
+.fa-skyatlas:before {
+ content: "\f216";
+}
+.fa-cart-plus:before {
+ content: "\f217";
+}
+.fa-cart-arrow-down:before {
+ content: "\f218";
+}
+.fa-diamond:before {
+ content: "\f219";
+}
+.fa-ship:before {
+ content: "\f21a";
+}
+.fa-user-secret:before {
+ content: "\f21b";
+}
+.fa-motorcycle:before {
+ content: "\f21c";
+}
+.fa-street-view:before {
+ content: "\f21d";
+}
+.fa-heartbeat:before {
+ content: "\f21e";
+}
+.fa-venus:before {
+ content: "\f221";
+}
+.fa-mars:before {
+ content: "\f222";
+}
+.fa-mercury:before {
+ content: "\f223";
+}
+.fa-intersex:before,
+.fa-transgender:before {
+ content: "\f224";
+}
+.fa-transgender-alt:before {
+ content: "\f225";
+}
+.fa-venus-double:before {
+ content: "\f226";
+}
+.fa-mars-double:before {
+ content: "\f227";
+}
+.fa-venus-mars:before {
+ content: "\f228";
+}
+.fa-mars-stroke:before {
+ content: "\f229";
+}
+.fa-mars-stroke-v:before {
+ content: "\f22a";
+}
+.fa-mars-stroke-h:before {
+ content: "\f22b";
+}
+.fa-neuter:before {
+ content: "\f22c";
+}
+.fa-genderless:before {
+ content: "\f22d";
+}
+.fa-facebook-official:before {
+ content: "\f230";
+}
+.fa-pinterest-p:before {
+ content: "\f231";
+}
+.fa-whatsapp:before {
+ content: "\f232";
+}
+.fa-server:before {
+ content: "\f233";
+}
+.fa-user-plus:before {
+ content: "\f234";
+}
+.fa-user-times:before {
+ content: "\f235";
+}
+.fa-hotel:before,
+.fa-bed:before {
+ content: "\f236";
+}
+.fa-viacoin:before {
+ content: "\f237";
+}
+.fa-train:before {
+ content: "\f238";
+}
+.fa-subway:before {
+ content: "\f239";
+}
+.fa-medium:before {
+ content: "\f23a";
+}
+.fa-yc:before,
+.fa-y-combinator:before {
+ content: "\f23b";
+}
+.fa-optin-monster:before {
+ content: "\f23c";
+}
+.fa-opencart:before {
+ content: "\f23d";
+}
+.fa-expeditedssl:before {
+ content: "\f23e";
+}
+.fa-battery-4:before,
+.fa-battery:before,
+.fa-battery-full:before {
+ content: "\f240";
+}
+.fa-battery-3:before,
+.fa-battery-three-quarters:before {
+ content: "\f241";
+}
+.fa-battery-2:before,
+.fa-battery-half:before {
+ content: "\f242";
+}
+.fa-battery-1:before,
+.fa-battery-quarter:before {
+ content: "\f243";
+}
+.fa-battery-0:before,
+.fa-battery-empty:before {
+ content: "\f244";
+}
+.fa-mouse-pointer:before {
+ content: "\f245";
+}
+.fa-i-cursor:before {
+ content: "\f246";
+}
+.fa-object-group:before {
+ content: "\f247";
+}
+.fa-object-ungroup:before {
+ content: "\f248";
+}
+.fa-sticky-note:before {
+ content: "\f249";
+}
+.fa-sticky-note-o:before {
+ content: "\f24a";
+}
+.fa-cc-jcb:before {
+ content: "\f24b";
+}
+.fa-cc-diners-club:before {
+ content: "\f24c";
+}
+.fa-clone:before {
+ content: "\f24d";
+}
+.fa-balance-scale:before {
+ content: "\f24e";
+}
+.fa-hourglass-o:before {
+ content: "\f250";
+}
+.fa-hourglass-1:before,
+.fa-hourglass-start:before {
+ content: "\f251";
+}
+.fa-hourglass-2:before,
+.fa-hourglass-half:before {
+ content: "\f252";
+}
+.fa-hourglass-3:before,
+.fa-hourglass-end:before {
+ content: "\f253";
+}
+.fa-hourglass:before {
+ content: "\f254";
+}
+.fa-hand-grab-o:before,
+.fa-hand-rock-o:before {
+ content: "\f255";
+}
+.fa-hand-stop-o:before,
+.fa-hand-paper-o:before {
+ content: "\f256";
+}
+.fa-hand-scissors-o:before {
+ content: "\f257";
+}
+.fa-hand-lizard-o:before {
+ content: "\f258";
+}
+.fa-hand-spock-o:before {
+ content: "\f259";
+}
+.fa-hand-pointer-o:before {
+ content: "\f25a";
+}
+.fa-hand-peace-o:before {
+ content: "\f25b";
+}
+.fa-trademark:before {
+ content: "\f25c";
+}
+.fa-registered:before {
+ content: "\f25d";
+}
+.fa-creative-commons:before {
+ content: "\f25e";
+}
+.fa-gg:before {
+ content: "\f260";
+}
+.fa-gg-circle:before {
+ content: "\f261";
+}
+.fa-tripadvisor:before {
+ content: "\f262";
+}
+.fa-odnoklassniki:before {
+ content: "\f263";
+}
+.fa-odnoklassniki-square:before {
+ content: "\f264";
+}
+.fa-get-pocket:before {
+ content: "\f265";
+}
+.fa-wikipedia-w:before {
+ content: "\f266";
+}
+.fa-safari:before {
+ content: "\f267";
+}
+.fa-chrome:before {
+ content: "\f268";
+}
+.fa-firefox:before {
+ content: "\f269";
+}
+.fa-opera:before {
+ content: "\f26a";
+}
+.fa-internet-explorer:before {
+ content: "\f26b";
+}
+.fa-tv:before,
+.fa-television:before {
+ content: "\f26c";
+}
+.fa-contao:before {
+ content: "\f26d";
+}
+.fa-500px:before {
+ content: "\f26e";
+}
+.fa-amazon:before {
+ content: "\f270";
+}
+.fa-calendar-plus-o:before {
+ content: "\f271";
+}
+.fa-calendar-minus-o:before {
+ content: "\f272";
+}
+.fa-calendar-times-o:before {
+ content: "\f273";
+}
+.fa-calendar-check-o:before {
+ content: "\f274";
+}
+.fa-industry:before {
+ content: "\f275";
+}
+.fa-map-pin:before {
+ content: "\f276";
+}
+.fa-map-signs:before {
+ content: "\f277";
+}
+.fa-map-o:before {
+ content: "\f278";
+}
+.fa-map:before {
+ content: "\f279";
+}
+.fa-commenting:before {
+ content: "\f27a";
+}
+.fa-commenting-o:before {
+ content: "\f27b";
+}
+.fa-houzz:before {
+ content: "\f27c";
+}
+.fa-vimeo:before {
+ content: "\f27d";
+}
+.fa-black-tie:before {
+ content: "\f27e";
+}
+.fa-fonticons:before {
+ content: "\f280";
+}
+.fa-reddit-alien:before {
+ content: "\f281";
+}
+.fa-edge:before {
+ content: "\f282";
+}
+.fa-credit-card-alt:before {
+ content: "\f283";
+}
+.fa-codiepie:before {
+ content: "\f284";
+}
+.fa-modx:before {
+ content: "\f285";
+}
+.fa-fort-awesome:before {
+ content: "\f286";
+}
+.fa-usb:before {
+ content: "\f287";
+}
+.fa-product-hunt:before {
+ content: "\f288";
+}
+.fa-mixcloud:before {
+ content: "\f289";
+}
+.fa-scribd:before {
+ content: "\f28a";
+}
+.fa-pause-circle:before {
+ content: "\f28b";
+}
+.fa-pause-circle-o:before {
+ content: "\f28c";
+}
+.fa-stop-circle:before {
+ content: "\f28d";
+}
+.fa-stop-circle-o:before {
+ content: "\f28e";
+}
+.fa-shopping-bag:before {
+ content: "\f290";
+}
+.fa-shopping-basket:before {
+ content: "\f291";
+}
+.fa-hashtag:before {
+ content: "\f292";
+}
+.fa-bluetooth:before {
+ content: "\f293";
+}
+.fa-bluetooth-b:before {
+ content: "\f294";
+}
+.fa-percent:before {
+ content: "\f295";
+}
+.fa-gitlab:before {
+ content: "\f296";
+}
+.fa-wpbeginner:before {
+ content: "\f297";
+}
+.fa-wpforms:before {
+ content: "\f298";
+}
+.fa-envira:before {
+ content: "\f299";
+}
+.fa-universal-access:before {
+ content: "\f29a";
+}
+.fa-wheelchair-alt:before {
+ content: "\f29b";
+}
+.fa-question-circle-o:before {
+ content: "\f29c";
+}
+.fa-blind:before {
+ content: "\f29d";
+}
+.fa-audio-description:before {
+ content: "\f29e";
+}
+.fa-volume-control-phone:before {
+ content: "\f2a0";
+}
+.fa-braille:before {
+ content: "\f2a1";
+}
+.fa-assistive-listening-systems:before {
+ content: "\f2a2";
+}
+.fa-asl-interpreting:before,
+.fa-american-sign-language-interpreting:before {
+ content: "\f2a3";
+}
+.fa-deafness:before,
+.fa-hard-of-hearing:before,
+.fa-deaf:before {
+ content: "\f2a4";
+}
+.fa-glide:before {
+ content: "\f2a5";
+}
+.fa-glide-g:before {
+ content: "\f2a6";
+}
+.fa-signing:before,
+.fa-sign-language:before {
+ content: "\f2a7";
+}
+.fa-low-vision:before {
+ content: "\f2a8";
+}
+.fa-viadeo:before {
+ content: "\f2a9";
+}
+.fa-viadeo-square:before {
+ content: "\f2aa";
+}
+.fa-snapchat:before {
+ content: "\f2ab";
+}
+.fa-snapchat-ghost:before {
+ content: "\f2ac";
+}
+.fa-snapchat-square:before {
+ content: "\f2ad";
+}
+.fa-pied-piper:before {
+ content: "\f2ae";
+}
+.fa-first-order:before {
+ content: "\f2b0";
+}
+.fa-yoast:before {
+ content: "\f2b1";
+}
+.fa-themeisle:before {
+ content: "\f2b2";
+}
+.fa-google-plus-circle:before,
+.fa-google-plus-official:before {
+ content: "\f2b3";
+}
+.fa-fa:before,
+.fa-font-awesome:before {
+ content: "\f2b4";
+}
+.fa-handshake-o:before {
+ content: "\f2b5";
+}
+.fa-envelope-open:before {
+ content: "\f2b6";
+}
+.fa-envelope-open-o:before {
+ content: "\f2b7";
+}
+.fa-linode:before {
+ content: "\f2b8";
+}
+.fa-address-book:before {
+ content: "\f2b9";
+}
+.fa-address-book-o:before {
+ content: "\f2ba";
+}
+.fa-vcard:before,
+.fa-address-card:before {
+ content: "\f2bb";
+}
+.fa-vcard-o:before,
+.fa-address-card-o:before {
+ content: "\f2bc";
+}
+.fa-user-circle:before {
+ content: "\f2bd";
+}
+.fa-user-circle-o:before {
+ content: "\f2be";
+}
+.fa-user-o:before {
+ content: "\f2c0";
+}
+.fa-id-badge:before {
+ content: "\f2c1";
+}
+.fa-drivers-license:before,
+.fa-id-card:before {
+ content: "\f2c2";
+}
+.fa-drivers-license-o:before,
+.fa-id-card-o:before {
+ content: "\f2c3";
+}
+.fa-quora:before {
+ content: "\f2c4";
+}
+.fa-free-code-camp:before {
+ content: "\f2c5";
+}
+.fa-telegram:before {
+ content: "\f2c6";
+}
+.fa-thermometer-4:before,
+.fa-thermometer:before,
+.fa-thermometer-full:before {
+ content: "\f2c7";
+}
+.fa-thermometer-3:before,
+.fa-thermometer-three-quarters:before {
+ content: "\f2c8";
+}
+.fa-thermometer-2:before,
+.fa-thermometer-half:before {
+ content: "\f2c9";
+}
+.fa-thermometer-1:before,
+.fa-thermometer-quarter:before {
+ content: "\f2ca";
+}
+.fa-thermometer-0:before,
+.fa-thermometer-empty:before {
+ content: "\f2cb";
+}
+.fa-shower:before {
+ content: "\f2cc";
+}
+.fa-bathtub:before,
+.fa-s15:before,
+.fa-bath:before {
+ content: "\f2cd";
+}
+.fa-podcast:before {
+ content: "\f2ce";
+}
+.fa-window-maximize:before {
+ content: "\f2d0";
+}
+.fa-window-minimize:before {
+ content: "\f2d1";
+}
+.fa-window-restore:before {
+ content: "\f2d2";
+}
+.fa-times-rectangle:before,
+.fa-window-close:before {
+ content: "\f2d3";
+}
+.fa-times-rectangle-o:before,
+.fa-window-close-o:before {
+ content: "\f2d4";
+}
+.fa-bandcamp:before {
+ content: "\f2d5";
+}
+.fa-grav:before {
+ content: "\f2d6";
+}
+.fa-etsy:before {
+ content: "\f2d7";
+}
+.fa-imdb:before {
+ content: "\f2d8";
+}
+.fa-ravelry:before {
+ content: "\f2d9";
+}
+.fa-eercast:before {
+ content: "\f2da";
+}
+.fa-microchip:before {
+ content: "\f2db";
+}
+.fa-snowflake-o:before {
+ content: "\f2dc";
+}
+.fa-superpowers:before {
+ content: "\f2dd";
+}
+.fa-wpexplorer:before {
+ content: "\f2de";
+}
+.fa-meetup:before {
+ content: "\f2e0";
+}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+}
diff --git a/functions/kirki/assets/vendor/fontawesome/css/font-awesome.min.css b/functions/kirki/assets/vendor/fontawesome/css/font-awesome.min.css
new file mode 100644
index 0000000..540440c
--- /dev/null
+++ b/functions/kirki/assets/vendor/fontawesome/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
diff --git a/functions/kirki/assets/vendor/fontawesome/fontawesome.json b/functions/kirki/assets/vendor/fontawesome/fontawesome.json
new file mode 100644
index 0000000..5986779
--- /dev/null
+++ b/functions/kirki/assets/vendor/fontawesome/fontawesome.json
@@ -0,0 +1,8315 @@
+{
+ "icons": [
+ {
+ "name": "Glass",
+ "id": "glass",
+ "unicode": "f000",
+ "created": 1,
+ "filter": [
+ "martini",
+ "drink",
+ "bar",
+ "alcohol",
+ "liquor"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Music",
+ "id": "music",
+ "unicode": "f001",
+ "created": 1,
+ "filter": [
+ "note",
+ "sound"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Search",
+ "id": "search",
+ "unicode": "f002",
+ "created": 1,
+ "filter": [
+ "magnify",
+ "zoom",
+ "enlarge",
+ "bigger"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Envelope Outlined",
+ "id": "envelope-o",
+ "unicode": "f003",
+ "created": 1,
+ "filter": [
+ "email",
+ "e-mail",
+ "letter",
+ "support",
+ "mail",
+ "message",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Heart",
+ "id": "heart",
+ "unicode": "f004",
+ "created": 1,
+ "filter": [
+ "love",
+ "like",
+ "favorite"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Star",
+ "id": "star",
+ "unicode": "f005",
+ "created": 1,
+ "filter": [
+ "award",
+ "achievement",
+ "night",
+ "rating",
+ "score",
+ "favorite"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Star Outlined",
+ "id": "star-o",
+ "unicode": "f006",
+ "created": 1,
+ "filter": [
+ "award",
+ "achievement",
+ "night",
+ "rating",
+ "score",
+ "favorite"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "User",
+ "id": "user",
+ "unicode": "f007",
+ "created": 1,
+ "filter": [
+ "person",
+ "man",
+ "head",
+ "profile"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Film",
+ "id": "film",
+ "unicode": "f008",
+ "created": 1,
+ "filter": [
+ "movie"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "th-large",
+ "id": "th-large",
+ "unicode": "f009",
+ "created": 1,
+ "filter": [
+ "blocks",
+ "squares",
+ "boxes",
+ "grid"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "th",
+ "id": "th",
+ "unicode": "f00a",
+ "created": 1,
+ "filter": [
+ "blocks",
+ "squares",
+ "boxes",
+ "grid"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "th-list",
+ "id": "th-list",
+ "unicode": "f00b",
+ "created": 1,
+ "filter": [
+ "ul",
+ "ol",
+ "checklist",
+ "finished",
+ "completed",
+ "done",
+ "todo"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Check",
+ "id": "check",
+ "unicode": "f00c",
+ "created": 1,
+ "filter": [
+ "checkmark",
+ "done",
+ "todo",
+ "agree",
+ "accept",
+ "confirm",
+ "tick",
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Times",
+ "id": "times",
+ "unicode": "f00d",
+ "created": 1,
+ "aliases": [
+ "remove",
+ "close"
+ ],
+ "filter": [
+ "close",
+ "exit",
+ "x",
+ "cross"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Search Plus",
+ "id": "search-plus",
+ "unicode": "f00e",
+ "created": 1,
+ "filter": [
+ "magnify",
+ "zoom",
+ "enlarge",
+ "bigger"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Search Minus",
+ "id": "search-minus",
+ "unicode": "f010",
+ "created": 1,
+ "filter": [
+ "magnify",
+ "minify",
+ "zoom",
+ "smaller"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Power Off",
+ "id": "power-off",
+ "unicode": "f011",
+ "created": 1,
+ "filter": [
+ "on"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "signal",
+ "id": "signal",
+ "unicode": "f012",
+ "created": 1,
+ "filter": [
+ "graph",
+ "bars"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "cog",
+ "id": "cog",
+ "unicode": "f013",
+ "created": 1,
+ "filter": [
+ "settings"
+ ],
+ "aliases": [
+ "gear"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Spinner Icons"
+ ]
+ },
+ {
+ "name": "Trash Outlined",
+ "id": "trash-o",
+ "unicode": "f014",
+ "created": 1,
+ "filter": [
+ "garbage",
+ "delete",
+ "remove",
+ "trash",
+ "hide"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "home",
+ "id": "home",
+ "unicode": "f015",
+ "created": 1,
+ "filter": [
+ "main",
+ "house"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "File Outlined",
+ "id": "file-o",
+ "unicode": "f016",
+ "created": 1,
+ "filter": [
+ "new",
+ "page",
+ "pdf",
+ "document"
+ ],
+ "categories": [
+ "Text Editor Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Clock Outlined",
+ "id": "clock-o",
+ "unicode": "f017",
+ "created": 1,
+ "filter": [
+ "watch",
+ "timer",
+ "late",
+ "timestamp"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "road",
+ "id": "road",
+ "unicode": "f018",
+ "created": 1,
+ "filter": [
+ "street"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Download",
+ "id": "download",
+ "unicode": "f019",
+ "created": 1,
+ "filter": [
+ "import"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Outlined Down",
+ "id": "arrow-circle-o-down",
+ "unicode": "f01a",
+ "created": 1,
+ "filter": [
+ "download"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Outlined Up",
+ "id": "arrow-circle-o-up",
+ "unicode": "f01b",
+ "created": 1,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "inbox",
+ "id": "inbox",
+ "unicode": "f01c",
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Play Circle Outlined",
+ "id": "play-circle-o",
+ "unicode": "f01d",
+ "created": 1,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Repeat",
+ "id": "repeat",
+ "unicode": "f01e",
+ "created": 1,
+ "filter": [
+ "redo",
+ "forward"
+ ],
+ "aliases": [
+ "rotate-right"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "refresh",
+ "id": "refresh",
+ "unicode": "f021",
+ "created": 1,
+ "filter": [
+ "reload",
+ "sync"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Spinner Icons"
+ ]
+ },
+ {
+ "name": "list-alt",
+ "id": "list-alt",
+ "unicode": "f022",
+ "created": 1,
+ "filter": [
+ "ul",
+ "ol",
+ "checklist",
+ "finished",
+ "completed",
+ "done",
+ "todo"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "lock",
+ "id": "lock",
+ "unicode": "f023",
+ "created": 1,
+ "filter": [
+ "protect",
+ "admin",
+ "security"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "flag",
+ "id": "flag",
+ "unicode": "f024",
+ "created": 1,
+ "filter": [
+ "report",
+ "notification",
+ "notify"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "headphones",
+ "id": "headphones",
+ "unicode": "f025",
+ "created": 1,
+ "filter": [
+ "sound",
+ "listen",
+ "music",
+ "audio"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "volume-off",
+ "id": "volume-off",
+ "unicode": "f026",
+ "created": 1,
+ "filter": [
+ "audio",
+ "mute",
+ "sound",
+ "music"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "volume-down",
+ "id": "volume-down",
+ "unicode": "f027",
+ "created": 1,
+ "filter": [
+ "audio",
+ "lower",
+ "quieter",
+ "sound",
+ "music"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "volume-up",
+ "id": "volume-up",
+ "unicode": "f028",
+ "created": 1,
+ "filter": [
+ "audio",
+ "higher",
+ "louder",
+ "sound",
+ "music"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "qrcode",
+ "id": "qrcode",
+ "unicode": "f029",
+ "created": 1,
+ "filter": [
+ "scan"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "barcode",
+ "id": "barcode",
+ "unicode": "f02a",
+ "created": 1,
+ "filter": [
+ "scan"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "tag",
+ "id": "tag",
+ "unicode": "f02b",
+ "created": 1,
+ "filter": [
+ "label"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "tags",
+ "id": "tags",
+ "unicode": "f02c",
+ "created": 1,
+ "filter": [
+ "labels"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "book",
+ "id": "book",
+ "unicode": "f02d",
+ "created": 1,
+ "filter": [
+ "read",
+ "documentation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "bookmark",
+ "id": "bookmark",
+ "unicode": "f02e",
+ "created": 1,
+ "filter": [
+ "save"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "print",
+ "id": "print",
+ "unicode": "f02f",
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "camera",
+ "id": "camera",
+ "unicode": "f030",
+ "created": 1,
+ "filter": [
+ "photo",
+ "picture",
+ "record"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "font",
+ "id": "font",
+ "unicode": "f031",
+ "created": 1,
+ "filter": [
+ "text"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "bold",
+ "id": "bold",
+ "unicode": "f032",
+ "created": 1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "italic",
+ "id": "italic",
+ "unicode": "f033",
+ "created": 1,
+ "filter": [
+ "italics"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "text-height",
+ "id": "text-height",
+ "unicode": "f034",
+ "created": 1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "text-width",
+ "id": "text-width",
+ "unicode": "f035",
+ "created": 1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "align-left",
+ "id": "align-left",
+ "unicode": "f036",
+ "created": 1,
+ "filter": [
+ "text"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "align-center",
+ "id": "align-center",
+ "unicode": "f037",
+ "created": 1,
+ "filter": [
+ "middle",
+ "text"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "align-right",
+ "id": "align-right",
+ "unicode": "f038",
+ "created": 1,
+ "filter": [
+ "text"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "align-justify",
+ "id": "align-justify",
+ "unicode": "f039",
+ "created": 1,
+ "filter": [
+ "text"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "list",
+ "id": "list",
+ "unicode": "f03a",
+ "created": 1,
+ "filter": [
+ "ul",
+ "ol",
+ "checklist",
+ "finished",
+ "completed",
+ "done",
+ "todo"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Outdent",
+ "id": "outdent",
+ "unicode": "f03b",
+ "created": 1,
+ "aliases": [
+ "dedent"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Indent",
+ "id": "indent",
+ "unicode": "f03c",
+ "created": 1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Video Camera",
+ "id": "video-camera",
+ "unicode": "f03d",
+ "created": 1,
+ "filter": [
+ "film",
+ "movie",
+ "record"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Picture Outlined",
+ "id": "picture-o",
+ "unicode": "f03e",
+ "created": 1,
+ "aliases": [
+ "photo",
+ "image"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "pencil",
+ "id": "pencil",
+ "unicode": "f040",
+ "created": 1,
+ "filter": [
+ "write",
+ "edit",
+ "update"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "map-marker",
+ "id": "map-marker",
+ "unicode": "f041",
+ "created": 1,
+ "filter": [
+ "map",
+ "pin",
+ "location",
+ "coordinates",
+ "localize",
+ "address",
+ "travel",
+ "where",
+ "place"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "adjust",
+ "id": "adjust",
+ "unicode": "f042",
+ "created": 1,
+ "filter": [
+ "contrast"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "tint",
+ "id": "tint",
+ "unicode": "f043",
+ "created": 1,
+ "filter": [
+ "raindrop",
+ "waterdrop",
+ "drop",
+ "droplet"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Pencil Square Outlined",
+ "id": "pencil-square-o",
+ "unicode": "f044",
+ "created": 1,
+ "filter": [
+ "write",
+ "edit",
+ "update"
+ ],
+ "aliases": [
+ "edit"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Share Square Outlined",
+ "id": "share-square-o",
+ "unicode": "f045",
+ "created": 1,
+ "filter": [
+ "social",
+ "send",
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Check Square Outlined",
+ "id": "check-square-o",
+ "unicode": "f046",
+ "created": 1,
+ "filter": [
+ "todo",
+ "done",
+ "agree",
+ "accept",
+ "confirm",
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Arrows",
+ "id": "arrows",
+ "unicode": "f047",
+ "created": 1,
+ "filter": [
+ "move",
+ "reorder",
+ "resize"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "step-backward",
+ "id": "step-backward",
+ "unicode": "f048",
+ "created": 1,
+ "filter": [
+ "rewind",
+ "previous",
+ "beginning",
+ "start",
+ "first"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "fast-backward",
+ "id": "fast-backward",
+ "unicode": "f049",
+ "created": 1,
+ "filter": [
+ "rewind",
+ "previous",
+ "beginning",
+ "start",
+ "first"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "backward",
+ "id": "backward",
+ "unicode": "f04a",
+ "created": 1,
+ "filter": [
+ "rewind",
+ "previous"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "play",
+ "id": "play",
+ "unicode": "f04b",
+ "created": 1,
+ "filter": [
+ "start",
+ "playing",
+ "music",
+ "sound"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "pause",
+ "id": "pause",
+ "unicode": "f04c",
+ "created": 1,
+ "filter": [
+ "wait"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "stop",
+ "id": "stop",
+ "unicode": "f04d",
+ "created": 1,
+ "filter": [
+ "block",
+ "box",
+ "square"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "forward",
+ "id": "forward",
+ "unicode": "f04e",
+ "created": 1,
+ "filter": [
+ "forward",
+ "next"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "fast-forward",
+ "id": "fast-forward",
+ "unicode": "f050",
+ "created": 1,
+ "filter": [
+ "next",
+ "end",
+ "last"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "step-forward",
+ "id": "step-forward",
+ "unicode": "f051",
+ "created": 1,
+ "filter": [
+ "next",
+ "end",
+ "last"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "eject",
+ "id": "eject",
+ "unicode": "f052",
+ "created": 1,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "chevron-left",
+ "id": "chevron-left",
+ "unicode": "f053",
+ "created": 1,
+ "filter": [
+ "bracket",
+ "previous",
+ "back"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "chevron-right",
+ "id": "chevron-right",
+ "unicode": "f054",
+ "created": 1,
+ "filter": [
+ "bracket",
+ "next",
+ "forward"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Plus Circle",
+ "id": "plus-circle",
+ "unicode": "f055",
+ "created": 1,
+ "filter": [
+ "add",
+ "new",
+ "create",
+ "expand"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Minus Circle",
+ "id": "minus-circle",
+ "unicode": "f056",
+ "created": 1,
+ "filter": [
+ "delete",
+ "remove",
+ "trash",
+ "hide"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Times Circle",
+ "id": "times-circle",
+ "unicode": "f057",
+ "created": 1,
+ "filter": [
+ "close",
+ "exit",
+ "x"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Check Circle",
+ "id": "check-circle",
+ "unicode": "f058",
+ "created": 1,
+ "filter": [
+ "todo",
+ "done",
+ "agree",
+ "accept",
+ "confirm",
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Question Circle",
+ "id": "question-circle",
+ "unicode": "f059",
+ "filter": [
+ "help",
+ "information",
+ "unknown",
+ "support"
+ ],
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Info Circle",
+ "id": "info-circle",
+ "unicode": "f05a",
+ "created": 1,
+ "filter": [
+ "help",
+ "information",
+ "more",
+ "details"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Crosshairs",
+ "id": "crosshairs",
+ "unicode": "f05b",
+ "created": 1,
+ "filter": [
+ "picker"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Times Circle Outlined",
+ "id": "times-circle-o",
+ "unicode": "f05c",
+ "created": 1,
+ "filter": [
+ "close",
+ "exit",
+ "x"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Check Circle Outlined",
+ "id": "check-circle-o",
+ "unicode": "f05d",
+ "created": 1,
+ "filter": [
+ "todo",
+ "done",
+ "agree",
+ "accept",
+ "confirm",
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "ban",
+ "id": "ban",
+ "unicode": "f05e",
+ "created": 1,
+ "filter": [
+ "delete",
+ "remove",
+ "trash",
+ "hide",
+ "block",
+ "stop",
+ "abort",
+ "cancel"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "arrow-left",
+ "id": "arrow-left",
+ "unicode": "f060",
+ "created": 1,
+ "filter": [
+ "previous",
+ "back"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "arrow-right",
+ "id": "arrow-right",
+ "unicode": "f061",
+ "created": 1,
+ "filter": [
+ "next",
+ "forward"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "arrow-up",
+ "id": "arrow-up",
+ "unicode": "f062",
+ "created": 1,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "arrow-down",
+ "id": "arrow-down",
+ "unicode": "f063",
+ "created": 1,
+ "filter": [
+ "download"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Share",
+ "id": "share",
+ "unicode": "f064",
+ "created": 1,
+ "aliases": [
+ "mail-forward"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Expand",
+ "id": "expand",
+ "unicode": "f065",
+ "created": 1,
+ "filter": [
+ "enlarge",
+ "bigger",
+ "resize"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Compress",
+ "id": "compress",
+ "unicode": "f066",
+ "created": 1,
+ "filter": [
+ "collapse",
+ "combine",
+ "contract",
+ "merge",
+ "smaller"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "plus",
+ "id": "plus",
+ "unicode": "f067",
+ "created": 1,
+ "filter": [
+ "add",
+ "new",
+ "create",
+ "expand"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "minus",
+ "id": "minus",
+ "unicode": "f068",
+ "created": 1,
+ "filter": [
+ "hide",
+ "minify",
+ "delete",
+ "remove",
+ "trash",
+ "hide",
+ "collapse"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "asterisk",
+ "id": "asterisk",
+ "unicode": "f069",
+ "created": 1,
+ "filter": [
+ "details"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Exclamation Circle",
+ "id": "exclamation-circle",
+ "unicode": "f06a",
+ "created": 1,
+ "filter": [
+ "warning",
+ "error",
+ "problem",
+ "notification",
+ "alert"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "gift",
+ "id": "gift",
+ "unicode": "f06b",
+ "created": 1,
+ "filter": [
+ "present"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "leaf",
+ "id": "leaf",
+ "unicode": "f06c",
+ "created": 1,
+ "filter": [
+ "eco",
+ "nature",
+ "plant"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "fire",
+ "id": "fire",
+ "unicode": "f06d",
+ "created": 1,
+ "filter": [
+ "flame",
+ "hot",
+ "popular"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Eye",
+ "id": "eye",
+ "unicode": "f06e",
+ "created": 1,
+ "filter": [
+ "show",
+ "visible",
+ "views"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Eye Slash",
+ "id": "eye-slash",
+ "unicode": "f070",
+ "created": 1,
+ "filter": [
+ "toggle",
+ "show",
+ "hide",
+ "visible",
+ "visiblity",
+ "views"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Exclamation Triangle",
+ "id": "exclamation-triangle",
+ "unicode": "f071",
+ "created": 1,
+ "filter": [
+ "warning",
+ "error",
+ "problem",
+ "notification",
+ "alert"
+ ],
+ "aliases": [
+ "warning"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "plane",
+ "id": "plane",
+ "unicode": "f072",
+ "created": 1,
+ "filter": [
+ "travel",
+ "trip",
+ "location",
+ "destination",
+ "airplane",
+ "fly",
+ "mode"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "calendar",
+ "id": "calendar",
+ "unicode": "f073",
+ "created": 1,
+ "filter": [
+ "date",
+ "time",
+ "when",
+ "event"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "random",
+ "id": "random",
+ "unicode": "f074",
+ "created": 1,
+ "filter": [
+ "sort",
+ "shuffle"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "comment",
+ "id": "comment",
+ "unicode": "f075",
+ "created": 1,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "magnet",
+ "id": "magnet",
+ "unicode": "f076",
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "chevron-up",
+ "id": "chevron-up",
+ "unicode": "f077",
+ "created": 1,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "chevron-down",
+ "id": "chevron-down",
+ "unicode": "f078",
+ "created": 1,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "retweet",
+ "id": "retweet",
+ "unicode": "f079",
+ "created": 1,
+ "filter": [
+ "refresh",
+ "reload",
+ "share"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "shopping-cart",
+ "id": "shopping-cart",
+ "unicode": "f07a",
+ "created": 1,
+ "filter": [
+ "checkout",
+ "buy",
+ "purchase",
+ "payment"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Folder",
+ "id": "folder",
+ "unicode": "f07b",
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Folder Open",
+ "id": "folder-open",
+ "unicode": "f07c",
+ "created": 1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Arrows Vertical",
+ "id": "arrows-v",
+ "unicode": "f07d",
+ "created": 1,
+ "filter": [
+ "resize"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrows Horizontal",
+ "id": "arrows-h",
+ "unicode": "f07e",
+ "created": 1,
+ "filter": [
+ "resize"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Bar Chart",
+ "id": "bar-chart",
+ "unicode": "f080",
+ "created": 1,
+ "aliases": [
+ "bar-chart-o"
+ ],
+ "filter": [
+ "graph",
+ "analytics"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Chart Icons"
+ ]
+ },
+ {
+ "name": "Twitter Square",
+ "id": "twitter-square",
+ "unicode": "f081",
+ "created": 1,
+ "filter": [
+ "tweet",
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Facebook Square",
+ "id": "facebook-square",
+ "unicode": "f082",
+ "created": 1,
+ "filter": [
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "camera-retro",
+ "id": "camera-retro",
+ "unicode": "f083",
+ "created": 1,
+ "filter": [
+ "photo",
+ "picture",
+ "record"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "key",
+ "id": "key",
+ "unicode": "f084",
+ "created": 1,
+ "filter": [
+ "unlock",
+ "password"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "cogs",
+ "id": "cogs",
+ "unicode": "f085",
+ "created": 1,
+ "aliases": [
+ "gears"
+ ],
+ "filter": [
+ "settings"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "comments",
+ "id": "comments",
+ "unicode": "f086",
+ "created": 1,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Thumbs Up Outlined",
+ "id": "thumbs-o-up",
+ "unicode": "f087",
+ "created": 1,
+ "filter": [
+ "like",
+ "approve",
+ "favorite",
+ "agree",
+ "hand"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Thumbs Down Outlined",
+ "id": "thumbs-o-down",
+ "unicode": "f088",
+ "created": 1,
+ "filter": [
+ "dislike",
+ "disapprove",
+ "disagree",
+ "hand"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "star-half",
+ "id": "star-half",
+ "unicode": "f089",
+ "created": 1,
+ "filter": [
+ "award",
+ "achievement",
+ "rating",
+ "score"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Heart Outlined",
+ "id": "heart-o",
+ "unicode": "f08a",
+ "created": 1,
+ "filter": [
+ "love",
+ "like",
+ "favorite"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Sign Out",
+ "id": "sign-out",
+ "unicode": "f08b",
+ "created": 1,
+ "filter": [
+ "log out",
+ "logout",
+ "leave",
+ "exit",
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "LinkedIn Square",
+ "id": "linkedin-square",
+ "unicode": "f08c",
+ "created": 1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Thumb Tack",
+ "id": "thumb-tack",
+ "unicode": "f08d",
+ "created": 1,
+ "filter": [
+ "marker",
+ "pin",
+ "location",
+ "coordinates"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "External Link",
+ "id": "external-link",
+ "unicode": "f08e",
+ "created": 1,
+ "filter": [
+ "open",
+ "new"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sign In",
+ "id": "sign-in",
+ "unicode": "f090",
+ "created": 1,
+ "filter": [
+ "enter",
+ "join",
+ "log in",
+ "login",
+ "sign up",
+ "sign in",
+ "signin",
+ "signup",
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "trophy",
+ "id": "trophy",
+ "unicode": "f091",
+ "created": 1,
+ "filter": [
+ "award",
+ "achievement",
+ "cup",
+ "winner",
+ "game"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "GitHub Square",
+ "id": "github-square",
+ "unicode": "f092",
+ "created": 1,
+ "url": "github.com/logos",
+ "filter": [
+ "octocat"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Upload",
+ "id": "upload",
+ "unicode": "f093",
+ "created": 1,
+ "filter": [
+ "import"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Lemon Outlined",
+ "id": "lemon-o",
+ "unicode": "f094",
+ "created": 1,
+ "filter": [
+ "food"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Phone",
+ "id": "phone",
+ "unicode": "f095",
+ "created": 2,
+ "filter": [
+ "call",
+ "voice",
+ "number",
+ "support",
+ "earphone",
+ "telephone"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Square Outlined",
+ "id": "square-o",
+ "unicode": "f096",
+ "created": 2,
+ "filter": [
+ "block",
+ "square",
+ "box"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Bookmark Outlined",
+ "id": "bookmark-o",
+ "unicode": "f097",
+ "created": 2,
+ "filter": [
+ "save"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Phone Square",
+ "id": "phone-square",
+ "unicode": "f098",
+ "created": 2,
+ "filter": [
+ "call",
+ "voice",
+ "number",
+ "support",
+ "telephone"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Twitter",
+ "id": "twitter",
+ "unicode": "f099",
+ "created": 2,
+ "filter": [
+ "tweet",
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Facebook",
+ "id": "facebook",
+ "unicode": "f09a",
+ "created": 2,
+ "aliases": [
+ "facebook-f"
+ ],
+ "filter": [
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "GitHub",
+ "id": "github",
+ "unicode": "f09b",
+ "created": 2,
+ "url": "github.com/logos",
+ "filter": [
+ "octocat"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "unlock",
+ "id": "unlock",
+ "unicode": "f09c",
+ "created": 2,
+ "filter": [
+ "protect",
+ "admin",
+ "password",
+ "lock"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "credit-card",
+ "id": "credit-card",
+ "unicode": "f09d",
+ "created": 2,
+ "filter": [
+ "money",
+ "buy",
+ "debit",
+ "checkout",
+ "purchase",
+ "payment"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "rss",
+ "id": "rss",
+ "unicode": "f09e",
+ "created": 2,
+ "filter": [
+ "blog"
+ ],
+ "aliases": [
+ "feed"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "HDD",
+ "id": "hdd-o",
+ "unicode": "f0a0",
+ "created": 2,
+ "filter": [
+ "harddrive",
+ "hard drive",
+ "storage",
+ "save"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "bullhorn",
+ "id": "bullhorn",
+ "unicode": "f0a1",
+ "created": 2,
+ "filter": [
+ "announcement",
+ "share",
+ "broadcast",
+ "louder",
+ "megaphone"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "bell",
+ "id": "bell",
+ "unicode": "f0f3",
+ "created": 2,
+ "filter": [
+ "alert",
+ "reminder",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "certificate",
+ "id": "certificate",
+ "unicode": "f0a3",
+ "created": 2,
+ "filter": [
+ "badge",
+ "star"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hand Outlined Right",
+ "id": "hand-o-right",
+ "unicode": "f0a4",
+ "created": 2,
+ "filter": [
+ "point",
+ "right",
+ "next",
+ "forward",
+ "finger"
+ ],
+ "categories": [
+ "Directional Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Hand Outlined Left",
+ "id": "hand-o-left",
+ "unicode": "f0a5",
+ "created": 2,
+ "filter": [
+ "point",
+ "left",
+ "previous",
+ "back",
+ "finger"
+ ],
+ "categories": [
+ "Directional Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Hand Outlined Up",
+ "id": "hand-o-up",
+ "unicode": "f0a6",
+ "created": 2,
+ "filter": [
+ "point",
+ "finger"
+ ],
+ "categories": [
+ "Directional Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Hand Outlined Down",
+ "id": "hand-o-down",
+ "unicode": "f0a7",
+ "created": 2,
+ "filter": [
+ "point",
+ "finger"
+ ],
+ "categories": [
+ "Directional Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Left",
+ "id": "arrow-circle-left",
+ "unicode": "f0a8",
+ "created": 2,
+ "filter": [
+ "previous",
+ "back"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Right",
+ "id": "arrow-circle-right",
+ "unicode": "f0a9",
+ "created": 2,
+ "filter": [
+ "next",
+ "forward"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Up",
+ "id": "arrow-circle-up",
+ "unicode": "f0aa",
+ "created": 2,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Down",
+ "id": "arrow-circle-down",
+ "unicode": "f0ab",
+ "created": 2,
+ "filter": [
+ "download"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Globe",
+ "id": "globe",
+ "unicode": "f0ac",
+ "created": 2,
+ "filter": [
+ "world",
+ "planet",
+ "map",
+ "place",
+ "travel",
+ "earth",
+ "global",
+ "translate",
+ "all",
+ "language",
+ "localize",
+ "location",
+ "coordinates",
+ "country"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Wrench",
+ "id": "wrench",
+ "unicode": "f0ad",
+ "created": 2,
+ "filter": [
+ "settings",
+ "fix",
+ "update",
+ "spanner"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Tasks",
+ "id": "tasks",
+ "unicode": "f0ae",
+ "created": 2,
+ "filter": [
+ "progress",
+ "loading",
+ "downloading",
+ "downloads",
+ "settings"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Filter",
+ "id": "filter",
+ "unicode": "f0b0",
+ "created": 2,
+ "filter": [
+ "funnel",
+ "options"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Briefcase",
+ "id": "briefcase",
+ "unicode": "f0b1",
+ "created": 2,
+ "filter": [
+ "work",
+ "business",
+ "office",
+ "luggage",
+ "bag"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Arrows Alt",
+ "id": "arrows-alt",
+ "unicode": "f0b2",
+ "created": 2,
+ "filter": [
+ "expand",
+ "enlarge",
+ "fullscreen",
+ "bigger",
+ "move",
+ "reorder",
+ "resize",
+ "arrow"
+ ],
+ "categories": [
+ "Video Player Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Users",
+ "id": "users",
+ "unicode": "f0c0",
+ "created": 2,
+ "filter": [
+ "people",
+ "profiles",
+ "persons"
+ ],
+ "aliases": [
+ "group"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Link",
+ "id": "link",
+ "unicode": "f0c1",
+ "created": 2,
+ "filter": [
+ "chain"
+ ],
+ "aliases": [
+ "chain"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Cloud",
+ "id": "cloud",
+ "filter": [
+ "save"
+ ],
+ "unicode": "f0c2",
+ "created": 2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Flask",
+ "id": "flask",
+ "unicode": "f0c3",
+ "created": 2,
+ "filter": [
+ "science",
+ "beaker",
+ "experimental",
+ "labs"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Scissors",
+ "id": "scissors",
+ "unicode": "f0c4",
+ "created": 2,
+ "aliases": [
+ "cut"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Files Outlined",
+ "id": "files-o",
+ "unicode": "f0c5",
+ "created": 2,
+ "filter": [
+ "duplicate",
+ "clone",
+ "copy"
+ ],
+ "aliases": [
+ "copy"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Paperclip",
+ "id": "paperclip",
+ "unicode": "f0c6",
+ "created": 2,
+ "filter": [
+ "attachment"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Floppy Outlined",
+ "id": "floppy-o",
+ "unicode": "f0c7",
+ "created": 2,
+ "aliases": [
+ "save"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Square",
+ "id": "square",
+ "unicode": "f0c8",
+ "created": 2,
+ "filter": [
+ "block",
+ "box"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Bars",
+ "id": "bars",
+ "unicode": "f0c9",
+ "created": 2,
+ "aliases": [
+ "navicon",
+ "reorder"
+ ],
+ "filter": [
+ "menu",
+ "drag",
+ "reorder",
+ "settings",
+ "list",
+ "ul",
+ "ol",
+ "checklist",
+ "todo",
+ "list",
+ "hamburger"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "list-ul",
+ "id": "list-ul",
+ "unicode": "f0ca",
+ "created": 2,
+ "filter": [
+ "ul",
+ "ol",
+ "checklist",
+ "todo",
+ "list"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "list-ol",
+ "id": "list-ol",
+ "unicode": "f0cb",
+ "created": 2,
+ "filter": [
+ "ul",
+ "ol",
+ "checklist",
+ "list",
+ "todo",
+ "list",
+ "numbers"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Strikethrough",
+ "id": "strikethrough",
+ "unicode": "f0cc",
+ "created": 2,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Underline",
+ "id": "underline",
+ "unicode": "f0cd",
+ "created": 2,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "table",
+ "id": "table",
+ "unicode": "f0ce",
+ "created": 2,
+ "filter": [
+ "data",
+ "excel",
+ "spreadsheet"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "magic",
+ "id": "magic",
+ "unicode": "f0d0",
+ "created": 2,
+ "filter": [
+ "wizard",
+ "automatic",
+ "autocomplete"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "truck",
+ "id": "truck",
+ "unicode": "f0d1",
+ "created": 2,
+ "filter": [
+ "shipping"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Pinterest",
+ "id": "pinterest",
+ "unicode": "f0d2",
+ "created": 2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pinterest Square",
+ "id": "pinterest-square",
+ "unicode": "f0d3",
+ "created": 2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Google Plus Square",
+ "id": "google-plus-square",
+ "unicode": "f0d4",
+ "created": 2,
+ "filter": [
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Google Plus",
+ "id": "google-plus",
+ "unicode": "f0d5",
+ "created": 2,
+ "filter": [
+ "social network"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Money",
+ "id": "money",
+ "unicode": "f0d6",
+ "created": 2,
+ "filter": [
+ "cash",
+ "money",
+ "buy",
+ "checkout",
+ "purchase",
+ "payment"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Caret Down",
+ "id": "caret-down",
+ "unicode": "f0d7",
+ "created": 2,
+ "filter": [
+ "more",
+ "dropdown",
+ "menu",
+ "triangle down",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Up",
+ "id": "caret-up",
+ "unicode": "f0d8",
+ "created": 2,
+ "filter": [
+ "triangle up",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Left",
+ "id": "caret-left",
+ "unicode": "f0d9",
+ "created": 2,
+ "filter": [
+ "previous",
+ "back",
+ "triangle left",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Right",
+ "id": "caret-right",
+ "unicode": "f0da",
+ "created": 2,
+ "filter": [
+ "next",
+ "forward",
+ "triangle right",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Columns",
+ "id": "columns",
+ "unicode": "f0db",
+ "created": 2,
+ "filter": [
+ "split",
+ "panes"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Sort",
+ "id": "sort",
+ "unicode": "f0dc",
+ "created": 2,
+ "filter": [
+ "order"
+ ],
+ "aliases": [
+ "unsorted"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Descending",
+ "id": "sort-desc",
+ "unicode": "f0dd",
+ "created": 2,
+ "filter": [
+ "dropdown",
+ "more",
+ "menu",
+ "arrow"
+ ],
+ "aliases": [
+ "sort-down"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Ascending",
+ "id": "sort-asc",
+ "unicode": "f0de",
+ "created": 2,
+ "aliases": [
+ "sort-up"
+ ],
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Envelope",
+ "id": "envelope",
+ "unicode": "f0e0",
+ "created": 2,
+ "filter": [
+ "email",
+ "e-mail",
+ "letter",
+ "support",
+ "mail",
+ "message",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "LinkedIn",
+ "id": "linkedin",
+ "unicode": "f0e1",
+ "created": 2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Undo",
+ "id": "undo",
+ "unicode": "f0e2",
+ "created": 2,
+ "filter": [
+ "back"
+ ],
+ "aliases": [
+ "rotate-left"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Gavel",
+ "id": "gavel",
+ "unicode": "f0e3",
+ "created": 2,
+ "filter": [
+ "judge",
+ "lawyer",
+ "opinion"
+ ],
+ "aliases": [
+ "legal"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Tachometer",
+ "id": "tachometer",
+ "unicode": "f0e4",
+ "created": 2,
+ "filter": [
+ "speedometer",
+ "fast"
+ ],
+ "aliases": [
+ "dashboard"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "comment-o",
+ "id": "comment-o",
+ "unicode": "f0e5",
+ "created": 2,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "comments-o",
+ "id": "comments-o",
+ "unicode": "f0e6",
+ "created": 2,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Lightning Bolt",
+ "id": "bolt",
+ "unicode": "f0e7",
+ "created": 2,
+ "filter": [
+ "lightning",
+ "weather"
+ ],
+ "aliases": [
+ "flash"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sitemap",
+ "id": "sitemap",
+ "unicode": "f0e8",
+ "created": 2,
+ "filter": [
+ "directory",
+ "hierarchy",
+ "organization"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Umbrella",
+ "id": "umbrella",
+ "unicode": "f0e9",
+ "created": 2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Clipboard",
+ "id": "clipboard",
+ "unicode": "f0ea",
+ "created": 2,
+ "filter": [
+ "copy"
+ ],
+ "aliases": [
+ "paste"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Lightbulb Outlined",
+ "id": "lightbulb-o",
+ "unicode": "f0eb",
+ "created": 3,
+ "filter": [
+ "idea",
+ "inspiration"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Exchange",
+ "id": "exchange",
+ "unicode": "f0ec",
+ "created": 3,
+ "filter": [
+ "transfer",
+ "arrows",
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Cloud Download",
+ "id": "cloud-download",
+ "unicode": "f0ed",
+ "created": 3,
+ "filter": [
+ "import"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Cloud Upload",
+ "id": "cloud-upload",
+ "unicode": "f0ee",
+ "created": 3,
+ "filter": [
+ "import"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "user-md",
+ "id": "user-md",
+ "unicode": "f0f0",
+ "created": 2,
+ "filter": [
+ "doctor",
+ "profile",
+ "medical",
+ "nurse"
+ ],
+ "categories": [
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Stethoscope",
+ "id": "stethoscope",
+ "unicode": "f0f1",
+ "created": 3,
+ "categories": [
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Suitcase",
+ "id": "suitcase",
+ "unicode": "f0f2",
+ "created": 3,
+ "filter": [
+ "trip",
+ "luggage",
+ "travel",
+ "move",
+ "baggage"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bell Outlined",
+ "id": "bell-o",
+ "unicode": "f0a2",
+ "created": 3,
+ "filter": [
+ "alert",
+ "reminder",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Coffee",
+ "id": "coffee",
+ "unicode": "f0f4",
+ "created": 3,
+ "filter": [
+ "morning",
+ "mug",
+ "breakfast",
+ "tea",
+ "drink",
+ "cafe"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Cutlery",
+ "id": "cutlery",
+ "unicode": "f0f5",
+ "created": 3,
+ "filter": [
+ "food",
+ "restaurant",
+ "spoon",
+ "knife",
+ "dinner",
+ "eat"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "File Text Outlined",
+ "id": "file-text-o",
+ "unicode": "f0f6",
+ "created": 3,
+ "filter": [
+ "new",
+ "page",
+ "pdf",
+ "document"
+ ],
+ "categories": [
+ "Text Editor Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Building Outlined",
+ "id": "building-o",
+ "unicode": "f0f7",
+ "created": 3,
+ "filter": [
+ "work",
+ "business",
+ "apartment",
+ "office",
+ "company"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "hospital Outlined",
+ "id": "hospital-o",
+ "unicode": "f0f8",
+ "created": 3,
+ "filter": [
+ "building"
+ ],
+ "categories": [
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "ambulance",
+ "id": "ambulance",
+ "unicode": "f0f9",
+ "created": 3,
+ "filter": [
+ "vehicle",
+ "support",
+ "help"
+ ],
+ "categories": [
+ "Medical Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "medkit",
+ "id": "medkit",
+ "unicode": "f0fa",
+ "created": 3,
+ "filter": [
+ "first aid",
+ "firstaid",
+ "help",
+ "support",
+ "health"
+ ],
+ "categories": [
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "fighter-jet",
+ "id": "fighter-jet",
+ "unicode": "f0fb",
+ "created": 3,
+ "filter": [
+ "fly",
+ "plane",
+ "airplane",
+ "quick",
+ "fast",
+ "travel"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "beer",
+ "id": "beer",
+ "unicode": "f0fc",
+ "created": 3,
+ "filter": [
+ "alcohol",
+ "stein",
+ "drink",
+ "mug",
+ "bar",
+ "liquor"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "H Square",
+ "id": "h-square",
+ "unicode": "f0fd",
+ "created": 3,
+ "filter": [
+ "hospital",
+ "hotel"
+ ],
+ "categories": [
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Plus Square",
+ "id": "plus-square",
+ "unicode": "f0fe",
+ "created": 3,
+ "filter": [
+ "add",
+ "new",
+ "create",
+ "expand"
+ ],
+ "categories": [
+ "Medical Icons",
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Angle Double Left",
+ "id": "angle-double-left",
+ "unicode": "f100",
+ "created": 3,
+ "filter": [
+ "laquo",
+ "quote",
+ "previous",
+ "back",
+ "arrows"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Angle Double Right",
+ "id": "angle-double-right",
+ "unicode": "f101",
+ "created": 3,
+ "filter": [
+ "raquo",
+ "quote",
+ "next",
+ "forward",
+ "arrows"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Angle Double Up",
+ "id": "angle-double-up",
+ "unicode": "f102",
+ "created": 3,
+ "filter": [
+ "arrows"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Angle Double Down",
+ "id": "angle-double-down",
+ "unicode": "f103",
+ "created": 3,
+ "filter": [
+ "arrows"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "angle-left",
+ "id": "angle-left",
+ "unicode": "f104",
+ "created": 3,
+ "filter": [
+ "previous",
+ "back",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "angle-right",
+ "id": "angle-right",
+ "unicode": "f105",
+ "created": 3,
+ "filter": [
+ "next",
+ "forward",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "angle-up",
+ "id": "angle-up",
+ "unicode": "f106",
+ "created": 3,
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "angle-down",
+ "id": "angle-down",
+ "unicode": "f107",
+ "created": 3,
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Desktop",
+ "id": "desktop",
+ "unicode": "f108",
+ "created": 3,
+ "filter": [
+ "monitor",
+ "screen",
+ "desktop",
+ "computer",
+ "demo",
+ "device"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Laptop",
+ "id": "laptop",
+ "unicode": "f109",
+ "created": 3,
+ "filter": [
+ "demo",
+ "computer",
+ "device"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "tablet",
+ "id": "tablet",
+ "unicode": "f10a",
+ "created": 3,
+ "filter": [
+ "ipad",
+ "device"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Mobile Phone",
+ "id": "mobile",
+ "unicode": "f10b",
+ "created": 3,
+ "filter": [
+ "cell phone",
+ "cellphone",
+ "text",
+ "call",
+ "iphone",
+ "number",
+ "telephone"
+ ],
+ "aliases": [
+ "mobile-phone"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Circle Outlined",
+ "id": "circle-o",
+ "unicode": "f10c",
+ "created": 3,
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "quote-left",
+ "id": "quote-left",
+ "unicode": "f10d",
+ "created": 3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "quote-right",
+ "id": "quote-right",
+ "unicode": "f10e",
+ "created": 3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Spinner",
+ "id": "spinner",
+ "unicode": "f110",
+ "created": 3,
+ "filter": [
+ "loading",
+ "progress"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Spinner Icons"
+ ]
+ },
+ {
+ "name": "Circle",
+ "id": "circle",
+ "unicode": "f111",
+ "created": 3,
+ "filter": [
+ "dot",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Reply",
+ "id": "reply",
+ "unicode": "f112",
+ "created": 3,
+ "aliases": [
+ "mail-reply"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "GitHub Alt",
+ "id": "github-alt",
+ "unicode": "f113",
+ "created": 3,
+ "url": "github.com/logos",
+ "filter": [
+ "octocat"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Folder Outlined",
+ "id": "folder-o",
+ "unicode": "f114",
+ "created": 3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Folder Open Outlined",
+ "id": "folder-open-o",
+ "unicode": "f115",
+ "created": 3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Smile Outlined",
+ "id": "smile-o",
+ "unicode": "f118",
+ "created": 3.1,
+ "filter": [
+ "face",
+ "emoticon",
+ "happy",
+ "approve",
+ "satisfied",
+ "rating"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Frown Outlined",
+ "id": "frown-o",
+ "unicode": "f119",
+ "created": 3.1,
+ "filter": [
+ "face",
+ "emoticon",
+ "sad",
+ "disapprove",
+ "rating"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Meh Outlined",
+ "id": "meh-o",
+ "unicode": "f11a",
+ "created": 3.1,
+ "filter": [
+ "face",
+ "emoticon",
+ "rating",
+ "neutral"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Gamepad",
+ "id": "gamepad",
+ "unicode": "f11b",
+ "created": 3.1,
+ "filter": [
+ "controller"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Keyboard Outlined",
+ "id": "keyboard-o",
+ "unicode": "f11c",
+ "created": 3.1,
+ "filter": [
+ "type",
+ "input"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Flag Outlined",
+ "id": "flag-o",
+ "unicode": "f11d",
+ "created": 3.1,
+ "filter": [
+ "report",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "flag-checkered",
+ "id": "flag-checkered",
+ "unicode": "f11e",
+ "created": 3.1,
+ "filter": [
+ "report",
+ "notification",
+ "notify"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Terminal",
+ "id": "terminal",
+ "unicode": "f120",
+ "created": 3.1,
+ "filter": [
+ "command",
+ "prompt",
+ "code"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Code",
+ "id": "code",
+ "unicode": "f121",
+ "created": 3.1,
+ "filter": [
+ "html",
+ "brackets"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "reply-all",
+ "id": "reply-all",
+ "unicode": "f122",
+ "created": 3.1,
+ "aliases": [
+ "mail-reply-all"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Star Half Outlined",
+ "id": "star-half-o",
+ "unicode": "f123",
+ "created": 3.1,
+ "filter": [
+ "award",
+ "achievement",
+ "rating",
+ "score"
+ ],
+ "aliases": [
+ "star-half-empty",
+ "star-half-full"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "location-arrow",
+ "id": "location-arrow",
+ "unicode": "f124",
+ "created": 3.1,
+ "filter": [
+ "map",
+ "coordinates",
+ "location",
+ "address",
+ "place",
+ "where"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "crop",
+ "id": "crop",
+ "unicode": "f125",
+ "created": 3.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "code-fork",
+ "id": "code-fork",
+ "unicode": "f126",
+ "created": 3.1,
+ "filter": [
+ "git",
+ "fork",
+ "vcs",
+ "svn",
+ "github",
+ "rebase",
+ "version",
+ "merge"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Chain Broken",
+ "id": "chain-broken",
+ "unicode": "f127",
+ "created": 3.1,
+ "filter": [
+ "remove"
+ ],
+ "aliases": [
+ "unlink"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Question",
+ "id": "question",
+ "unicode": "f128",
+ "created": 3.1,
+ "filter": [
+ "help",
+ "information",
+ "unknown",
+ "support"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Info",
+ "id": "info",
+ "unicode": "f129",
+ "created": 3.1,
+ "filter": [
+ "help",
+ "information",
+ "more",
+ "details"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "exclamation",
+ "id": "exclamation",
+ "unicode": "f12a",
+ "created": 3.1,
+ "filter": [
+ "warning",
+ "error",
+ "problem",
+ "notification",
+ "notify",
+ "alert"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "superscript",
+ "id": "superscript",
+ "unicode": "f12b",
+ "created": 3.1,
+ "filter": [
+ "exponential"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "subscript",
+ "id": "subscript",
+ "unicode": "f12c",
+ "created": 3.1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "eraser",
+ "id": "eraser",
+ "unicode": "f12d",
+ "created": 3.1,
+ "filter": [
+ "remove",
+ "delete"
+ ],
+ "categories": [
+ "Text Editor Icons",
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Puzzle Piece",
+ "id": "puzzle-piece",
+ "unicode": "f12e",
+ "created": 3.1,
+ "filter": [
+ "addon",
+ "add-on",
+ "section"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "microphone",
+ "id": "microphone",
+ "unicode": "f130",
+ "created": 3.1,
+ "filter": [
+ "record",
+ "voice",
+ "sound"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Microphone Slash",
+ "id": "microphone-slash",
+ "unicode": "f131",
+ "created": 3.1,
+ "filter": [
+ "record",
+ "voice",
+ "sound",
+ "mute"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "shield",
+ "id": "shield",
+ "unicode": "f132",
+ "created": 3.1,
+ "filter": [
+ "award",
+ "achievement",
+ "security",
+ "winner"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "calendar-o",
+ "id": "calendar-o",
+ "unicode": "f133",
+ "created": 3.1,
+ "filter": [
+ "date",
+ "time",
+ "when",
+ "event"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "fire-extinguisher",
+ "id": "fire-extinguisher",
+ "unicode": "f134",
+ "created": 3.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "rocket",
+ "id": "rocket",
+ "unicode": "f135",
+ "created": 3.1,
+ "filter": [
+ "app"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "MaxCDN",
+ "id": "maxcdn",
+ "unicode": "f136",
+ "created": 3.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Chevron Circle Left",
+ "id": "chevron-circle-left",
+ "unicode": "f137",
+ "created": 3.1,
+ "filter": [
+ "previous",
+ "back",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Chevron Circle Right",
+ "id": "chevron-circle-right",
+ "unicode": "f138",
+ "created": 3.1,
+ "filter": [
+ "next",
+ "forward",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Chevron Circle Up",
+ "id": "chevron-circle-up",
+ "unicode": "f139",
+ "created": 3.1,
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Chevron Circle Down",
+ "id": "chevron-circle-down",
+ "unicode": "f13a",
+ "created": 3.1,
+ "filter": [
+ "more",
+ "dropdown",
+ "menu",
+ "arrow"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "HTML 5 Logo",
+ "id": "html5",
+ "unicode": "f13b",
+ "created": 3.1,
+ "code": [
+ "code",
+ "html5"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "CSS 3 Logo",
+ "id": "css3",
+ "unicode": "f13c",
+ "created": 3.1,
+ "filter": [
+ "code"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Anchor",
+ "id": "anchor",
+ "unicode": "f13d",
+ "created": 3.1,
+ "filter": [
+ "link"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Unlock Alt",
+ "id": "unlock-alt",
+ "unicode": "f13e",
+ "created": 3.1,
+ "filter": [
+ "protect",
+ "admin",
+ "password",
+ "lock"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bullseye",
+ "id": "bullseye",
+ "unicode": "f140",
+ "created": 3.1,
+ "filter": [
+ "target"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Ellipsis Horizontal",
+ "id": "ellipsis-h",
+ "unicode": "f141",
+ "created": 3.1,
+ "filter": [
+ "dots"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Ellipsis Vertical",
+ "id": "ellipsis-v",
+ "unicode": "f142",
+ "created": 3.1,
+ "filter": [
+ "dots"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "RSS Square",
+ "id": "rss-square",
+ "unicode": "f143",
+ "created": 3.1,
+ "filter": [
+ "feed",
+ "blog"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Play Circle",
+ "id": "play-circle",
+ "unicode": "f144",
+ "created": 3.1,
+ "filter": [
+ "start",
+ "playing"
+ ],
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Ticket",
+ "id": "ticket",
+ "unicode": "f145",
+ "created": 3.1,
+ "filter": [
+ "movie",
+ "pass",
+ "support"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Minus Square",
+ "id": "minus-square",
+ "unicode": "f146",
+ "created": 3.1,
+ "filter": [
+ "hide",
+ "minify",
+ "delete",
+ "remove",
+ "trash",
+ "hide",
+ "collapse"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Minus Square Outlined",
+ "id": "minus-square-o",
+ "unicode": "f147",
+ "created": 3.1,
+ "filter": [
+ "hide",
+ "minify",
+ "delete",
+ "remove",
+ "trash",
+ "hide",
+ "collapse"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Level Up",
+ "id": "level-up",
+ "unicode": "f148",
+ "created": 3.1,
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Level Down",
+ "id": "level-down",
+ "unicode": "f149",
+ "created": 3.1,
+ "filter": [
+ "arrow"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Check Square",
+ "id": "check-square",
+ "unicode": "f14a",
+ "created": 3.1,
+ "filter": [
+ "checkmark",
+ "done",
+ "todo",
+ "agree",
+ "accept",
+ "confirm",
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Pencil Square",
+ "id": "pencil-square",
+ "unicode": "f14b",
+ "created": 3.1,
+ "filter": [
+ "write",
+ "edit",
+ "update"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "External Link Square",
+ "id": "external-link-square",
+ "unicode": "f14c",
+ "created": 3.1,
+ "filter": [
+ "open",
+ "new"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Share Square",
+ "id": "share-square",
+ "unicode": "f14d",
+ "created": 3.1,
+ "filter": [
+ "social",
+ "send"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Compass",
+ "id": "compass",
+ "unicode": "f14e",
+ "created": 3.2,
+ "filter": [
+ "safari",
+ "directory",
+ "menu",
+ "location"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Caret Square Outlined Down",
+ "id": "caret-square-o-down",
+ "unicode": "f150",
+ "created": 3.2,
+ "aliases": [
+ "toggle-down"
+ ],
+ "filter": [
+ "more",
+ "dropdown",
+ "menu"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Square Outlined Up",
+ "id": "caret-square-o-up",
+ "unicode": "f151",
+ "created": 3.2,
+ "aliases": [
+ "toggle-up"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Square Outlined Right",
+ "id": "caret-square-o-right",
+ "unicode": "f152",
+ "created": 3.2,
+ "filter": [
+ "next",
+ "forward"
+ ],
+ "aliases": [
+ "toggle-right"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Euro (EUR)",
+ "id": "eur",
+ "unicode": "f153",
+ "created": 3.2,
+ "aliases": [
+ "euro"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "GBP",
+ "id": "gbp",
+ "unicode": "f154",
+ "created": 3.2,
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "US Dollar",
+ "id": "usd",
+ "unicode": "f155",
+ "created": 3.2,
+ "aliases": [
+ "dollar"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Indian Rupee (INR)",
+ "id": "inr",
+ "unicode": "f156",
+ "created": 3.2,
+ "aliases": [
+ "rupee"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Japanese Yen (JPY)",
+ "id": "jpy",
+ "unicode": "f157",
+ "created": 3.2,
+ "aliases": [
+ "cny",
+ "rmb",
+ "yen"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Russian Ruble (RUB)",
+ "id": "rub",
+ "unicode": "f158",
+ "created": 4,
+ "aliases": [
+ "ruble",
+ "rouble"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Korean Won (KRW)",
+ "id": "krw",
+ "unicode": "f159",
+ "created": 3.2,
+ "aliases": [
+ "won"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Bitcoin (BTC)",
+ "id": "btc",
+ "unicode": "f15a",
+ "created": 3.2,
+ "aliases": [
+ "bitcoin"
+ ],
+ "categories": [
+ "Currency Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "File",
+ "id": "file",
+ "unicode": "f15b",
+ "created": 3.2,
+ "filter": [
+ "new",
+ "page",
+ "pdf",
+ "document"
+ ],
+ "categories": [
+ "Text Editor Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "File Text",
+ "id": "file-text",
+ "unicode": "f15c",
+ "created": 3.2,
+ "filter": [
+ "new",
+ "page",
+ "pdf",
+ "document"
+ ],
+ "categories": [
+ "Text Editor Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Sort Alpha Ascending",
+ "id": "sort-alpha-asc",
+ "unicode": "f15d",
+ "created": 3.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Alpha Descending",
+ "id": "sort-alpha-desc",
+ "unicode": "f15e",
+ "created": 3.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Amount Ascending",
+ "id": "sort-amount-asc",
+ "unicode": "f160",
+ "created": 3.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Amount Descending",
+ "id": "sort-amount-desc",
+ "unicode": "f161",
+ "created": 3.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Numeric Ascending",
+ "id": "sort-numeric-asc",
+ "unicode": "f162",
+ "created": 3.2,
+ "filter": [
+ "numbers"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sort Numeric Descending",
+ "id": "sort-numeric-desc",
+ "unicode": "f163",
+ "created": 3.2,
+ "filter": [
+ "numbers"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "thumbs-up",
+ "id": "thumbs-up",
+ "unicode": "f164",
+ "created": 3.2,
+ "filter": [
+ "like",
+ "favorite",
+ "approve",
+ "agree",
+ "hand"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "thumbs-down",
+ "id": "thumbs-down",
+ "unicode": "f165",
+ "created": 3.2,
+ "filter": [
+ "dislike",
+ "disapprove",
+ "disagree",
+ "hand"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "YouTube Square",
+ "id": "youtube-square",
+ "unicode": "f166",
+ "created": 3.2,
+ "filter": [
+ "video",
+ "film"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "YouTube",
+ "id": "youtube",
+ "unicode": "f167",
+ "created": 3.2,
+ "filter": [
+ "video",
+ "film"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Xing",
+ "id": "xing",
+ "unicode": "f168",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Xing Square",
+ "id": "xing-square",
+ "unicode": "f169",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "YouTube Play",
+ "id": "youtube-play",
+ "unicode": "f16a",
+ "created": 3.2,
+ "filter": [
+ "start",
+ "playing"
+ ],
+ "categories": [
+ "Brand Icons",
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Dropbox",
+ "id": "dropbox",
+ "unicode": "f16b",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Stack Overflow",
+ "id": "stack-overflow",
+ "unicode": "f16c",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Instagram",
+ "id": "instagram",
+ "unicode": "f16d",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Flickr",
+ "id": "flickr",
+ "unicode": "f16e",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "App.net",
+ "id": "adn",
+ "unicode": "f170",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Bitbucket",
+ "id": "bitbucket",
+ "unicode": "f171",
+ "created": 3.2,
+ "filter": [
+ "git"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Bitbucket Square",
+ "id": "bitbucket-square",
+ "unicode": "f172",
+ "created": 3.2,
+ "filter": [
+ "git"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Tumblr",
+ "id": "tumblr",
+ "unicode": "f173",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Tumblr Square",
+ "id": "tumblr-square",
+ "unicode": "f174",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Long Arrow Down",
+ "id": "long-arrow-down",
+ "unicode": "f175",
+ "created": 3.2,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Long Arrow Up",
+ "id": "long-arrow-up",
+ "unicode": "f176",
+ "created": 3.2,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Long Arrow Left",
+ "id": "long-arrow-left",
+ "unicode": "f177",
+ "created": 3.2,
+ "filter": [
+ "previous",
+ "back"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Long Arrow Right",
+ "id": "long-arrow-right",
+ "unicode": "f178",
+ "created": 3.2,
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Apple",
+ "id": "apple",
+ "unicode": "f179",
+ "created": 3.2,
+ "filter": [
+ "osx",
+ "food"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Windows",
+ "id": "windows",
+ "unicode": "f17a",
+ "created": 3.2,
+ "filter": [
+ "microsoft"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Android",
+ "id": "android",
+ "unicode": "f17b",
+ "created": 3.2,
+ "filter": [
+ "robot"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Linux",
+ "id": "linux",
+ "unicode": "f17c",
+ "created": 3.2,
+ "filter": [
+ "tux"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Dribbble",
+ "id": "dribbble",
+ "unicode": "f17d",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Skype",
+ "id": "skype",
+ "unicode": "f17e",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Foursquare",
+ "id": "foursquare",
+ "unicode": "f180",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Trello",
+ "id": "trello",
+ "unicode": "f181",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Female",
+ "id": "female",
+ "unicode": "f182",
+ "created": 3.2,
+ "filter": [
+ "woman",
+ "user",
+ "person",
+ "profile"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Male",
+ "id": "male",
+ "unicode": "f183",
+ "created": 3.2,
+ "filter": [
+ "man",
+ "user",
+ "person",
+ "profile"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Gratipay (Gittip)",
+ "id": "gratipay",
+ "unicode": "f184",
+ "created": 3.2,
+ "aliases": [
+ "gittip"
+ ],
+ "filter": [
+ "heart",
+ "like",
+ "favorite",
+ "love"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Sun Outlined",
+ "id": "sun-o",
+ "unicode": "f185",
+ "created": 3.2,
+ "filter": [
+ "weather",
+ "contrast",
+ "lighter",
+ "brighten",
+ "day"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Moon Outlined",
+ "id": "moon-o",
+ "unicode": "f186",
+ "created": 3.2,
+ "filter": [
+ "night",
+ "darker",
+ "contrast"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Archive",
+ "id": "archive",
+ "unicode": "f187",
+ "created": 3.2,
+ "filter": [
+ "box",
+ "storage"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bug",
+ "id": "bug",
+ "unicode": "f188",
+ "created": 3.2,
+ "filter": [
+ "report",
+ "insect"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "VK",
+ "id": "vk",
+ "unicode": "f189",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Weibo",
+ "id": "weibo",
+ "unicode": "f18a",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Renren",
+ "id": "renren",
+ "unicode": "f18b",
+ "created": 3.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pagelines",
+ "id": "pagelines",
+ "unicode": "f18c",
+ "created": 4,
+ "filter": [
+ "leaf",
+ "leaves",
+ "tree",
+ "plant",
+ "eco",
+ "nature"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Stack Exchange",
+ "id": "stack-exchange",
+ "unicode": "f18d",
+ "created": 4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Outlined Right",
+ "id": "arrow-circle-o-right",
+ "unicode": "f18e",
+ "created": 4,
+ "filter": [
+ "next",
+ "forward"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Arrow Circle Outlined Left",
+ "id": "arrow-circle-o-left",
+ "unicode": "f190",
+ "created": 4,
+ "filter": [
+ "previous",
+ "back"
+ ],
+ "categories": [
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Caret Square Outlined Left",
+ "id": "caret-square-o-left",
+ "unicode": "f191",
+ "created": 4,
+ "filter": [
+ "previous",
+ "back"
+ ],
+ "aliases": [
+ "toggle-left"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Directional Icons"
+ ]
+ },
+ {
+ "name": "Dot Circle Outlined",
+ "id": "dot-circle-o",
+ "unicode": "f192",
+ "created": 4,
+ "filter": [
+ "target",
+ "bullseye",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Wheelchair",
+ "id": "wheelchair",
+ "unicode": "f193",
+ "created": 4,
+ "filter": [
+ "handicap",
+ "person"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Medical Icons",
+ "Transportation Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Vimeo Square",
+ "id": "vimeo-square",
+ "unicode": "f194",
+ "created": 4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Turkish Lira (TRY)",
+ "id": "try",
+ "unicode": "f195",
+ "created": 4,
+ "aliases": [
+ "turkish-lira"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "Plus Square Outlined",
+ "id": "plus-square-o",
+ "unicode": "f196",
+ "created": 4,
+ "filter": [
+ "add",
+ "new",
+ "create",
+ "expand"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Form Control Icons"
+ ]
+ },
+ {
+ "name": "Space Shuttle",
+ "id": "space-shuttle",
+ "unicode": "f197",
+ "created": 4.1,
+ "filter": null,
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Slack Logo",
+ "id": "slack",
+ "unicode": "f198",
+ "created": 4.1,
+ "filter": [
+ "hashtag",
+ "anchor",
+ "hash"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Envelope Square",
+ "id": "envelope-square",
+ "unicode": "f199",
+ "created": 4.1,
+ "filter": [
+ "email",
+ "e-mail",
+ "letter",
+ "support",
+ "mail",
+ "message",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "WordPress Logo",
+ "id": "wordpress",
+ "unicode": "f19a",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "OpenID",
+ "id": "openid",
+ "unicode": "f19b",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "University",
+ "id": "university",
+ "unicode": "f19c",
+ "created": 4.1,
+ "aliases": [
+ "institution",
+ "bank"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Graduation Cap",
+ "id": "graduation-cap",
+ "unicode": "f19d",
+ "created": 4.1,
+ "aliases": [
+ "mortar-board"
+ ],
+ "filter": [
+ "learning",
+ "school",
+ "student"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Yahoo Logo",
+ "id": "yahoo",
+ "unicode": "f19e",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Google Logo",
+ "id": "google",
+ "unicode": "f1a0",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "reddit Logo",
+ "id": "reddit",
+ "unicode": "f1a1",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "reddit Square",
+ "id": "reddit-square",
+ "unicode": "f1a2",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "StumbleUpon Circle",
+ "id": "stumbleupon-circle",
+ "unicode": "f1a3",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "StumbleUpon Logo",
+ "id": "stumbleupon",
+ "unicode": "f1a4",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Delicious Logo",
+ "id": "delicious",
+ "unicode": "f1a5",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Digg Logo",
+ "id": "digg",
+ "unicode": "f1a6",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pied Piper PP Logo (Old)",
+ "id": "pied-piper-pp",
+ "unicode": "f1a7",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pied Piper Alternate Logo",
+ "id": "pied-piper-alt",
+ "unicode": "f1a8",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Drupal Logo",
+ "id": "drupal",
+ "unicode": "f1a9",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Joomla Logo",
+ "id": "joomla",
+ "unicode": "f1aa",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Language",
+ "id": "language",
+ "unicode": "f1ab",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Fax",
+ "id": "fax",
+ "unicode": "f1ac",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Building",
+ "id": "building",
+ "unicode": "f1ad",
+ "created": 4.1,
+ "filter": [
+ "work",
+ "business",
+ "apartment",
+ "office",
+ "company"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Child",
+ "id": "child",
+ "unicode": "f1ae",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Paw",
+ "id": "paw",
+ "unicode": "f1b0",
+ "created": 4.1,
+ "filter": [
+ "pet"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "spoon",
+ "id": "spoon",
+ "unicode": "f1b1",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Cube",
+ "id": "cube",
+ "unicode": "f1b2",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Cubes",
+ "id": "cubes",
+ "unicode": "f1b3",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Behance",
+ "id": "behance",
+ "unicode": "f1b4",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Behance Square",
+ "id": "behance-square",
+ "unicode": "f1b5",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Steam",
+ "id": "steam",
+ "unicode": "f1b6",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Steam Square",
+ "id": "steam-square",
+ "unicode": "f1b7",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Recycle",
+ "id": "recycle",
+ "unicode": "f1b8",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Car",
+ "id": "car",
+ "unicode": "f1b9",
+ "created": 4.1,
+ "aliases": [
+ "automobile"
+ ],
+ "filter": [
+ "vehicle"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Taxi",
+ "id": "taxi",
+ "unicode": "f1ba",
+ "created": 4.1,
+ "aliases": [
+ "cab"
+ ],
+ "filter": [
+ "vehicle"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Tree",
+ "id": "tree",
+ "unicode": "f1bb",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Spotify",
+ "id": "spotify",
+ "unicode": "f1bc",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "deviantART",
+ "id": "deviantart",
+ "unicode": "f1bd",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "SoundCloud",
+ "id": "soundcloud",
+ "unicode": "f1be",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Database",
+ "id": "database",
+ "unicode": "f1c0",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "PDF File Outlined",
+ "id": "file-pdf-o",
+ "unicode": "f1c1",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Word File Outlined",
+ "id": "file-word-o",
+ "unicode": "f1c2",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Excel File Outlined",
+ "id": "file-excel-o",
+ "unicode": "f1c3",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Powerpoint File Outlined",
+ "id": "file-powerpoint-o",
+ "unicode": "f1c4",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Image File Outlined",
+ "id": "file-image-o",
+ "unicode": "f1c5",
+ "created": 4.1,
+ "aliases": [
+ "file-photo-o",
+ "file-picture-o"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Archive File Outlined",
+ "id": "file-archive-o",
+ "unicode": "f1c6",
+ "created": 4.1,
+ "aliases": [
+ "file-zip-o"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Audio File Outlined",
+ "id": "file-audio-o",
+ "unicode": "f1c7",
+ "created": 4.1,
+ "aliases": [
+ "file-sound-o"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Video File Outlined",
+ "id": "file-video-o",
+ "unicode": "f1c8",
+ "created": 4.1,
+ "aliases": [
+ "file-movie-o"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Code File Outlined",
+ "id": "file-code-o",
+ "unicode": "f1c9",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "File Type Icons"
+ ]
+ },
+ {
+ "name": "Vine",
+ "id": "vine",
+ "unicode": "f1ca",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Codepen",
+ "id": "codepen",
+ "unicode": "f1cb",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "jsFiddle",
+ "id": "jsfiddle",
+ "unicode": "f1cc",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Life Ring",
+ "id": "life-ring",
+ "unicode": "f1cd",
+ "created": 4.1,
+ "aliases": [
+ {
+ "life-bouy": "Deprecated - remove in 5.0.0"
+ },
+ "life-buoy",
+ "life-saver",
+ "support"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Circle Outlined Notched",
+ "id": "circle-o-notch",
+ "unicode": "f1ce",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "Spinner Icons"
+ ]
+ },
+ {
+ "name": "Rebel Alliance",
+ "id": "rebel",
+ "unicode": "f1d0",
+ "created": 4.1,
+ "aliases": [
+ "ra",
+ "resistance"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Galactic Empire",
+ "id": "empire",
+ "unicode": "f1d1",
+ "created": 4.1,
+ "aliases": [
+ "ge"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Git Square",
+ "id": "git-square",
+ "unicode": "f1d2",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Git",
+ "id": "git",
+ "unicode": "f1d3",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Hacker News",
+ "id": "hacker-news",
+ "unicode": "f1d4",
+ "created": 4.1,
+ "aliases": [
+ "y-combinator-square",
+ "yc-square"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Tencent Weibo",
+ "id": "tencent-weibo",
+ "unicode": "f1d5",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "QQ",
+ "id": "qq",
+ "unicode": "f1d6",
+ "created": 4.1,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Weixin (WeChat)",
+ "id": "weixin",
+ "unicode": "f1d7",
+ "created": 4.1,
+ "aliases": [
+ "wechat"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Paper Plane",
+ "id": "paper-plane",
+ "unicode": "f1d8",
+ "created": 4.1,
+ "aliases": [
+ "send"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Paper Plane Outlined",
+ "id": "paper-plane-o",
+ "unicode": "f1d9",
+ "created": 4.1,
+ "aliases": [
+ "send-o"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "History",
+ "id": "history",
+ "unicode": "f1da",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Circle Outlined Thin",
+ "id": "circle-thin",
+ "unicode": "f1db",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "header",
+ "id": "header",
+ "unicode": "f1dc",
+ "created": 4.1,
+ "filter": [
+ "heading"
+ ],
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "paragraph",
+ "id": "paragraph",
+ "unicode": "f1dd",
+ "created": 4.1,
+ "categories": [
+ "Text Editor Icons"
+ ]
+ },
+ {
+ "name": "Sliders",
+ "id": "sliders",
+ "unicode": "f1de",
+ "created": 4.1,
+ "filter": [
+ "settings"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Share Alt",
+ "id": "share-alt",
+ "unicode": "f1e0",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Share Alt Square",
+ "id": "share-alt-square",
+ "unicode": "f1e1",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Bomb",
+ "id": "bomb",
+ "unicode": "f1e2",
+ "created": 4.1,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Futbol Outlined",
+ "id": "futbol-o",
+ "unicode": "f1e3",
+ "created": 4.2,
+ "aliases": [
+ "soccer-ball-o"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "TTY",
+ "id": "tty",
+ "unicode": "f1e4",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Binoculars",
+ "id": "binoculars",
+ "unicode": "f1e5",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Plug",
+ "id": "plug",
+ "unicode": "f1e6",
+ "created": 4.2,
+ "filter": [
+ "power",
+ "connect"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Slideshare",
+ "id": "slideshare",
+ "unicode": "f1e7",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Twitch",
+ "id": "twitch",
+ "unicode": "f1e8",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Yelp",
+ "id": "yelp",
+ "unicode": "f1e9",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Newspaper Outlined",
+ "id": "newspaper-o",
+ "unicode": "f1ea",
+ "created": 4.2,
+ "filter": [
+ "press"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "WiFi",
+ "id": "wifi",
+ "unicode": "f1eb",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Calculator",
+ "id": "calculator",
+ "unicode": "f1ec",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Paypal",
+ "id": "paypal",
+ "unicode": "f1ed",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Google Wallet",
+ "id": "google-wallet",
+ "unicode": "f1ee",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Visa Credit Card",
+ "id": "cc-visa",
+ "unicode": "f1f0",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "MasterCard Credit Card",
+ "id": "cc-mastercard",
+ "unicode": "f1f1",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Discover Credit Card",
+ "id": "cc-discover",
+ "unicode": "f1f2",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "American Express Credit Card",
+ "id": "cc-amex",
+ "unicode": "f1f3",
+ "created": 4.2,
+ "filter": [
+ "amex"
+ ],
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Paypal Credit Card",
+ "id": "cc-paypal",
+ "unicode": "f1f4",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Stripe Credit Card",
+ "id": "cc-stripe",
+ "unicode": "f1f5",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Bell Slash",
+ "id": "bell-slash",
+ "unicode": "f1f6",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bell Slash Outlined",
+ "id": "bell-slash-o",
+ "unicode": "f1f7",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Trash",
+ "id": "trash",
+ "unicode": "f1f8",
+ "created": 4.2,
+ "filter": [
+ "garbage",
+ "delete",
+ "remove",
+ "hide"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Copyright",
+ "id": "copyright",
+ "unicode": "f1f9",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "At",
+ "id": "at",
+ "unicode": "f1fa",
+ "created": 4.2,
+ "filter": [
+ "email",
+ "e-mail"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Eyedropper",
+ "id": "eyedropper",
+ "unicode": "f1fb",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Paint Brush",
+ "id": "paint-brush",
+ "unicode": "f1fc",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Birthday Cake",
+ "id": "birthday-cake",
+ "unicode": "f1fd",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Area Chart",
+ "id": "area-chart",
+ "unicode": "f1fe",
+ "created": 4.2,
+ "filter": [
+ "graph",
+ "analytics"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Chart Icons"
+ ]
+ },
+ {
+ "name": "Pie Chart",
+ "id": "pie-chart",
+ "unicode": "f200",
+ "created": 4.2,
+ "filter": [
+ "graph",
+ "analytics"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Chart Icons"
+ ]
+ },
+ {
+ "name": "Line Chart",
+ "id": "line-chart",
+ "unicode": "f201",
+ "created": 4.2,
+ "filter": [
+ "graph",
+ "analytics"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Chart Icons"
+ ]
+ },
+ {
+ "name": "last.fm",
+ "id": "lastfm",
+ "unicode": "f202",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "last.fm Square",
+ "id": "lastfm-square",
+ "unicode": "f203",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Toggle Off",
+ "id": "toggle-off",
+ "unicode": "f204",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Toggle On",
+ "id": "toggle-on",
+ "unicode": "f205",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bicycle",
+ "id": "bicycle",
+ "unicode": "f206",
+ "created": 4.2,
+ "filter": [
+ "vehicle",
+ "bike"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Bus",
+ "id": "bus",
+ "unicode": "f207",
+ "created": 4.2,
+ "filter": [
+ "vehicle"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "ioxhost",
+ "id": "ioxhost",
+ "unicode": "f208",
+ "created": 4.2,
+ "url": "ioxhost.co.uk",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "AngelList",
+ "id": "angellist",
+ "unicode": "f209",
+ "created": 4.2,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Closed Captions",
+ "id": "cc",
+ "unicode": "f20a",
+ "created": 4.2,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Shekel (ILS)",
+ "id": "ils",
+ "unicode": "f20b",
+ "created": 4.2,
+ "aliases": [
+ "shekel",
+ "sheqel"
+ ],
+ "categories": [
+ "Currency Icons"
+ ]
+ },
+ {
+ "name": "meanpath",
+ "id": "meanpath",
+ "unicode": "f20c",
+ "created": 4.2,
+ "url": "meanpath.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "BuySellAds",
+ "id": "buysellads",
+ "unicode": "f20d",
+ "created": 4.3,
+ "url": "buysellads.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Connect Develop",
+ "id": "connectdevelop",
+ "unicode": "f20e",
+ "created": 4.3,
+ "url": "connectdevelop.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "DashCube",
+ "id": "dashcube",
+ "unicode": "f210",
+ "created": 4.3,
+ "url": "dashcube.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Forumbee",
+ "id": "forumbee",
+ "unicode": "f211",
+ "created": 4.3,
+ "url": "forumbee.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Leanpub",
+ "id": "leanpub",
+ "unicode": "f212",
+ "created": 4.3,
+ "url": "leanpub.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Sellsy",
+ "id": "sellsy",
+ "unicode": "f213",
+ "created": 4.3,
+ "url": "sellsy.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Shirts in Bulk",
+ "id": "shirtsinbulk",
+ "unicode": "f214",
+ "created": 4.3,
+ "url": "shirtsinbulk.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "SimplyBuilt",
+ "id": "simplybuilt",
+ "unicode": "f215",
+ "created": 4.3,
+ "url": "simplybuilt.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "skyatlas",
+ "id": "skyatlas",
+ "unicode": "f216",
+ "created": 4.3,
+ "url": "skyatlas.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Add to Shopping Cart",
+ "id": "cart-plus",
+ "unicode": "f217",
+ "created": 4.3,
+ "filter": [
+ "add",
+ "shopping"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Shopping Cart Arrow Down",
+ "id": "cart-arrow-down",
+ "unicode": "f218",
+ "created": 4.3,
+ "filter": [
+ "shopping"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Diamond",
+ "id": "diamond",
+ "unicode": "f219",
+ "created": 4.3,
+ "filter": [
+ "gem",
+ "gemstone"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Ship",
+ "id": "ship",
+ "unicode": "f21a",
+ "created": 4.3,
+ "filter": [
+ "boat",
+ "sea"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "User Secret",
+ "id": "user-secret",
+ "unicode": "f21b",
+ "created": 4.3,
+ "filter": [
+ "whisper",
+ "spy",
+ "incognito",
+ "privacy"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Motorcycle",
+ "id": "motorcycle",
+ "unicode": "f21c",
+ "created": 4.3,
+ "filter": [
+ "vehicle",
+ "bike"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Street View",
+ "id": "street-view",
+ "unicode": "f21d",
+ "created": 4.3,
+ "filter": [
+ "map"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Heartbeat",
+ "id": "heartbeat",
+ "unicode": "f21e",
+ "created": 4.3,
+ "filter": [
+ "ekg"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Medical Icons"
+ ]
+ },
+ {
+ "name": "Venus",
+ "id": "venus",
+ "unicode": "f221",
+ "created": 4.3,
+ "filter": [
+ "female"
+ ],
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mars",
+ "id": "mars",
+ "unicode": "f222",
+ "created": 4.3,
+ "filter": [
+ "male"
+ ],
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mercury",
+ "id": "mercury",
+ "unicode": "f223",
+ "created": 4.3,
+ "filter": [
+ "transgender"
+ ],
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Transgender",
+ "id": "transgender",
+ "unicode": "f224",
+ "created": 4.3,
+ "aliases": [
+ "intersex"
+ ],
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Transgender Alt",
+ "id": "transgender-alt",
+ "unicode": "f225",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Venus Double",
+ "id": "venus-double",
+ "unicode": "f226",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mars Double",
+ "id": "mars-double",
+ "unicode": "f227",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Venus Mars",
+ "id": "venus-mars",
+ "unicode": "f228",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mars Stroke",
+ "id": "mars-stroke",
+ "unicode": "f229",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mars Stroke Vertical",
+ "id": "mars-stroke-v",
+ "unicode": "f22a",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Mars Stroke Horizontal",
+ "id": "mars-stroke-h",
+ "unicode": "f22b",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Neuter",
+ "id": "neuter",
+ "unicode": "f22c",
+ "created": 4.3,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Genderless",
+ "id": "genderless",
+ "unicode": "f22d",
+ "created": 4.4,
+ "categories": [
+ "Gender Icons"
+ ]
+ },
+ {
+ "name": "Facebook Official",
+ "id": "facebook-official",
+ "unicode": "f230",
+ "created": 4.3,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pinterest P",
+ "id": "pinterest-p",
+ "unicode": "f231",
+ "created": 4.3,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "What's App",
+ "id": "whatsapp",
+ "unicode": "f232",
+ "created": 4.3,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Server",
+ "id": "server",
+ "unicode": "f233",
+ "created": 4.3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Add User",
+ "id": "user-plus",
+ "unicode": "f234",
+ "created": 4.3,
+ "filter": [
+ "sign up",
+ "signup"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Remove User",
+ "id": "user-times",
+ "unicode": "f235",
+ "created": 4.3,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bed",
+ "id": "bed",
+ "unicode": "f236",
+ "created": 4.3,
+ "filter": [
+ "travel"
+ ],
+ "aliases": [
+ "hotel"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Viacoin",
+ "id": "viacoin",
+ "unicode": "f237",
+ "created": 4.3,
+ "url": "viacoin.org",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Train",
+ "id": "train",
+ "unicode": "f238",
+ "created": 4.3,
+ "categories": [
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Subway",
+ "id": "subway",
+ "unicode": "f239",
+ "created": 4.3,
+ "categories": [
+ "Transportation Icons"
+ ]
+ },
+ {
+ "name": "Medium",
+ "id": "medium",
+ "unicode": "f23a",
+ "created": 4.3,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Y Combinator",
+ "id": "y-combinator",
+ "unicode": "f23b",
+ "created": 4.4,
+ "aliases": [
+ "yc"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Optin Monster",
+ "id": "optin-monster",
+ "unicode": "f23c",
+ "created": 4.4,
+ "url": "optinmonster.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "OpenCart",
+ "id": "opencart",
+ "unicode": "f23d",
+ "created": 4.4,
+ "url": "opencart.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "ExpeditedSSL",
+ "id": "expeditedssl",
+ "unicode": "f23e",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Battery Full",
+ "id": "battery-full",
+ "unicode": "f240",
+ "created": 4.4,
+ "aliases": [
+ "battery-4",
+ "battery"
+ ],
+ "filter": [
+ "power"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Battery 3/4 Full",
+ "id": "battery-three-quarters",
+ "unicode": "f241",
+ "created": 4.4,
+ "aliases": [
+ "battery-3"
+ ],
+ "filter": [
+ "power"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Battery 1/2 Full",
+ "id": "battery-half",
+ "unicode": "f242",
+ "created": 4.4,
+ "aliases": [
+ "battery-2"
+ ],
+ "filter": [
+ "power"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Battery 1/4 Full",
+ "id": "battery-quarter",
+ "unicode": "f243",
+ "created": 4.4,
+ "aliases": [
+ "battery-1"
+ ],
+ "filter": [
+ "power"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Battery Empty",
+ "id": "battery-empty",
+ "unicode": "f244",
+ "created": 4.4,
+ "aliases": [
+ "battery-0"
+ ],
+ "filter": [
+ "power"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Mouse Pointer",
+ "id": "mouse-pointer",
+ "unicode": "f245",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "I Beam Cursor",
+ "id": "i-cursor",
+ "unicode": "f246",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Object Group",
+ "id": "object-group",
+ "unicode": "f247",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Object Ungroup",
+ "id": "object-ungroup",
+ "unicode": "f248",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sticky Note",
+ "id": "sticky-note",
+ "unicode": "f249",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Sticky Note Outlined",
+ "id": "sticky-note-o",
+ "unicode": "f24a",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "JCB Credit Card",
+ "id": "cc-jcb",
+ "unicode": "f24b",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Diner's Club Credit Card",
+ "id": "cc-diners-club",
+ "unicode": "f24c",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons",
+ "Payment Icons"
+ ]
+ },
+ {
+ "name": "Clone",
+ "id": "clone",
+ "unicode": "f24d",
+ "created": 4.4,
+ "filter": [
+ "copy"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Balance Scale",
+ "id": "balance-scale",
+ "unicode": "f24e",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hourglass Outlined",
+ "id": "hourglass-o",
+ "unicode": "f250",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hourglass Start",
+ "id": "hourglass-start",
+ "unicode": "f251",
+ "created": 4.4,
+ "aliases": [
+ "hourglass-1"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hourglass Half",
+ "id": "hourglass-half",
+ "unicode": "f252",
+ "created": 4.4,
+ "aliases": [
+ "hourglass-2"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hourglass End",
+ "id": "hourglass-end",
+ "unicode": "f253",
+ "created": 4.4,
+ "aliases": [
+ "hourglass-3"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hourglass",
+ "id": "hourglass",
+ "unicode": "f254",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Rock (Hand)",
+ "id": "hand-rock-o",
+ "unicode": "f255",
+ "created": 4.4,
+ "aliases": [
+ "hand-grab-o"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Paper (Hand)",
+ "id": "hand-paper-o",
+ "unicode": "f256",
+ "created": 4.4,
+ "aliases": [
+ "hand-stop-o"
+ ],
+ "filter": [
+ "stop"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Scissors (Hand)",
+ "id": "hand-scissors-o",
+ "unicode": "f257",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Lizard (Hand)",
+ "id": "hand-lizard-o",
+ "unicode": "f258",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Spock (Hand)",
+ "id": "hand-spock-o",
+ "unicode": "f259",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Hand Pointer",
+ "id": "hand-pointer-o",
+ "unicode": "f25a",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Hand Peace",
+ "id": "hand-peace-o",
+ "unicode": "f25b",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons",
+ "Hand Icons"
+ ]
+ },
+ {
+ "name": "Trademark",
+ "id": "trademark",
+ "unicode": "f25c",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Registered Trademark",
+ "id": "registered",
+ "unicode": "f25d",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Creative Commons",
+ "id": "creative-commons",
+ "unicode": "f25e",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "GG Currency",
+ "id": "gg",
+ "unicode": "f260",
+ "created": 4.4,
+ "categories": [
+ "Currency Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "GG Currency Circle",
+ "id": "gg-circle",
+ "unicode": "f261",
+ "created": 4.4,
+ "categories": [
+ "Currency Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "TripAdvisor",
+ "id": "tripadvisor",
+ "unicode": "f262",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Odnoklassniki",
+ "id": "odnoklassniki",
+ "unicode": "f263",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Odnoklassniki Square",
+ "id": "odnoklassniki-square",
+ "unicode": "f264",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Get Pocket",
+ "id": "get-pocket",
+ "unicode": "f265",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Wikipedia W",
+ "id": "wikipedia-w",
+ "unicode": "f266",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Safari",
+ "id": "safari",
+ "unicode": "f267",
+ "created": 4.4,
+ "filter": [
+ "browser"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Chrome",
+ "id": "chrome",
+ "unicode": "f268",
+ "created": 4.4,
+ "filter": [
+ "browser"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Firefox",
+ "id": "firefox",
+ "unicode": "f269",
+ "created": 4.4,
+ "filter": [
+ "browser"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Opera",
+ "id": "opera",
+ "unicode": "f26a",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Internet-explorer",
+ "id": "internet-explorer",
+ "unicode": "f26b",
+ "created": 4.4,
+ "filter": [
+ "browser",
+ "ie"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Television",
+ "id": "television",
+ "unicode": "f26c",
+ "created": 4.4,
+ "aliases": [
+ "tv"
+ ],
+ "filter": [
+ "display",
+ "computer",
+ "monitor"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Contao",
+ "id": "contao",
+ "unicode": "f26d",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "500px",
+ "id": "500px",
+ "unicode": "f26e",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Amazon",
+ "id": "amazon",
+ "unicode": "f270",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Calendar Plus Outlined",
+ "id": "calendar-plus-o",
+ "unicode": "f271",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Calendar Minus Outlined",
+ "id": "calendar-minus-o",
+ "unicode": "f272",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Calendar Times Outlined",
+ "id": "calendar-times-o",
+ "unicode": "f273",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Calendar Check Outlined",
+ "id": "calendar-check-o",
+ "unicode": "f274",
+ "created": 4.4,
+ "filter": [
+ "ok"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Industry",
+ "id": "industry",
+ "unicode": "f275",
+ "created": 4.4,
+ "filter": [
+ "factory"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Map Pin",
+ "id": "map-pin",
+ "unicode": "f276",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Map Signs",
+ "id": "map-signs",
+ "unicode": "f277",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Map Outlined",
+ "id": "map-o",
+ "unicode": "f278",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Map",
+ "id": "map",
+ "unicode": "f279",
+ "created": 4.4,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Commenting",
+ "id": "commenting",
+ "unicode": "f27a",
+ "created": 4.4,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Commenting Outlined",
+ "id": "commenting-o",
+ "unicode": "f27b",
+ "created": 4.4,
+ "filter": [
+ "speech",
+ "notification",
+ "note",
+ "chat",
+ "bubble",
+ "feedback",
+ "message",
+ "texting",
+ "sms",
+ "conversation"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Houzz",
+ "id": "houzz",
+ "unicode": "f27c",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Vimeo",
+ "id": "vimeo",
+ "unicode": "f27d",
+ "created": 4.4,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Font Awesome Black Tie",
+ "id": "black-tie",
+ "unicode": "f27e",
+ "created": 4.4,
+ "url": "blacktie.io",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Fonticons",
+ "id": "fonticons",
+ "unicode": "f280",
+ "created": 4.4,
+ "url": "fonticons.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "reddit Alien",
+ "id": "reddit-alien",
+ "unicode": "f281",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Edge Browser",
+ "id": "edge",
+ "unicode": "f282",
+ "created": 4.5,
+ "filter": [
+ "browser",
+ "ie"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Credit Card",
+ "id": "credit-card-alt",
+ "unicode": "f283",
+ "created": 4.5,
+ "filter": [
+ "money",
+ "buy",
+ "debit",
+ "checkout",
+ "purchase",
+ "payment",
+ "credit card"
+ ],
+ "categories": [
+ "Payment Icons",
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Codie Pie",
+ "id": "codiepie",
+ "unicode": "f284",
+ "created": 4.5,
+ "url": "codiepie.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "MODX",
+ "id": "modx",
+ "unicode": "f285",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Fort Awesome",
+ "id": "fort-awesome",
+ "unicode": "f286",
+ "created": 4.5,
+ "url": "fortawesome.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "USB",
+ "id": "usb",
+ "unicode": "f287",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Product Hunt",
+ "id": "product-hunt",
+ "unicode": "f288",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Mixcloud",
+ "id": "mixcloud",
+ "unicode": "f289",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Scribd",
+ "id": "scribd",
+ "unicode": "f28a",
+ "created": 4.5,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pause Circle",
+ "id": "pause-circle",
+ "unicode": "f28b",
+ "created": 4.5,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Pause Circle Outlined",
+ "id": "pause-circle-o",
+ "unicode": "f28c",
+ "created": 4.5,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Stop Circle",
+ "id": "stop-circle",
+ "unicode": "f28d",
+ "created": 4.5,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Stop Circle Outlined",
+ "id": "stop-circle-o",
+ "unicode": "f28e",
+ "created": 4.5,
+ "categories": [
+ "Video Player Icons"
+ ]
+ },
+ {
+ "name": "Shopping Bag",
+ "id": "shopping-bag",
+ "unicode": "f290",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Shopping Basket",
+ "id": "shopping-basket",
+ "unicode": "f291",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Hashtag",
+ "id": "hashtag",
+ "unicode": "f292",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bluetooth",
+ "id": "bluetooth",
+ "unicode": "f293",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Bluetooth",
+ "id": "bluetooth-b",
+ "unicode": "f294",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons",
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Percent",
+ "id": "percent",
+ "unicode": "f295",
+ "created": 4.5,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "GitLab",
+ "id": "gitlab",
+ "unicode": "f296",
+ "created": 4.6,
+ "url": "gitlab.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "WPBeginner",
+ "id": "wpbeginner",
+ "unicode": "f297",
+ "created": 4.6,
+ "url": "wpbeginner.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "WPForms",
+ "id": "wpforms",
+ "unicode": "f298",
+ "created": 4.6,
+ "url": "wpforms.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Envira Gallery",
+ "id": "envira",
+ "unicode": "f299",
+ "created": 4.6,
+ "url": "enviragallery.com",
+ "filter": [
+ "leaf"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Universal Access",
+ "id": "universal-access",
+ "unicode": "f29a",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Wheelchair Alt",
+ "id": "wheelchair-alt",
+ "unicode": "f29b",
+ "created": 4.6,
+ "filter": [
+ "handicap",
+ "person"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Medical Icons",
+ "Transportation Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Question Circle Outlined",
+ "id": "question-circle-o",
+ "unicode": "f29c",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Blind",
+ "id": "blind",
+ "unicode": "f29d",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Audio Description",
+ "id": "audio-description",
+ "unicode": "f29e",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Volume Control Phone",
+ "id": "volume-control-phone",
+ "unicode": "f2a0",
+ "created": 4.6,
+ "filter": [
+ "telephone"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Braille",
+ "id": "braille",
+ "unicode": "f2a1",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Assistive Listening Systems",
+ "id": "assistive-listening-systems",
+ "unicode": "f2a2",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "American Sign Language Interpreting",
+ "id": "american-sign-language-interpreting",
+ "unicode": "f2a3",
+ "created": 4.6,
+ "aliases": [
+ "asl-interpreting"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Deaf",
+ "id": "deaf",
+ "unicode": "f2a4",
+ "created": 4.6,
+ "aliases": [
+ "deafness",
+ "hard-of-hearing"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Glide",
+ "id": "glide",
+ "unicode": "f2a5",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Glide G",
+ "id": "glide-g",
+ "unicode": "f2a6",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Sign Language",
+ "id": "sign-language",
+ "unicode": "f2a7",
+ "created": 4.6,
+ "aliases": [
+ "signing"
+ ],
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Low Vision",
+ "id": "low-vision",
+ "unicode": "f2a8",
+ "created": 4.6,
+ "categories": [
+ "Web Application Icons",
+ "Accessibility Icons"
+ ]
+ },
+ {
+ "name": "Viadeo",
+ "id": "viadeo",
+ "unicode": "f2a9",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Viadeo Square",
+ "id": "viadeo-square",
+ "unicode": "f2aa",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Snapchat",
+ "id": "snapchat",
+ "unicode": "f2ab",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Snapchat Ghost",
+ "id": "snapchat-ghost",
+ "unicode": "f2ac",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Snapchat Square",
+ "id": "snapchat-square",
+ "unicode": "f2ad",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Pied Piper Logo",
+ "id": "pied-piper",
+ "unicode": "f2ae",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "First Order",
+ "id": "first-order",
+ "unicode": "f2b0",
+ "created": 4.6,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Yoast",
+ "id": "yoast",
+ "unicode": "f2b1",
+ "created": 4.6,
+ "url": "yoast.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "ThemeIsle",
+ "id": "themeisle",
+ "unicode": "f2b2",
+ "created": 4.6,
+ "url": "themeisle.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Google Plus Official",
+ "id": "google-plus-official",
+ "unicode": "f2b3",
+ "created": 4.6,
+ "aliases": [
+ "google-plus-circle"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Font Awesome",
+ "id": "font-awesome",
+ "unicode": "f2b4",
+ "created": 4.6,
+ "aliases": [
+ "fa"
+ ],
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Handshake Outlined",
+ "id": "handshake-o",
+ "unicode": "f2b5",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Envelope Open",
+ "id": "envelope-open",
+ "unicode": "f2b6",
+ "created": 4.7,
+ "filter": [
+ "email",
+ "e-mail",
+ "letter",
+ "support",
+ "mail",
+ "message",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Envelope Open Outlined",
+ "id": "envelope-open-o",
+ "unicode": "f2b7",
+ "created": 4.7,
+ "filter": [
+ "email",
+ "e-mail",
+ "letter",
+ "support",
+ "mail",
+ "message",
+ "notification"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Linode",
+ "id": "linode",
+ "unicode": "f2b8",
+ "created": 4.7,
+ "url": "linode.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Address Book",
+ "id": "address-book",
+ "unicode": "f2b9",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Address Book Outlined",
+ "id": "address-book-o",
+ "unicode": "f2ba",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Address Card",
+ "id": "address-card",
+ "unicode": "f2bb",
+ "created": 4.7,
+ "aliases": [
+ "vcard"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Address Card Outlined",
+ "id": "address-card-o",
+ "unicode": "f2bc",
+ "created": 4.7,
+ "aliases": [
+ "vcard-o"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "User Circle",
+ "id": "user-circle",
+ "unicode": "f2bd",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "User Circle Outlined",
+ "id": "user-circle-o",
+ "unicode": "f2be",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "User Outlined",
+ "id": "user-o",
+ "unicode": "f2c0",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Identification Badge",
+ "id": "id-badge",
+ "unicode": "f2c1",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Identification Card",
+ "id": "id-card",
+ "unicode": "f2c2",
+ "created": 4.7,
+ "aliases": [
+ "drivers-license"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Identification Card Outlined",
+ "id": "id-card-o",
+ "unicode": "f2c3",
+ "created": 4.7,
+ "aliases": [
+ "drivers-license-o"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Quora",
+ "id": "quora",
+ "unicode": "f2c4",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Free Code Camp",
+ "id": "free-code-camp",
+ "unicode": "f2c5",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Telegram",
+ "id": "telegram",
+ "unicode": "f2c6",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Thermometer Full",
+ "id": "thermometer-full",
+ "unicode": "f2c7",
+ "created": 4.7,
+ "aliases": [
+ "thermometer-4",
+ "thermometer"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Thermometer 3/4 Full",
+ "id": "thermometer-three-quarters",
+ "unicode": "f2c8",
+ "created": 4.7,
+ "aliases": [
+ "thermometer-3"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Thermometer 1/2 Full",
+ "id": "thermometer-half",
+ "unicode": "f2c9",
+ "created": 4.7,
+ "aliases": [
+ "thermometer-2"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Thermometer 1/4 Full",
+ "id": "thermometer-quarter",
+ "unicode": "f2ca",
+ "created": 4.7,
+ "aliases": [
+ "thermometer-1"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Thermometer Empty",
+ "id": "thermometer-empty",
+ "unicode": "f2cb",
+ "created": 4.7,
+ "aliases": [
+ "thermometer-0"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Shower",
+ "id": "shower",
+ "unicode": "f2cc",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bath",
+ "id": "bath",
+ "unicode": "f2cd",
+ "created": 4.7,
+ "aliases": [
+ "bathtub",
+ "s15"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Podcast",
+ "id": "podcast",
+ "unicode": "f2ce",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Window Maximize",
+ "id": "window-maximize",
+ "unicode": "f2d0",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Window Minimize",
+ "id": "window-minimize",
+ "unicode": "f2d1",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Window Restore",
+ "id": "window-restore",
+ "unicode": "f2d2",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Window Close",
+ "id": "window-close",
+ "unicode": "f2d3",
+ "created": 4.7,
+ "aliases": [
+ "times-rectangle"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Window Close Outline",
+ "id": "window-close-o",
+ "unicode": "f2d4",
+ "created": 4.7,
+ "aliases": [
+ "times-rectangle-o"
+ ],
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Bandcamp",
+ "id": "bandcamp",
+ "unicode": "f2d5",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Grav",
+ "id": "grav",
+ "unicode": "f2d6",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Etsy",
+ "id": "etsy",
+ "unicode": "f2d7",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "IMDB",
+ "id": "imdb",
+ "unicode": "f2d8",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Ravelry",
+ "id": "ravelry",
+ "unicode": "f2d9",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Eercast",
+ "id": "eercast",
+ "unicode": "f2da",
+ "created": 4.7,
+ "url": "eercast.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Microchip",
+ "id": "microchip",
+ "unicode": "f2db",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Snowflake Outlined",
+ "id": "snowflake-o",
+ "unicode": "f2dc",
+ "created": 4.7,
+ "categories": [
+ "Web Application Icons"
+ ]
+ },
+ {
+ "name": "Superpowers",
+ "id": "superpowers",
+ "unicode": "f2dd",
+ "created": 4.7,
+ "url": "superpowers.io",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "WPExplorer",
+ "id": "wpexplorer",
+ "unicode": "f2de",
+ "created": 4.7,
+ "url": "wpexplorer.com",
+ "categories": [
+ "Brand Icons"
+ ]
+ },
+ {
+ "name": "Meetup",
+ "id": "meetup",
+ "unicode": "f2e0",
+ "created": 4.7,
+ "categories": [
+ "Brand Icons"
+ ]
+ }
+ ]
+}
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/FontAwesome.otf b/functions/kirki/assets/vendor/fontawesome/fonts/FontAwesome.otf
new file mode 100644
index 0000000..401ec0f
Binary files /dev/null and b/functions/kirki/assets/vendor/fontawesome/fonts/FontAwesome.otf differ
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.eot b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.eot
new file mode 100644
index 0000000..e9f60ca
Binary files /dev/null and b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.eot differ
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.svg b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.svg
new file mode 100644
index 0000000..855c845
--- /dev/null
+++ b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.svg
@@ -0,0 +1,2671 @@
+
+
+
+
+Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016
+ By ,,,
+Copyright Dave Gandy 2016. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.ttf b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..35acda2
Binary files /dev/null and b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.ttf differ
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..400014a
Binary files /dev/null and b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff differ
diff --git a/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff2 b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff2
new file mode 100644
index 0000000..4d13fc6
Binary files /dev/null and b/functions/kirki/assets/vendor/fontawesome/fonts/fontawesome-webfont.woff2 differ
diff --git a/functions/kirki/assets/vendor/selectWoo/css/select2.css b/functions/kirki/assets/vendor/selectWoo/css/select2.css
new file mode 100644
index 0000000..6b4d251
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/css/select2.css
@@ -0,0 +1,484 @@
+.select2-container {
+ box-sizing: border-box;
+ display: inline-block;
+ margin: 0;
+ position: relative;
+ vertical-align: middle; }
+ .select2-container .select2-selection--single {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: block;
+ height: 28px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-container .select2-selection--single .select2-selection__rendered {
+ display: block;
+ padding-left: 8px;
+ padding-right: 20px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap; }
+ .select2-container .select2-selection--single .select2-selection__clear {
+ position: relative; }
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
+ padding-right: 8px;
+ padding-left: 20px; }
+ .select2-container .select2-selection--multiple {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: block;
+ min-height: 32px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
+ display: inline-block;
+ overflow: hidden;
+ padding-left: 8px;
+ text-overflow: ellipsis;
+ white-space: nowrap; }
+ .select2-container .select2-search--inline {
+ float: left; }
+ .select2-container .select2-search--inline .select2-search__field {
+ box-sizing: border-box;
+ border: none;
+ font-size: 100%;
+ margin-top: 5px;
+ padding: 0; }
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
+ -webkit-appearance: none; }
+
+.select2-dropdown {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ box-sizing: border-box;
+ display: block;
+ position: absolute;
+ left: -100000px;
+ width: 100%;
+ z-index: 1051; }
+
+.select2-results {
+ display: block; }
+
+.select2-results__options {
+ list-style: none;
+ margin: 0;
+ padding: 0; }
+
+.select2-results__option {
+ padding: 6px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-results__option[data-selected] {
+ cursor: pointer; }
+
+.select2-container--open .select2-dropdown {
+ left: 0; }
+
+.select2-container--open .select2-dropdown--above {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--open .select2-dropdown--below {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-search--dropdown {
+ display: block;
+ padding: 4px; }
+ .select2-search--dropdown .select2-search__field {
+ padding: 4px;
+ width: 100%;
+ box-sizing: border-box; }
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
+ -webkit-appearance: none; }
+ .select2-search--dropdown.select2-search--hide {
+ display: none; }
+
+.select2-close-mask {
+ border: 0;
+ margin: 0;
+ padding: 0;
+ display: block;
+ position: fixed;
+ left: 0;
+ top: 0;
+ min-height: 100%;
+ min-width: 100%;
+ height: auto;
+ width: auto;
+ opacity: 0;
+ z-index: 99;
+ background-color: #fff;
+ filter: alpha(opacity=0); }
+
+.select2-hidden-accessible {
+ border: 0 !important;
+ clip: rect(0 0 0 0) !important;
+ height: 1px !important;
+ margin: -1px !important;
+ overflow: hidden !important;
+ padding: 0 !important;
+ position: absolute !important;
+ width: 1px !important; }
+
+.select2-container--default .select2-selection--single {
+ background-color: #fff;
+ border: 1px solid #aaa;
+ border-radius: 4px; }
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
+ color: #444;
+ line-height: 28px; }
+ .select2-container--default .select2-selection--single .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold; }
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
+ color: #999; }
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
+ height: 26px;
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ width: 20px; }
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
+ border-color: #888 transparent transparent transparent;
+ border-style: solid;
+ border-width: 5px 4px 0 4px;
+ height: 0;
+ left: 50%;
+ margin-left: -4px;
+ margin-top: -2px;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
+ float: left; }
+
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
+ left: 1px;
+ right: auto; }
+
+.select2-container--default.select2-container--disabled .select2-selection--single {
+ background-color: #eee;
+ cursor: default; }
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
+ display: none; }
+
+.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
+ border-color: transparent transparent #888 transparent;
+ border-width: 0 4px 5px 4px; }
+
+.select2-container--default .select2-selection--multiple {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: text; }
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
+ box-sizing: border-box;
+ list-style: none;
+ margin: 0;
+ padding: 0 5px;
+ width: 100%; }
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
+ list-style: none; }
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
+ color: #999;
+ margin-top: 5px;
+ float: left; }
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold;
+ margin-top: 5px;
+ margin-right: 10px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
+ background-color: #e4e4e4;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: default;
+ float: left;
+ margin-right: 5px;
+ margin-top: 5px;
+ padding: 0 5px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
+ color: #999;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: bold;
+ margin-right: 2px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
+ color: #333; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
+ float: right; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ margin-left: 5px;
+ margin-right: auto; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
+ margin-left: 2px;
+ margin-right: auto; }
+
+.select2-container--default.select2-container--focus .select2-selection--multiple {
+ border: solid black 1px;
+ outline: 0; }
+
+.select2-container--default.select2-container--disabled .select2-selection--multiple {
+ background-color: #eee;
+ cursor: default; }
+
+.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
+ display: none; }
+
+.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--default .select2-search--dropdown .select2-search__field {
+ border: 1px solid #aaa; }
+
+.select2-container--default .select2-search--inline .select2-search__field {
+ background: transparent;
+ border: none;
+ outline: 0;
+ box-shadow: none;
+ -webkit-appearance: textfield; }
+
+.select2-container--default .select2-results > .select2-results__options {
+ max-height: 200px;
+ overflow-y: auto; }
+
+.select2-container--default .select2-results__option[role=group] {
+ padding: 0; }
+
+.select2-container--default .select2-results__option[aria-disabled=true] {
+ color: #999; }
+
+.select2-container--default .select2-results__option[data-selected=true] {
+ background-color: #ddd; }
+
+.select2-container--default .select2-results__option .select2-results__option {
+ padding-left: 1em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
+ padding-left: 0; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -1em;
+ padding-left: 2em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -2em;
+ padding-left: 3em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -3em;
+ padding-left: 4em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -4em;
+ padding-left: 5em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -5em;
+ padding-left: 6em; }
+
+.select2-container--default .select2-results__option--highlighted[data-selected] {
+ background-color: #5897fb;
+ color: white; }
+
+.select2-container--default .select2-results__group {
+ cursor: default;
+ display: block;
+ padding: 6px; }
+
+.select2-container--classic .select2-selection--single {
+ background-color: #f7f7f7;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ outline: 0;
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
+ .select2-container--classic .select2-selection--single:focus {
+ border: 1px solid #5897fb; }
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
+ color: #444;
+ line-height: 28px; }
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold;
+ margin-right: 10px; }
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
+ color: #999; }
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
+ background-color: #ddd;
+ border: none;
+ border-left: 1px solid #aaa;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ height: 26px;
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ width: 20px;
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
+ border-color: #888 transparent transparent transparent;
+ border-style: solid;
+ border-width: 5px 4px 0 4px;
+ height: 0;
+ left: 50%;
+ margin-left: -4px;
+ margin-top: -2px;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
+ float: left; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
+ border: none;
+ border-right: 1px solid #aaa;
+ border-radius: 0;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ left: 1px;
+ right: auto; }
+
+.select2-container--classic.select2-container--open .select2-selection--single {
+ border: 1px solid #5897fb; }
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
+ background: transparent;
+ border: none; }
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
+ border-color: transparent transparent #888 transparent;
+ border-width: 0 4px 5px 4px; }
+
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
+
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
+
+.select2-container--classic .select2-selection--multiple {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: text;
+ outline: 0; }
+ .select2-container--classic .select2-selection--multiple:focus {
+ border: 1px solid #5897fb; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
+ list-style: none;
+ margin: 0;
+ padding: 0 5px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
+ display: none; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
+ background-color: #e4e4e4;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: default;
+ float: left;
+ margin-right: 5px;
+ margin-top: 5px;
+ padding: 0 5px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
+ color: #888;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: bold;
+ margin-right: 2px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
+ color: #555; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ float: right; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ margin-left: 5px;
+ margin-right: auto; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
+ margin-left: 2px;
+ margin-right: auto; }
+
+.select2-container--classic.select2-container--open .select2-selection--multiple {
+ border: 1px solid #5897fb; }
+
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--classic .select2-search--dropdown .select2-search__field {
+ border: 1px solid #aaa;
+ outline: 0; }
+
+.select2-container--classic .select2-search--inline .select2-search__field {
+ outline: 0;
+ box-shadow: none; }
+
+.select2-container--classic .select2-dropdown {
+ background-color: white;
+ border: 1px solid transparent; }
+
+.select2-container--classic .select2-dropdown--above {
+ border-bottom: none; }
+
+.select2-container--classic .select2-dropdown--below {
+ border-top: none; }
+
+.select2-container--classic .select2-results > .select2-results__options {
+ max-height: 200px;
+ overflow-y: auto; }
+
+.select2-container--classic .select2-results__option[role=group] {
+ padding: 0; }
+
+.select2-container--classic .select2-results__option[aria-disabled=true] {
+ color: grey; }
+
+.select2-container--classic .select2-results__option--highlighted[data-selected] {
+ background-color: #3875d7;
+ color: white; }
+
+.select2-container--classic .select2-results__group {
+ cursor: default;
+ display: block;
+ padding: 6px; }
+
+.select2-container--classic.select2-container--open .select2-dropdown {
+ border-color: #5897fb; }
diff --git a/functions/kirki/assets/vendor/selectWoo/css/select2.min.css b/functions/kirki/assets/vendor/selectWoo/css/select2.min.css
new file mode 100644
index 0000000..59fa33d
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/css/select2.min.css
@@ -0,0 +1 @@
+.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[data-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[data-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[data-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
diff --git a/functions/kirki/assets/vendor/selectWoo/css/selectWoo.css b/functions/kirki/assets/vendor/selectWoo/css/selectWoo.css
new file mode 100644
index 0000000..6b4d251
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/css/selectWoo.css
@@ -0,0 +1,484 @@
+.select2-container {
+ box-sizing: border-box;
+ display: inline-block;
+ margin: 0;
+ position: relative;
+ vertical-align: middle; }
+ .select2-container .select2-selection--single {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: block;
+ height: 28px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-container .select2-selection--single .select2-selection__rendered {
+ display: block;
+ padding-left: 8px;
+ padding-right: 20px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap; }
+ .select2-container .select2-selection--single .select2-selection__clear {
+ position: relative; }
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
+ padding-right: 8px;
+ padding-left: 20px; }
+ .select2-container .select2-selection--multiple {
+ box-sizing: border-box;
+ cursor: pointer;
+ display: block;
+ min-height: 32px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
+ display: inline-block;
+ overflow: hidden;
+ padding-left: 8px;
+ text-overflow: ellipsis;
+ white-space: nowrap; }
+ .select2-container .select2-search--inline {
+ float: left; }
+ .select2-container .select2-search--inline .select2-search__field {
+ box-sizing: border-box;
+ border: none;
+ font-size: 100%;
+ margin-top: 5px;
+ padding: 0; }
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
+ -webkit-appearance: none; }
+
+.select2-dropdown {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ box-sizing: border-box;
+ display: block;
+ position: absolute;
+ left: -100000px;
+ width: 100%;
+ z-index: 1051; }
+
+.select2-results {
+ display: block; }
+
+.select2-results__options {
+ list-style: none;
+ margin: 0;
+ padding: 0; }
+
+.select2-results__option {
+ padding: 6px;
+ user-select: none;
+ -webkit-user-select: none; }
+ .select2-results__option[data-selected] {
+ cursor: pointer; }
+
+.select2-container--open .select2-dropdown {
+ left: 0; }
+
+.select2-container--open .select2-dropdown--above {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--open .select2-dropdown--below {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-search--dropdown {
+ display: block;
+ padding: 4px; }
+ .select2-search--dropdown .select2-search__field {
+ padding: 4px;
+ width: 100%;
+ box-sizing: border-box; }
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
+ -webkit-appearance: none; }
+ .select2-search--dropdown.select2-search--hide {
+ display: none; }
+
+.select2-close-mask {
+ border: 0;
+ margin: 0;
+ padding: 0;
+ display: block;
+ position: fixed;
+ left: 0;
+ top: 0;
+ min-height: 100%;
+ min-width: 100%;
+ height: auto;
+ width: auto;
+ opacity: 0;
+ z-index: 99;
+ background-color: #fff;
+ filter: alpha(opacity=0); }
+
+.select2-hidden-accessible {
+ border: 0 !important;
+ clip: rect(0 0 0 0) !important;
+ height: 1px !important;
+ margin: -1px !important;
+ overflow: hidden !important;
+ padding: 0 !important;
+ position: absolute !important;
+ width: 1px !important; }
+
+.select2-container--default .select2-selection--single {
+ background-color: #fff;
+ border: 1px solid #aaa;
+ border-radius: 4px; }
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
+ color: #444;
+ line-height: 28px; }
+ .select2-container--default .select2-selection--single .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold; }
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
+ color: #999; }
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
+ height: 26px;
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ width: 20px; }
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
+ border-color: #888 transparent transparent transparent;
+ border-style: solid;
+ border-width: 5px 4px 0 4px;
+ height: 0;
+ left: 50%;
+ margin-left: -4px;
+ margin-top: -2px;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
+ float: left; }
+
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
+ left: 1px;
+ right: auto; }
+
+.select2-container--default.select2-container--disabled .select2-selection--single {
+ background-color: #eee;
+ cursor: default; }
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
+ display: none; }
+
+.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
+ border-color: transparent transparent #888 transparent;
+ border-width: 0 4px 5px 4px; }
+
+.select2-container--default .select2-selection--multiple {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: text; }
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
+ box-sizing: border-box;
+ list-style: none;
+ margin: 0;
+ padding: 0 5px;
+ width: 100%; }
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
+ list-style: none; }
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
+ color: #999;
+ margin-top: 5px;
+ float: left; }
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold;
+ margin-top: 5px;
+ margin-right: 10px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
+ background-color: #e4e4e4;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: default;
+ float: left;
+ margin-right: 5px;
+ margin-top: 5px;
+ padding: 0 5px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
+ color: #999;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: bold;
+ margin-right: 2px; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
+ color: #333; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
+ float: right; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ margin-left: 5px;
+ margin-right: auto; }
+
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
+ margin-left: 2px;
+ margin-right: auto; }
+
+.select2-container--default.select2-container--focus .select2-selection--multiple {
+ border: solid black 1px;
+ outline: 0; }
+
+.select2-container--default.select2-container--disabled .select2-selection--multiple {
+ background-color: #eee;
+ cursor: default; }
+
+.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
+ display: none; }
+
+.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--default .select2-search--dropdown .select2-search__field {
+ border: 1px solid #aaa; }
+
+.select2-container--default .select2-search--inline .select2-search__field {
+ background: transparent;
+ border: none;
+ outline: 0;
+ box-shadow: none;
+ -webkit-appearance: textfield; }
+
+.select2-container--default .select2-results > .select2-results__options {
+ max-height: 200px;
+ overflow-y: auto; }
+
+.select2-container--default .select2-results__option[role=group] {
+ padding: 0; }
+
+.select2-container--default .select2-results__option[aria-disabled=true] {
+ color: #999; }
+
+.select2-container--default .select2-results__option[data-selected=true] {
+ background-color: #ddd; }
+
+.select2-container--default .select2-results__option .select2-results__option {
+ padding-left: 1em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
+ padding-left: 0; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -1em;
+ padding-left: 2em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -2em;
+ padding-left: 3em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -3em;
+ padding-left: 4em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -4em;
+ padding-left: 5em; }
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
+ margin-left: -5em;
+ padding-left: 6em; }
+
+.select2-container--default .select2-results__option--highlighted[data-selected] {
+ background-color: #5897fb;
+ color: white; }
+
+.select2-container--default .select2-results__group {
+ cursor: default;
+ display: block;
+ padding: 6px; }
+
+.select2-container--classic .select2-selection--single {
+ background-color: #f7f7f7;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ outline: 0;
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
+ .select2-container--classic .select2-selection--single:focus {
+ border: 1px solid #5897fb; }
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
+ color: #444;
+ line-height: 28px; }
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
+ cursor: pointer;
+ float: right;
+ font-weight: bold;
+ margin-right: 10px; }
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
+ color: #999; }
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
+ background-color: #ddd;
+ border: none;
+ border-left: 1px solid #aaa;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ height: 26px;
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ width: 20px;
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
+ border-color: #888 transparent transparent transparent;
+ border-style: solid;
+ border-width: 5px 4px 0 4px;
+ height: 0;
+ left: 50%;
+ margin-left: -4px;
+ margin-top: -2px;
+ position: absolute;
+ top: 50%;
+ width: 0; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
+ float: left; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
+ border: none;
+ border-right: 1px solid #aaa;
+ border-radius: 0;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ left: 1px;
+ right: auto; }
+
+.select2-container--classic.select2-container--open .select2-selection--single {
+ border: 1px solid #5897fb; }
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
+ background: transparent;
+ border: none; }
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
+ border-color: transparent transparent #888 transparent;
+ border-width: 0 4px 5px 4px; }
+
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
+
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
+
+.select2-container--classic .select2-selection--multiple {
+ background-color: white;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: text;
+ outline: 0; }
+ .select2-container--classic .select2-selection--multiple:focus {
+ border: 1px solid #5897fb; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
+ list-style: none;
+ margin: 0;
+ padding: 0 5px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
+ display: none; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
+ background-color: #e4e4e4;
+ border: 1px solid #aaa;
+ border-radius: 4px;
+ cursor: default;
+ float: left;
+ margin-right: 5px;
+ margin-top: 5px;
+ padding: 0 5px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
+ color: #888;
+ cursor: pointer;
+ display: inline-block;
+ font-weight: bold;
+ margin-right: 2px; }
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
+ color: #555; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ float: right; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
+ margin-left: 5px;
+ margin-right: auto; }
+
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
+ margin-left: 2px;
+ margin-right: auto; }
+
+.select2-container--classic.select2-container--open .select2-selection--multiple {
+ border: 1px solid #5897fb; }
+
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
+ border-top: none;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0; }
+
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
+ border-bottom: none;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0; }
+
+.select2-container--classic .select2-search--dropdown .select2-search__field {
+ border: 1px solid #aaa;
+ outline: 0; }
+
+.select2-container--classic .select2-search--inline .select2-search__field {
+ outline: 0;
+ box-shadow: none; }
+
+.select2-container--classic .select2-dropdown {
+ background-color: white;
+ border: 1px solid transparent; }
+
+.select2-container--classic .select2-dropdown--above {
+ border-bottom: none; }
+
+.select2-container--classic .select2-dropdown--below {
+ border-top: none; }
+
+.select2-container--classic .select2-results > .select2-results__options {
+ max-height: 200px;
+ overflow-y: auto; }
+
+.select2-container--classic .select2-results__option[role=group] {
+ padding: 0; }
+
+.select2-container--classic .select2-results__option[aria-disabled=true] {
+ color: grey; }
+
+.select2-container--classic .select2-results__option--highlighted[data-selected] {
+ background-color: #3875d7;
+ color: white; }
+
+.select2-container--classic .select2-results__group {
+ cursor: default;
+ display: block;
+ padding: 6px; }
+
+.select2-container--classic.select2-container--open .select2-dropdown {
+ border-color: #5897fb; }
diff --git a/functions/kirki/assets/vendor/selectWoo/css/selectWoo.min.css b/functions/kirki/assets/vendor/selectWoo/css/selectWoo.min.css
new file mode 100644
index 0000000..59fa33d
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/css/selectWoo.min.css
@@ -0,0 +1 @@
+.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[data-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[data-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[data-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ar.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ar.js
new file mode 100644
index 0000000..f9d1965
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ar.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/az.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/az.js
new file mode 100644
index 0000000..ffd640f
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/az.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/bg.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/bg.js
new file mode 100644
index 0000000..c170d3c
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/bg.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ca.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ca.js
new file mode 100644
index 0000000..274099d
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ca.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/cs.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/cs.js
new file mode 100644
index 0000000..d50faa2
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/cs.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/da.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/da.js
new file mode 100644
index 0000000..a59bd1f
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/da.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/de.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/de.js
new file mode 100644
index 0000000..13c2509
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/de.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/el.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/el.js
new file mode 100644
index 0000000..7277ced
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/el.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/en.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/en.js
new file mode 100644
index 0000000..6465853
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/en.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/es.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/es.js
new file mode 100644
index 0000000..3fb592b
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/es.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/et.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/et.js
new file mode 100644
index 0000000..d9a6f09
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/et.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/eu.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/eu.js
new file mode 100644
index 0000000..7fb958d
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/eu.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/fa.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/fa.js
new file mode 100644
index 0000000..fdc16c6
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/fa.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/fi.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/fi.js
new file mode 100644
index 0000000..b406c66
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/fi.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/fr.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/fr.js
new file mode 100644
index 0000000..524acb8
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/fr.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/gl.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/gl.js
new file mode 100644
index 0000000..2799266
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/gl.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/he.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/he.js
new file mode 100644
index 0000000..7e0ed14
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/he.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/hi.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/hi.js
new file mode 100644
index 0000000..8a8ebaf
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/hi.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/hr.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/hr.js
new file mode 100644
index 0000000..8999b9c
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/hr.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/hu.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/hu.js
new file mode 100644
index 0000000..6871068
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/hu.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/hy.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/hy.js
new file mode 100644
index 0000000..17cb0e7
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/hy.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/id.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/id.js
new file mode 100644
index 0000000..876edb4
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/id.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/is.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/is.js
new file mode 100644
index 0000000..49bceb3
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/is.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/it.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/it.js
new file mode 100644
index 0000000..37ab22d
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/it.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ja.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ja.js
new file mode 100644
index 0000000..281e8a0
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ja.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/km.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/km.js
new file mode 100644
index 0000000..0ace96e
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/km.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ko.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ko.js
new file mode 100644
index 0000000..a8c39fb
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ko.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/lt.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/lt.js
new file mode 100644
index 0000000..15f1478
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/lt.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/lv.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/lv.js
new file mode 100644
index 0000000..c55a484
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/lv.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/mk.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/mk.js
new file mode 100644
index 0000000..4884354
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/mk.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ms.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ms.js
new file mode 100644
index 0000000..6711f72
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ms.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/nb.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/nb.js
new file mode 100644
index 0000000..2001a3b
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/nb.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/nl.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/nl.js
new file mode 100644
index 0000000..0c20ad2
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/nl.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/pl.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/pl.js
new file mode 100644
index 0000000..157c4b3
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/pl.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/pt-BR.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/pt-BR.js
new file mode 100644
index 0000000..1d066d6
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/pt-BR.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/pt.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/pt.js
new file mode 100644
index 0000000..e200ea4
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/pt.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ro.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ro.js
new file mode 100644
index 0000000..d066a2b
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ro.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/ru.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/ru.js
new file mode 100644
index 0000000..7ef8036
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/ru.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/sk.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/sk.js
new file mode 100644
index 0000000..574d862
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/sk.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/sl.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/sl.js
new file mode 100644
index 0000000..44e5d06
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/sl.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/sr-Cyrl.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/sr-Cyrl.js
new file mode 100644
index 0000000..9d01257
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/sr-Cyrl.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/sr.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/sr.js
new file mode 100644
index 0000000..e635fd3
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/sr.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/sv.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/sv.js
new file mode 100644
index 0000000..fe220e3
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/sv.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/th.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/th.js
new file mode 100644
index 0000000..6ac7d92
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/th.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/tr.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/tr.js
new file mode 100644
index 0000000..5836299
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/tr.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/uk.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/uk.js
new file mode 100644
index 0000000..44c603f
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/uk.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/vi.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/vi.js
new file mode 100644
index 0000000..1a22705
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/vi.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-CN.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-CN.js
new file mode 100644
index 0000000..20b5b9b
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-CN.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-TW.js b/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-TW.js
new file mode 100644
index 0000000..dfb0a2f
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/i18n/zh-TW.js
@@ -0,0 +1,3 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/select2.full.js b/functions/kirki/assets/vendor/selectWoo/js/select2.full.js
new file mode 100644
index 0000000..d973690
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/select2.full.js
@@ -0,0 +1,6553 @@
+/*!
+ * SelectWoo 1.0.1
+ * https://github.com/woocommerce/selectWoo
+ *
+ * Released under the MIT license
+ * https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = function (root, jQuery) {
+ if (jQuery === undefined) {
+ // require('jQuery') returns a factory that requires window to
+ // build a jQuery instance, we normalize how we use modules
+ // that require this pattern but the window provided is a noop
+ // if it's defined (how jquery works)
+ if (typeof window !== 'undefined') {
+ jQuery = require('jquery');
+ }
+ else {
+ jQuery = require('jquery')(root);
+ }
+ }
+ factory(jQuery);
+ return jQuery;
+ };
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+} (function (jQuery) {
+ // This is needed so we can catch the AMD loader configuration and use it
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
+ // returns the AMD loader references.
+ var S2 =(function () {
+ // Restore the Select2 AMD loader so it can be used
+ // Needed mostly in the language files, where the loader is not inserted
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
+ var S2 = jQuery.fn.select2.amd;
+ }
+var S2;(function () { if (!S2 || !S2.requirejs) {
+if (!S2) { S2 = {}; } else { require = S2; }
+/**
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
+ */
+//Going sloppy to avoid 'use strict' string cost, but strict practices should
+//be followed.
+/*global setTimeout: false */
+
+var requirejs, require, define;
+(function (undef) {
+ var main, req, makeMap, handlers,
+ defined = {},
+ waiting = {},
+ config = {},
+ defining = {},
+ hasOwn = Object.prototype.hasOwnProperty,
+ aps = [].slice,
+ jsSuffixRegExp = /\.js$/;
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName) {
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
+ baseParts = baseName && baseName.split("/"),
+ map = config.map,
+ starMap = (map && map['*']) || {};
+
+ //Adjust any relative paths.
+ if (name) {
+ name = name.split('/');
+ lastIndex = name.length - 1;
+
+ // If wanting node ID compatibility, strip .js from end
+ // of IDs. Have to do this here, and not in nameToUrl
+ // because node allows either .js or non .js to map
+ // to same file.
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
+ }
+
+ // Starts with a '.' so need the baseName
+ if (name[0].charAt(0) === '.' && baseParts) {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ name = normalizedBaseParts.concat(name);
+ }
+
+ //start trimDots
+ for (i = 0; i < name.length; i++) {
+ part = name[i];
+ if (part === '.') {
+ name.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ // If at the start, or previous value is still ..,
+ // keep them so that when converted to a path it may
+ // still work when converted to a path, even though
+ // as an ID it is less than ideal. In larger point
+ // releases, may be better to just kick out an error.
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
+ continue;
+ } else if (i > 0) {
+ name.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ //end trimDots
+
+ name = name.join('/');
+ }
+
+ //Apply map config if available.
+ if ((baseParts || starMap) && map) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join("/");
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = map[baseParts.slice(0, j).join('/')];
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = mapValue[nameSegment];
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
+ foundStarMap = starMap[nameSegment];
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function makeRequire(relName, forceSync) {
+ return function () {
+ //A version of a require function that passes a moduleName
+ //value for items that may need to
+ //look up paths relative to the moduleName
+ var args = aps.call(arguments, 0);
+
+ //If first arg is not require('string'), and there is only
+ //one arg, it is the array form without a callback. Insert
+ //a null so that the following concat is correct.
+ if (typeof args[0] !== 'string' && args.length === 1) {
+ args.push(null);
+ }
+ return req.apply(undef, args.concat([relName, forceSync]));
+ };
+ }
+
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(depName) {
+ return function (value) {
+ defined[depName] = value;
+ };
+ }
+
+ function callDep(name) {
+ if (hasProp(waiting, name)) {
+ var args = waiting[name];
+ delete waiting[name];
+ defining[name] = true;
+ main.apply(undef, args);
+ }
+
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
+ throw new Error('No ' + name);
+ }
+ return defined[name];
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ //Creates a parts array for a relName where first part is plugin ID,
+ //second part is resource ID. Assumes relName has already been normalized.
+ function makeRelParts(relName) {
+ return relName ? splitPrefix(relName) : [];
+ }
+
+ /**
+ * Makes a name map, normalizing the name, and using a plugin
+ * for normalization if necessary. Grabs a ref to plugin
+ * too, as an optimization.
+ */
+ makeMap = function (name, relParts) {
+ var plugin,
+ parts = splitPrefix(name),
+ prefix = parts[0],
+ relResourceName = relParts[1];
+
+ name = parts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, relResourceName);
+ plugin = callDep(prefix);
+ }
+
+ //Normalize according
+ if (prefix) {
+ if (plugin && plugin.normalize) {
+ name = plugin.normalize(name, makeNormalize(relResourceName));
+ } else {
+ name = normalize(name, relResourceName);
+ }
+ } else {
+ name = normalize(name, relResourceName);
+ parts = splitPrefix(name);
+ prefix = parts[0];
+ name = parts[1];
+ if (prefix) {
+ plugin = callDep(prefix);
+ }
+ }
+
+ //Using ridiculous property names for space reasons
+ return {
+ f: prefix ? prefix + '!' + name : name, //fullName
+ n: name,
+ pr: prefix,
+ p: plugin
+ };
+ };
+
+ function makeConfig(name) {
+ return function () {
+ return (config && config.config && config.config[name]) || {};
+ };
+ }
+
+ handlers = {
+ require: function (name) {
+ return makeRequire(name);
+ },
+ exports: function (name) {
+ var e = defined[name];
+ if (typeof e !== 'undefined') {
+ return e;
+ } else {
+ return (defined[name] = {});
+ }
+ },
+ module: function (name) {
+ return {
+ id: name,
+ uri: '',
+ exports: defined[name],
+ config: makeConfig(name)
+ };
+ }
+ };
+
+ main = function (name, deps, callback, relName) {
+ var cjsModule, depName, ret, map, i, relParts,
+ args = [],
+ callbackType = typeof callback,
+ usingExports;
+
+ //Use name if no relName
+ relName = relName || name;
+ relParts = makeRelParts(relName);
+
+ //Call the callback to define the module, if necessary.
+ if (callbackType === 'undefined' || callbackType === 'function') {
+ //Pull out the defined dependencies and pass the ordered
+ //values to the callback.
+ //Default to [require, exports, module] if no deps
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
+ for (i = 0; i < deps.length; i += 1) {
+ map = makeMap(deps[i], relParts);
+ depName = map.f;
+
+ //Fast path CommonJS standard dependencies.
+ if (depName === "require") {
+ args[i] = handlers.require(name);
+ } else if (depName === "exports") {
+ //CommonJS module spec 1.1
+ args[i] = handlers.exports(name);
+ usingExports = true;
+ } else if (depName === "module") {
+ //CommonJS module spec 1.1
+ cjsModule = args[i] = handlers.module(name);
+ } else if (hasProp(defined, depName) ||
+ hasProp(waiting, depName) ||
+ hasProp(defining, depName)) {
+ args[i] = callDep(depName);
+ } else if (map.p) {
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
+ args[i] = defined[depName];
+ } else {
+ throw new Error(name + ' missing ' + depName);
+ }
+ }
+
+ ret = callback ? callback.apply(defined[name], args) : undefined;
+
+ if (name) {
+ //If setting exports via "module" is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ if (cjsModule && cjsModule.exports !== undef &&
+ cjsModule.exports !== defined[name]) {
+ defined[name] = cjsModule.exports;
+ } else if (ret !== undef || !usingExports) {
+ //Use the return value from the function.
+ defined[name] = ret;
+ }
+ }
+ } else if (name) {
+ //May just be an object definition for the module. Only
+ //worry about defining if have a module name.
+ defined[name] = callback;
+ }
+ };
+
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
+ if (typeof deps === "string") {
+ if (handlers[deps]) {
+ //callback in this case is really relName
+ return handlers[deps](callback);
+ }
+ //Just return the module wanted. In this scenario, the
+ //deps arg is the module name, and second arg (if passed)
+ //is just the relName.
+ //Normalize module name, if it contains . or ..
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
+ } else if (!deps.splice) {
+ //deps is a config object, not an array.
+ config = deps;
+ if (config.deps) {
+ req(config.deps, config.callback);
+ }
+ if (!callback) {
+ return;
+ }
+
+ if (callback.splice) {
+ //callback is an array, which means it is a dependency list.
+ //Adjust args if there are dependencies
+ deps = callback;
+ callback = relName;
+ relName = null;
+ } else {
+ deps = undef;
+ }
+ }
+
+ //Support require(['a'])
+ callback = callback || function () {};
+
+ //If relName is a function, it is an errback handler,
+ //so remove it.
+ if (typeof relName === 'function') {
+ relName = forceSync;
+ forceSync = alt;
+ }
+
+ //Simulate async callback;
+ if (forceSync) {
+ main(undef, deps, callback, relName);
+ } else {
+ //Using a non-zero value because of concern for what old browsers
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
+ //If want a value immediately, use require('id') instead -- something
+ //that works in almond on the global level, but not guaranteed and
+ //unlikely to work in other AMD implementations.
+ setTimeout(function () {
+ main(undef, deps, callback, relName);
+ }, 4);
+ }
+
+ return req;
+ };
+
+ /**
+ * Just drops the config on the floor, but returns req in case
+ * the config return value is used.
+ */
+ req.config = function (cfg) {
+ return req(cfg);
+ };
+
+ /**
+ * Expose module registry for debugging and tooling
+ */
+ requirejs._defined = defined;
+
+ define = function (name, deps, callback) {
+ if (typeof name !== 'string') {
+ throw new Error('See almond README: incorrect module build, no module name');
+ }
+
+ //This module may not have dependencies
+ if (!deps.splice) {
+ //deps is not an array, so probably means
+ //an object literal or factory function for
+ //the value. Adjust args.
+ callback = deps;
+ deps = [];
+ }
+
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
+ waiting[name] = [name, deps, callback];
+ }
+ };
+
+ define.amd = {
+ jQuery: true
+ };
+}());
+
+S2.requirejs = requirejs;S2.require = require;S2.define = define;
+}
+}());
+S2.define("almond", function(){});
+
+/* global jQuery:false, $:false */
+S2.define('jquery',[],function () {
+ var _$ = jQuery || $;
+
+ if (_$ == null && console && console.error) {
+ console.error(
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
+ 'web page.'
+ );
+ }
+
+ return _$;
+});
+
+S2.define('select2/utils',[
+ 'jquery'
+], function ($) {
+ var Utils = {};
+
+ Utils.Extend = function (ChildClass, SuperClass) {
+ var __hasProp = {}.hasOwnProperty;
+
+ function BaseConstructor () {
+ this.constructor = ChildClass;
+ }
+
+ for (var key in SuperClass) {
+ if (__hasProp.call(SuperClass, key)) {
+ ChildClass[key] = SuperClass[key];
+ }
+ }
+
+ BaseConstructor.prototype = SuperClass.prototype;
+ ChildClass.prototype = new BaseConstructor();
+ ChildClass.__super__ = SuperClass.prototype;
+
+ return ChildClass;
+ };
+
+ function getMethods (theClass) {
+ var proto = theClass.prototype;
+
+ var methods = [];
+
+ for (var methodName in proto) {
+ var m = proto[methodName];
+
+ if (typeof m !== 'function') {
+ continue;
+ }
+
+ if (methodName === 'constructor') {
+ continue;
+ }
+
+ methods.push(methodName);
+ }
+
+ return methods;
+ }
+
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
+ var decoratedMethods = getMethods(DecoratorClass);
+ var superMethods = getMethods(SuperClass);
+
+ function DecoratedClass () {
+ var unshift = Array.prototype.unshift;
+
+ var argCount = DecoratorClass.prototype.constructor.length;
+
+ var calledConstructor = SuperClass.prototype.constructor;
+
+ if (argCount > 0) {
+ unshift.call(arguments, SuperClass.prototype.constructor);
+
+ calledConstructor = DecoratorClass.prototype.constructor;
+ }
+
+ calledConstructor.apply(this, arguments);
+ }
+
+ DecoratorClass.displayName = SuperClass.displayName;
+
+ function ctr () {
+ this.constructor = DecoratedClass;
+ }
+
+ DecoratedClass.prototype = new ctr();
+
+ for (var m = 0; m < superMethods.length; m++) {
+ var superMethod = superMethods[m];
+
+ DecoratedClass.prototype[superMethod] =
+ SuperClass.prototype[superMethod];
+ }
+
+ var calledMethod = function (methodName) {
+ // Stub out the original method if it's not decorating an actual method
+ var originalMethod = function () {};
+
+ if (methodName in DecoratedClass.prototype) {
+ originalMethod = DecoratedClass.prototype[methodName];
+ }
+
+ var decoratedMethod = DecoratorClass.prototype[methodName];
+
+ return function () {
+ var unshift = Array.prototype.unshift;
+
+ unshift.call(arguments, originalMethod);
+
+ return decoratedMethod.apply(this, arguments);
+ };
+ };
+
+ for (var d = 0; d < decoratedMethods.length; d++) {
+ var decoratedMethod = decoratedMethods[d];
+
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
+ }
+
+ return DecoratedClass;
+ };
+
+ var Observable = function () {
+ this.listeners = {};
+ };
+
+ Observable.prototype.on = function (event, callback) {
+ this.listeners = this.listeners || {};
+
+ if (event in this.listeners) {
+ this.listeners[event].push(callback);
+ } else {
+ this.listeners[event] = [callback];
+ }
+ };
+
+ Observable.prototype.trigger = function (event) {
+ var slice = Array.prototype.slice;
+ var params = slice.call(arguments, 1);
+
+ this.listeners = this.listeners || {};
+
+ // Params should always come in as an array
+ if (params == null) {
+ params = [];
+ }
+
+ // If there are no arguments to the event, use a temporary object
+ if (params.length === 0) {
+ params.push({});
+ }
+
+ // Set the `_type` of the first object to the event
+ params[0]._type = event;
+
+ if (event in this.listeners) {
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
+ }
+
+ if ('*' in this.listeners) {
+ this.invoke(this.listeners['*'], arguments);
+ }
+ };
+
+ Observable.prototype.invoke = function (listeners, params) {
+ for (var i = 0, len = listeners.length; i < len; i++) {
+ listeners[i].apply(this, params);
+ }
+ };
+
+ Utils.Observable = Observable;
+
+ Utils.generateChars = function (length) {
+ var chars = '';
+
+ for (var i = 0; i < length; i++) {
+ var randomChar = Math.floor(Math.random() * 36);
+ chars += randomChar.toString(36);
+ }
+
+ return chars;
+ };
+
+ Utils.bind = function (func, context) {
+ return function () {
+ func.apply(context, arguments);
+ };
+ };
+
+ Utils._convertData = function (data) {
+ for (var originalKey in data) {
+ var keys = originalKey.split('-');
+
+ var dataLevel = data;
+
+ if (keys.length === 1) {
+ continue;
+ }
+
+ for (var k = 0; k < keys.length; k++) {
+ var key = keys[k];
+
+ // Lowercase the first letter
+ // By default, dash-separated becomes camelCase
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
+
+ if (!(key in dataLevel)) {
+ dataLevel[key] = {};
+ }
+
+ if (k == keys.length - 1) {
+ dataLevel[key] = data[originalKey];
+ }
+
+ dataLevel = dataLevel[key];
+ }
+
+ delete data[originalKey];
+ }
+
+ return data;
+ };
+
+ Utils.hasScroll = function (index, el) {
+ // Adapted from the function created by @ShadowScripter
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
+ // The original code can be found at
+ // http://codereview.stackexchange.com/q/13338
+ // and was designed to be used with the Sizzle selector engine.
+
+ var $el = $(el);
+ var overflowX = el.style.overflowX;
+ var overflowY = el.style.overflowY;
+
+ //Check both x and y declarations
+ if (overflowX === overflowY &&
+ (overflowY === 'hidden' || overflowY === 'visible')) {
+ return false;
+ }
+
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
+ return true;
+ }
+
+ return ($el.innerHeight() < el.scrollHeight ||
+ $el.innerWidth() < el.scrollWidth);
+ };
+
+ Utils.escapeMarkup = function (markup) {
+ var replaceMap = {
+ '\\': '\',
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '\'': ''',
+ '/': '/'
+ };
+
+ // Do not try to escape the markup if it's not a string
+ if (typeof markup !== 'string') {
+ return markup;
+ }
+
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
+ return replaceMap[match];
+ });
+ };
+
+ // Append an array of jQuery nodes to a given element.
+ Utils.appendMany = function ($element, $nodes) {
+ // jQuery 1.7.x does not support $.fn.append() with an array
+ // Fall back to a jQuery object collection using $.fn.add()
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
+ var $jqNodes = $();
+
+ $.map($nodes, function (node) {
+ $jqNodes = $jqNodes.add(node);
+ });
+
+ $nodes = $jqNodes;
+ }
+
+ $element.append($nodes);
+ };
+
+ // Determine whether the browser is on a touchscreen device.
+ Utils.isTouchscreen = function() {
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
+ }
+ return Utils._isTouchscreenCache;
+ }
+
+ return Utils;
+});
+
+S2.define('select2/results',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Results ($element, options, dataAdapter) {
+ this.$element = $element;
+ this.data = dataAdapter;
+ this.options = options;
+
+ Results.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Results, Utils.Observable);
+
+ Results.prototype.render = function () {
+ var $results = $(
+ '
'
+ );
+
+ if (this.options.get('multiple')) {
+ $results.attr('aria-multiselectable', 'true');
+ }
+
+ this.$results = $results;
+
+ return $results;
+ };
+
+ Results.prototype.clear = function () {
+ this.$results.empty();
+ };
+
+ Results.prototype.displayMessage = function (params) {
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ this.clear();
+ this.hideLoading();
+
+ var $message = $(
+ '
'
+ );
+
+ var message = this.options.get('translations').get(params.message);
+
+ $message.append(
+ escapeMarkup(
+ message(params.args)
+ )
+ );
+
+ $message[0].className += ' select2-results__message';
+
+ this.$results.append($message);
+ };
+
+ Results.prototype.hideMessages = function () {
+ this.$results.find('.select2-results__message').remove();
+ };
+
+ Results.prototype.append = function (data) {
+ this.hideLoading();
+
+ var $options = [];
+
+ if (data.results == null || data.results.length === 0) {
+ if (this.$results.children().length === 0) {
+ this.trigger('results:message', {
+ message: 'noResults'
+ });
+ }
+
+ return;
+ }
+
+ data.results = this.sort(data.results);
+
+ for (var d = 0; d < data.results.length; d++) {
+ var item = data.results[d];
+
+ var $option = this.option(item);
+
+ $options.push($option);
+ }
+
+ this.$results.append($options);
+ };
+
+ Results.prototype.position = function ($results, $dropdown) {
+ var $resultsContainer = $dropdown.find('.select2-results');
+ $resultsContainer.append($results);
+ };
+
+ Results.prototype.sort = function (data) {
+ var sorter = this.options.get('sorter');
+
+ return sorter(data);
+ };
+
+ Results.prototype.highlightFirstItem = function () {
+ var $options = this.$results
+ .find('.select2-results__option[data-selected]');
+
+ var $selected = $options.filter('[data-selected=true]');
+
+ // Check if there are any selected options
+ if ($selected.length > 0) {
+ // If there are selected options, highlight the first
+ $selected.first().trigger('mouseenter');
+ } else {
+ // If there are no selected options, highlight the first option
+ // in the dropdown
+ $options.first().trigger('mouseenter');
+ }
+
+ this.ensureHighlightVisible();
+ };
+
+ Results.prototype.setClasses = function () {
+ var self = this;
+
+ this.data.current(function (selected) {
+ var selectedIds = $.map(selected, function (s) {
+ return s.id.toString();
+ });
+
+ var $options = self.$results
+ .find('.select2-results__option[data-selected]');
+
+ $options.each(function () {
+ var $option = $(this);
+
+ var item = $.data(this, 'data');
+
+ // id needs to be converted to a string when comparing
+ var id = '' + item.id;
+
+ if ((item.element != null && item.element.selected) ||
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
+ $option.attr('data-selected', 'true');
+ } else {
+ $option.attr('data-selected', 'false');
+ }
+ });
+
+ });
+ };
+
+ Results.prototype.showLoading = function (params) {
+ this.hideLoading();
+
+ var loadingMore = this.options.get('translations').get('searching');
+
+ var loading = {
+ disabled: true,
+ loading: true,
+ text: loadingMore(params)
+ };
+ var $loading = this.option(loading);
+ $loading.className += ' loading-results';
+
+ this.$results.prepend($loading);
+ };
+
+ Results.prototype.hideLoading = function () {
+ this.$results.find('.loading-results').remove();
+ };
+
+ Results.prototype.option = function (data) {
+ var option = document.createElement('li');
+ option.className = 'select2-results__option';
+
+ var attrs = {
+ 'role': 'option',
+ 'data-selected': 'false',
+ 'tabindex': -1
+ };
+
+ if (data.disabled) {
+ delete attrs['data-selected'];
+ attrs['aria-disabled'] = 'true';
+ }
+
+ if (data.id == null) {
+ delete attrs['data-selected'];
+ }
+
+ if (data._resultId != null) {
+ option.id = data._resultId;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ if (data.children) {
+ attrs['aria-label'] = data.text;
+ delete attrs['data-selected'];
+ }
+
+ for (var attr in attrs) {
+ var val = attrs[attr];
+
+ option.setAttribute(attr, val);
+ }
+
+ if (data.children) {
+ var $option = $(option);
+
+ var label = document.createElement('strong');
+ label.className = 'select2-results__group';
+
+ var $label = $(label);
+ this.template(data, label);
+ $label.attr('role', 'presentation');
+
+ var $children = [];
+
+ for (var c = 0; c < data.children.length; c++) {
+ var child = data.children[c];
+
+ var $child = this.option(child);
+
+ $children.push($child);
+ }
+
+ var $childrenContainer = $('
', {
+ 'class': 'select2-results__options select2-results__options--nested',
+ 'role': 'listbox'
+ });
+ $childrenContainer.append($children);
+ $option.attr('role', 'list');
+
+ $option.append(label);
+ $option.append($childrenContainer);
+ } else {
+ this.template(data, option);
+ }
+
+ $.data(option, 'data', data);
+
+ return option;
+ };
+
+ Results.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-results';
+
+ this.$results.attr('id', id);
+
+ container.on('results:all', function (params) {
+ self.clear();
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ self.highlightFirstItem();
+ }
+ });
+
+ container.on('results:append', function (params) {
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ }
+ });
+
+ container.on('query', function (params) {
+ self.hideMessages();
+ self.showLoading(params);
+ });
+
+ container.on('select', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('unselect', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expended="true"
+ self.$results.attr('aria-expanded', 'true');
+ self.$results.attr('aria-hidden', 'false');
+
+ self.setClasses();
+ self.ensureHighlightVisible();
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expended="false"
+ self.$results.attr('aria-expanded', 'false');
+ self.$results.attr('aria-hidden', 'true');
+ self.$results.removeAttr('aria-activedescendant');
+ });
+
+ container.on('results:toggle', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ $highlighted.trigger('mouseup');
+ });
+
+ container.on('results:select', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var data = $highlighted.data('data');
+
+ if ($highlighted.attr('data-selected') == 'true') {
+ self.trigger('close', {});
+ } else {
+ self.trigger('select', {
+ data: data
+ });
+ }
+ });
+
+ container.on('results:previous', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ // If we are already at te top, don't move further
+ if (currentIndex === 0) {
+ return;
+ }
+
+ var nextIndex = currentIndex - 1;
+
+ // If none are highlighted, highlight the first
+ if ($highlighted.length === 0) {
+ nextIndex = 0;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top;
+ var nextTop = $next.offset().top;
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextTop - currentOffset < 0) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:next', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var nextIndex = currentIndex + 1;
+
+ // If we are at the last option, stay there
+ if (nextIndex >= $options.length) {
+ return;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextBottom > currentOffset) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
+ });
+
+ container.on('results:message', function (params) {
+ self.displayMessage(params);
+ });
+
+ if ($.fn.mousewheel) {
+ this.$results.on('mousewheel', function (e) {
+ var top = self.$results.scrollTop();
+
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
+
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
+
+ if (isAtTop) {
+ self.$results.scrollTop(0);
+
+ e.preventDefault();
+ e.stopPropagation();
+ } else if (isAtBottom) {
+ self.$results.scrollTop(
+ self.$results.get(0).scrollHeight - self.$results.height()
+ );
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ }
+
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
+ function (evt) {
+ var $this = $(this);
+
+ var data = $this.data('data');
+
+ if ($this.attr('data-selected') === 'true') {
+ if (self.options.get('multiple')) {
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ } else {
+ self.trigger('close', {});
+ }
+
+ return;
+ }
+
+ self.trigger('select', {
+ originalEvent: evt,
+ data: data
+ });
+ });
+
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
+ function (evt) {
+ var data = $(this).data('data');
+
+ self.getHighlightedResults()
+ .removeClass('select2-results__option--highlighted')
+ .attr('aria-selected', 'false');
+
+ self.trigger('results:focus', {
+ data: data,
+ element: $(this)
+ });
+ });
+ };
+
+ Results.prototype.getHighlightedResults = function () {
+ var $highlighted = this.$results
+ .find('.select2-results__option--highlighted');
+
+ return $highlighted;
+ };
+
+ Results.prototype.destroy = function () {
+ this.$results.remove();
+ };
+
+ Results.prototype.ensureHighlightVisible = function () {
+ var $highlighted = this.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var $options = this.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var currentOffset = this.$results.offset().top;
+ var nextTop = $highlighted.offset().top;
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
+
+ var offsetDelta = nextTop - currentOffset;
+ nextOffset -= $highlighted.outerHeight(false) * 2;
+
+ if (currentIndex <= 2) {
+ this.$results.scrollTop(0);
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
+ this.$results.scrollTop(nextOffset);
+ }
+ };
+
+ Results.prototype.template = function (result, container) {
+ var template = this.options.get('templateResult');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ var content = template(result, container);
+
+ if (content == null) {
+ container.style.display = 'none';
+ } else if (typeof content === 'string') {
+ container.innerHTML = escapeMarkup(content);
+ } else {
+ $(container).append(content);
+ }
+ };
+
+ return Results;
+});
+
+S2.define('select2/keys',[
+
+], function () {
+ var KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ ENTER: 13,
+ SHIFT: 16,
+ CTRL: 17,
+ ALT: 18,
+ ESC: 27,
+ SPACE: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DELETE: 46
+ };
+
+ return KEYS;
+});
+
+S2.define('select2/selection/base',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function BaseSelection ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ BaseSelection.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseSelection, Utils.Observable);
+
+ BaseSelection.prototype.render = function () {
+ var $selection = $(
+ '
' +
+ ' '
+ );
+
+ this._tabindex = 0;
+
+ if (this.$element.data('old-tabindex') != null) {
+ this._tabindex = this.$element.data('old-tabindex');
+ } else if (this.$element.attr('tabindex') != null) {
+ this._tabindex = this.$element.attr('tabindex');
+ }
+
+ $selection.attr('title', this.$element.attr('title'));
+ $selection.attr('tabindex', this._tabindex);
+
+ this.$selection = $selection;
+
+ return $selection;
+ };
+
+ BaseSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-container';
+ var resultsId = container.id + '-results';
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
+
+ this.container = container;
+
+ this.$selection.on('focus', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('blur', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ if (evt.which === KEYS.SPACE) {
+ evt.preventDefault();
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expanded="true"
+ self.$selection.attr('aria-expanded', 'true');
+ self.$selection.attr('aria-owns', resultsId);
+
+ self._attachCloseHandler(container);
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expanded="false"
+ self.$selection.attr('aria-expanded', 'false');
+ self.$selection.removeAttr('aria-activedescendant');
+ self.$selection.removeAttr('aria-owns');
+
+ // This needs to be delayed as the active element is the body when the
+ // key is pressed.
+ window.setTimeout(function () {
+ self.$selection.focus();
+ }, 1);
+
+ self._detachCloseHandler(container);
+ });
+
+ container.on('enable', function () {
+ self.$selection.attr('tabindex', self._tabindex);
+ });
+
+ container.on('disable', function () {
+ self.$selection.attr('tabindex', '-1');
+ });
+ };
+
+ BaseSelection.prototype._handleBlur = function (evt) {
+ var self = this;
+
+ // This needs to be delayed as the active element is the body when the tab
+ // key is pressed, possibly along with others.
+ window.setTimeout(function () {
+ // Don't trigger `blur` if the focus is still in the selection
+ if (
+ (document.activeElement == self.$selection[0]) ||
+ ($.contains(self.$selection[0], document.activeElement))
+ ) {
+ return;
+ }
+
+ self.trigger('blur', evt);
+ }, 1);
+ };
+
+ BaseSelection.prototype._attachCloseHandler = function (container) {
+ var self = this;
+
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
+ var $target = $(e.target);
+
+ var $select = $target.closest('.select2');
+
+ var $all = $('.select2.select2-container--open');
+
+ $all.each(function () {
+ var $this = $(this);
+
+ if (this == $select[0]) {
+ return;
+ }
+
+ var $element = $this.data('element');
+
+ $element.select2('close');
+ });
+ });
+ };
+
+ BaseSelection.prototype._detachCloseHandler = function (container) {
+ $(document.body).off('mousedown.select2.' + container.id);
+ };
+
+ BaseSelection.prototype.position = function ($selection, $container) {
+ var $selectionContainer = $container.find('.selection');
+ $selectionContainer.append($selection);
+ };
+
+ BaseSelection.prototype.destroy = function () {
+ this._detachCloseHandler(this.container);
+ };
+
+ BaseSelection.prototype.update = function (data) {
+ throw new Error('The `update` method must be defined in child classes.');
+ };
+
+ return BaseSelection;
+});
+
+S2.define('select2/selection/single',[
+ 'jquery',
+ './base',
+ '../utils',
+ '../keys'
+], function ($, BaseSelection, Utils, KEYS) {
+ function SingleSelection () {
+ SingleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(SingleSelection, BaseSelection);
+
+ SingleSelection.prototype.render = function () {
+ var $selection = SingleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--single');
+
+ $selection.html(
+ '
' +
+ '
' +
+ ' ' +
+ ' '
+ );
+
+ return $selection;
+ };
+
+ SingleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ SingleSelection.__super__.bind.apply(this, arguments);
+
+ var id = container.id + '-container';
+
+ this.$selection.find('.select2-selection__rendered')
+ .attr('id', id)
+ .attr('role', 'textbox')
+ .attr('aria-readonly', 'true');
+ this.$selection.attr('aria-labelledby', id);
+
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
+ this.$selection.attr('role', 'combobox');
+
+ this.$selection.on('mousedown', function (evt) {
+ // Only respond to left clicks
+ if (evt.which !== 1) {
+ return;
+ }
+
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on('focus', function (evt) {
+ // User focuses on the container
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
+ container.open();
+ }
+ });
+
+ this.$selection.on('blur', function (evt) {
+ // User exits the container
+ });
+
+ container.on('focus', function (evt) {
+ if (!container.isOpen()) {
+ self.$selection.focus();
+ }
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+ };
+
+ SingleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ SingleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ SingleSelection.prototype.selectionContainer = function () {
+ return $('
');
+ };
+
+ SingleSelection.prototype.update = function (data) {
+ if (data.length === 0) {
+ this.clear();
+ return;
+ }
+
+ var selection = data[0];
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+ var formatted = this.display(selection, $rendered);
+
+ $rendered.empty().append(formatted);
+ $rendered.prop('title', selection.title || selection.text);
+ };
+
+ return SingleSelection;
+});
+
+S2.define('select2/selection/multiple',[
+ 'jquery',
+ './base',
+ '../utils'
+], function ($, BaseSelection, Utils) {
+ function MultipleSelection ($element, options) {
+ MultipleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(MultipleSelection, BaseSelection);
+
+ MultipleSelection.prototype.render = function () {
+ var $selection = MultipleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--multiple');
+
+ $selection.html(
+ '
'
+ );
+
+ return $selection;
+ };
+
+ MultipleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ MultipleSelection.__super__.bind.apply(this, arguments);
+
+ this.$selection.on('click', function (evt) {
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on(
+ 'click',
+ '.select2-selection__choice__remove',
+ function (evt) {
+ // Ignore the event if it is disabled
+ if (self.options.get('disabled')) {
+ return;
+ }
+
+ var $remove = $(this);
+ var $selection = $remove.parent();
+
+ var data = $selection.data('data');
+
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ }
+ );
+ };
+
+ MultipleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ MultipleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ MultipleSelection.prototype.selectionContainer = function () {
+ var $container = $(
+ '
' +
+ '' +
+ '×' +
+ ' ' +
+ ' '
+ );
+
+ return $container;
+ };
+
+ MultipleSelection.prototype.update = function (data) {
+ var self = this;
+ this.clear();
+
+ if (data.length === 0) {
+ return;
+ }
+
+ var $selections = [];
+
+ for (var d = 0; d < data.length; d++) {
+ var selection = data[d];
+
+ var $selection = this.selectionContainer();
+ var formatted = this.display(selection, $selection).trim();
+
+ $selection.append(formatted);
+ $selection.prop('title', selection.title || selection.text);
+
+ $selection.data('data', selection);
+
+ $selections.push($selection);
+ }
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+
+ Utils.appendMany($rendered, $selections);
+
+ // Return cursor to search field after updating.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ if ('undefined' !== typeof this.$search) {
+ setTimeout(function(){
+ self.$search.focus();
+ }, 1);
+ }
+ };
+
+ return MultipleSelection;
+});
+
+S2.define('select2/selection/placeholder',[
+ '../utils'
+], function (Utils) {
+ function Placeholder (decorated, $element, options) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options);
+ }
+
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
+ var $placeholder = this.selectionContainer();
+
+ $placeholder.html(this.display(placeholder));
+ $placeholder.addClass('select2-selection__placeholder')
+ .removeClass('select2-selection__choice');
+
+ return $placeholder;
+ };
+
+ Placeholder.prototype.update = function (decorated, data) {
+ var singlePlaceholder = (
+ data.length == 1 && data[0].id != this.placeholder.id
+ );
+ var multipleSelections = data.length > 1;
+
+ if (multipleSelections || singlePlaceholder) {
+ return decorated.call(this, data);
+ }
+
+ this.clear();
+
+ var $placeholder = this.createPlaceholder(this.placeholder);
+
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
+ };
+
+ return Placeholder;
+});
+
+S2.define('select2/selection/allowClear',[
+ 'jquery',
+ '../keys'
+], function ($, KEYS) {
+ function AllowClear () { }
+
+ AllowClear.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ if (this.placeholder == null) {
+ if (this.options.get('debug') && window.console && console.error) {
+ console.error(
+ 'Select2: The `allowClear` option should be used in combination ' +
+ 'with the `placeholder` option.'
+ );
+ }
+ }
+
+ this.$selection.on('mousedown', '.select2-selection__clear',
+ function (evt) {
+ self._handleClear(evt);
+ });
+
+ container.on('keypress', function (evt) {
+ self._handleKeyboardClear(evt, container);
+ });
+ };
+
+ AllowClear.prototype._handleClear = function (_, evt) {
+ // Ignore the event if it is disabled
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ var $clear = this.$selection.find('.select2-selection__clear');
+
+ // Ignore the event if nothing has been selected
+ if ($clear.length === 0) {
+ return;
+ }
+
+ evt.stopPropagation();
+
+ var data = $clear.data('data');
+
+ for (var d = 0; d < data.length; d++) {
+ var unselectData = {
+ data: data[d]
+ };
+
+ // Trigger the `unselect` event, so people can prevent it from being
+ // cleared.
+ this.trigger('unselect', unselectData);
+
+ // If the event was prevented, don't clear it out.
+ if (unselectData.prevented) {
+ return;
+ }
+ }
+
+ this.$element.val(this.placeholder.id).trigger('change');
+
+ this.trigger('toggle', {});
+ };
+
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
+ if (container.isOpen()) {
+ return;
+ }
+
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
+ this._handleClear(evt);
+ }
+ };
+
+ AllowClear.prototype.update = function (decorated, data) {
+ decorated.call(this, data);
+
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
+ data.length === 0) {
+ return;
+ }
+
+ var $remove = $(
+ '
' +
+ '×' +
+ ' '
+ );
+ $remove.data('data', data);
+
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
+ };
+
+ return AllowClear;
+});
+
+S2.define('select2/selection/search',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function Search (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ Search.prototype.render = function (decorated) {
+ var $search = $(
+ '
' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ var $rendered = decorated.call(this);
+
+ this._transferTabIndex();
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.trigger('focus');
+ });
+
+ container.on('close', function () {
+ self.$search.val('');
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.trigger('focus');
+ });
+
+ container.on('enable', function () {
+ self.$search.prop('disabled', false);
+
+ self._transferTabIndex();
+ });
+
+ container.on('disable', function () {
+ self.$search.prop('disabled', true);
+ });
+
+ container.on('focus', function (evt) {
+ self.$search.trigger('focus');
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
+ evt.stopPropagation();
+
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+
+ var key = evt.which;
+
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
+ var $previousChoice = self.$searchContainer
+ .prev('.select2-selection__choice');
+
+ if ($previousChoice.length > 0) {
+ var item = $previousChoice.data('data');
+
+ self.searchRemoveChoice(item);
+
+ evt.preventDefault();
+ }
+ }
+ });
+
+ // Try to detect the IE version should the `documentMode` property that
+ // is stored on the document. This is only implemented in IE and is
+ // slightly cleaner than doing a user agent check.
+ // This property is not available in Edge, but Edge also doesn't have
+ // this bug.
+ var msie = document.documentMode;
+ var disableInputEvents = msie && msie <= 11;
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$selection.on(
+ 'input.searchcheck',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents) {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ // Unbind the duplicated `keyup` event
+ self.$selection.off('keyup.search');
+ }
+ );
+
+ this.$selection.on(
+ 'keyup.search input.search',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents && evt.type === 'input') {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ var key = evt.which;
+
+ // We can freely ignore events from modifier keys
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
+ return;
+ }
+
+ // Tabbing will be handled during the `keydown` phase
+ if (key == KEYS.TAB) {
+ return;
+ }
+
+ self.handleSearch(evt);
+ }
+ );
+ };
+
+ /**
+ * This method will transfer the tabindex attribute from the rendered
+ * selection to the search box. This allows for the search box to be used as
+ * the primary focus instead of the selection container.
+ *
+ * @private
+ */
+ Search.prototype._transferTabIndex = function (decorated) {
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
+ this.$selection.attr('tabindex', '-1');
+ };
+
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
+ this.$search.attr('placeholder', placeholder.text);
+ };
+
+ Search.prototype.update = function (decorated, data) {
+ var searchHadFocus = this.$search[0] == document.activeElement;
+
+ this.$search.attr('placeholder', '');
+
+ decorated.call(this, data);
+
+ this.$selection.find('.select2-selection__rendered')
+ .append(this.$searchContainer);
+
+ this.resizeSearch();
+ if (searchHadFocus) {
+ this.$search.focus();
+ }
+ };
+
+ Search.prototype.handleSearch = function () {
+ this.resizeSearch();
+
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
+ this.trigger('unselect', {
+ data: item
+ });
+
+ this.$search.val(item.text);
+ this.handleSearch();
+ };
+
+ Search.prototype.resizeSearch = function () {
+ this.$search.css('width', '25px');
+
+ var width = '';
+
+ if (this.$search.attr('placeholder') !== '') {
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
+ } else {
+ var minimumWidth = this.$search.val().length + 1;
+
+ width = (minimumWidth * 0.75) + 'em';
+ }
+
+ this.$search.css('width', width);
+ };
+
+ return Search;
+});
+
+S2.define('select2/selection/eventRelay',[
+ 'jquery'
+], function ($) {
+ function EventRelay () { }
+
+ EventRelay.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var relayEvents = [
+ 'open', 'opening',
+ 'close', 'closing',
+ 'select', 'selecting',
+ 'unselect', 'unselecting'
+ ];
+
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
+
+ decorated.call(this, container, $container);
+
+ container.on('*', function (name, params) {
+ // Ignore events that should not be relayed
+ if ($.inArray(name, relayEvents) === -1) {
+ return;
+ }
+
+ // The parameters should always be an object
+ params = params || {};
+
+ // Generate the jQuery event for the Select2 event
+ var evt = $.Event('select2:' + name, {
+ params: params
+ });
+
+ self.$element.trigger(evt);
+
+ // Only handle preventable events if it was one
+ if ($.inArray(name, preventableEvents) === -1) {
+ return;
+ }
+
+ params.prevented = evt.isDefaultPrevented();
+ });
+ };
+
+ return EventRelay;
+});
+
+S2.define('select2/translation',[
+ 'jquery',
+ 'require'
+], function ($, require) {
+ function Translation (dict) {
+ this.dict = dict || {};
+ }
+
+ Translation.prototype.all = function () {
+ return this.dict;
+ };
+
+ Translation.prototype.get = function (key) {
+ return this.dict[key];
+ };
+
+ Translation.prototype.extend = function (translation) {
+ this.dict = $.extend({}, translation.all(), this.dict);
+ };
+
+ // Static functions
+
+ Translation._cache = {};
+
+ Translation.loadPath = function (path) {
+ if (!(path in Translation._cache)) {
+ var translations = require(path);
+
+ Translation._cache[path] = translations;
+ }
+
+ return new Translation(Translation._cache[path]);
+ };
+
+ return Translation;
+});
+
+S2.define('select2/diacritics',[
+
+], function () {
+ var diacritics = {
+ '\u24B6': 'A',
+ '\uFF21': 'A',
+ '\u00C0': 'A',
+ '\u00C1': 'A',
+ '\u00C2': 'A',
+ '\u1EA6': 'A',
+ '\u1EA4': 'A',
+ '\u1EAA': 'A',
+ '\u1EA8': 'A',
+ '\u00C3': 'A',
+ '\u0100': 'A',
+ '\u0102': 'A',
+ '\u1EB0': 'A',
+ '\u1EAE': 'A',
+ '\u1EB4': 'A',
+ '\u1EB2': 'A',
+ '\u0226': 'A',
+ '\u01E0': 'A',
+ '\u00C4': 'A',
+ '\u01DE': 'A',
+ '\u1EA2': 'A',
+ '\u00C5': 'A',
+ '\u01FA': 'A',
+ '\u01CD': 'A',
+ '\u0200': 'A',
+ '\u0202': 'A',
+ '\u1EA0': 'A',
+ '\u1EAC': 'A',
+ '\u1EB6': 'A',
+ '\u1E00': 'A',
+ '\u0104': 'A',
+ '\u023A': 'A',
+ '\u2C6F': 'A',
+ '\uA732': 'AA',
+ '\u00C6': 'AE',
+ '\u01FC': 'AE',
+ '\u01E2': 'AE',
+ '\uA734': 'AO',
+ '\uA736': 'AU',
+ '\uA738': 'AV',
+ '\uA73A': 'AV',
+ '\uA73C': 'AY',
+ '\u24B7': 'B',
+ '\uFF22': 'B',
+ '\u1E02': 'B',
+ '\u1E04': 'B',
+ '\u1E06': 'B',
+ '\u0243': 'B',
+ '\u0182': 'B',
+ '\u0181': 'B',
+ '\u24B8': 'C',
+ '\uFF23': 'C',
+ '\u0106': 'C',
+ '\u0108': 'C',
+ '\u010A': 'C',
+ '\u010C': 'C',
+ '\u00C7': 'C',
+ '\u1E08': 'C',
+ '\u0187': 'C',
+ '\u023B': 'C',
+ '\uA73E': 'C',
+ '\u24B9': 'D',
+ '\uFF24': 'D',
+ '\u1E0A': 'D',
+ '\u010E': 'D',
+ '\u1E0C': 'D',
+ '\u1E10': 'D',
+ '\u1E12': 'D',
+ '\u1E0E': 'D',
+ '\u0110': 'D',
+ '\u018B': 'D',
+ '\u018A': 'D',
+ '\u0189': 'D',
+ '\uA779': 'D',
+ '\u01F1': 'DZ',
+ '\u01C4': 'DZ',
+ '\u01F2': 'Dz',
+ '\u01C5': 'Dz',
+ '\u24BA': 'E',
+ '\uFF25': 'E',
+ '\u00C8': 'E',
+ '\u00C9': 'E',
+ '\u00CA': 'E',
+ '\u1EC0': 'E',
+ '\u1EBE': 'E',
+ '\u1EC4': 'E',
+ '\u1EC2': 'E',
+ '\u1EBC': 'E',
+ '\u0112': 'E',
+ '\u1E14': 'E',
+ '\u1E16': 'E',
+ '\u0114': 'E',
+ '\u0116': 'E',
+ '\u00CB': 'E',
+ '\u1EBA': 'E',
+ '\u011A': 'E',
+ '\u0204': 'E',
+ '\u0206': 'E',
+ '\u1EB8': 'E',
+ '\u1EC6': 'E',
+ '\u0228': 'E',
+ '\u1E1C': 'E',
+ '\u0118': 'E',
+ '\u1E18': 'E',
+ '\u1E1A': 'E',
+ '\u0190': 'E',
+ '\u018E': 'E',
+ '\u24BB': 'F',
+ '\uFF26': 'F',
+ '\u1E1E': 'F',
+ '\u0191': 'F',
+ '\uA77B': 'F',
+ '\u24BC': 'G',
+ '\uFF27': 'G',
+ '\u01F4': 'G',
+ '\u011C': 'G',
+ '\u1E20': 'G',
+ '\u011E': 'G',
+ '\u0120': 'G',
+ '\u01E6': 'G',
+ '\u0122': 'G',
+ '\u01E4': 'G',
+ '\u0193': 'G',
+ '\uA7A0': 'G',
+ '\uA77D': 'G',
+ '\uA77E': 'G',
+ '\u24BD': 'H',
+ '\uFF28': 'H',
+ '\u0124': 'H',
+ '\u1E22': 'H',
+ '\u1E26': 'H',
+ '\u021E': 'H',
+ '\u1E24': 'H',
+ '\u1E28': 'H',
+ '\u1E2A': 'H',
+ '\u0126': 'H',
+ '\u2C67': 'H',
+ '\u2C75': 'H',
+ '\uA78D': 'H',
+ '\u24BE': 'I',
+ '\uFF29': 'I',
+ '\u00CC': 'I',
+ '\u00CD': 'I',
+ '\u00CE': 'I',
+ '\u0128': 'I',
+ '\u012A': 'I',
+ '\u012C': 'I',
+ '\u0130': 'I',
+ '\u00CF': 'I',
+ '\u1E2E': 'I',
+ '\u1EC8': 'I',
+ '\u01CF': 'I',
+ '\u0208': 'I',
+ '\u020A': 'I',
+ '\u1ECA': 'I',
+ '\u012E': 'I',
+ '\u1E2C': 'I',
+ '\u0197': 'I',
+ '\u24BF': 'J',
+ '\uFF2A': 'J',
+ '\u0134': 'J',
+ '\u0248': 'J',
+ '\u24C0': 'K',
+ '\uFF2B': 'K',
+ '\u1E30': 'K',
+ '\u01E8': 'K',
+ '\u1E32': 'K',
+ '\u0136': 'K',
+ '\u1E34': 'K',
+ '\u0198': 'K',
+ '\u2C69': 'K',
+ '\uA740': 'K',
+ '\uA742': 'K',
+ '\uA744': 'K',
+ '\uA7A2': 'K',
+ '\u24C1': 'L',
+ '\uFF2C': 'L',
+ '\u013F': 'L',
+ '\u0139': 'L',
+ '\u013D': 'L',
+ '\u1E36': 'L',
+ '\u1E38': 'L',
+ '\u013B': 'L',
+ '\u1E3C': 'L',
+ '\u1E3A': 'L',
+ '\u0141': 'L',
+ '\u023D': 'L',
+ '\u2C62': 'L',
+ '\u2C60': 'L',
+ '\uA748': 'L',
+ '\uA746': 'L',
+ '\uA780': 'L',
+ '\u01C7': 'LJ',
+ '\u01C8': 'Lj',
+ '\u24C2': 'M',
+ '\uFF2D': 'M',
+ '\u1E3E': 'M',
+ '\u1E40': 'M',
+ '\u1E42': 'M',
+ '\u2C6E': 'M',
+ '\u019C': 'M',
+ '\u24C3': 'N',
+ '\uFF2E': 'N',
+ '\u01F8': 'N',
+ '\u0143': 'N',
+ '\u00D1': 'N',
+ '\u1E44': 'N',
+ '\u0147': 'N',
+ '\u1E46': 'N',
+ '\u0145': 'N',
+ '\u1E4A': 'N',
+ '\u1E48': 'N',
+ '\u0220': 'N',
+ '\u019D': 'N',
+ '\uA790': 'N',
+ '\uA7A4': 'N',
+ '\u01CA': 'NJ',
+ '\u01CB': 'Nj',
+ '\u24C4': 'O',
+ '\uFF2F': 'O',
+ '\u00D2': 'O',
+ '\u00D3': 'O',
+ '\u00D4': 'O',
+ '\u1ED2': 'O',
+ '\u1ED0': 'O',
+ '\u1ED6': 'O',
+ '\u1ED4': 'O',
+ '\u00D5': 'O',
+ '\u1E4C': 'O',
+ '\u022C': 'O',
+ '\u1E4E': 'O',
+ '\u014C': 'O',
+ '\u1E50': 'O',
+ '\u1E52': 'O',
+ '\u014E': 'O',
+ '\u022E': 'O',
+ '\u0230': 'O',
+ '\u00D6': 'O',
+ '\u022A': 'O',
+ '\u1ECE': 'O',
+ '\u0150': 'O',
+ '\u01D1': 'O',
+ '\u020C': 'O',
+ '\u020E': 'O',
+ '\u01A0': 'O',
+ '\u1EDC': 'O',
+ '\u1EDA': 'O',
+ '\u1EE0': 'O',
+ '\u1EDE': 'O',
+ '\u1EE2': 'O',
+ '\u1ECC': 'O',
+ '\u1ED8': 'O',
+ '\u01EA': 'O',
+ '\u01EC': 'O',
+ '\u00D8': 'O',
+ '\u01FE': 'O',
+ '\u0186': 'O',
+ '\u019F': 'O',
+ '\uA74A': 'O',
+ '\uA74C': 'O',
+ '\u01A2': 'OI',
+ '\uA74E': 'OO',
+ '\u0222': 'OU',
+ '\u24C5': 'P',
+ '\uFF30': 'P',
+ '\u1E54': 'P',
+ '\u1E56': 'P',
+ '\u01A4': 'P',
+ '\u2C63': 'P',
+ '\uA750': 'P',
+ '\uA752': 'P',
+ '\uA754': 'P',
+ '\u24C6': 'Q',
+ '\uFF31': 'Q',
+ '\uA756': 'Q',
+ '\uA758': 'Q',
+ '\u024A': 'Q',
+ '\u24C7': 'R',
+ '\uFF32': 'R',
+ '\u0154': 'R',
+ '\u1E58': 'R',
+ '\u0158': 'R',
+ '\u0210': 'R',
+ '\u0212': 'R',
+ '\u1E5A': 'R',
+ '\u1E5C': 'R',
+ '\u0156': 'R',
+ '\u1E5E': 'R',
+ '\u024C': 'R',
+ '\u2C64': 'R',
+ '\uA75A': 'R',
+ '\uA7A6': 'R',
+ '\uA782': 'R',
+ '\u24C8': 'S',
+ '\uFF33': 'S',
+ '\u1E9E': 'S',
+ '\u015A': 'S',
+ '\u1E64': 'S',
+ '\u015C': 'S',
+ '\u1E60': 'S',
+ '\u0160': 'S',
+ '\u1E66': 'S',
+ '\u1E62': 'S',
+ '\u1E68': 'S',
+ '\u0218': 'S',
+ '\u015E': 'S',
+ '\u2C7E': 'S',
+ '\uA7A8': 'S',
+ '\uA784': 'S',
+ '\u24C9': 'T',
+ '\uFF34': 'T',
+ '\u1E6A': 'T',
+ '\u0164': 'T',
+ '\u1E6C': 'T',
+ '\u021A': 'T',
+ '\u0162': 'T',
+ '\u1E70': 'T',
+ '\u1E6E': 'T',
+ '\u0166': 'T',
+ '\u01AC': 'T',
+ '\u01AE': 'T',
+ '\u023E': 'T',
+ '\uA786': 'T',
+ '\uA728': 'TZ',
+ '\u24CA': 'U',
+ '\uFF35': 'U',
+ '\u00D9': 'U',
+ '\u00DA': 'U',
+ '\u00DB': 'U',
+ '\u0168': 'U',
+ '\u1E78': 'U',
+ '\u016A': 'U',
+ '\u1E7A': 'U',
+ '\u016C': 'U',
+ '\u00DC': 'U',
+ '\u01DB': 'U',
+ '\u01D7': 'U',
+ '\u01D5': 'U',
+ '\u01D9': 'U',
+ '\u1EE6': 'U',
+ '\u016E': 'U',
+ '\u0170': 'U',
+ '\u01D3': 'U',
+ '\u0214': 'U',
+ '\u0216': 'U',
+ '\u01AF': 'U',
+ '\u1EEA': 'U',
+ '\u1EE8': 'U',
+ '\u1EEE': 'U',
+ '\u1EEC': 'U',
+ '\u1EF0': 'U',
+ '\u1EE4': 'U',
+ '\u1E72': 'U',
+ '\u0172': 'U',
+ '\u1E76': 'U',
+ '\u1E74': 'U',
+ '\u0244': 'U',
+ '\u24CB': 'V',
+ '\uFF36': 'V',
+ '\u1E7C': 'V',
+ '\u1E7E': 'V',
+ '\u01B2': 'V',
+ '\uA75E': 'V',
+ '\u0245': 'V',
+ '\uA760': 'VY',
+ '\u24CC': 'W',
+ '\uFF37': 'W',
+ '\u1E80': 'W',
+ '\u1E82': 'W',
+ '\u0174': 'W',
+ '\u1E86': 'W',
+ '\u1E84': 'W',
+ '\u1E88': 'W',
+ '\u2C72': 'W',
+ '\u24CD': 'X',
+ '\uFF38': 'X',
+ '\u1E8A': 'X',
+ '\u1E8C': 'X',
+ '\u24CE': 'Y',
+ '\uFF39': 'Y',
+ '\u1EF2': 'Y',
+ '\u00DD': 'Y',
+ '\u0176': 'Y',
+ '\u1EF8': 'Y',
+ '\u0232': 'Y',
+ '\u1E8E': 'Y',
+ '\u0178': 'Y',
+ '\u1EF6': 'Y',
+ '\u1EF4': 'Y',
+ '\u01B3': 'Y',
+ '\u024E': 'Y',
+ '\u1EFE': 'Y',
+ '\u24CF': 'Z',
+ '\uFF3A': 'Z',
+ '\u0179': 'Z',
+ '\u1E90': 'Z',
+ '\u017B': 'Z',
+ '\u017D': 'Z',
+ '\u1E92': 'Z',
+ '\u1E94': 'Z',
+ '\u01B5': 'Z',
+ '\u0224': 'Z',
+ '\u2C7F': 'Z',
+ '\u2C6B': 'Z',
+ '\uA762': 'Z',
+ '\u24D0': 'a',
+ '\uFF41': 'a',
+ '\u1E9A': 'a',
+ '\u00E0': 'a',
+ '\u00E1': 'a',
+ '\u00E2': 'a',
+ '\u1EA7': 'a',
+ '\u1EA5': 'a',
+ '\u1EAB': 'a',
+ '\u1EA9': 'a',
+ '\u00E3': 'a',
+ '\u0101': 'a',
+ '\u0103': 'a',
+ '\u1EB1': 'a',
+ '\u1EAF': 'a',
+ '\u1EB5': 'a',
+ '\u1EB3': 'a',
+ '\u0227': 'a',
+ '\u01E1': 'a',
+ '\u00E4': 'a',
+ '\u01DF': 'a',
+ '\u1EA3': 'a',
+ '\u00E5': 'a',
+ '\u01FB': 'a',
+ '\u01CE': 'a',
+ '\u0201': 'a',
+ '\u0203': 'a',
+ '\u1EA1': 'a',
+ '\u1EAD': 'a',
+ '\u1EB7': 'a',
+ '\u1E01': 'a',
+ '\u0105': 'a',
+ '\u2C65': 'a',
+ '\u0250': 'a',
+ '\uA733': 'aa',
+ '\u00E6': 'ae',
+ '\u01FD': 'ae',
+ '\u01E3': 'ae',
+ '\uA735': 'ao',
+ '\uA737': 'au',
+ '\uA739': 'av',
+ '\uA73B': 'av',
+ '\uA73D': 'ay',
+ '\u24D1': 'b',
+ '\uFF42': 'b',
+ '\u1E03': 'b',
+ '\u1E05': 'b',
+ '\u1E07': 'b',
+ '\u0180': 'b',
+ '\u0183': 'b',
+ '\u0253': 'b',
+ '\u24D2': 'c',
+ '\uFF43': 'c',
+ '\u0107': 'c',
+ '\u0109': 'c',
+ '\u010B': 'c',
+ '\u010D': 'c',
+ '\u00E7': 'c',
+ '\u1E09': 'c',
+ '\u0188': 'c',
+ '\u023C': 'c',
+ '\uA73F': 'c',
+ '\u2184': 'c',
+ '\u24D3': 'd',
+ '\uFF44': 'd',
+ '\u1E0B': 'd',
+ '\u010F': 'd',
+ '\u1E0D': 'd',
+ '\u1E11': 'd',
+ '\u1E13': 'd',
+ '\u1E0F': 'd',
+ '\u0111': 'd',
+ '\u018C': 'd',
+ '\u0256': 'd',
+ '\u0257': 'd',
+ '\uA77A': 'd',
+ '\u01F3': 'dz',
+ '\u01C6': 'dz',
+ '\u24D4': 'e',
+ '\uFF45': 'e',
+ '\u00E8': 'e',
+ '\u00E9': 'e',
+ '\u00EA': 'e',
+ '\u1EC1': 'e',
+ '\u1EBF': 'e',
+ '\u1EC5': 'e',
+ '\u1EC3': 'e',
+ '\u1EBD': 'e',
+ '\u0113': 'e',
+ '\u1E15': 'e',
+ '\u1E17': 'e',
+ '\u0115': 'e',
+ '\u0117': 'e',
+ '\u00EB': 'e',
+ '\u1EBB': 'e',
+ '\u011B': 'e',
+ '\u0205': 'e',
+ '\u0207': 'e',
+ '\u1EB9': 'e',
+ '\u1EC7': 'e',
+ '\u0229': 'e',
+ '\u1E1D': 'e',
+ '\u0119': 'e',
+ '\u1E19': 'e',
+ '\u1E1B': 'e',
+ '\u0247': 'e',
+ '\u025B': 'e',
+ '\u01DD': 'e',
+ '\u24D5': 'f',
+ '\uFF46': 'f',
+ '\u1E1F': 'f',
+ '\u0192': 'f',
+ '\uA77C': 'f',
+ '\u24D6': 'g',
+ '\uFF47': 'g',
+ '\u01F5': 'g',
+ '\u011D': 'g',
+ '\u1E21': 'g',
+ '\u011F': 'g',
+ '\u0121': 'g',
+ '\u01E7': 'g',
+ '\u0123': 'g',
+ '\u01E5': 'g',
+ '\u0260': 'g',
+ '\uA7A1': 'g',
+ '\u1D79': 'g',
+ '\uA77F': 'g',
+ '\u24D7': 'h',
+ '\uFF48': 'h',
+ '\u0125': 'h',
+ '\u1E23': 'h',
+ '\u1E27': 'h',
+ '\u021F': 'h',
+ '\u1E25': 'h',
+ '\u1E29': 'h',
+ '\u1E2B': 'h',
+ '\u1E96': 'h',
+ '\u0127': 'h',
+ '\u2C68': 'h',
+ '\u2C76': 'h',
+ '\u0265': 'h',
+ '\u0195': 'hv',
+ '\u24D8': 'i',
+ '\uFF49': 'i',
+ '\u00EC': 'i',
+ '\u00ED': 'i',
+ '\u00EE': 'i',
+ '\u0129': 'i',
+ '\u012B': 'i',
+ '\u012D': 'i',
+ '\u00EF': 'i',
+ '\u1E2F': 'i',
+ '\u1EC9': 'i',
+ '\u01D0': 'i',
+ '\u0209': 'i',
+ '\u020B': 'i',
+ '\u1ECB': 'i',
+ '\u012F': 'i',
+ '\u1E2D': 'i',
+ '\u0268': 'i',
+ '\u0131': 'i',
+ '\u24D9': 'j',
+ '\uFF4A': 'j',
+ '\u0135': 'j',
+ '\u01F0': 'j',
+ '\u0249': 'j',
+ '\u24DA': 'k',
+ '\uFF4B': 'k',
+ '\u1E31': 'k',
+ '\u01E9': 'k',
+ '\u1E33': 'k',
+ '\u0137': 'k',
+ '\u1E35': 'k',
+ '\u0199': 'k',
+ '\u2C6A': 'k',
+ '\uA741': 'k',
+ '\uA743': 'k',
+ '\uA745': 'k',
+ '\uA7A3': 'k',
+ '\u24DB': 'l',
+ '\uFF4C': 'l',
+ '\u0140': 'l',
+ '\u013A': 'l',
+ '\u013E': 'l',
+ '\u1E37': 'l',
+ '\u1E39': 'l',
+ '\u013C': 'l',
+ '\u1E3D': 'l',
+ '\u1E3B': 'l',
+ '\u017F': 'l',
+ '\u0142': 'l',
+ '\u019A': 'l',
+ '\u026B': 'l',
+ '\u2C61': 'l',
+ '\uA749': 'l',
+ '\uA781': 'l',
+ '\uA747': 'l',
+ '\u01C9': 'lj',
+ '\u24DC': 'm',
+ '\uFF4D': 'm',
+ '\u1E3F': 'm',
+ '\u1E41': 'm',
+ '\u1E43': 'm',
+ '\u0271': 'm',
+ '\u026F': 'm',
+ '\u24DD': 'n',
+ '\uFF4E': 'n',
+ '\u01F9': 'n',
+ '\u0144': 'n',
+ '\u00F1': 'n',
+ '\u1E45': 'n',
+ '\u0148': 'n',
+ '\u1E47': 'n',
+ '\u0146': 'n',
+ '\u1E4B': 'n',
+ '\u1E49': 'n',
+ '\u019E': 'n',
+ '\u0272': 'n',
+ '\u0149': 'n',
+ '\uA791': 'n',
+ '\uA7A5': 'n',
+ '\u01CC': 'nj',
+ '\u24DE': 'o',
+ '\uFF4F': 'o',
+ '\u00F2': 'o',
+ '\u00F3': 'o',
+ '\u00F4': 'o',
+ '\u1ED3': 'o',
+ '\u1ED1': 'o',
+ '\u1ED7': 'o',
+ '\u1ED5': 'o',
+ '\u00F5': 'o',
+ '\u1E4D': 'o',
+ '\u022D': 'o',
+ '\u1E4F': 'o',
+ '\u014D': 'o',
+ '\u1E51': 'o',
+ '\u1E53': 'o',
+ '\u014F': 'o',
+ '\u022F': 'o',
+ '\u0231': 'o',
+ '\u00F6': 'o',
+ '\u022B': 'o',
+ '\u1ECF': 'o',
+ '\u0151': 'o',
+ '\u01D2': 'o',
+ '\u020D': 'o',
+ '\u020F': 'o',
+ '\u01A1': 'o',
+ '\u1EDD': 'o',
+ '\u1EDB': 'o',
+ '\u1EE1': 'o',
+ '\u1EDF': 'o',
+ '\u1EE3': 'o',
+ '\u1ECD': 'o',
+ '\u1ED9': 'o',
+ '\u01EB': 'o',
+ '\u01ED': 'o',
+ '\u00F8': 'o',
+ '\u01FF': 'o',
+ '\u0254': 'o',
+ '\uA74B': 'o',
+ '\uA74D': 'o',
+ '\u0275': 'o',
+ '\u01A3': 'oi',
+ '\u0223': 'ou',
+ '\uA74F': 'oo',
+ '\u24DF': 'p',
+ '\uFF50': 'p',
+ '\u1E55': 'p',
+ '\u1E57': 'p',
+ '\u01A5': 'p',
+ '\u1D7D': 'p',
+ '\uA751': 'p',
+ '\uA753': 'p',
+ '\uA755': 'p',
+ '\u24E0': 'q',
+ '\uFF51': 'q',
+ '\u024B': 'q',
+ '\uA757': 'q',
+ '\uA759': 'q',
+ '\u24E1': 'r',
+ '\uFF52': 'r',
+ '\u0155': 'r',
+ '\u1E59': 'r',
+ '\u0159': 'r',
+ '\u0211': 'r',
+ '\u0213': 'r',
+ '\u1E5B': 'r',
+ '\u1E5D': 'r',
+ '\u0157': 'r',
+ '\u1E5F': 'r',
+ '\u024D': 'r',
+ '\u027D': 'r',
+ '\uA75B': 'r',
+ '\uA7A7': 'r',
+ '\uA783': 'r',
+ '\u24E2': 's',
+ '\uFF53': 's',
+ '\u00DF': 's',
+ '\u015B': 's',
+ '\u1E65': 's',
+ '\u015D': 's',
+ '\u1E61': 's',
+ '\u0161': 's',
+ '\u1E67': 's',
+ '\u1E63': 's',
+ '\u1E69': 's',
+ '\u0219': 's',
+ '\u015F': 's',
+ '\u023F': 's',
+ '\uA7A9': 's',
+ '\uA785': 's',
+ '\u1E9B': 's',
+ '\u24E3': 't',
+ '\uFF54': 't',
+ '\u1E6B': 't',
+ '\u1E97': 't',
+ '\u0165': 't',
+ '\u1E6D': 't',
+ '\u021B': 't',
+ '\u0163': 't',
+ '\u1E71': 't',
+ '\u1E6F': 't',
+ '\u0167': 't',
+ '\u01AD': 't',
+ '\u0288': 't',
+ '\u2C66': 't',
+ '\uA787': 't',
+ '\uA729': 'tz',
+ '\u24E4': 'u',
+ '\uFF55': 'u',
+ '\u00F9': 'u',
+ '\u00FA': 'u',
+ '\u00FB': 'u',
+ '\u0169': 'u',
+ '\u1E79': 'u',
+ '\u016B': 'u',
+ '\u1E7B': 'u',
+ '\u016D': 'u',
+ '\u00FC': 'u',
+ '\u01DC': 'u',
+ '\u01D8': 'u',
+ '\u01D6': 'u',
+ '\u01DA': 'u',
+ '\u1EE7': 'u',
+ '\u016F': 'u',
+ '\u0171': 'u',
+ '\u01D4': 'u',
+ '\u0215': 'u',
+ '\u0217': 'u',
+ '\u01B0': 'u',
+ '\u1EEB': 'u',
+ '\u1EE9': 'u',
+ '\u1EEF': 'u',
+ '\u1EED': 'u',
+ '\u1EF1': 'u',
+ '\u1EE5': 'u',
+ '\u1E73': 'u',
+ '\u0173': 'u',
+ '\u1E77': 'u',
+ '\u1E75': 'u',
+ '\u0289': 'u',
+ '\u24E5': 'v',
+ '\uFF56': 'v',
+ '\u1E7D': 'v',
+ '\u1E7F': 'v',
+ '\u028B': 'v',
+ '\uA75F': 'v',
+ '\u028C': 'v',
+ '\uA761': 'vy',
+ '\u24E6': 'w',
+ '\uFF57': 'w',
+ '\u1E81': 'w',
+ '\u1E83': 'w',
+ '\u0175': 'w',
+ '\u1E87': 'w',
+ '\u1E85': 'w',
+ '\u1E98': 'w',
+ '\u1E89': 'w',
+ '\u2C73': 'w',
+ '\u24E7': 'x',
+ '\uFF58': 'x',
+ '\u1E8B': 'x',
+ '\u1E8D': 'x',
+ '\u24E8': 'y',
+ '\uFF59': 'y',
+ '\u1EF3': 'y',
+ '\u00FD': 'y',
+ '\u0177': 'y',
+ '\u1EF9': 'y',
+ '\u0233': 'y',
+ '\u1E8F': 'y',
+ '\u00FF': 'y',
+ '\u1EF7': 'y',
+ '\u1E99': 'y',
+ '\u1EF5': 'y',
+ '\u01B4': 'y',
+ '\u024F': 'y',
+ '\u1EFF': 'y',
+ '\u24E9': 'z',
+ '\uFF5A': 'z',
+ '\u017A': 'z',
+ '\u1E91': 'z',
+ '\u017C': 'z',
+ '\u017E': 'z',
+ '\u1E93': 'z',
+ '\u1E95': 'z',
+ '\u01B6': 'z',
+ '\u0225': 'z',
+ '\u0240': 'z',
+ '\u2C6C': 'z',
+ '\uA763': 'z',
+ '\u0386': '\u0391',
+ '\u0388': '\u0395',
+ '\u0389': '\u0397',
+ '\u038A': '\u0399',
+ '\u03AA': '\u0399',
+ '\u038C': '\u039F',
+ '\u038E': '\u03A5',
+ '\u03AB': '\u03A5',
+ '\u038F': '\u03A9',
+ '\u03AC': '\u03B1',
+ '\u03AD': '\u03B5',
+ '\u03AE': '\u03B7',
+ '\u03AF': '\u03B9',
+ '\u03CA': '\u03B9',
+ '\u0390': '\u03B9',
+ '\u03CC': '\u03BF',
+ '\u03CD': '\u03C5',
+ '\u03CB': '\u03C5',
+ '\u03B0': '\u03C5',
+ '\u03C9': '\u03C9',
+ '\u03C2': '\u03C3'
+ };
+
+ return diacritics;
+});
+
+S2.define('select2/data/base',[
+ '../utils'
+], function (Utils) {
+ function BaseAdapter ($element, options) {
+ BaseAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseAdapter, Utils.Observable);
+
+ BaseAdapter.prototype.current = function (callback) {
+ throw new Error('The `current` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.query = function (params, callback) {
+ throw new Error('The `query` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.bind = function (container, $container) {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.destroy = function () {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.generateResultId = function (container, data) {
+ var id = '';
+
+ if (container != null) {
+ id += container.id
+ } else {
+ id += Utils.generateChars(4);
+ }
+
+ id += '-result-';
+ id += Utils.generateChars(4);
+
+ if (data.id != null) {
+ id += '-' + data.id.toString();
+ } else {
+ id += '-' + Utils.generateChars(4);
+ }
+ return id;
+ };
+
+ return BaseAdapter;
+});
+
+S2.define('select2/data/select',[
+ './base',
+ '../utils',
+ 'jquery'
+], function (BaseAdapter, Utils, $) {
+ function SelectAdapter ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ SelectAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(SelectAdapter, BaseAdapter);
+
+ SelectAdapter.prototype.current = function (callback) {
+ var data = [];
+ var self = this;
+
+ this.$element.find(':selected').each(function () {
+ var $option = $(this);
+
+ var option = self.item($option);
+
+ data.push(option);
+ });
+
+ callback(data);
+ };
+
+ SelectAdapter.prototype.select = function (data) {
+ var self = this;
+
+ data.selected = true;
+
+ // If data.element is a DOM node, use it instead
+ if ($(data.element).is('option')) {
+ data.element.selected = true;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ if (this.$element.prop('multiple')) {
+ this.current(function (currentData) {
+ var val = [];
+
+ data = [data];
+ data.push.apply(data, currentData);
+
+ for (var d = 0; d < data.length; d++) {
+ var id = data[d].id;
+
+ if ($.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+ self.$element.trigger('change');
+ });
+ } else {
+ var val = data.id;
+
+ this.$element.val(val);
+ this.$element.trigger('change');
+ }
+ };
+
+ SelectAdapter.prototype.unselect = function (data) {
+ var self = this;
+
+ if (!this.$element.prop('multiple')) {
+ return;
+ }
+
+ data.selected = false;
+
+ if ($(data.element).is('option')) {
+ data.element.selected = false;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ this.current(function (currentData) {
+ var val = [];
+
+ for (var d = 0; d < currentData.length; d++) {
+ var id = currentData[d].id;
+
+ if (id !== data.id && $.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+
+ self.$element.trigger('change');
+ });
+ };
+
+ SelectAdapter.prototype.bind = function (container, $container) {
+ var self = this;
+
+ this.container = container;
+
+ container.on('select', function (params) {
+ self.select(params.data);
+ });
+
+ container.on('unselect', function (params) {
+ self.unselect(params.data);
+ });
+ };
+
+ SelectAdapter.prototype.destroy = function () {
+ // Remove anything added to child elements
+ this.$element.find('*').each(function () {
+ // Remove any custom data set by Select2
+ $.removeData(this, 'data');
+ });
+ };
+
+ SelectAdapter.prototype.query = function (params, callback) {
+ var data = [];
+ var self = this;
+
+ var $options = this.$element.children();
+
+ $options.each(function () {
+ var $option = $(this);
+
+ if (!$option.is('option') && !$option.is('optgroup')) {
+ return;
+ }
+
+ var option = self.item($option);
+
+ var matches = self.matches(params, option);
+
+ if (matches !== null) {
+ data.push(matches);
+ }
+ });
+
+ callback({
+ results: data
+ });
+ };
+
+ SelectAdapter.prototype.addOptions = function ($options) {
+ Utils.appendMany(this.$element, $options);
+ };
+
+ SelectAdapter.prototype.option = function (data) {
+ var option;
+
+ if (data.children) {
+ option = document.createElement('optgroup');
+ option.label = data.text;
+ } else {
+ option = document.createElement('option');
+
+ if (option.textContent !== undefined) {
+ option.textContent = data.text;
+ } else {
+ option.innerText = data.text;
+ }
+ }
+
+ if (data.id !== undefined) {
+ option.value = data.id;
+ }
+
+ if (data.disabled) {
+ option.disabled = true;
+ }
+
+ if (data.selected) {
+ option.selected = true;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ var $option = $(option);
+
+ var normalizedData = this._normalizeItem(data);
+ normalizedData.element = option;
+
+ // Override the option's data with the combined data
+ $.data(option, 'data', normalizedData);
+
+ return $option;
+ };
+
+ SelectAdapter.prototype.item = function ($option) {
+ var data = {};
+
+ data = $.data($option[0], 'data');
+
+ if (data != null) {
+ return data;
+ }
+
+ if ($option.is('option')) {
+ data = {
+ id: $option.val(),
+ text: $option.text(),
+ disabled: $option.prop('disabled'),
+ selected: $option.prop('selected'),
+ title: $option.prop('title')
+ };
+ } else if ($option.is('optgroup')) {
+ data = {
+ text: $option.prop('label'),
+ children: [],
+ title: $option.prop('title')
+ };
+
+ var $children = $option.children('option');
+ var children = [];
+
+ for (var c = 0; c < $children.length; c++) {
+ var $child = $($children[c]);
+
+ var child = this.item($child);
+
+ children.push(child);
+ }
+
+ data.children = children;
+ }
+
+ data = this._normalizeItem(data);
+ data.element = $option[0];
+
+ $.data($option[0], 'data', data);
+
+ return data;
+ };
+
+ SelectAdapter.prototype._normalizeItem = function (item) {
+ if (!$.isPlainObject(item)) {
+ item = {
+ id: item,
+ text: item
+ };
+ }
+
+ item = $.extend({}, {
+ text: ''
+ }, item);
+
+ var defaults = {
+ selected: false,
+ disabled: false
+ };
+
+ if (item.id != null) {
+ item.id = item.id.toString();
+ }
+
+ if (item.text != null) {
+ item.text = item.text.toString();
+ }
+
+ if (item._resultId == null && item.id) {
+ item._resultId = this.generateResultId(this.container, item);
+ }
+
+ return $.extend({}, defaults, item);
+ };
+
+ SelectAdapter.prototype.matches = function (params, data) {
+ var matcher = this.options.get('matcher');
+
+ return matcher(params, data);
+ };
+
+ return SelectAdapter;
+});
+
+S2.define('select2/data/array',[
+ './select',
+ '../utils',
+ 'jquery'
+], function (SelectAdapter, Utils, $) {
+ function ArrayAdapter ($element, options) {
+ var data = options.get('data') || [];
+
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
+
+ this.addOptions(this.convertToOptions(data));
+ }
+
+ Utils.Extend(ArrayAdapter, SelectAdapter);
+
+ ArrayAdapter.prototype.select = function (data) {
+ var $option = this.$element.find('option').filter(function (i, elm) {
+ return elm.value == data.id.toString();
+ });
+
+ if ($option.length === 0) {
+ $option = this.option(data);
+
+ this.addOptions($option);
+ }
+
+ ArrayAdapter.__super__.select.call(this, data);
+ };
+
+ ArrayAdapter.prototype.convertToOptions = function (data) {
+ var self = this;
+
+ var $existing = this.$element.find('option');
+ var existingIds = $existing.map(function () {
+ return self.item($(this)).id;
+ }).get();
+
+ var $options = [];
+
+ // Filter out all items except for the one passed in the argument
+ function onlyItem (item) {
+ return function () {
+ return $(this).val() == item.id;
+ };
+ }
+
+ for (var d = 0; d < data.length; d++) {
+ var item = this._normalizeItem(data[d]);
+
+ // Skip items which were pre-loaded, only merge the data
+ if ($.inArray(item.id, existingIds) >= 0) {
+ var $existingOption = $existing.filter(onlyItem(item));
+
+ var existingData = this.item($existingOption);
+ var newData = $.extend(true, {}, item, existingData);
+
+ var $newOption = this.option(newData);
+
+ $existingOption.replaceWith($newOption);
+
+ continue;
+ }
+
+ var $option = this.option(item);
+
+ if (item.children) {
+ var $children = this.convertToOptions(item.children);
+
+ Utils.appendMany($option, $children);
+ }
+
+ $options.push($option);
+ }
+
+ return $options;
+ };
+
+ return ArrayAdapter;
+});
+
+S2.define('select2/data/ajax',[
+ './array',
+ '../utils',
+ 'jquery'
+], function (ArrayAdapter, Utils, $) {
+ function AjaxAdapter ($element, options) {
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
+
+ if (this.ajaxOptions.processResults != null) {
+ this.processResults = this.ajaxOptions.processResults;
+ }
+
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
+ }
+
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
+
+ AjaxAdapter.prototype._applyDefaults = function (options) {
+ var defaults = {
+ data: function (params) {
+ return $.extend({}, params, {
+ q: params.term
+ });
+ },
+ transport: function (params, success, failure) {
+ var $request = $.ajax(params);
+
+ $request.then(success);
+ $request.fail(failure);
+
+ return $request;
+ }
+ };
+
+ return $.extend({}, defaults, options, true);
+ };
+
+ AjaxAdapter.prototype.processResults = function (results) {
+ return results;
+ };
+
+ AjaxAdapter.prototype.query = function (params, callback) {
+ var matches = [];
+ var self = this;
+
+ if (this._request != null) {
+ // JSONP requests cannot always be aborted
+ if ($.isFunction(this._request.abort)) {
+ this._request.abort();
+ }
+
+ this._request = null;
+ }
+
+ var options = $.extend({
+ type: 'GET'
+ }, this.ajaxOptions);
+
+ if (typeof options.url === 'function') {
+ options.url = options.url.call(this.$element, params);
+ }
+
+ if (typeof options.data === 'function') {
+ options.data = options.data.call(this.$element, params);
+ }
+
+ function request () {
+ var $request = options.transport(options, function (data) {
+ var results = self.processResults(data, params);
+
+ if (self.options.get('debug') && window.console && console.error) {
+ // Check to make sure that the response included a `results` key.
+ if (!results || !results.results || !$.isArray(results.results)) {
+ console.error(
+ 'Select2: The AJAX results did not return an array in the ' +
+ '`results` key of the response.'
+ );
+ }
+ }
+
+ callback(results);
+ self.container.focusOnActiveElement();
+ }, function () {
+ // Attempt to detect if a request was aborted
+ // Only works if the transport exposes a status property
+ if ($request.status && $request.status === '0') {
+ return;
+ }
+
+ self.trigger('results:message', {
+ message: 'errorLoading'
+ });
+ });
+
+ self._request = $request;
+ }
+
+ if (this.ajaxOptions.delay && params.term != null) {
+ if (this._queryTimeout) {
+ window.clearTimeout(this._queryTimeout);
+ }
+
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
+ } else {
+ request();
+ }
+ };
+
+ return AjaxAdapter;
+});
+
+S2.define('select2/data/tags',[
+ 'jquery'
+], function ($) {
+ function Tags (decorated, $element, options) {
+ var tags = options.get('tags');
+
+ var createTag = options.get('createTag');
+
+ if (createTag !== undefined) {
+ this.createTag = createTag;
+ }
+
+ var insertTag = options.get('insertTag');
+
+ if (insertTag !== undefined) {
+ this.insertTag = insertTag;
+ }
+
+ decorated.call(this, $element, options);
+
+ if ($.isArray(tags)) {
+ for (var t = 0; t < tags.length; t++) {
+ var tag = tags[t];
+ var item = this._normalizeItem(tag);
+
+ var $option = this.option(item);
+
+ this.$element.append($option);
+ }
+ }
+ }
+
+ Tags.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ this._removeOldTags();
+
+ if (params.term == null || params.page != null) {
+ decorated.call(this, params, callback);
+ return;
+ }
+
+ function wrapper (obj, child) {
+ var data = obj.results;
+
+ for (var i = 0; i < data.length; i++) {
+ var option = data[i];
+
+ var checkChildren = (
+ option.children != null &&
+ !wrapper({
+ results: option.children
+ }, true)
+ );
+
+ var optionText = (option.text || '').toUpperCase();
+ var paramsTerm = (params.term || '').toUpperCase();
+
+ var checkText = optionText === paramsTerm;
+
+ if (checkText || checkChildren) {
+ if (child) {
+ return false;
+ }
+
+ obj.data = data;
+ callback(obj);
+
+ return;
+ }
+ }
+
+ if (child) {
+ return true;
+ }
+
+ var tag = self.createTag(params);
+
+ if (tag != null) {
+ var $option = self.option(tag);
+ $option.attr('data-select2-tag', true);
+
+ self.addOptions([$option]);
+
+ self.insertTag(data, tag);
+ }
+
+ obj.results = data;
+
+ callback(obj);
+ }
+
+ decorated.call(this, params, wrapper);
+ };
+
+ Tags.prototype.createTag = function (decorated, params) {
+ var term = $.trim(params.term);
+
+ if (term === '') {
+ return null;
+ }
+
+ return {
+ id: term,
+ text: term
+ };
+ };
+
+ Tags.prototype.insertTag = function (_, data, tag) {
+ data.unshift(tag);
+ };
+
+ Tags.prototype._removeOldTags = function (_) {
+ var tag = this._lastTag;
+
+ var $options = this.$element.find('option[data-select2-tag]');
+
+ $options.each(function () {
+ if (this.selected) {
+ return;
+ }
+
+ $(this).remove();
+ });
+ };
+
+ return Tags;
+});
+
+S2.define('select2/data/tokenizer',[
+ 'jquery'
+], function ($) {
+ function Tokenizer (decorated, $element, options) {
+ var tokenizer = options.get('tokenizer');
+
+ if (tokenizer !== undefined) {
+ this.tokenizer = tokenizer;
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ this.$search = container.dropdown.$search || container.selection.$search ||
+ $container.find('.select2-search__field');
+ };
+
+ Tokenizer.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ function createAndSelect (data) {
+ // Normalize the data object so we can use it for checks
+ var item = self._normalizeItem(data);
+
+ // Check if the data object already exists as a tag
+ // Select it if it doesn't
+ var $existingOptions = self.$element.find('option').filter(function () {
+ return $(this).val() === item.id;
+ });
+
+ // If an existing option wasn't found for it, create the option
+ if (!$existingOptions.length) {
+ var $option = self.option(item);
+ $option.attr('data-select2-tag', true);
+
+ self._removeOldTags();
+ self.addOptions([$option]);
+ }
+
+ // Select the item, now that we know there is an option for it
+ select(item);
+ }
+
+ function select (data) {
+ self.trigger('select', {
+ data: data
+ });
+ }
+
+ params.term = params.term || '';
+
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
+
+ if (tokenData.term !== params.term) {
+ // Replace the search term if we have the search box
+ if (this.$search.length) {
+ this.$search.val(tokenData.term);
+ this.$search.focus();
+ }
+
+ params.term = tokenData.term;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
+ var separators = options.get('tokenSeparators') || [];
+ var term = params.term;
+ var i = 0;
+
+ var createTag = this.createTag || function (params) {
+ return {
+ id: params.term,
+ text: params.term
+ };
+ };
+
+ while (i < term.length) {
+ var termChar = term[i];
+
+ if ($.inArray(termChar, separators) === -1) {
+ i++;
+
+ continue;
+ }
+
+ var part = term.substr(0, i);
+ var partParams = $.extend({}, params, {
+ term: part
+ });
+
+ var data = createTag(partParams);
+
+ if (data == null) {
+ i++;
+ continue;
+ }
+
+ callback(data);
+
+ // Reset the term to not include the tokenized portion
+ term = term.substr(i + 1) || '';
+ i = 0;
+ }
+
+ return {
+ term: term
+ };
+ };
+
+ return Tokenizer;
+});
+
+S2.define('select2/data/minimumInputLength',[
+
+], function () {
+ function MinimumInputLength (decorated, $e, options) {
+ this.minimumInputLength = options.get('minimumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (params.term.length < this.minimumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooShort',
+ args: {
+ minimum: this.minimumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MinimumInputLength;
+});
+
+S2.define('select2/data/maximumInputLength',[
+
+], function () {
+ function MaximumInputLength (decorated, $e, options) {
+ this.maximumInputLength = options.get('maximumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (this.maximumInputLength > 0 &&
+ params.term.length > this.maximumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooLong',
+ args: {
+ maximum: this.maximumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MaximumInputLength;
+});
+
+S2.define('select2/data/maximumSelectionLength',[
+
+], function (){
+ function MaximumSelectionLength (decorated, $e, options) {
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumSelectionLength.prototype.query =
+ function (decorated, params, callback) {
+ var self = this;
+
+ this.current(function (currentData) {
+ var count = currentData != null ? currentData.length : 0;
+ if (self.maximumSelectionLength > 0 &&
+ count >= self.maximumSelectionLength) {
+ self.trigger('results:message', {
+ message: 'maximumSelected',
+ args: {
+ maximum: self.maximumSelectionLength
+ }
+ });
+ return;
+ }
+ decorated.call(self, params, callback);
+ });
+ };
+
+ return MaximumSelectionLength;
+});
+
+S2.define('select2/dropdown',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Dropdown ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ Dropdown.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Dropdown, Utils.Observable);
+
+ Dropdown.prototype.render = function () {
+ var $dropdown = $(
+ '
' +
+ ' ' +
+ ' '
+ );
+
+ $dropdown.attr('dir', this.options.get('dir'));
+
+ this.$dropdown = $dropdown;
+
+ return $dropdown;
+ };
+
+ Dropdown.prototype.bind = function () {
+ // Should be implemented in subclasses
+ };
+
+ Dropdown.prototype.position = function ($dropdown, $container) {
+ // Should be implmented in subclasses
+ };
+
+ Dropdown.prototype.destroy = function () {
+ // Remove the dropdown from the DOM
+ this.$dropdown.remove();
+ };
+
+ return Dropdown;
+});
+
+S2.define('select2/dropdown/search',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function Search () { }
+
+ Search.prototype.render = function (decorated) {
+ var $rendered = decorated.call(this);
+
+ var $search = $(
+ '
' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ $rendered.prepend($search);
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ this.$search.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+ });
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$search.on('input', function (evt) {
+ // Unbind the duplicated `keyup` event
+ $(this).off('keyup');
+ });
+
+ this.$search.on('keyup input', function (evt) {
+ self.handleSearch(evt);
+ });
+
+ container.on('open', function () {
+ self.$search.attr('tabindex', 0);
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.focus();
+
+ window.setTimeout(function () {
+ self.$search.focus();
+ }, 0);
+ });
+
+ container.on('close', function () {
+ self.$search.attr('tabindex', -1);
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.val('');
+ });
+
+ container.on('focus', function () {
+ if (container.isOpen()) {
+ self.$search.focus();
+ }
+ });
+
+ container.on('results:all', function (params) {
+ if (params.query.term == null || params.query.term === '') {
+ var showSearch = self.showSearch(params);
+
+ if (showSearch) {
+ self.$searchContainer.removeClass('select2-search--hide');
+ } else {
+ self.$searchContainer.addClass('select2-search--hide');
+ }
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+ };
+
+ Search.prototype.handleSearch = function (evt) {
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.showSearch = function (_, params) {
+ return true;
+ };
+
+ return Search;
+});
+
+S2.define('select2/dropdown/hidePlaceholder',[
+
+], function () {
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ HidePlaceholder.prototype.append = function (decorated, data) {
+ data.results = this.removePlaceholder(data.results);
+
+ decorated.call(this, data);
+ };
+
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
+ var modifiedData = data.slice(0);
+
+ for (var d = data.length - 1; d >= 0; d--) {
+ var item = data[d];
+
+ if (this.placeholder.id === item.id) {
+ modifiedData.splice(d, 1);
+ }
+ }
+
+ return modifiedData;
+ };
+
+ return HidePlaceholder;
+});
+
+S2.define('select2/dropdown/infiniteScroll',[
+ 'jquery'
+], function ($) {
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
+ this.lastParams = {};
+
+ decorated.call(this, $element, options, dataAdapter);
+
+ this.$loadingMore = this.createLoadingMore();
+ this.loading = false;
+ }
+
+ InfiniteScroll.prototype.append = function (decorated, data) {
+ this.$loadingMore.remove();
+ this.loading = false;
+
+ decorated.call(this, data);
+
+ if (this.showLoadingMore(data)) {
+ this.$results.append(this.$loadingMore);
+ }
+ };
+
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('query', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ container.on('query:append', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ this.$results.on('scroll', function () {
+ var isLoadMoreVisible = $.contains(
+ document.documentElement,
+ self.$loadingMore[0]
+ );
+
+ if (self.loading || !isLoadMoreVisible) {
+ return;
+ }
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var loadingMoreOffset = self.$loadingMore.offset().top +
+ self.$loadingMore.outerHeight(false);
+
+ if (currentOffset + 50 >= loadingMoreOffset) {
+ self.loadMore();
+ }
+ });
+ };
+
+ InfiniteScroll.prototype.loadMore = function () {
+ this.loading = true;
+
+ var params = $.extend({}, {page: 1}, this.lastParams);
+
+ params.page++;
+
+ this.trigger('query:append', params);
+ };
+
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
+ return data.pagination && data.pagination.more;
+ };
+
+ InfiniteScroll.prototype.createLoadingMore = function () {
+ var $option = $(
+ '
'
+ );
+
+ var message = this.options.get('translations').get('loadingMore');
+
+ $option.html(message(this.lastParams));
+
+ return $option;
+ };
+
+ return InfiniteScroll;
+});
+
+S2.define('select2/dropdown/attachBody',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function AttachBody (decorated, $element, options) {
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
+
+ decorated.call(this, $element, options);
+ }
+
+ AttachBody.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ var setupResultsEvents = false;
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self._showDropdown();
+ self._attachPositioningHandler(container);
+
+ if (!setupResultsEvents) {
+ setupResultsEvents = true;
+
+ container.on('results:all', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+
+ container.on('results:append', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ }
+ });
+
+ container.on('close', function () {
+ self._hideDropdown();
+ self._detachPositioningHandler(container);
+ });
+
+ this.$dropdownContainer.on('mousedown', function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ AttachBody.prototype.destroy = function (decorated) {
+ decorated.call(this);
+
+ this.$dropdownContainer.remove();
+ };
+
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
+ // Clone all of the container classes
+ $dropdown.attr('class', $container.attr('class'));
+
+ $dropdown.removeClass('select2');
+ $dropdown.addClass('select2-container--open');
+
+ $dropdown.css({
+ position: 'absolute',
+ top: -999999
+ });
+
+ this.$container = $container;
+ };
+
+ AttachBody.prototype.render = function (decorated) {
+ var $container = $('
');
+
+ var $dropdown = decorated.call(this);
+ $container.append($dropdown);
+
+ this.$dropdownContainer = $container;
+
+ return $container;
+ };
+
+ AttachBody.prototype._hideDropdown = function (decorated) {
+ this.$dropdownContainer.detach();
+ };
+
+ AttachBody.prototype._attachPositioningHandler =
+ function (decorated, container) {
+ var self = this;
+
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.each(function () {
+ $(this).data('select2-scroll-position', {
+ x: $(this).scrollLeft(),
+ y: $(this).scrollTop()
+ });
+ });
+
+ $watchers.on(scrollEvent, function (ev) {
+ var position = $(this).data('select2-scroll-position');
+ $(this).scrollTop(position.y);
+ });
+
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
+ function (e) {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ };
+
+ AttachBody.prototype._detachPositioningHandler =
+ function (decorated, container) {
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.off(scrollEvent);
+
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
+ };
+
+ AttachBody.prototype._positionDropdown = function () {
+ var $window = $(window);
+
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
+
+ var newDirection = null;
+
+ var offset = this.$container.offset();
+
+ offset.bottom = offset.top + this.$container.outerHeight(false);
+
+ var container = {
+ height: this.$container.outerHeight(false)
+ };
+
+ container.top = offset.top;
+ container.bottom = offset.top + container.height;
+
+ var dropdown = {
+ height: this.$dropdown.outerHeight(false)
+ };
+
+ var viewport = {
+ top: $window.scrollTop(),
+ bottom: $window.scrollTop() + $window.height()
+ };
+
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
+
+ var css = {
+ left: offset.left,
+ top: container.bottom
+ };
+
+ // Determine what the parent element is to use for calciulating the offset
+ var $offsetParent = this.$dropdownParent;
+
+ // For statically positoned elements, we need to get the element
+ // that is determining the offset
+ if ($offsetParent.css('position') === 'static') {
+ $offsetParent = $offsetParent.offsetParent();
+ }
+
+ var parentOffset = $offsetParent.offset();
+
+ css.top -= parentOffset.top;
+ css.left -= parentOffset.left;
+
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
+ newDirection = 'below';
+ }
+
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
+ newDirection = 'above';
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
+ newDirection = 'below';
+ }
+
+ if (newDirection == 'above' ||
+ (isCurrentlyAbove && newDirection !== 'below')) {
+ css.top = container.top - parentOffset.top - dropdown.height;
+ }
+
+ if (newDirection != null) {
+ this.$dropdown
+ .removeClass('select2-dropdown--below select2-dropdown--above')
+ .addClass('select2-dropdown--' + newDirection);
+ this.$container
+ .removeClass('select2-container--below select2-container--above')
+ .addClass('select2-container--' + newDirection);
+ }
+
+ this.$dropdownContainer.css(css);
+ };
+
+ AttachBody.prototype._resizeDropdown = function () {
+ var css = {
+ width: this.$container.outerWidth(false) + 'px'
+ };
+
+ if (this.options.get('dropdownAutoWidth')) {
+ css.minWidth = css.width;
+ css.position = 'relative';
+ css.width = 'auto';
+ }
+
+ this.$dropdown.css(css);
+ };
+
+ AttachBody.prototype._showDropdown = function (decorated) {
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
+
+ this._positionDropdown();
+ this._resizeDropdown();
+ };
+
+ return AttachBody;
+});
+
+S2.define('select2/dropdown/minimumResultsForSearch',[
+
+], function () {
+ function countResults (data) {
+ var count = 0;
+
+ for (var d = 0; d < data.length; d++) {
+ var item = data[d];
+
+ if (item.children) {
+ count += countResults(item.children);
+ } else {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
+
+ if (this.minimumResultsForSearch < 0) {
+ this.minimumResultsForSearch = Infinity;
+ }
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
+ return false;
+ }
+
+ return decorated.call(this, params);
+ };
+
+ return MinimumResultsForSearch;
+});
+
+S2.define('select2/dropdown/selectOnClose',[
+
+], function () {
+ function SelectOnClose () { }
+
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('close', function (params) {
+ self._handleSelectOnClose(params);
+ });
+ };
+
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
+ if (params && params.originalSelect2Event != null) {
+ var event = params.originalSelect2Event;
+
+ // Don't select an item if the close event was triggered from a select or
+ // unselect event
+ if (event._type === 'select' || event._type === 'unselect') {
+ return;
+ }
+ }
+
+ var $highlightedResults = this.getHighlightedResults();
+
+ // Only select highlighted results
+ if ($highlightedResults.length < 1) {
+ return;
+ }
+
+ var data = $highlightedResults.data('data');
+
+ // Don't re-select already selected resulte
+ if (
+ (data.element != null && data.element.selected) ||
+ (data.element == null && data.selected)
+ ) {
+ return;
+ }
+
+ this.trigger('select', {
+ data: data
+ });
+ };
+
+ return SelectOnClose;
+});
+
+S2.define('select2/dropdown/closeOnSelect',[
+
+], function () {
+ function CloseOnSelect () { }
+
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('select', function (evt) {
+ self._selectTriggered(evt);
+ });
+
+ container.on('unselect', function (evt) {
+ self._selectTriggered(evt);
+ });
+ };
+
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
+ var originalEvent = evt.originalEvent;
+
+ // Don't close if the control key is being held
+ if (originalEvent && originalEvent.ctrlKey) {
+ return;
+ }
+
+ this.trigger('close', {
+ originalEvent: originalEvent,
+ originalSelect2Event: evt
+ });
+ };
+
+ return CloseOnSelect;
+});
+
+S2.define('select2/i18n/en',[],function () {
+ // English
+ return {
+ errorLoading: function () {
+ return 'The results could not be loaded.';
+ },
+ inputTooLong: function (args) {
+ var overChars = args.input.length - args.maximum;
+
+ var message = 'Please delete ' + overChars + ' character';
+
+ if (overChars != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ inputTooShort: function (args) {
+ var remainingChars = args.minimum - args.input.length;
+
+ var message = 'Please enter ' + remainingChars + ' or more characters';
+
+ return message;
+ },
+ loadingMore: function () {
+ return 'Loading more results…';
+ },
+ maximumSelected: function (args) {
+ var message = 'You can only select ' + args.maximum + ' item';
+
+ if (args.maximum != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ noResults: function () {
+ return 'No results found';
+ },
+ searching: function () {
+ return 'Searching…';
+ }
+ };
+});
+
+S2.define('select2/defaults',[
+ 'jquery',
+ 'require',
+
+ './results',
+
+ './selection/single',
+ './selection/multiple',
+ './selection/placeholder',
+ './selection/allowClear',
+ './selection/search',
+ './selection/eventRelay',
+
+ './utils',
+ './translation',
+ './diacritics',
+
+ './data/select',
+ './data/array',
+ './data/ajax',
+ './data/tags',
+ './data/tokenizer',
+ './data/minimumInputLength',
+ './data/maximumInputLength',
+ './data/maximumSelectionLength',
+
+ './dropdown',
+ './dropdown/search',
+ './dropdown/hidePlaceholder',
+ './dropdown/infiniteScroll',
+ './dropdown/attachBody',
+ './dropdown/minimumResultsForSearch',
+ './dropdown/selectOnClose',
+ './dropdown/closeOnSelect',
+
+ './i18n/en'
+], function ($, require,
+
+ ResultsList,
+
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
+ SelectionSearch, EventRelay,
+
+ Utils, Translation, DIACRITICS,
+
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
+
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
+
+ EnglishTranslation) {
+ function Defaults () {
+ this.reset();
+ }
+
+ Defaults.prototype.apply = function (options) {
+ options = $.extend(true, {}, this.defaults, options);
+
+ if (options.dataAdapter == null) {
+ if (options.ajax != null) {
+ options.dataAdapter = AjaxData;
+ } else if (options.data != null) {
+ options.dataAdapter = ArrayData;
+ } else {
+ options.dataAdapter = SelectData;
+ }
+
+ if (options.minimumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MinimumInputLength
+ );
+ }
+
+ if (options.maximumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumInputLength
+ );
+ }
+
+ if (options.maximumSelectionLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumSelectionLength
+ );
+ }
+
+ if (options.tags) {
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
+ }
+
+ if (options.tokenSeparators != null || options.tokenizer != null) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Tokenizer
+ );
+ }
+
+ if (options.query != null) {
+ var Query = require(options.amdBase + 'compat/query');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Query
+ );
+ }
+
+ if (options.initSelection != null) {
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ InitSelection
+ );
+ }
+ }
+
+ if (options.resultsAdapter == null) {
+ options.resultsAdapter = ResultsList;
+
+ if (options.ajax != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ InfiniteScroll
+ );
+ }
+
+ if (options.placeholder != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ HidePlaceholder
+ );
+ }
+
+ if (options.selectOnClose) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ SelectOnClose
+ );
+ }
+ }
+
+ if (options.dropdownAdapter == null) {
+ if (options.multiple) {
+ options.dropdownAdapter = Dropdown;
+ } else {
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
+
+ options.dropdownAdapter = SearchableDropdown;
+ }
+
+ if (options.minimumResultsForSearch !== 0) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ MinimumResultsForSearch
+ );
+ }
+
+ if (options.closeOnSelect) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ CloseOnSelect
+ );
+ }
+
+ if (
+ options.dropdownCssClass != null ||
+ options.dropdownCss != null ||
+ options.adaptDropdownCssClass != null
+ ) {
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ DropdownCSS
+ );
+ }
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ AttachBody
+ );
+ }
+
+ if (options.selectionAdapter == null) {
+ if (options.multiple) {
+ options.selectionAdapter = MultipleSelection;
+ } else {
+ options.selectionAdapter = SingleSelection;
+ }
+
+ // Add the placeholder mixin if a placeholder was specified
+ if (options.placeholder != null) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ Placeholder
+ );
+ }
+
+ if (options.allowClear) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ AllowClear
+ );
+ }
+
+ if (options.multiple) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ SelectionSearch
+ );
+ }
+
+ if (
+ options.containerCssClass != null ||
+ options.containerCss != null ||
+ options.adaptContainerCssClass != null
+ ) {
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ ContainerCSS
+ );
+ }
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ EventRelay
+ );
+ }
+
+ if (typeof options.language === 'string') {
+ // Check if the language is specified with a region
+ if (options.language.indexOf('-') > 0) {
+ // Extract the region information if it is included
+ var languageParts = options.language.split('-');
+ var baseLanguage = languageParts[0];
+
+ options.language = [options.language, baseLanguage];
+ } else {
+ options.language = [options.language];
+ }
+ }
+
+ if ($.isArray(options.language)) {
+ var languages = new Translation();
+ options.language.push('en');
+
+ var languageNames = options.language;
+
+ for (var l = 0; l < languageNames.length; l++) {
+ var name = languageNames[l];
+ var language = {};
+
+ try {
+ // Try to load it with the original name
+ language = Translation.loadPath(name);
+ } catch (e) {
+ try {
+ // If we couldn't load it, check if it wasn't the full path
+ name = this.defaults.amdLanguageBase + name;
+ language = Translation.loadPath(name);
+ } catch (ex) {
+ // The translation could not be loaded at all. Sometimes this is
+ // because of a configuration problem, other times this can be
+ // because of how Select2 helps load all possible translation files.
+ if (options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The language file for "' + name + '" could not be ' +
+ 'automatically loaded. A fallback will be used instead.'
+ );
+ }
+
+ continue;
+ }
+ }
+
+ languages.extend(language);
+ }
+
+ options.translations = languages;
+ } else {
+ var baseTranslation = Translation.loadPath(
+ this.defaults.amdLanguageBase + 'en'
+ );
+ var customTranslation = new Translation(options.language);
+
+ customTranslation.extend(baseTranslation);
+
+ options.translations = customTranslation;
+ }
+
+ return options;
+ };
+
+ Defaults.prototype.reset = function () {
+ function stripDiacritics (text) {
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
+ function match(a) {
+ return DIACRITICS[a] || a;
+ }
+
+ return text.replace(/[^\u0000-\u007E]/g, match);
+ }
+
+ function matcher (params, data) {
+ // Always return the object if there is nothing to compare
+ if ($.trim(params.term) === '') {
+ return data;
+ }
+
+ // Do a recursive check for options with children
+ if (data.children && data.children.length > 0) {
+ // Clone the data object if there are children
+ // This is required as we modify the object to remove any non-matches
+ var match = $.extend(true, {}, data);
+
+ // Check each child of the option
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ var matches = matcher(params, child);
+
+ // If there wasn't a match, remove the object in the array
+ if (matches == null) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ // If any children matched, return the new object
+ if (match.children.length > 0) {
+ return match;
+ }
+
+ // If there were no matching children, check just the plain object
+ return matcher(params, match);
+ }
+
+ var original = stripDiacritics(data.text).toUpperCase();
+ var term = stripDiacritics(params.term).toUpperCase();
+
+ // Check if the text contains the term
+ if (original.indexOf(term) > -1) {
+ return data;
+ }
+
+ // If it doesn't contain the term, don't return anything
+ return null;
+ }
+
+ this.defaults = {
+ amdBase: './',
+ amdLanguageBase: './i18n/',
+ closeOnSelect: true,
+ debug: false,
+ dropdownAutoWidth: false,
+ escapeMarkup: Utils.escapeMarkup,
+ language: EnglishTranslation,
+ matcher: matcher,
+ minimumInputLength: 0,
+ maximumInputLength: 0,
+ maximumSelectionLength: 0,
+ minimumResultsForSearch: 0,
+ selectOnClose: false,
+ sorter: function (data) {
+ return data;
+ },
+ templateResult: function (result) {
+ return result.text;
+ },
+ templateSelection: function (selection) {
+ return selection.text;
+ },
+ theme: 'default',
+ width: 'resolve'
+ };
+ };
+
+ Defaults.prototype.set = function (key, value) {
+ var camelKey = $.camelCase(key);
+
+ var data = {};
+ data[camelKey] = value;
+
+ var convertedData = Utils._convertData(data);
+
+ $.extend(this.defaults, convertedData);
+ };
+
+ var defaults = new Defaults();
+
+ return defaults;
+});
+
+S2.define('select2/options',[
+ 'require',
+ 'jquery',
+ './defaults',
+ './utils'
+], function (require, $, Defaults, Utils) {
+ function Options (options, $element) {
+ this.options = options;
+
+ if ($element != null) {
+ this.fromElement($element);
+ }
+
+ this.options = Defaults.apply(this.options);
+
+ if ($element && $element.is('input')) {
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
+
+ this.options.dataAdapter = Utils.Decorate(
+ this.options.dataAdapter,
+ InputCompat
+ );
+ }
+ }
+
+ Options.prototype.fromElement = function ($e) {
+ var excludedData = ['select2'];
+
+ if (this.options.multiple == null) {
+ this.options.multiple = $e.prop('multiple');
+ }
+
+ if (this.options.disabled == null) {
+ this.options.disabled = $e.prop('disabled');
+ }
+
+ if (this.options.language == null) {
+ if ($e.prop('lang')) {
+ this.options.language = $e.prop('lang').toLowerCase();
+ } else if ($e.closest('[lang]').prop('lang')) {
+ this.options.language = $e.closest('[lang]').prop('lang');
+ }
+ }
+
+ if (this.options.dir == null) {
+ if ($e.prop('dir')) {
+ this.options.dir = $e.prop('dir');
+ } else if ($e.closest('[dir]').prop('dir')) {
+ this.options.dir = $e.closest('[dir]').prop('dir');
+ } else {
+ this.options.dir = 'ltr';
+ }
+ }
+
+ $e.prop('disabled', this.options.disabled);
+ $e.prop('multiple', this.options.multiple);
+
+ if ($e.data('select2Tags')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
+ 'removed in future versions of Select2.'
+ );
+ }
+
+ $e.data('data', $e.data('select2Tags'));
+ $e.data('tags', true);
+ }
+
+ if ($e.data('ajaxUrl')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
+ '`data-ajax--url` and support for the old attribute will be removed' +
+ ' in future versions of Select2.'
+ );
+ }
+
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
+ $e.data('ajax--url', $e.data('ajaxUrl'));
+ }
+
+ var dataset = {};
+
+ // Prefer the element's `dataset` attribute if it exists
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
+ } else {
+ dataset = $e.data();
+ }
+
+ var data = $.extend(true, {}, dataset);
+
+ data = Utils._convertData(data);
+
+ for (var key in data) {
+ if ($.inArray(key, excludedData) > -1) {
+ continue;
+ }
+
+ if ($.isPlainObject(this.options[key])) {
+ $.extend(this.options[key], data[key]);
+ } else {
+ this.options[key] = data[key];
+ }
+ }
+
+ return this;
+ };
+
+ Options.prototype.get = function (key) {
+ return this.options[key];
+ };
+
+ Options.prototype.set = function (key, val) {
+ this.options[key] = val;
+ };
+
+ return Options;
+});
+
+S2.define('select2/core',[
+ 'jquery',
+ './options',
+ './utils',
+ './keys'
+], function ($, Options, Utils, KEYS) {
+ var Select2 = function ($element, options) {
+ if ($element.data('select2') != null) {
+ $element.data('select2').destroy();
+ }
+
+ this.$element = $element;
+
+ this.id = this._generateId($element);
+
+ options = options || {};
+
+ this.options = new Options(options, $element);
+
+ Select2.__super__.constructor.call(this);
+
+ // Set up the tabindex
+
+ var tabindex = $element.attr('tabindex') || 0;
+ $element.data('old-tabindex', tabindex);
+ $element.attr('tabindex', '-1');
+
+ // Set up containers and adapters
+
+ var DataAdapter = this.options.get('dataAdapter');
+ this.dataAdapter = new DataAdapter($element, this.options);
+
+ var $container = this.render();
+
+ this._placeContainer($container);
+
+ var SelectionAdapter = this.options.get('selectionAdapter');
+ this.selection = new SelectionAdapter($element, this.options);
+ this.$selection = this.selection.render();
+
+ this.selection.position(this.$selection, $container);
+
+ var DropdownAdapter = this.options.get('dropdownAdapter');
+ this.dropdown = new DropdownAdapter($element, this.options);
+ this.$dropdown = this.dropdown.render();
+
+ this.dropdown.position(this.$dropdown, $container);
+
+ var ResultsAdapter = this.options.get('resultsAdapter');
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
+ this.$results = this.results.render();
+
+ this.results.position(this.$results, this.$dropdown);
+
+ // Bind events
+
+ var self = this;
+
+ // Bind the container to all of the adapters
+ this._bindAdapters();
+
+ // Register any DOM event handlers
+ this._registerDomEvents();
+
+ // Register any internal event handlers
+ this._registerDataEvents();
+ this._registerSelectionEvents();
+ this._registerDropdownEvents();
+ this._registerResultsEvents();
+ this._registerEvents();
+
+ // Set the initial state
+ this.dataAdapter.current(function (initialData) {
+ self.trigger('selection:update', {
+ data: initialData
+ });
+ });
+
+ // Hide the original select
+ $element.addClass('select2-hidden-accessible');
+ $element.attr('aria-hidden', 'true');
+
+ // Synchronize any monitored attributes
+ this._syncAttributes();
+
+ $element.data('select2', this);
+ };
+
+ Utils.Extend(Select2, Utils.Observable);
+
+ Select2.prototype._generateId = function ($element) {
+ var id = '';
+
+ if ($element.attr('id') != null) {
+ id = $element.attr('id');
+ } else if ($element.attr('name') != null) {
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
+ } else {
+ id = Utils.generateChars(4);
+ }
+
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
+ id = 'select2-' + id;
+
+ return id;
+ };
+
+ Select2.prototype._placeContainer = function ($container) {
+ $container.insertAfter(this.$element);
+
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
+
+ if (width != null) {
+ $container.css('width', width);
+ }
+ };
+
+ Select2.prototype._resolveWidth = function ($element, method) {
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
+
+ if (method == 'resolve') {
+ var styleWidth = this._resolveWidth($element, 'style');
+
+ if (styleWidth != null) {
+ return styleWidth;
+ }
+
+ return this._resolveWidth($element, 'element');
+ }
+
+ if (method == 'element') {
+ var elementWidth = $element.outerWidth(false);
+
+ if (elementWidth <= 0) {
+ return 'auto';
+ }
+
+ return elementWidth + 'px';
+ }
+
+ if (method == 'style') {
+ var style = $element.attr('style');
+
+ if (typeof(style) !== 'string') {
+ return null;
+ }
+
+ var attrs = style.split(';');
+
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
+ var attr = attrs[i].replace(/\s/g, '');
+ var matches = attr.match(WIDTH);
+
+ if (matches !== null && matches.length >= 1) {
+ return matches[1];
+ }
+ }
+
+ return null;
+ }
+
+ return method;
+ };
+
+ Select2.prototype._bindAdapters = function () {
+ this.dataAdapter.bind(this, this.$container);
+ this.selection.bind(this, this.$container);
+
+ this.dropdown.bind(this, this.$container);
+ this.results.bind(this, this.$container);
+ };
+
+ Select2.prototype._registerDomEvents = function () {
+ var self = this;
+
+ this.$element.on('change.select2', function () {
+ self.dataAdapter.current(function (data) {
+ self.trigger('selection:update', {
+ data: data
+ });
+ });
+ });
+
+ this.$element.on('focus.select2', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this._syncA = Utils.bind(this._syncAttributes, this);
+ this._syncS = Utils.bind(this._syncSubtree, this);
+
+ if (this.$element[0].attachEvent) {
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
+ }
+
+ var observer = window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver
+ ;
+
+ if (observer != null) {
+ this._observer = new observer(function (mutations) {
+ $.each(mutations, self._syncA);
+ $.each(mutations, self._syncS);
+ });
+ this._observer.observe(this.$element[0], {
+ attributes: true,
+ childList: true,
+ subtree: false
+ });
+ } else if (this.$element[0].addEventListener) {
+ this.$element[0].addEventListener(
+ 'DOMAttrModified',
+ self._syncA,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeInserted',
+ self._syncS,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeRemoved',
+ self._syncS,
+ false
+ );
+ }
+ };
+
+ Select2.prototype._registerDataEvents = function () {
+ var self = this;
+
+ this.dataAdapter.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerSelectionEvents = function () {
+ var self = this;
+ var nonRelayEvents = ['toggle', 'focus'];
+
+ this.selection.on('toggle', function () {
+ self.toggleDropdown();
+ });
+
+ this.selection.on('focus', function (params) {
+ self.focus(params);
+ });
+
+ this.selection.on('*', function (name, params) {
+ if ($.inArray(name, nonRelayEvents) !== -1) {
+ return;
+ }
+
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerDropdownEvents = function () {
+ var self = this;
+
+ this.dropdown.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerResultsEvents = function () {
+ var self = this;
+
+ this.results.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerEvents = function () {
+ var self = this;
+
+ this.on('open', function () {
+ self.$container.addClass('select2-container--open');
+ });
+
+ this.on('close', function () {
+ self.$container.removeClass('select2-container--open');
+ });
+
+ this.on('enable', function () {
+ self.$container.removeClass('select2-container--disabled');
+ });
+
+ this.on('disable', function () {
+ self.$container.addClass('select2-container--disabled');
+ });
+
+ this.on('blur', function () {
+ self.$container.removeClass('select2-container--focus');
+ });
+
+ this.on('query', function (params) {
+ if (!self.isOpen()) {
+ self.trigger('open', {});
+ }
+
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:all', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('query:append', function (params) {
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:append', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('open', function(){
+ // Focus on the active element when opening dropdown.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1);
+ });
+
+ $(document).on('keydown', function (evt) {
+ var key = evt.which;
+ if (self.isOpen()) {
+ if (key === KEYS.ESC || key === KEYS.TAB ||
+ (key === KEYS.UP && evt.altKey)) {
+ self.close();
+
+ evt.preventDefault();
+ } else if (key === KEYS.ENTER) {
+ self.trigger('results:select', {});
+
+ evt.preventDefault();
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
+ self.trigger('results:toggle', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.UP) {
+ self.trigger('results:previous', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.DOWN) {
+ self.trigger('results:next', {});
+
+ evt.preventDefault();
+ }
+
+ // Move the focus to the selected element on keyboard navigation.
+ // Required for screen readers to work properly.
+ if (key === KEYS.DOWN || key === KEYS.UP) {
+ self.focusOnActiveElement();
+ } else {
+ // Focus on the search if user starts typing.
+ var $searchField = self.$dropdown.find('.select2-search__field');
+ if (! $searchField.length) {
+ $searchField = self.$container.find('.select2-search__field');
+ }
+ $searchField.focus();
+ // Focus back to active selection when finished typing.
+ // Small delay so typed character can be read by screen reader.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1000);
+ }
+
+ } else if (self.hasFocus()) {
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
+ (key === KEYS.DOWN && evt.altKey)) {
+ self.open();
+ evt.preventDefault();
+ }
+ }
+ });
+ };
+
+ Select2.prototype.focusOnActiveElement = function () {
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
+ if (! Utils.isTouchscreen()) {
+ this.$results.find('li.select2-results__option--highlighted').focus();
+ }
+ };
+
+ Select2.prototype._syncAttributes = function () {
+ this.options.set('disabled', this.$element.prop('disabled'));
+
+ if (this.options.get('disabled')) {
+ if (this.isOpen()) {
+ this.close();
+ }
+
+ this.trigger('disable', {});
+ } else {
+ this.trigger('enable', {});
+ }
+ };
+
+ Select2.prototype._syncSubtree = function (evt, mutations) {
+ var changed = false;
+ var self = this;
+
+ // Ignore any mutation events raised for elements that aren't options or
+ // optgroups. This handles the case when the select element is destroyed
+ if (
+ evt && evt.target && (
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
+ )
+ ) {
+ return;
+ }
+
+ if (!mutations) {
+ // If mutation events aren't supported, then we can only assume that the
+ // change affected the selections
+ changed = true;
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
+ var node = mutations.addedNodes[n];
+
+ if (node.selected) {
+ changed = true;
+ }
+ }
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
+ changed = true;
+ }
+
+ // Only re-pull the data if we think there is a change
+ if (changed) {
+ this.dataAdapter.current(function (currentData) {
+ self.trigger('selection:update', {
+ data: currentData
+ });
+ });
+ }
+ };
+
+ /**
+ * Override the trigger method to automatically trigger pre-events when
+ * there are events that can be prevented.
+ */
+ Select2.prototype.trigger = function (name, args) {
+ var actualTrigger = Select2.__super__.trigger;
+ var preTriggerMap = {
+ 'open': 'opening',
+ 'close': 'closing',
+ 'select': 'selecting',
+ 'unselect': 'unselecting'
+ };
+
+ if (args === undefined) {
+ args = {};
+ }
+
+ if (name in preTriggerMap) {
+ var preTriggerName = preTriggerMap[name];
+ var preTriggerArgs = {
+ prevented: false,
+ name: name,
+ args: args
+ };
+
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
+
+ if (preTriggerArgs.prevented) {
+ args.prevented = true;
+
+ return;
+ }
+ }
+
+ actualTrigger.call(this, name, args);
+ };
+
+ Select2.prototype.toggleDropdown = function () {
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ if (this.isOpen()) {
+ this.close();
+ } else {
+ this.open();
+ }
+ };
+
+ Select2.prototype.open = function () {
+ if (this.isOpen()) {
+ return;
+ }
+
+ this.trigger('query', {});
+ };
+
+ Select2.prototype.close = function () {
+ if (!this.isOpen()) {
+ return;
+ }
+
+ this.trigger('close', {});
+ };
+
+ Select2.prototype.isOpen = function () {
+ return this.$container.hasClass('select2-container--open');
+ };
+
+ Select2.prototype.hasFocus = function () {
+ return this.$container.hasClass('select2-container--focus');
+ };
+
+ Select2.prototype.focus = function (data) {
+ // No need to re-trigger focus events if we are already focused
+ if (this.hasFocus()) {
+ return;
+ }
+
+ this.$container.addClass('select2-container--focus');
+ this.trigger('focus', {});
+ };
+
+ Select2.prototype.enable = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
+ ' instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ args = [true];
+ }
+
+ var disabled = !args[0];
+
+ this.$element.prop('disabled', disabled);
+ };
+
+ Select2.prototype.data = function () {
+ if (this.options.get('debug') &&
+ arguments.length > 0 && window.console && console.warn) {
+ console.warn(
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
+ 'should consider setting the value instead using `$element.val()`.'
+ );
+ }
+
+ var data = [];
+
+ this.dataAdapter.current(function (currentData) {
+ data = currentData;
+ });
+
+ return data;
+ };
+
+ Select2.prototype.val = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
+ ' removed in later Select2 versions. Use $element.val() instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ return this.$element.val();
+ }
+
+ var newVal = args[0];
+
+ if ($.isArray(newVal)) {
+ newVal = $.map(newVal, function (obj) {
+ return obj.toString();
+ });
+ }
+
+ this.$element.val(newVal).trigger('change');
+ };
+
+ Select2.prototype.destroy = function () {
+ this.$container.remove();
+
+ if (this.$element[0].detachEvent) {
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
+ }
+
+ if (this._observer != null) {
+ this._observer.disconnect();
+ this._observer = null;
+ } else if (this.$element[0].removeEventListener) {
+ this.$element[0]
+ .removeEventListener('DOMAttrModified', this._syncA, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
+ }
+
+ this._syncA = null;
+ this._syncS = null;
+
+ this.$element.off('.select2');
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
+
+ this.$element.removeClass('select2-hidden-accessible');
+ this.$element.attr('aria-hidden', 'false');
+ this.$element.removeData('select2');
+
+ this.dataAdapter.destroy();
+ this.selection.destroy();
+ this.dropdown.destroy();
+ this.results.destroy();
+
+ this.dataAdapter = null;
+ this.selection = null;
+ this.dropdown = null;
+ this.results = null;
+ };
+
+ Select2.prototype.render = function () {
+ var $container = $(
+ '
' +
+ ' ' +
+ ' ' +
+ ' '
+ );
+
+ $container.attr('dir', this.options.get('dir'));
+
+ this.$container = $container;
+
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
+
+ $container.data('element', this.$element);
+
+ return $container;
+ };
+
+ return Select2;
+});
+
+S2.define('select2/compat/utils',[
+ 'jquery'
+], function ($) {
+ function syncCssClasses ($dest, $src, adapter) {
+ var classes, replacements = [], adapted;
+
+ classes = $.trim($dest.attr('class'));
+
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+
+ $(classes.split(/\s+/)).each(function () {
+ // Save all Select2 classes
+ if (this.indexOf('select2-') === 0) {
+ replacements.push(this);
+ }
+ });
+ }
+
+ classes = $.trim($src.attr('class'));
+
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+
+ $(classes.split(/\s+/)).each(function () {
+ // Only adapt non-Select2 classes
+ if (this.indexOf('select2-') !== 0) {
+ adapted = adapter(this);
+
+ if (adapted != null) {
+ replacements.push(adapted);
+ }
+ }
+ });
+ }
+
+ $dest.attr('class', replacements.join(' '));
+ }
+
+ return {
+ syncCssClasses: syncCssClasses
+ };
+});
+
+S2.define('select2/compat/containerCss',[
+ 'jquery',
+ './utils'
+], function ($, CompatUtils) {
+ // No-op CSS adapter that discards all classes by default
+ function _containerAdapter (clazz) {
+ return null;
+ }
+
+ function ContainerCSS () { }
+
+ ContainerCSS.prototype.render = function (decorated) {
+ var $container = decorated.call(this);
+
+ var containerCssClass = this.options.get('containerCssClass') || '';
+
+ if ($.isFunction(containerCssClass)) {
+ containerCssClass = containerCssClass(this.$element);
+ }
+
+ var containerCssAdapter = this.options.get('adaptContainerCssClass');
+ containerCssAdapter = containerCssAdapter || _containerAdapter;
+
+ if (containerCssClass.indexOf(':all:') !== -1) {
+ containerCssClass = containerCssClass.replace(':all:', '');
+
+ var _cssAdapter = containerCssAdapter;
+
+ containerCssAdapter = function (clazz) {
+ var adapted = _cssAdapter(clazz);
+
+ if (adapted != null) {
+ // Append the old one along with the adapted one
+ return adapted + ' ' + clazz;
+ }
+
+ return clazz;
+ };
+ }
+
+ var containerCss = this.options.get('containerCss') || {};
+
+ if ($.isFunction(containerCss)) {
+ containerCss = containerCss(this.$element);
+ }
+
+ CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
+
+ $container.css(containerCss);
+ $container.addClass(containerCssClass);
+
+ return $container;
+ };
+
+ return ContainerCSS;
+});
+
+S2.define('select2/compat/dropdownCss',[
+ 'jquery',
+ './utils'
+], function ($, CompatUtils) {
+ // No-op CSS adapter that discards all classes by default
+ function _dropdownAdapter (clazz) {
+ return null;
+ }
+
+ function DropdownCSS () { }
+
+ DropdownCSS.prototype.render = function (decorated) {
+ var $dropdown = decorated.call(this);
+
+ var dropdownCssClass = this.options.get('dropdownCssClass') || '';
+
+ if ($.isFunction(dropdownCssClass)) {
+ dropdownCssClass = dropdownCssClass(this.$element);
+ }
+
+ var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
+ dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
+
+ if (dropdownCssClass.indexOf(':all:') !== -1) {
+ dropdownCssClass = dropdownCssClass.replace(':all:', '');
+
+ var _cssAdapter = dropdownCssAdapter;
+
+ dropdownCssAdapter = function (clazz) {
+ var adapted = _cssAdapter(clazz);
+
+ if (adapted != null) {
+ // Append the old one along with the adapted one
+ return adapted + ' ' + clazz;
+ }
+
+ return clazz;
+ };
+ }
+
+ var dropdownCss = this.options.get('dropdownCss') || {};
+
+ if ($.isFunction(dropdownCss)) {
+ dropdownCss = dropdownCss(this.$element);
+ }
+
+ CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
+
+ $dropdown.css(dropdownCss);
+ $dropdown.addClass(dropdownCssClass);
+
+ return $dropdown;
+ };
+
+ return DropdownCSS;
+});
+
+S2.define('select2/compat/initSelection',[
+ 'jquery'
+], function ($) {
+ function InitSelection (decorated, $element, options) {
+ if (options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `initSelection` option has been deprecated in favor' +
+ ' of a custom data adapter that overrides the `current` method. ' +
+ 'This method is now called multiple times instead of a single ' +
+ 'time when the instance is initialized. Support will be removed ' +
+ 'for the `initSelection` option in future versions of Select2'
+ );
+ }
+
+ this.initSelection = options.get('initSelection');
+ this._isInitialized = false;
+
+ decorated.call(this, $element, options);
+ }
+
+ InitSelection.prototype.current = function (decorated, callback) {
+ var self = this;
+
+ if (this._isInitialized) {
+ decorated.call(this, callback);
+
+ return;
+ }
+
+ this.initSelection.call(null, this.$element, function (data) {
+ self._isInitialized = true;
+
+ if (!$.isArray(data)) {
+ data = [data];
+ }
+
+ callback(data);
+ });
+ };
+
+ return InitSelection;
+});
+
+S2.define('select2/compat/inputData',[
+ 'jquery'
+], function ($) {
+ function InputData (decorated, $element, options) {
+ this._currentData = [];
+ this._valueSeparator = options.get('valueSeparator') || ',';
+
+ if ($element.prop('type') === 'hidden') {
+ if (options.get('debug') && console && console.warn) {
+ console.warn(
+ 'Select2: Using a hidden input with Select2 is no longer ' +
+ 'supported and may stop working in the future. It is recommended ' +
+ 'to use a `
` element instead.'
+ );
+ }
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ InputData.prototype.current = function (_, callback) {
+ function getSelected (data, selectedIds) {
+ var selected = [];
+
+ if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
+ data.selected = true;
+ selected.push(data);
+ } else {
+ data.selected = false;
+ }
+
+ if (data.children) {
+ selected.push.apply(selected, getSelected(data.children, selectedIds));
+ }
+
+ return selected;
+ }
+
+ var selected = [];
+
+ for (var d = 0; d < this._currentData.length; d++) {
+ var data = this._currentData[d];
+
+ selected.push.apply(
+ selected,
+ getSelected(
+ data,
+ this.$element.val().split(
+ this._valueSeparator
+ )
+ )
+ );
+ }
+
+ callback(selected);
+ };
+
+ InputData.prototype.select = function (_, data) {
+ if (!this.options.get('multiple')) {
+ this.current(function (allData) {
+ $.map(allData, function (data) {
+ data.selected = false;
+ });
+ });
+
+ this.$element.val(data.id);
+ this.$element.trigger('change');
+ } else {
+ var value = this.$element.val();
+ value += this._valueSeparator + data.id;
+
+ this.$element.val(value);
+ this.$element.trigger('change');
+ }
+ };
+
+ InputData.prototype.unselect = function (_, data) {
+ var self = this;
+
+ data.selected = false;
+
+ this.current(function (allData) {
+ var values = [];
+
+ for (var d = 0; d < allData.length; d++) {
+ var item = allData[d];
+
+ if (data.id == item.id) {
+ continue;
+ }
+
+ values.push(item.id);
+ }
+
+ self.$element.val(values.join(self._valueSeparator));
+ self.$element.trigger('change');
+ });
+ };
+
+ InputData.prototype.query = function (_, params, callback) {
+ var results = [];
+
+ for (var d = 0; d < this._currentData.length; d++) {
+ var data = this._currentData[d];
+
+ var matches = this.matches(params, data);
+
+ if (matches !== null) {
+ results.push(matches);
+ }
+ }
+
+ callback({
+ results: results
+ });
+ };
+
+ InputData.prototype.addOptions = function (_, $options) {
+ var options = $.map($options, function ($option) {
+ return $.data($option[0], 'data');
+ });
+
+ this._currentData.push.apply(this._currentData, options);
+ };
+
+ return InputData;
+});
+
+S2.define('select2/compat/matcher',[
+ 'jquery'
+], function ($) {
+ function oldMatcher (matcher) {
+ function wrappedMatcher (params, data) {
+ var match = $.extend(true, {}, data);
+
+ if (params.term == null || $.trim(params.term) === '') {
+ return match;
+ }
+
+ if (data.children) {
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ // Check if the child object matches
+ // The old matcher returned a boolean true or false
+ var doesMatch = matcher(params.term, child.text, child);
+
+ // If the child didn't match, pop it off
+ if (!doesMatch) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ if (match.children.length > 0) {
+ return match;
+ }
+ }
+
+ if (matcher(params.term, data.text, data)) {
+ return match;
+ }
+
+ return null;
+ }
+
+ return wrappedMatcher;
+ }
+
+ return oldMatcher;
+});
+
+S2.define('select2/compat/query',[
+
+], function () {
+ function Query (decorated, $element, options) {
+ if (options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `query` option has been deprecated in favor of a ' +
+ 'custom data adapter that overrides the `query` method. Support ' +
+ 'will be removed for the `query` option in future versions of ' +
+ 'Select2.'
+ );
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Query.prototype.query = function (_, params, callback) {
+ params.callback = callback;
+
+ var query = this.options.get('query');
+
+ query.call(null, params);
+ };
+
+ return Query;
+});
+
+S2.define('select2/dropdown/attachContainer',[
+
+], function () {
+ function AttachContainer (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ AttachContainer.prototype.position =
+ function (decorated, $dropdown, $container) {
+ var $dropdownContainer = $container.find('.dropdown-wrapper');
+ $dropdownContainer.append($dropdown);
+
+ $dropdown.addClass('select2-dropdown--below');
+ $container.addClass('select2-container--below');
+ };
+
+ return AttachContainer;
+});
+
+S2.define('select2/dropdown/stopPropagation',[
+
+], function () {
+ function StopPropagation () { }
+
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ var stoppedEvents = [
+ 'blur',
+ 'change',
+ 'click',
+ 'dblclick',
+ 'focus',
+ 'focusin',
+ 'focusout',
+ 'input',
+ 'keydown',
+ 'keyup',
+ 'keypress',
+ 'mousedown',
+ 'mouseenter',
+ 'mouseleave',
+ 'mousemove',
+ 'mouseover',
+ 'mouseup',
+ 'search',
+ 'touchend',
+ 'touchstart'
+ ];
+
+ this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ return StopPropagation;
+});
+
+S2.define('select2/selection/stopPropagation',[
+
+], function () {
+ function StopPropagation () { }
+
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ var stoppedEvents = [
+ 'blur',
+ 'change',
+ 'click',
+ 'dblclick',
+ 'focus',
+ 'focusin',
+ 'focusout',
+ 'input',
+ 'keydown',
+ 'keyup',
+ 'keypress',
+ 'mousedown',
+ 'mouseenter',
+ 'mouseleave',
+ 'mousemove',
+ 'mouseover',
+ 'mouseup',
+ 'search',
+ 'touchend',
+ 'touchstart'
+ ];
+
+ this.$selection.on(stoppedEvents.join(' '), function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ return StopPropagation;
+});
+
+/*!
+ * jQuery Mousewheel 3.1.13
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ */
+
+(function (factory) {
+ if ( typeof S2.define === 'function' && S2.define.amd ) {
+ // AMD. Register as an anonymous module.
+ S2.define('jquery-mousewheel',['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS style for Browserify
+ module.exports = factory;
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
+ slice = Array.prototype.slice,
+ nullLowestDeltaTimeout, lowestDelta;
+
+ if ( $.event.fixHooks ) {
+ for ( var i = toFix.length; i; ) {
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
+ }
+ }
+
+ var special = $.event.special.mousewheel = {
+ version: '3.1.12',
+
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.addEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ // Store the line height and page height for this particular element
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.removeEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ // Clean up the data we added to the element
+ $.removeData(this, 'mousewheel-line-height');
+ $.removeData(this, 'mousewheel-page-height');
+ },
+
+ getLineHeight: function(elem) {
+ var $elem = $(elem),
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
+ if (!$parent.length) {
+ $parent = $('body');
+ }
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
+ },
+
+ getPageHeight: function(elem) {
+ return $(elem).height();
+ },
+
+ settings: {
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
+ normalizeOffset: true // calls getBoundingClientRect for each event
+ }
+ };
+
+ $.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind('mousewheel', fn);
+ }
+ });
+
+
+ function handler(event) {
+ var orgEvent = event || window.event,
+ args = slice.call(arguments, 1),
+ delta = 0,
+ deltaX = 0,
+ deltaY = 0,
+ absDelta = 0,
+ offsetX = 0,
+ offsetY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = 'mousewheel';
+
+ // Old school scrollwheel delta
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
+
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaX = deltaY * -1;
+ deltaY = 0;
+ }
+
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
+ delta = deltaY === 0 ? deltaX : deltaY;
+
+ // New school wheel delta (wheel event)
+ if ( 'deltaY' in orgEvent ) {
+ deltaY = orgEvent.deltaY * -1;
+ delta = deltaY;
+ }
+ if ( 'deltaX' in orgEvent ) {
+ deltaX = orgEvent.deltaX;
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
+ }
+
+ // No change actually happened, no reason to go any further
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
+
+ // Need to convert lines and pages to pixels if we aren't already in pixels
+ // There are three delta modes:
+ // * deltaMode 0 is by pixels, nothing to do
+ // * deltaMode 1 is by lines
+ // * deltaMode 2 is by pages
+ if ( orgEvent.deltaMode === 1 ) {
+ var lineHeight = $.data(this, 'mousewheel-line-height');
+ delta *= lineHeight;
+ deltaY *= lineHeight;
+ deltaX *= lineHeight;
+ } else if ( orgEvent.deltaMode === 2 ) {
+ var pageHeight = $.data(this, 'mousewheel-page-height');
+ delta *= pageHeight;
+ deltaY *= pageHeight;
+ deltaX *= pageHeight;
+ }
+
+ // Store lowest absolute delta to normalize the delta values
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
+
+ if ( !lowestDelta || absDelta < lowestDelta ) {
+ lowestDelta = absDelta;
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ lowestDelta /= 40;
+ }
+ }
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ // Divide all the things by 40!
+ delta /= 40;
+ deltaX /= 40;
+ deltaY /= 40;
+ }
+
+ // Get a whole, normalized value for the deltas
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
+
+ // Normalise offsetX and offsetY properties
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
+ var boundingRect = this.getBoundingClientRect();
+ offsetX = event.clientX - boundingRect.left;
+ offsetY = event.clientY - boundingRect.top;
+ }
+
+ // Add information to the event object
+ event.deltaX = deltaX;
+ event.deltaY = deltaY;
+ event.deltaFactor = lowestDelta;
+ event.offsetX = offsetX;
+ event.offsetY = offsetY;
+ // Go ahead and set deltaMode to 0 since we converted to pixels
+ // Although this is a little odd since we overwrite the deltaX/Y
+ // properties with normalized deltas.
+ event.deltaMode = 0;
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ // Clearout lowestDelta after sometime to better
+ // handle multiple device types that give different
+ // a different lowestDelta
+ // Ex: trackpad = 3 and mouse wheel = 120
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
+
+ return ($.event.dispatch || $.event.handle).apply(this, args);
+ }
+
+ function nullLowestDelta() {
+ lowestDelta = null;
+ }
+
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
+ // If this is an older event and the delta is divisable by 120,
+ // then we are assuming that the browser is treating this as an
+ // older mouse wheel event and that we should divide the deltas
+ // by 40 to try and get a more usable deltaFactor.
+ // Side note, this actually impacts the reported scroll distance
+ // in older browsers and can cause scrolling to be slower than native.
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
+ }
+
+}));
+
+S2.define('jquery.select2',[
+ 'jquery',
+ 'jquery-mousewheel',
+
+ './select2/core',
+ './select2/defaults'
+], function ($, _, Select2, Defaults) {
+ if ($.fn.selectWoo == null) {
+ // All methods that should return the element
+ var thisMethods = ['open', 'close', 'destroy'];
+
+ $.fn.selectWoo = function (options) {
+ options = options || {};
+
+ if (typeof options === 'object') {
+ this.each(function () {
+ var instanceOptions = $.extend(true, {}, options);
+
+ var instance = new Select2($(this), instanceOptions);
+ });
+
+ return this;
+ } else if (typeof options === 'string') {
+ var ret;
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var instance = $(this).data('select2');
+
+ if (instance == null && window.console && console.error) {
+ console.error(
+ 'The select2(\'' + options + '\') method was called on an ' +
+ 'element that is not using Select2.'
+ );
+ }
+
+ ret = instance[options].apply(instance, args);
+ });
+
+ // Check if we should be returning `this`
+ if ($.inArray(options, thisMethods) > -1) {
+ return this;
+ }
+
+ return ret;
+ } else {
+ throw new Error('Invalid arguments for Select2: ' + options);
+ }
+ };
+ }
+
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
+ }
+
+ if ($.fn.selectWoo.defaults == null) {
+ $.fn.selectWoo.defaults = Defaults;
+ }
+
+ // Also register selectWoo under select2 if select2 is not already present.
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
+
+ return Select2;
+});
+
+ // Return the AMD loader configuration so it can be used outside of this file
+ return {
+ define: S2.define,
+ require: S2.require
+ };
+}());
+
+ // Autoload the jQuery bindings
+ // We know that all of the modules exist above this, so we're safe
+ var select2 = S2.require('jquery.select2');
+
+ // Hold the AMD module references on the jQuery function that was just loaded
+ // This allows Select2 to use the internal loader outside of this file, such
+ // as in the language files.
+ jQuery.fn.select2.amd = S2;
+ jQuery.fn.selectWoo.amd = S2;
+
+ // Return the Select2 instance for anyone who is importing it.
+ return select2;
+}));
diff --git a/functions/kirki/assets/vendor/selectWoo/js/select2.full.min.js b/functions/kirki/assets/vendor/selectWoo/js/select2.full.min.js
new file mode 100644
index 0000000..9c7c386
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/select2.full.min.js
@@ -0,0 +1 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a(' '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[data-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("data-selected","true"):b.attr("data-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a(' ');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.options.get("minimumResultsForSearch");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),window.setTimeout(function(){d.$selection.focus()},1),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(' '),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a(" ")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html(''),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('× ')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('× ');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a(' ');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f),e.container.focusOnActiveElement()},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a(' ');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a(' '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(" "),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;if(this._isInitialized)return void b.call(this,c);this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f=0;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||n=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null!=a.fn.select2&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/select2.js b/functions/kirki/assets/vendor/selectWoo/js/select2.js
new file mode 100644
index 0000000..22a7207
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/select2.js
@@ -0,0 +1,5842 @@
+/*!
+ * SelectWoo 1.0.1
+ * https://github.com/woocommerce/selectWoo
+ *
+ * Released under the MIT license
+ * https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = function (root, jQuery) {
+ if (jQuery === undefined) {
+ // require('jQuery') returns a factory that requires window to
+ // build a jQuery instance, we normalize how we use modules
+ // that require this pattern but the window provided is a noop
+ // if it's defined (how jquery works)
+ if (typeof window !== 'undefined') {
+ jQuery = require('jquery');
+ }
+ else {
+ jQuery = require('jquery')(root);
+ }
+ }
+ factory(jQuery);
+ return jQuery;
+ };
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+} (function (jQuery) {
+ // This is needed so we can catch the AMD loader configuration and use it
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
+ // returns the AMD loader references.
+ var S2 =(function () {
+ // Restore the Select2 AMD loader so it can be used
+ // Needed mostly in the language files, where the loader is not inserted
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
+ var S2 = jQuery.fn.select2.amd;
+ }
+var S2;(function () { if (!S2 || !S2.requirejs) {
+if (!S2) { S2 = {}; } else { require = S2; }
+/**
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
+ */
+//Going sloppy to avoid 'use strict' string cost, but strict practices should
+//be followed.
+/*global setTimeout: false */
+
+var requirejs, require, define;
+(function (undef) {
+ var main, req, makeMap, handlers,
+ defined = {},
+ waiting = {},
+ config = {},
+ defining = {},
+ hasOwn = Object.prototype.hasOwnProperty,
+ aps = [].slice,
+ jsSuffixRegExp = /\.js$/;
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName) {
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
+ baseParts = baseName && baseName.split("/"),
+ map = config.map,
+ starMap = (map && map['*']) || {};
+
+ //Adjust any relative paths.
+ if (name) {
+ name = name.split('/');
+ lastIndex = name.length - 1;
+
+ // If wanting node ID compatibility, strip .js from end
+ // of IDs. Have to do this here, and not in nameToUrl
+ // because node allows either .js or non .js to map
+ // to same file.
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
+ }
+
+ // Starts with a '.' so need the baseName
+ if (name[0].charAt(0) === '.' && baseParts) {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ name = normalizedBaseParts.concat(name);
+ }
+
+ //start trimDots
+ for (i = 0; i < name.length; i++) {
+ part = name[i];
+ if (part === '.') {
+ name.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ // If at the start, or previous value is still ..,
+ // keep them so that when converted to a path it may
+ // still work when converted to a path, even though
+ // as an ID it is less than ideal. In larger point
+ // releases, may be better to just kick out an error.
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
+ continue;
+ } else if (i > 0) {
+ name.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ //end trimDots
+
+ name = name.join('/');
+ }
+
+ //Apply map config if available.
+ if ((baseParts || starMap) && map) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join("/");
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = map[baseParts.slice(0, j).join('/')];
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = mapValue[nameSegment];
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
+ foundStarMap = starMap[nameSegment];
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function makeRequire(relName, forceSync) {
+ return function () {
+ //A version of a require function that passes a moduleName
+ //value for items that may need to
+ //look up paths relative to the moduleName
+ var args = aps.call(arguments, 0);
+
+ //If first arg is not require('string'), and there is only
+ //one arg, it is the array form without a callback. Insert
+ //a null so that the following concat is correct.
+ if (typeof args[0] !== 'string' && args.length === 1) {
+ args.push(null);
+ }
+ return req.apply(undef, args.concat([relName, forceSync]));
+ };
+ }
+
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(depName) {
+ return function (value) {
+ defined[depName] = value;
+ };
+ }
+
+ function callDep(name) {
+ if (hasProp(waiting, name)) {
+ var args = waiting[name];
+ delete waiting[name];
+ defining[name] = true;
+ main.apply(undef, args);
+ }
+
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
+ throw new Error('No ' + name);
+ }
+ return defined[name];
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ //Creates a parts array for a relName where first part is plugin ID,
+ //second part is resource ID. Assumes relName has already been normalized.
+ function makeRelParts(relName) {
+ return relName ? splitPrefix(relName) : [];
+ }
+
+ /**
+ * Makes a name map, normalizing the name, and using a plugin
+ * for normalization if necessary. Grabs a ref to plugin
+ * too, as an optimization.
+ */
+ makeMap = function (name, relParts) {
+ var plugin,
+ parts = splitPrefix(name),
+ prefix = parts[0],
+ relResourceName = relParts[1];
+
+ name = parts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, relResourceName);
+ plugin = callDep(prefix);
+ }
+
+ //Normalize according
+ if (prefix) {
+ if (plugin && plugin.normalize) {
+ name = plugin.normalize(name, makeNormalize(relResourceName));
+ } else {
+ name = normalize(name, relResourceName);
+ }
+ } else {
+ name = normalize(name, relResourceName);
+ parts = splitPrefix(name);
+ prefix = parts[0];
+ name = parts[1];
+ if (prefix) {
+ plugin = callDep(prefix);
+ }
+ }
+
+ //Using ridiculous property names for space reasons
+ return {
+ f: prefix ? prefix + '!' + name : name, //fullName
+ n: name,
+ pr: prefix,
+ p: plugin
+ };
+ };
+
+ function makeConfig(name) {
+ return function () {
+ return (config && config.config && config.config[name]) || {};
+ };
+ }
+
+ handlers = {
+ require: function (name) {
+ return makeRequire(name);
+ },
+ exports: function (name) {
+ var e = defined[name];
+ if (typeof e !== 'undefined') {
+ return e;
+ } else {
+ return (defined[name] = {});
+ }
+ },
+ module: function (name) {
+ return {
+ id: name,
+ uri: '',
+ exports: defined[name],
+ config: makeConfig(name)
+ };
+ }
+ };
+
+ main = function (name, deps, callback, relName) {
+ var cjsModule, depName, ret, map, i, relParts,
+ args = [],
+ callbackType = typeof callback,
+ usingExports;
+
+ //Use name if no relName
+ relName = relName || name;
+ relParts = makeRelParts(relName);
+
+ //Call the callback to define the module, if necessary.
+ if (callbackType === 'undefined' || callbackType === 'function') {
+ //Pull out the defined dependencies and pass the ordered
+ //values to the callback.
+ //Default to [require, exports, module] if no deps
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
+ for (i = 0; i < deps.length; i += 1) {
+ map = makeMap(deps[i], relParts);
+ depName = map.f;
+
+ //Fast path CommonJS standard dependencies.
+ if (depName === "require") {
+ args[i] = handlers.require(name);
+ } else if (depName === "exports") {
+ //CommonJS module spec 1.1
+ args[i] = handlers.exports(name);
+ usingExports = true;
+ } else if (depName === "module") {
+ //CommonJS module spec 1.1
+ cjsModule = args[i] = handlers.module(name);
+ } else if (hasProp(defined, depName) ||
+ hasProp(waiting, depName) ||
+ hasProp(defining, depName)) {
+ args[i] = callDep(depName);
+ } else if (map.p) {
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
+ args[i] = defined[depName];
+ } else {
+ throw new Error(name + ' missing ' + depName);
+ }
+ }
+
+ ret = callback ? callback.apply(defined[name], args) : undefined;
+
+ if (name) {
+ //If setting exports via "module" is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ if (cjsModule && cjsModule.exports !== undef &&
+ cjsModule.exports !== defined[name]) {
+ defined[name] = cjsModule.exports;
+ } else if (ret !== undef || !usingExports) {
+ //Use the return value from the function.
+ defined[name] = ret;
+ }
+ }
+ } else if (name) {
+ //May just be an object definition for the module. Only
+ //worry about defining if have a module name.
+ defined[name] = callback;
+ }
+ };
+
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
+ if (typeof deps === "string") {
+ if (handlers[deps]) {
+ //callback in this case is really relName
+ return handlers[deps](callback);
+ }
+ //Just return the module wanted. In this scenario, the
+ //deps arg is the module name, and second arg (if passed)
+ //is just the relName.
+ //Normalize module name, if it contains . or ..
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
+ } else if (!deps.splice) {
+ //deps is a config object, not an array.
+ config = deps;
+ if (config.deps) {
+ req(config.deps, config.callback);
+ }
+ if (!callback) {
+ return;
+ }
+
+ if (callback.splice) {
+ //callback is an array, which means it is a dependency list.
+ //Adjust args if there are dependencies
+ deps = callback;
+ callback = relName;
+ relName = null;
+ } else {
+ deps = undef;
+ }
+ }
+
+ //Support require(['a'])
+ callback = callback || function () {};
+
+ //If relName is a function, it is an errback handler,
+ //so remove it.
+ if (typeof relName === 'function') {
+ relName = forceSync;
+ forceSync = alt;
+ }
+
+ //Simulate async callback;
+ if (forceSync) {
+ main(undef, deps, callback, relName);
+ } else {
+ //Using a non-zero value because of concern for what old browsers
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
+ //If want a value immediately, use require('id') instead -- something
+ //that works in almond on the global level, but not guaranteed and
+ //unlikely to work in other AMD implementations.
+ setTimeout(function () {
+ main(undef, deps, callback, relName);
+ }, 4);
+ }
+
+ return req;
+ };
+
+ /**
+ * Just drops the config on the floor, but returns req in case
+ * the config return value is used.
+ */
+ req.config = function (cfg) {
+ return req(cfg);
+ };
+
+ /**
+ * Expose module registry for debugging and tooling
+ */
+ requirejs._defined = defined;
+
+ define = function (name, deps, callback) {
+ if (typeof name !== 'string') {
+ throw new Error('See almond README: incorrect module build, no module name');
+ }
+
+ //This module may not have dependencies
+ if (!deps.splice) {
+ //deps is not an array, so probably means
+ //an object literal or factory function for
+ //the value. Adjust args.
+ callback = deps;
+ deps = [];
+ }
+
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
+ waiting[name] = [name, deps, callback];
+ }
+ };
+
+ define.amd = {
+ jQuery: true
+ };
+}());
+
+S2.requirejs = requirejs;S2.require = require;S2.define = define;
+}
+}());
+S2.define("almond", function(){});
+
+/* global jQuery:false, $:false */
+S2.define('jquery',[],function () {
+ var _$ = jQuery || $;
+
+ if (_$ == null && console && console.error) {
+ console.error(
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
+ 'web page.'
+ );
+ }
+
+ return _$;
+});
+
+S2.define('select2/utils',[
+ 'jquery'
+], function ($) {
+ var Utils = {};
+
+ Utils.Extend = function (ChildClass, SuperClass) {
+ var __hasProp = {}.hasOwnProperty;
+
+ function BaseConstructor () {
+ this.constructor = ChildClass;
+ }
+
+ for (var key in SuperClass) {
+ if (__hasProp.call(SuperClass, key)) {
+ ChildClass[key] = SuperClass[key];
+ }
+ }
+
+ BaseConstructor.prototype = SuperClass.prototype;
+ ChildClass.prototype = new BaseConstructor();
+ ChildClass.__super__ = SuperClass.prototype;
+
+ return ChildClass;
+ };
+
+ function getMethods (theClass) {
+ var proto = theClass.prototype;
+
+ var methods = [];
+
+ for (var methodName in proto) {
+ var m = proto[methodName];
+
+ if (typeof m !== 'function') {
+ continue;
+ }
+
+ if (methodName === 'constructor') {
+ continue;
+ }
+
+ methods.push(methodName);
+ }
+
+ return methods;
+ }
+
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
+ var decoratedMethods = getMethods(DecoratorClass);
+ var superMethods = getMethods(SuperClass);
+
+ function DecoratedClass () {
+ var unshift = Array.prototype.unshift;
+
+ var argCount = DecoratorClass.prototype.constructor.length;
+
+ var calledConstructor = SuperClass.prototype.constructor;
+
+ if (argCount > 0) {
+ unshift.call(arguments, SuperClass.prototype.constructor);
+
+ calledConstructor = DecoratorClass.prototype.constructor;
+ }
+
+ calledConstructor.apply(this, arguments);
+ }
+
+ DecoratorClass.displayName = SuperClass.displayName;
+
+ function ctr () {
+ this.constructor = DecoratedClass;
+ }
+
+ DecoratedClass.prototype = new ctr();
+
+ for (var m = 0; m < superMethods.length; m++) {
+ var superMethod = superMethods[m];
+
+ DecoratedClass.prototype[superMethod] =
+ SuperClass.prototype[superMethod];
+ }
+
+ var calledMethod = function (methodName) {
+ // Stub out the original method if it's not decorating an actual method
+ var originalMethod = function () {};
+
+ if (methodName in DecoratedClass.prototype) {
+ originalMethod = DecoratedClass.prototype[methodName];
+ }
+
+ var decoratedMethod = DecoratorClass.prototype[methodName];
+
+ return function () {
+ var unshift = Array.prototype.unshift;
+
+ unshift.call(arguments, originalMethod);
+
+ return decoratedMethod.apply(this, arguments);
+ };
+ };
+
+ for (var d = 0; d < decoratedMethods.length; d++) {
+ var decoratedMethod = decoratedMethods[d];
+
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
+ }
+
+ return DecoratedClass;
+ };
+
+ var Observable = function () {
+ this.listeners = {};
+ };
+
+ Observable.prototype.on = function (event, callback) {
+ this.listeners = this.listeners || {};
+
+ if (event in this.listeners) {
+ this.listeners[event].push(callback);
+ } else {
+ this.listeners[event] = [callback];
+ }
+ };
+
+ Observable.prototype.trigger = function (event) {
+ var slice = Array.prototype.slice;
+ var params = slice.call(arguments, 1);
+
+ this.listeners = this.listeners || {};
+
+ // Params should always come in as an array
+ if (params == null) {
+ params = [];
+ }
+
+ // If there are no arguments to the event, use a temporary object
+ if (params.length === 0) {
+ params.push({});
+ }
+
+ // Set the `_type` of the first object to the event
+ params[0]._type = event;
+
+ if (event in this.listeners) {
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
+ }
+
+ if ('*' in this.listeners) {
+ this.invoke(this.listeners['*'], arguments);
+ }
+ };
+
+ Observable.prototype.invoke = function (listeners, params) {
+ for (var i = 0, len = listeners.length; i < len; i++) {
+ listeners[i].apply(this, params);
+ }
+ };
+
+ Utils.Observable = Observable;
+
+ Utils.generateChars = function (length) {
+ var chars = '';
+
+ for (var i = 0; i < length; i++) {
+ var randomChar = Math.floor(Math.random() * 36);
+ chars += randomChar.toString(36);
+ }
+
+ return chars;
+ };
+
+ Utils.bind = function (func, context) {
+ return function () {
+ func.apply(context, arguments);
+ };
+ };
+
+ Utils._convertData = function (data) {
+ for (var originalKey in data) {
+ var keys = originalKey.split('-');
+
+ var dataLevel = data;
+
+ if (keys.length === 1) {
+ continue;
+ }
+
+ for (var k = 0; k < keys.length; k++) {
+ var key = keys[k];
+
+ // Lowercase the first letter
+ // By default, dash-separated becomes camelCase
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
+
+ if (!(key in dataLevel)) {
+ dataLevel[key] = {};
+ }
+
+ if (k == keys.length - 1) {
+ dataLevel[key] = data[originalKey];
+ }
+
+ dataLevel = dataLevel[key];
+ }
+
+ delete data[originalKey];
+ }
+
+ return data;
+ };
+
+ Utils.hasScroll = function (index, el) {
+ // Adapted from the function created by @ShadowScripter
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
+ // The original code can be found at
+ // http://codereview.stackexchange.com/q/13338
+ // and was designed to be used with the Sizzle selector engine.
+
+ var $el = $(el);
+ var overflowX = el.style.overflowX;
+ var overflowY = el.style.overflowY;
+
+ //Check both x and y declarations
+ if (overflowX === overflowY &&
+ (overflowY === 'hidden' || overflowY === 'visible')) {
+ return false;
+ }
+
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
+ return true;
+ }
+
+ return ($el.innerHeight() < el.scrollHeight ||
+ $el.innerWidth() < el.scrollWidth);
+ };
+
+ Utils.escapeMarkup = function (markup) {
+ var replaceMap = {
+ '\\': '\',
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '\'': ''',
+ '/': '/'
+ };
+
+ // Do not try to escape the markup if it's not a string
+ if (typeof markup !== 'string') {
+ return markup;
+ }
+
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
+ return replaceMap[match];
+ });
+ };
+
+ // Append an array of jQuery nodes to a given element.
+ Utils.appendMany = function ($element, $nodes) {
+ // jQuery 1.7.x does not support $.fn.append() with an array
+ // Fall back to a jQuery object collection using $.fn.add()
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
+ var $jqNodes = $();
+
+ $.map($nodes, function (node) {
+ $jqNodes = $jqNodes.add(node);
+ });
+
+ $nodes = $jqNodes;
+ }
+
+ $element.append($nodes);
+ };
+
+ // Determine whether the browser is on a touchscreen device.
+ Utils.isTouchscreen = function() {
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
+ }
+ return Utils._isTouchscreenCache;
+ }
+
+ return Utils;
+});
+
+S2.define('select2/results',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Results ($element, options, dataAdapter) {
+ this.$element = $element;
+ this.data = dataAdapter;
+ this.options = options;
+
+ Results.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Results, Utils.Observable);
+
+ Results.prototype.render = function () {
+ var $results = $(
+ ''
+ );
+
+ if (this.options.get('multiple')) {
+ $results.attr('aria-multiselectable', 'true');
+ }
+
+ this.$results = $results;
+
+ return $results;
+ };
+
+ Results.prototype.clear = function () {
+ this.$results.empty();
+ };
+
+ Results.prototype.displayMessage = function (params) {
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ this.clear();
+ this.hideLoading();
+
+ var $message = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get(params.message);
+
+ $message.append(
+ escapeMarkup(
+ message(params.args)
+ )
+ );
+
+ $message[0].className += ' select2-results__message';
+
+ this.$results.append($message);
+ };
+
+ Results.prototype.hideMessages = function () {
+ this.$results.find('.select2-results__message').remove();
+ };
+
+ Results.prototype.append = function (data) {
+ this.hideLoading();
+
+ var $options = [];
+
+ if (data.results == null || data.results.length === 0) {
+ if (this.$results.children().length === 0) {
+ this.trigger('results:message', {
+ message: 'noResults'
+ });
+ }
+
+ return;
+ }
+
+ data.results = this.sort(data.results);
+
+ for (var d = 0; d < data.results.length; d++) {
+ var item = data.results[d];
+
+ var $option = this.option(item);
+
+ $options.push($option);
+ }
+
+ this.$results.append($options);
+ };
+
+ Results.prototype.position = function ($results, $dropdown) {
+ var $resultsContainer = $dropdown.find('.select2-results');
+ $resultsContainer.append($results);
+ };
+
+ Results.prototype.sort = function (data) {
+ var sorter = this.options.get('sorter');
+
+ return sorter(data);
+ };
+
+ Results.prototype.highlightFirstItem = function () {
+ var $options = this.$results
+ .find('.select2-results__option[data-selected]');
+
+ var $selected = $options.filter('[data-selected=true]');
+
+ // Check if there are any selected options
+ if ($selected.length > 0) {
+ // If there are selected options, highlight the first
+ $selected.first().trigger('mouseenter');
+ } else {
+ // If there are no selected options, highlight the first option
+ // in the dropdown
+ $options.first().trigger('mouseenter');
+ }
+
+ this.ensureHighlightVisible();
+ };
+
+ Results.prototype.setClasses = function () {
+ var self = this;
+
+ this.data.current(function (selected) {
+ var selectedIds = $.map(selected, function (s) {
+ return s.id.toString();
+ });
+
+ var $options = self.$results
+ .find('.select2-results__option[data-selected]');
+
+ $options.each(function () {
+ var $option = $(this);
+
+ var item = $.data(this, 'data');
+
+ // id needs to be converted to a string when comparing
+ var id = '' + item.id;
+
+ if ((item.element != null && item.element.selected) ||
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
+ $option.attr('data-selected', 'true');
+ } else {
+ $option.attr('data-selected', 'false');
+ }
+ });
+
+ });
+ };
+
+ Results.prototype.showLoading = function (params) {
+ this.hideLoading();
+
+ var loadingMore = this.options.get('translations').get('searching');
+
+ var loading = {
+ disabled: true,
+ loading: true,
+ text: loadingMore(params)
+ };
+ var $loading = this.option(loading);
+ $loading.className += ' loading-results';
+
+ this.$results.prepend($loading);
+ };
+
+ Results.prototype.hideLoading = function () {
+ this.$results.find('.loading-results').remove();
+ };
+
+ Results.prototype.option = function (data) {
+ var option = document.createElement('li');
+ option.className = 'select2-results__option';
+
+ var attrs = {
+ 'role': 'option',
+ 'data-selected': 'false',
+ 'tabindex': -1
+ };
+
+ if (data.disabled) {
+ delete attrs['data-selected'];
+ attrs['aria-disabled'] = 'true';
+ }
+
+ if (data.id == null) {
+ delete attrs['data-selected'];
+ }
+
+ if (data._resultId != null) {
+ option.id = data._resultId;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ if (data.children) {
+ attrs['aria-label'] = data.text;
+ delete attrs['data-selected'];
+ }
+
+ for (var attr in attrs) {
+ var val = attrs[attr];
+
+ option.setAttribute(attr, val);
+ }
+
+ if (data.children) {
+ var $option = $(option);
+
+ var label = document.createElement('strong');
+ label.className = 'select2-results__group';
+
+ var $label = $(label);
+ this.template(data, label);
+ $label.attr('role', 'presentation');
+
+ var $children = [];
+
+ for (var c = 0; c < data.children.length; c++) {
+ var child = data.children[c];
+
+ var $child = this.option(child);
+
+ $children.push($child);
+ }
+
+ var $childrenContainer = $('', {
+ 'class': 'select2-results__options select2-results__options--nested',
+ 'role': 'listbox'
+ });
+ $childrenContainer.append($children);
+ $option.attr('role', 'list');
+
+ $option.append(label);
+ $option.append($childrenContainer);
+ } else {
+ this.template(data, option);
+ }
+
+ $.data(option, 'data', data);
+
+ return option;
+ };
+
+ Results.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-results';
+
+ this.$results.attr('id', id);
+
+ container.on('results:all', function (params) {
+ self.clear();
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ self.highlightFirstItem();
+ }
+ });
+
+ container.on('results:append', function (params) {
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ }
+ });
+
+ container.on('query', function (params) {
+ self.hideMessages();
+ self.showLoading(params);
+ });
+
+ container.on('select', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('unselect', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expended="true"
+ self.$results.attr('aria-expanded', 'true');
+ self.$results.attr('aria-hidden', 'false');
+
+ self.setClasses();
+ self.ensureHighlightVisible();
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expended="false"
+ self.$results.attr('aria-expanded', 'false');
+ self.$results.attr('aria-hidden', 'true');
+ self.$results.removeAttr('aria-activedescendant');
+ });
+
+ container.on('results:toggle', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ $highlighted.trigger('mouseup');
+ });
+
+ container.on('results:select', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var data = $highlighted.data('data');
+
+ if ($highlighted.attr('data-selected') == 'true') {
+ self.trigger('close', {});
+ } else {
+ self.trigger('select', {
+ data: data
+ });
+ }
+ });
+
+ container.on('results:previous', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ // If we are already at te top, don't move further
+ if (currentIndex === 0) {
+ return;
+ }
+
+ var nextIndex = currentIndex - 1;
+
+ // If none are highlighted, highlight the first
+ if ($highlighted.length === 0) {
+ nextIndex = 0;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top;
+ var nextTop = $next.offset().top;
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextTop - currentOffset < 0) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:next', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var nextIndex = currentIndex + 1;
+
+ // If we are at the last option, stay there
+ if (nextIndex >= $options.length) {
+ return;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextBottom > currentOffset) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
+ });
+
+ container.on('results:message', function (params) {
+ self.displayMessage(params);
+ });
+
+ if ($.fn.mousewheel) {
+ this.$results.on('mousewheel', function (e) {
+ var top = self.$results.scrollTop();
+
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
+
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
+
+ if (isAtTop) {
+ self.$results.scrollTop(0);
+
+ e.preventDefault();
+ e.stopPropagation();
+ } else if (isAtBottom) {
+ self.$results.scrollTop(
+ self.$results.get(0).scrollHeight - self.$results.height()
+ );
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ }
+
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
+ function (evt) {
+ var $this = $(this);
+
+ var data = $this.data('data');
+
+ if ($this.attr('data-selected') === 'true') {
+ if (self.options.get('multiple')) {
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ } else {
+ self.trigger('close', {});
+ }
+
+ return;
+ }
+
+ self.trigger('select', {
+ originalEvent: evt,
+ data: data
+ });
+ });
+
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
+ function (evt) {
+ var data = $(this).data('data');
+
+ self.getHighlightedResults()
+ .removeClass('select2-results__option--highlighted')
+ .attr('aria-selected', 'false');
+
+ self.trigger('results:focus', {
+ data: data,
+ element: $(this)
+ });
+ });
+ };
+
+ Results.prototype.getHighlightedResults = function () {
+ var $highlighted = this.$results
+ .find('.select2-results__option--highlighted');
+
+ return $highlighted;
+ };
+
+ Results.prototype.destroy = function () {
+ this.$results.remove();
+ };
+
+ Results.prototype.ensureHighlightVisible = function () {
+ var $highlighted = this.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var $options = this.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var currentOffset = this.$results.offset().top;
+ var nextTop = $highlighted.offset().top;
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
+
+ var offsetDelta = nextTop - currentOffset;
+ nextOffset -= $highlighted.outerHeight(false) * 2;
+
+ if (currentIndex <= 2) {
+ this.$results.scrollTop(0);
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
+ this.$results.scrollTop(nextOffset);
+ }
+ };
+
+ Results.prototype.template = function (result, container) {
+ var template = this.options.get('templateResult');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ var content = template(result, container);
+
+ if (content == null) {
+ container.style.display = 'none';
+ } else if (typeof content === 'string') {
+ container.innerHTML = escapeMarkup(content);
+ } else {
+ $(container).append(content);
+ }
+ };
+
+ return Results;
+});
+
+S2.define('select2/keys',[
+
+], function () {
+ var KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ ENTER: 13,
+ SHIFT: 16,
+ CTRL: 17,
+ ALT: 18,
+ ESC: 27,
+ SPACE: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DELETE: 46
+ };
+
+ return KEYS;
+});
+
+S2.define('select2/selection/base',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function BaseSelection ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ BaseSelection.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseSelection, Utils.Observable);
+
+ BaseSelection.prototype.render = function () {
+ var $selection = $(
+ '' +
+ ' '
+ );
+
+ this._tabindex = 0;
+
+ if (this.$element.data('old-tabindex') != null) {
+ this._tabindex = this.$element.data('old-tabindex');
+ } else if (this.$element.attr('tabindex') != null) {
+ this._tabindex = this.$element.attr('tabindex');
+ }
+
+ $selection.attr('title', this.$element.attr('title'));
+ $selection.attr('tabindex', this._tabindex);
+
+ this.$selection = $selection;
+
+ return $selection;
+ };
+
+ BaseSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-container';
+ var resultsId = container.id + '-results';
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
+
+ this.container = container;
+
+ this.$selection.on('focus', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('blur', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ if (evt.which === KEYS.SPACE) {
+ evt.preventDefault();
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expanded="true"
+ self.$selection.attr('aria-expanded', 'true');
+ self.$selection.attr('aria-owns', resultsId);
+
+ self._attachCloseHandler(container);
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expanded="false"
+ self.$selection.attr('aria-expanded', 'false');
+ self.$selection.removeAttr('aria-activedescendant');
+ self.$selection.removeAttr('aria-owns');
+
+ // This needs to be delayed as the active element is the body when the
+ // key is pressed.
+ window.setTimeout(function () {
+ self.$selection.focus();
+ }, 1);
+
+ self._detachCloseHandler(container);
+ });
+
+ container.on('enable', function () {
+ self.$selection.attr('tabindex', self._tabindex);
+ });
+
+ container.on('disable', function () {
+ self.$selection.attr('tabindex', '-1');
+ });
+ };
+
+ BaseSelection.prototype._handleBlur = function (evt) {
+ var self = this;
+
+ // This needs to be delayed as the active element is the body when the tab
+ // key is pressed, possibly along with others.
+ window.setTimeout(function () {
+ // Don't trigger `blur` if the focus is still in the selection
+ if (
+ (document.activeElement == self.$selection[0]) ||
+ ($.contains(self.$selection[0], document.activeElement))
+ ) {
+ return;
+ }
+
+ self.trigger('blur', evt);
+ }, 1);
+ };
+
+ BaseSelection.prototype._attachCloseHandler = function (container) {
+ var self = this;
+
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
+ var $target = $(e.target);
+
+ var $select = $target.closest('.select2');
+
+ var $all = $('.select2.select2-container--open');
+
+ $all.each(function () {
+ var $this = $(this);
+
+ if (this == $select[0]) {
+ return;
+ }
+
+ var $element = $this.data('element');
+
+ $element.select2('close');
+ });
+ });
+ };
+
+ BaseSelection.prototype._detachCloseHandler = function (container) {
+ $(document.body).off('mousedown.select2.' + container.id);
+ };
+
+ BaseSelection.prototype.position = function ($selection, $container) {
+ var $selectionContainer = $container.find('.selection');
+ $selectionContainer.append($selection);
+ };
+
+ BaseSelection.prototype.destroy = function () {
+ this._detachCloseHandler(this.container);
+ };
+
+ BaseSelection.prototype.update = function (data) {
+ throw new Error('The `update` method must be defined in child classes.');
+ };
+
+ return BaseSelection;
+});
+
+S2.define('select2/selection/single',[
+ 'jquery',
+ './base',
+ '../utils',
+ '../keys'
+], function ($, BaseSelection, Utils, KEYS) {
+ function SingleSelection () {
+ SingleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(SingleSelection, BaseSelection);
+
+ SingleSelection.prototype.render = function () {
+ var $selection = SingleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--single');
+
+ $selection.html(
+ ' ' +
+ '' +
+ ' ' +
+ ' '
+ );
+
+ return $selection;
+ };
+
+ SingleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ SingleSelection.__super__.bind.apply(this, arguments);
+
+ var id = container.id + '-container';
+
+ this.$selection.find('.select2-selection__rendered')
+ .attr('id', id)
+ .attr('role', 'textbox')
+ .attr('aria-readonly', 'true');
+ this.$selection.attr('aria-labelledby', id);
+
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
+ this.$selection.attr('role', 'combobox');
+
+ this.$selection.on('mousedown', function (evt) {
+ // Only respond to left clicks
+ if (evt.which !== 1) {
+ return;
+ }
+
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on('focus', function (evt) {
+ // User focuses on the container
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
+ container.open();
+ }
+ });
+
+ this.$selection.on('blur', function (evt) {
+ // User exits the container
+ });
+
+ container.on('focus', function (evt) {
+ if (!container.isOpen()) {
+ self.$selection.focus();
+ }
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+ };
+
+ SingleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ SingleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ SingleSelection.prototype.selectionContainer = function () {
+ return $(' ');
+ };
+
+ SingleSelection.prototype.update = function (data) {
+ if (data.length === 0) {
+ this.clear();
+ return;
+ }
+
+ var selection = data[0];
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+ var formatted = this.display(selection, $rendered);
+
+ $rendered.empty().append(formatted);
+ $rendered.prop('title', selection.title || selection.text);
+ };
+
+ return SingleSelection;
+});
+
+S2.define('select2/selection/multiple',[
+ 'jquery',
+ './base',
+ '../utils'
+], function ($, BaseSelection, Utils) {
+ function MultipleSelection ($element, options) {
+ MultipleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(MultipleSelection, BaseSelection);
+
+ MultipleSelection.prototype.render = function () {
+ var $selection = MultipleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--multiple');
+
+ $selection.html(
+ ''
+ );
+
+ return $selection;
+ };
+
+ MultipleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ MultipleSelection.__super__.bind.apply(this, arguments);
+
+ this.$selection.on('click', function (evt) {
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on(
+ 'click',
+ '.select2-selection__choice__remove',
+ function (evt) {
+ // Ignore the event if it is disabled
+ if (self.options.get('disabled')) {
+ return;
+ }
+
+ var $remove = $(this);
+ var $selection = $remove.parent();
+
+ var data = $selection.data('data');
+
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ }
+ );
+ };
+
+ MultipleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ MultipleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ MultipleSelection.prototype.selectionContainer = function () {
+ var $container = $(
+ '' +
+ '' +
+ '×' +
+ ' ' +
+ ' '
+ );
+
+ return $container;
+ };
+
+ MultipleSelection.prototype.update = function (data) {
+ var self = this;
+ this.clear();
+
+ if (data.length === 0) {
+ return;
+ }
+
+ var $selections = [];
+
+ for (var d = 0; d < data.length; d++) {
+ var selection = data[d];
+
+ var $selection = this.selectionContainer();
+ var formatted = this.display(selection, $selection).trim();
+
+ $selection.append(formatted);
+ $selection.prop('title', selection.title || selection.text);
+
+ $selection.data('data', selection);
+
+ $selections.push($selection);
+ }
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+
+ Utils.appendMany($rendered, $selections);
+
+ // Return cursor to search field after updating.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ if ('undefined' !== typeof this.$search) {
+ setTimeout(function(){
+ self.$search.focus();
+ }, 1);
+ }
+ };
+
+ return MultipleSelection;
+});
+
+S2.define('select2/selection/placeholder',[
+ '../utils'
+], function (Utils) {
+ function Placeholder (decorated, $element, options) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options);
+ }
+
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
+ var $placeholder = this.selectionContainer();
+
+ $placeholder.html(this.display(placeholder));
+ $placeholder.addClass('select2-selection__placeholder')
+ .removeClass('select2-selection__choice');
+
+ return $placeholder;
+ };
+
+ Placeholder.prototype.update = function (decorated, data) {
+ var singlePlaceholder = (
+ data.length == 1 && data[0].id != this.placeholder.id
+ );
+ var multipleSelections = data.length > 1;
+
+ if (multipleSelections || singlePlaceholder) {
+ return decorated.call(this, data);
+ }
+
+ this.clear();
+
+ var $placeholder = this.createPlaceholder(this.placeholder);
+
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
+ };
+
+ return Placeholder;
+});
+
+S2.define('select2/selection/allowClear',[
+ 'jquery',
+ '../keys'
+], function ($, KEYS) {
+ function AllowClear () { }
+
+ AllowClear.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ if (this.placeholder == null) {
+ if (this.options.get('debug') && window.console && console.error) {
+ console.error(
+ 'Select2: The `allowClear` option should be used in combination ' +
+ 'with the `placeholder` option.'
+ );
+ }
+ }
+
+ this.$selection.on('mousedown', '.select2-selection__clear',
+ function (evt) {
+ self._handleClear(evt);
+ });
+
+ container.on('keypress', function (evt) {
+ self._handleKeyboardClear(evt, container);
+ });
+ };
+
+ AllowClear.prototype._handleClear = function (_, evt) {
+ // Ignore the event if it is disabled
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ var $clear = this.$selection.find('.select2-selection__clear');
+
+ // Ignore the event if nothing has been selected
+ if ($clear.length === 0) {
+ return;
+ }
+
+ evt.stopPropagation();
+
+ var data = $clear.data('data');
+
+ for (var d = 0; d < data.length; d++) {
+ var unselectData = {
+ data: data[d]
+ };
+
+ // Trigger the `unselect` event, so people can prevent it from being
+ // cleared.
+ this.trigger('unselect', unselectData);
+
+ // If the event was prevented, don't clear it out.
+ if (unselectData.prevented) {
+ return;
+ }
+ }
+
+ this.$element.val(this.placeholder.id).trigger('change');
+
+ this.trigger('toggle', {});
+ };
+
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
+ if (container.isOpen()) {
+ return;
+ }
+
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
+ this._handleClear(evt);
+ }
+ };
+
+ AllowClear.prototype.update = function (decorated, data) {
+ decorated.call(this, data);
+
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
+ data.length === 0) {
+ return;
+ }
+
+ var $remove = $(
+ '' +
+ '×' +
+ ' '
+ );
+ $remove.data('data', data);
+
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
+ };
+
+ return AllowClear;
+});
+
+S2.define('select2/selection/search',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function Search (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ Search.prototype.render = function (decorated) {
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ var $rendered = decorated.call(this);
+
+ this._transferTabIndex();
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.trigger('focus');
+ });
+
+ container.on('close', function () {
+ self.$search.val('');
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.trigger('focus');
+ });
+
+ container.on('enable', function () {
+ self.$search.prop('disabled', false);
+
+ self._transferTabIndex();
+ });
+
+ container.on('disable', function () {
+ self.$search.prop('disabled', true);
+ });
+
+ container.on('focus', function (evt) {
+ self.$search.trigger('focus');
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
+ evt.stopPropagation();
+
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+
+ var key = evt.which;
+
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
+ var $previousChoice = self.$searchContainer
+ .prev('.select2-selection__choice');
+
+ if ($previousChoice.length > 0) {
+ var item = $previousChoice.data('data');
+
+ self.searchRemoveChoice(item);
+
+ evt.preventDefault();
+ }
+ }
+ });
+
+ // Try to detect the IE version should the `documentMode` property that
+ // is stored on the document. This is only implemented in IE and is
+ // slightly cleaner than doing a user agent check.
+ // This property is not available in Edge, but Edge also doesn't have
+ // this bug.
+ var msie = document.documentMode;
+ var disableInputEvents = msie && msie <= 11;
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$selection.on(
+ 'input.searchcheck',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents) {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ // Unbind the duplicated `keyup` event
+ self.$selection.off('keyup.search');
+ }
+ );
+
+ this.$selection.on(
+ 'keyup.search input.search',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents && evt.type === 'input') {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ var key = evt.which;
+
+ // We can freely ignore events from modifier keys
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
+ return;
+ }
+
+ // Tabbing will be handled during the `keydown` phase
+ if (key == KEYS.TAB) {
+ return;
+ }
+
+ self.handleSearch(evt);
+ }
+ );
+ };
+
+ /**
+ * This method will transfer the tabindex attribute from the rendered
+ * selection to the search box. This allows for the search box to be used as
+ * the primary focus instead of the selection container.
+ *
+ * @private
+ */
+ Search.prototype._transferTabIndex = function (decorated) {
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
+ this.$selection.attr('tabindex', '-1');
+ };
+
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
+ this.$search.attr('placeholder', placeholder.text);
+ };
+
+ Search.prototype.update = function (decorated, data) {
+ var searchHadFocus = this.$search[0] == document.activeElement;
+
+ this.$search.attr('placeholder', '');
+
+ decorated.call(this, data);
+
+ this.$selection.find('.select2-selection__rendered')
+ .append(this.$searchContainer);
+
+ this.resizeSearch();
+ if (searchHadFocus) {
+ this.$search.focus();
+ }
+ };
+
+ Search.prototype.handleSearch = function () {
+ this.resizeSearch();
+
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
+ this.trigger('unselect', {
+ data: item
+ });
+
+ this.$search.val(item.text);
+ this.handleSearch();
+ };
+
+ Search.prototype.resizeSearch = function () {
+ this.$search.css('width', '25px');
+
+ var width = '';
+
+ if (this.$search.attr('placeholder') !== '') {
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
+ } else {
+ var minimumWidth = this.$search.val().length + 1;
+
+ width = (minimumWidth * 0.75) + 'em';
+ }
+
+ this.$search.css('width', width);
+ };
+
+ return Search;
+});
+
+S2.define('select2/selection/eventRelay',[
+ 'jquery'
+], function ($) {
+ function EventRelay () { }
+
+ EventRelay.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var relayEvents = [
+ 'open', 'opening',
+ 'close', 'closing',
+ 'select', 'selecting',
+ 'unselect', 'unselecting'
+ ];
+
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
+
+ decorated.call(this, container, $container);
+
+ container.on('*', function (name, params) {
+ // Ignore events that should not be relayed
+ if ($.inArray(name, relayEvents) === -1) {
+ return;
+ }
+
+ // The parameters should always be an object
+ params = params || {};
+
+ // Generate the jQuery event for the Select2 event
+ var evt = $.Event('select2:' + name, {
+ params: params
+ });
+
+ self.$element.trigger(evt);
+
+ // Only handle preventable events if it was one
+ if ($.inArray(name, preventableEvents) === -1) {
+ return;
+ }
+
+ params.prevented = evt.isDefaultPrevented();
+ });
+ };
+
+ return EventRelay;
+});
+
+S2.define('select2/translation',[
+ 'jquery',
+ 'require'
+], function ($, require) {
+ function Translation (dict) {
+ this.dict = dict || {};
+ }
+
+ Translation.prototype.all = function () {
+ return this.dict;
+ };
+
+ Translation.prototype.get = function (key) {
+ return this.dict[key];
+ };
+
+ Translation.prototype.extend = function (translation) {
+ this.dict = $.extend({}, translation.all(), this.dict);
+ };
+
+ // Static functions
+
+ Translation._cache = {};
+
+ Translation.loadPath = function (path) {
+ if (!(path in Translation._cache)) {
+ var translations = require(path);
+
+ Translation._cache[path] = translations;
+ }
+
+ return new Translation(Translation._cache[path]);
+ };
+
+ return Translation;
+});
+
+S2.define('select2/diacritics',[
+
+], function () {
+ var diacritics = {
+ '\u24B6': 'A',
+ '\uFF21': 'A',
+ '\u00C0': 'A',
+ '\u00C1': 'A',
+ '\u00C2': 'A',
+ '\u1EA6': 'A',
+ '\u1EA4': 'A',
+ '\u1EAA': 'A',
+ '\u1EA8': 'A',
+ '\u00C3': 'A',
+ '\u0100': 'A',
+ '\u0102': 'A',
+ '\u1EB0': 'A',
+ '\u1EAE': 'A',
+ '\u1EB4': 'A',
+ '\u1EB2': 'A',
+ '\u0226': 'A',
+ '\u01E0': 'A',
+ '\u00C4': 'A',
+ '\u01DE': 'A',
+ '\u1EA2': 'A',
+ '\u00C5': 'A',
+ '\u01FA': 'A',
+ '\u01CD': 'A',
+ '\u0200': 'A',
+ '\u0202': 'A',
+ '\u1EA0': 'A',
+ '\u1EAC': 'A',
+ '\u1EB6': 'A',
+ '\u1E00': 'A',
+ '\u0104': 'A',
+ '\u023A': 'A',
+ '\u2C6F': 'A',
+ '\uA732': 'AA',
+ '\u00C6': 'AE',
+ '\u01FC': 'AE',
+ '\u01E2': 'AE',
+ '\uA734': 'AO',
+ '\uA736': 'AU',
+ '\uA738': 'AV',
+ '\uA73A': 'AV',
+ '\uA73C': 'AY',
+ '\u24B7': 'B',
+ '\uFF22': 'B',
+ '\u1E02': 'B',
+ '\u1E04': 'B',
+ '\u1E06': 'B',
+ '\u0243': 'B',
+ '\u0182': 'B',
+ '\u0181': 'B',
+ '\u24B8': 'C',
+ '\uFF23': 'C',
+ '\u0106': 'C',
+ '\u0108': 'C',
+ '\u010A': 'C',
+ '\u010C': 'C',
+ '\u00C7': 'C',
+ '\u1E08': 'C',
+ '\u0187': 'C',
+ '\u023B': 'C',
+ '\uA73E': 'C',
+ '\u24B9': 'D',
+ '\uFF24': 'D',
+ '\u1E0A': 'D',
+ '\u010E': 'D',
+ '\u1E0C': 'D',
+ '\u1E10': 'D',
+ '\u1E12': 'D',
+ '\u1E0E': 'D',
+ '\u0110': 'D',
+ '\u018B': 'D',
+ '\u018A': 'D',
+ '\u0189': 'D',
+ '\uA779': 'D',
+ '\u01F1': 'DZ',
+ '\u01C4': 'DZ',
+ '\u01F2': 'Dz',
+ '\u01C5': 'Dz',
+ '\u24BA': 'E',
+ '\uFF25': 'E',
+ '\u00C8': 'E',
+ '\u00C9': 'E',
+ '\u00CA': 'E',
+ '\u1EC0': 'E',
+ '\u1EBE': 'E',
+ '\u1EC4': 'E',
+ '\u1EC2': 'E',
+ '\u1EBC': 'E',
+ '\u0112': 'E',
+ '\u1E14': 'E',
+ '\u1E16': 'E',
+ '\u0114': 'E',
+ '\u0116': 'E',
+ '\u00CB': 'E',
+ '\u1EBA': 'E',
+ '\u011A': 'E',
+ '\u0204': 'E',
+ '\u0206': 'E',
+ '\u1EB8': 'E',
+ '\u1EC6': 'E',
+ '\u0228': 'E',
+ '\u1E1C': 'E',
+ '\u0118': 'E',
+ '\u1E18': 'E',
+ '\u1E1A': 'E',
+ '\u0190': 'E',
+ '\u018E': 'E',
+ '\u24BB': 'F',
+ '\uFF26': 'F',
+ '\u1E1E': 'F',
+ '\u0191': 'F',
+ '\uA77B': 'F',
+ '\u24BC': 'G',
+ '\uFF27': 'G',
+ '\u01F4': 'G',
+ '\u011C': 'G',
+ '\u1E20': 'G',
+ '\u011E': 'G',
+ '\u0120': 'G',
+ '\u01E6': 'G',
+ '\u0122': 'G',
+ '\u01E4': 'G',
+ '\u0193': 'G',
+ '\uA7A0': 'G',
+ '\uA77D': 'G',
+ '\uA77E': 'G',
+ '\u24BD': 'H',
+ '\uFF28': 'H',
+ '\u0124': 'H',
+ '\u1E22': 'H',
+ '\u1E26': 'H',
+ '\u021E': 'H',
+ '\u1E24': 'H',
+ '\u1E28': 'H',
+ '\u1E2A': 'H',
+ '\u0126': 'H',
+ '\u2C67': 'H',
+ '\u2C75': 'H',
+ '\uA78D': 'H',
+ '\u24BE': 'I',
+ '\uFF29': 'I',
+ '\u00CC': 'I',
+ '\u00CD': 'I',
+ '\u00CE': 'I',
+ '\u0128': 'I',
+ '\u012A': 'I',
+ '\u012C': 'I',
+ '\u0130': 'I',
+ '\u00CF': 'I',
+ '\u1E2E': 'I',
+ '\u1EC8': 'I',
+ '\u01CF': 'I',
+ '\u0208': 'I',
+ '\u020A': 'I',
+ '\u1ECA': 'I',
+ '\u012E': 'I',
+ '\u1E2C': 'I',
+ '\u0197': 'I',
+ '\u24BF': 'J',
+ '\uFF2A': 'J',
+ '\u0134': 'J',
+ '\u0248': 'J',
+ '\u24C0': 'K',
+ '\uFF2B': 'K',
+ '\u1E30': 'K',
+ '\u01E8': 'K',
+ '\u1E32': 'K',
+ '\u0136': 'K',
+ '\u1E34': 'K',
+ '\u0198': 'K',
+ '\u2C69': 'K',
+ '\uA740': 'K',
+ '\uA742': 'K',
+ '\uA744': 'K',
+ '\uA7A2': 'K',
+ '\u24C1': 'L',
+ '\uFF2C': 'L',
+ '\u013F': 'L',
+ '\u0139': 'L',
+ '\u013D': 'L',
+ '\u1E36': 'L',
+ '\u1E38': 'L',
+ '\u013B': 'L',
+ '\u1E3C': 'L',
+ '\u1E3A': 'L',
+ '\u0141': 'L',
+ '\u023D': 'L',
+ '\u2C62': 'L',
+ '\u2C60': 'L',
+ '\uA748': 'L',
+ '\uA746': 'L',
+ '\uA780': 'L',
+ '\u01C7': 'LJ',
+ '\u01C8': 'Lj',
+ '\u24C2': 'M',
+ '\uFF2D': 'M',
+ '\u1E3E': 'M',
+ '\u1E40': 'M',
+ '\u1E42': 'M',
+ '\u2C6E': 'M',
+ '\u019C': 'M',
+ '\u24C3': 'N',
+ '\uFF2E': 'N',
+ '\u01F8': 'N',
+ '\u0143': 'N',
+ '\u00D1': 'N',
+ '\u1E44': 'N',
+ '\u0147': 'N',
+ '\u1E46': 'N',
+ '\u0145': 'N',
+ '\u1E4A': 'N',
+ '\u1E48': 'N',
+ '\u0220': 'N',
+ '\u019D': 'N',
+ '\uA790': 'N',
+ '\uA7A4': 'N',
+ '\u01CA': 'NJ',
+ '\u01CB': 'Nj',
+ '\u24C4': 'O',
+ '\uFF2F': 'O',
+ '\u00D2': 'O',
+ '\u00D3': 'O',
+ '\u00D4': 'O',
+ '\u1ED2': 'O',
+ '\u1ED0': 'O',
+ '\u1ED6': 'O',
+ '\u1ED4': 'O',
+ '\u00D5': 'O',
+ '\u1E4C': 'O',
+ '\u022C': 'O',
+ '\u1E4E': 'O',
+ '\u014C': 'O',
+ '\u1E50': 'O',
+ '\u1E52': 'O',
+ '\u014E': 'O',
+ '\u022E': 'O',
+ '\u0230': 'O',
+ '\u00D6': 'O',
+ '\u022A': 'O',
+ '\u1ECE': 'O',
+ '\u0150': 'O',
+ '\u01D1': 'O',
+ '\u020C': 'O',
+ '\u020E': 'O',
+ '\u01A0': 'O',
+ '\u1EDC': 'O',
+ '\u1EDA': 'O',
+ '\u1EE0': 'O',
+ '\u1EDE': 'O',
+ '\u1EE2': 'O',
+ '\u1ECC': 'O',
+ '\u1ED8': 'O',
+ '\u01EA': 'O',
+ '\u01EC': 'O',
+ '\u00D8': 'O',
+ '\u01FE': 'O',
+ '\u0186': 'O',
+ '\u019F': 'O',
+ '\uA74A': 'O',
+ '\uA74C': 'O',
+ '\u01A2': 'OI',
+ '\uA74E': 'OO',
+ '\u0222': 'OU',
+ '\u24C5': 'P',
+ '\uFF30': 'P',
+ '\u1E54': 'P',
+ '\u1E56': 'P',
+ '\u01A4': 'P',
+ '\u2C63': 'P',
+ '\uA750': 'P',
+ '\uA752': 'P',
+ '\uA754': 'P',
+ '\u24C6': 'Q',
+ '\uFF31': 'Q',
+ '\uA756': 'Q',
+ '\uA758': 'Q',
+ '\u024A': 'Q',
+ '\u24C7': 'R',
+ '\uFF32': 'R',
+ '\u0154': 'R',
+ '\u1E58': 'R',
+ '\u0158': 'R',
+ '\u0210': 'R',
+ '\u0212': 'R',
+ '\u1E5A': 'R',
+ '\u1E5C': 'R',
+ '\u0156': 'R',
+ '\u1E5E': 'R',
+ '\u024C': 'R',
+ '\u2C64': 'R',
+ '\uA75A': 'R',
+ '\uA7A6': 'R',
+ '\uA782': 'R',
+ '\u24C8': 'S',
+ '\uFF33': 'S',
+ '\u1E9E': 'S',
+ '\u015A': 'S',
+ '\u1E64': 'S',
+ '\u015C': 'S',
+ '\u1E60': 'S',
+ '\u0160': 'S',
+ '\u1E66': 'S',
+ '\u1E62': 'S',
+ '\u1E68': 'S',
+ '\u0218': 'S',
+ '\u015E': 'S',
+ '\u2C7E': 'S',
+ '\uA7A8': 'S',
+ '\uA784': 'S',
+ '\u24C9': 'T',
+ '\uFF34': 'T',
+ '\u1E6A': 'T',
+ '\u0164': 'T',
+ '\u1E6C': 'T',
+ '\u021A': 'T',
+ '\u0162': 'T',
+ '\u1E70': 'T',
+ '\u1E6E': 'T',
+ '\u0166': 'T',
+ '\u01AC': 'T',
+ '\u01AE': 'T',
+ '\u023E': 'T',
+ '\uA786': 'T',
+ '\uA728': 'TZ',
+ '\u24CA': 'U',
+ '\uFF35': 'U',
+ '\u00D9': 'U',
+ '\u00DA': 'U',
+ '\u00DB': 'U',
+ '\u0168': 'U',
+ '\u1E78': 'U',
+ '\u016A': 'U',
+ '\u1E7A': 'U',
+ '\u016C': 'U',
+ '\u00DC': 'U',
+ '\u01DB': 'U',
+ '\u01D7': 'U',
+ '\u01D5': 'U',
+ '\u01D9': 'U',
+ '\u1EE6': 'U',
+ '\u016E': 'U',
+ '\u0170': 'U',
+ '\u01D3': 'U',
+ '\u0214': 'U',
+ '\u0216': 'U',
+ '\u01AF': 'U',
+ '\u1EEA': 'U',
+ '\u1EE8': 'U',
+ '\u1EEE': 'U',
+ '\u1EEC': 'U',
+ '\u1EF0': 'U',
+ '\u1EE4': 'U',
+ '\u1E72': 'U',
+ '\u0172': 'U',
+ '\u1E76': 'U',
+ '\u1E74': 'U',
+ '\u0244': 'U',
+ '\u24CB': 'V',
+ '\uFF36': 'V',
+ '\u1E7C': 'V',
+ '\u1E7E': 'V',
+ '\u01B2': 'V',
+ '\uA75E': 'V',
+ '\u0245': 'V',
+ '\uA760': 'VY',
+ '\u24CC': 'W',
+ '\uFF37': 'W',
+ '\u1E80': 'W',
+ '\u1E82': 'W',
+ '\u0174': 'W',
+ '\u1E86': 'W',
+ '\u1E84': 'W',
+ '\u1E88': 'W',
+ '\u2C72': 'W',
+ '\u24CD': 'X',
+ '\uFF38': 'X',
+ '\u1E8A': 'X',
+ '\u1E8C': 'X',
+ '\u24CE': 'Y',
+ '\uFF39': 'Y',
+ '\u1EF2': 'Y',
+ '\u00DD': 'Y',
+ '\u0176': 'Y',
+ '\u1EF8': 'Y',
+ '\u0232': 'Y',
+ '\u1E8E': 'Y',
+ '\u0178': 'Y',
+ '\u1EF6': 'Y',
+ '\u1EF4': 'Y',
+ '\u01B3': 'Y',
+ '\u024E': 'Y',
+ '\u1EFE': 'Y',
+ '\u24CF': 'Z',
+ '\uFF3A': 'Z',
+ '\u0179': 'Z',
+ '\u1E90': 'Z',
+ '\u017B': 'Z',
+ '\u017D': 'Z',
+ '\u1E92': 'Z',
+ '\u1E94': 'Z',
+ '\u01B5': 'Z',
+ '\u0224': 'Z',
+ '\u2C7F': 'Z',
+ '\u2C6B': 'Z',
+ '\uA762': 'Z',
+ '\u24D0': 'a',
+ '\uFF41': 'a',
+ '\u1E9A': 'a',
+ '\u00E0': 'a',
+ '\u00E1': 'a',
+ '\u00E2': 'a',
+ '\u1EA7': 'a',
+ '\u1EA5': 'a',
+ '\u1EAB': 'a',
+ '\u1EA9': 'a',
+ '\u00E3': 'a',
+ '\u0101': 'a',
+ '\u0103': 'a',
+ '\u1EB1': 'a',
+ '\u1EAF': 'a',
+ '\u1EB5': 'a',
+ '\u1EB3': 'a',
+ '\u0227': 'a',
+ '\u01E1': 'a',
+ '\u00E4': 'a',
+ '\u01DF': 'a',
+ '\u1EA3': 'a',
+ '\u00E5': 'a',
+ '\u01FB': 'a',
+ '\u01CE': 'a',
+ '\u0201': 'a',
+ '\u0203': 'a',
+ '\u1EA1': 'a',
+ '\u1EAD': 'a',
+ '\u1EB7': 'a',
+ '\u1E01': 'a',
+ '\u0105': 'a',
+ '\u2C65': 'a',
+ '\u0250': 'a',
+ '\uA733': 'aa',
+ '\u00E6': 'ae',
+ '\u01FD': 'ae',
+ '\u01E3': 'ae',
+ '\uA735': 'ao',
+ '\uA737': 'au',
+ '\uA739': 'av',
+ '\uA73B': 'av',
+ '\uA73D': 'ay',
+ '\u24D1': 'b',
+ '\uFF42': 'b',
+ '\u1E03': 'b',
+ '\u1E05': 'b',
+ '\u1E07': 'b',
+ '\u0180': 'b',
+ '\u0183': 'b',
+ '\u0253': 'b',
+ '\u24D2': 'c',
+ '\uFF43': 'c',
+ '\u0107': 'c',
+ '\u0109': 'c',
+ '\u010B': 'c',
+ '\u010D': 'c',
+ '\u00E7': 'c',
+ '\u1E09': 'c',
+ '\u0188': 'c',
+ '\u023C': 'c',
+ '\uA73F': 'c',
+ '\u2184': 'c',
+ '\u24D3': 'd',
+ '\uFF44': 'd',
+ '\u1E0B': 'd',
+ '\u010F': 'd',
+ '\u1E0D': 'd',
+ '\u1E11': 'd',
+ '\u1E13': 'd',
+ '\u1E0F': 'd',
+ '\u0111': 'd',
+ '\u018C': 'd',
+ '\u0256': 'd',
+ '\u0257': 'd',
+ '\uA77A': 'd',
+ '\u01F3': 'dz',
+ '\u01C6': 'dz',
+ '\u24D4': 'e',
+ '\uFF45': 'e',
+ '\u00E8': 'e',
+ '\u00E9': 'e',
+ '\u00EA': 'e',
+ '\u1EC1': 'e',
+ '\u1EBF': 'e',
+ '\u1EC5': 'e',
+ '\u1EC3': 'e',
+ '\u1EBD': 'e',
+ '\u0113': 'e',
+ '\u1E15': 'e',
+ '\u1E17': 'e',
+ '\u0115': 'e',
+ '\u0117': 'e',
+ '\u00EB': 'e',
+ '\u1EBB': 'e',
+ '\u011B': 'e',
+ '\u0205': 'e',
+ '\u0207': 'e',
+ '\u1EB9': 'e',
+ '\u1EC7': 'e',
+ '\u0229': 'e',
+ '\u1E1D': 'e',
+ '\u0119': 'e',
+ '\u1E19': 'e',
+ '\u1E1B': 'e',
+ '\u0247': 'e',
+ '\u025B': 'e',
+ '\u01DD': 'e',
+ '\u24D5': 'f',
+ '\uFF46': 'f',
+ '\u1E1F': 'f',
+ '\u0192': 'f',
+ '\uA77C': 'f',
+ '\u24D6': 'g',
+ '\uFF47': 'g',
+ '\u01F5': 'g',
+ '\u011D': 'g',
+ '\u1E21': 'g',
+ '\u011F': 'g',
+ '\u0121': 'g',
+ '\u01E7': 'g',
+ '\u0123': 'g',
+ '\u01E5': 'g',
+ '\u0260': 'g',
+ '\uA7A1': 'g',
+ '\u1D79': 'g',
+ '\uA77F': 'g',
+ '\u24D7': 'h',
+ '\uFF48': 'h',
+ '\u0125': 'h',
+ '\u1E23': 'h',
+ '\u1E27': 'h',
+ '\u021F': 'h',
+ '\u1E25': 'h',
+ '\u1E29': 'h',
+ '\u1E2B': 'h',
+ '\u1E96': 'h',
+ '\u0127': 'h',
+ '\u2C68': 'h',
+ '\u2C76': 'h',
+ '\u0265': 'h',
+ '\u0195': 'hv',
+ '\u24D8': 'i',
+ '\uFF49': 'i',
+ '\u00EC': 'i',
+ '\u00ED': 'i',
+ '\u00EE': 'i',
+ '\u0129': 'i',
+ '\u012B': 'i',
+ '\u012D': 'i',
+ '\u00EF': 'i',
+ '\u1E2F': 'i',
+ '\u1EC9': 'i',
+ '\u01D0': 'i',
+ '\u0209': 'i',
+ '\u020B': 'i',
+ '\u1ECB': 'i',
+ '\u012F': 'i',
+ '\u1E2D': 'i',
+ '\u0268': 'i',
+ '\u0131': 'i',
+ '\u24D9': 'j',
+ '\uFF4A': 'j',
+ '\u0135': 'j',
+ '\u01F0': 'j',
+ '\u0249': 'j',
+ '\u24DA': 'k',
+ '\uFF4B': 'k',
+ '\u1E31': 'k',
+ '\u01E9': 'k',
+ '\u1E33': 'k',
+ '\u0137': 'k',
+ '\u1E35': 'k',
+ '\u0199': 'k',
+ '\u2C6A': 'k',
+ '\uA741': 'k',
+ '\uA743': 'k',
+ '\uA745': 'k',
+ '\uA7A3': 'k',
+ '\u24DB': 'l',
+ '\uFF4C': 'l',
+ '\u0140': 'l',
+ '\u013A': 'l',
+ '\u013E': 'l',
+ '\u1E37': 'l',
+ '\u1E39': 'l',
+ '\u013C': 'l',
+ '\u1E3D': 'l',
+ '\u1E3B': 'l',
+ '\u017F': 'l',
+ '\u0142': 'l',
+ '\u019A': 'l',
+ '\u026B': 'l',
+ '\u2C61': 'l',
+ '\uA749': 'l',
+ '\uA781': 'l',
+ '\uA747': 'l',
+ '\u01C9': 'lj',
+ '\u24DC': 'm',
+ '\uFF4D': 'm',
+ '\u1E3F': 'm',
+ '\u1E41': 'm',
+ '\u1E43': 'm',
+ '\u0271': 'm',
+ '\u026F': 'm',
+ '\u24DD': 'n',
+ '\uFF4E': 'n',
+ '\u01F9': 'n',
+ '\u0144': 'n',
+ '\u00F1': 'n',
+ '\u1E45': 'n',
+ '\u0148': 'n',
+ '\u1E47': 'n',
+ '\u0146': 'n',
+ '\u1E4B': 'n',
+ '\u1E49': 'n',
+ '\u019E': 'n',
+ '\u0272': 'n',
+ '\u0149': 'n',
+ '\uA791': 'n',
+ '\uA7A5': 'n',
+ '\u01CC': 'nj',
+ '\u24DE': 'o',
+ '\uFF4F': 'o',
+ '\u00F2': 'o',
+ '\u00F3': 'o',
+ '\u00F4': 'o',
+ '\u1ED3': 'o',
+ '\u1ED1': 'o',
+ '\u1ED7': 'o',
+ '\u1ED5': 'o',
+ '\u00F5': 'o',
+ '\u1E4D': 'o',
+ '\u022D': 'o',
+ '\u1E4F': 'o',
+ '\u014D': 'o',
+ '\u1E51': 'o',
+ '\u1E53': 'o',
+ '\u014F': 'o',
+ '\u022F': 'o',
+ '\u0231': 'o',
+ '\u00F6': 'o',
+ '\u022B': 'o',
+ '\u1ECF': 'o',
+ '\u0151': 'o',
+ '\u01D2': 'o',
+ '\u020D': 'o',
+ '\u020F': 'o',
+ '\u01A1': 'o',
+ '\u1EDD': 'o',
+ '\u1EDB': 'o',
+ '\u1EE1': 'o',
+ '\u1EDF': 'o',
+ '\u1EE3': 'o',
+ '\u1ECD': 'o',
+ '\u1ED9': 'o',
+ '\u01EB': 'o',
+ '\u01ED': 'o',
+ '\u00F8': 'o',
+ '\u01FF': 'o',
+ '\u0254': 'o',
+ '\uA74B': 'o',
+ '\uA74D': 'o',
+ '\u0275': 'o',
+ '\u01A3': 'oi',
+ '\u0223': 'ou',
+ '\uA74F': 'oo',
+ '\u24DF': 'p',
+ '\uFF50': 'p',
+ '\u1E55': 'p',
+ '\u1E57': 'p',
+ '\u01A5': 'p',
+ '\u1D7D': 'p',
+ '\uA751': 'p',
+ '\uA753': 'p',
+ '\uA755': 'p',
+ '\u24E0': 'q',
+ '\uFF51': 'q',
+ '\u024B': 'q',
+ '\uA757': 'q',
+ '\uA759': 'q',
+ '\u24E1': 'r',
+ '\uFF52': 'r',
+ '\u0155': 'r',
+ '\u1E59': 'r',
+ '\u0159': 'r',
+ '\u0211': 'r',
+ '\u0213': 'r',
+ '\u1E5B': 'r',
+ '\u1E5D': 'r',
+ '\u0157': 'r',
+ '\u1E5F': 'r',
+ '\u024D': 'r',
+ '\u027D': 'r',
+ '\uA75B': 'r',
+ '\uA7A7': 'r',
+ '\uA783': 'r',
+ '\u24E2': 's',
+ '\uFF53': 's',
+ '\u00DF': 's',
+ '\u015B': 's',
+ '\u1E65': 's',
+ '\u015D': 's',
+ '\u1E61': 's',
+ '\u0161': 's',
+ '\u1E67': 's',
+ '\u1E63': 's',
+ '\u1E69': 's',
+ '\u0219': 's',
+ '\u015F': 's',
+ '\u023F': 's',
+ '\uA7A9': 's',
+ '\uA785': 's',
+ '\u1E9B': 's',
+ '\u24E3': 't',
+ '\uFF54': 't',
+ '\u1E6B': 't',
+ '\u1E97': 't',
+ '\u0165': 't',
+ '\u1E6D': 't',
+ '\u021B': 't',
+ '\u0163': 't',
+ '\u1E71': 't',
+ '\u1E6F': 't',
+ '\u0167': 't',
+ '\u01AD': 't',
+ '\u0288': 't',
+ '\u2C66': 't',
+ '\uA787': 't',
+ '\uA729': 'tz',
+ '\u24E4': 'u',
+ '\uFF55': 'u',
+ '\u00F9': 'u',
+ '\u00FA': 'u',
+ '\u00FB': 'u',
+ '\u0169': 'u',
+ '\u1E79': 'u',
+ '\u016B': 'u',
+ '\u1E7B': 'u',
+ '\u016D': 'u',
+ '\u00FC': 'u',
+ '\u01DC': 'u',
+ '\u01D8': 'u',
+ '\u01D6': 'u',
+ '\u01DA': 'u',
+ '\u1EE7': 'u',
+ '\u016F': 'u',
+ '\u0171': 'u',
+ '\u01D4': 'u',
+ '\u0215': 'u',
+ '\u0217': 'u',
+ '\u01B0': 'u',
+ '\u1EEB': 'u',
+ '\u1EE9': 'u',
+ '\u1EEF': 'u',
+ '\u1EED': 'u',
+ '\u1EF1': 'u',
+ '\u1EE5': 'u',
+ '\u1E73': 'u',
+ '\u0173': 'u',
+ '\u1E77': 'u',
+ '\u1E75': 'u',
+ '\u0289': 'u',
+ '\u24E5': 'v',
+ '\uFF56': 'v',
+ '\u1E7D': 'v',
+ '\u1E7F': 'v',
+ '\u028B': 'v',
+ '\uA75F': 'v',
+ '\u028C': 'v',
+ '\uA761': 'vy',
+ '\u24E6': 'w',
+ '\uFF57': 'w',
+ '\u1E81': 'w',
+ '\u1E83': 'w',
+ '\u0175': 'w',
+ '\u1E87': 'w',
+ '\u1E85': 'w',
+ '\u1E98': 'w',
+ '\u1E89': 'w',
+ '\u2C73': 'w',
+ '\u24E7': 'x',
+ '\uFF58': 'x',
+ '\u1E8B': 'x',
+ '\u1E8D': 'x',
+ '\u24E8': 'y',
+ '\uFF59': 'y',
+ '\u1EF3': 'y',
+ '\u00FD': 'y',
+ '\u0177': 'y',
+ '\u1EF9': 'y',
+ '\u0233': 'y',
+ '\u1E8F': 'y',
+ '\u00FF': 'y',
+ '\u1EF7': 'y',
+ '\u1E99': 'y',
+ '\u1EF5': 'y',
+ '\u01B4': 'y',
+ '\u024F': 'y',
+ '\u1EFF': 'y',
+ '\u24E9': 'z',
+ '\uFF5A': 'z',
+ '\u017A': 'z',
+ '\u1E91': 'z',
+ '\u017C': 'z',
+ '\u017E': 'z',
+ '\u1E93': 'z',
+ '\u1E95': 'z',
+ '\u01B6': 'z',
+ '\u0225': 'z',
+ '\u0240': 'z',
+ '\u2C6C': 'z',
+ '\uA763': 'z',
+ '\u0386': '\u0391',
+ '\u0388': '\u0395',
+ '\u0389': '\u0397',
+ '\u038A': '\u0399',
+ '\u03AA': '\u0399',
+ '\u038C': '\u039F',
+ '\u038E': '\u03A5',
+ '\u03AB': '\u03A5',
+ '\u038F': '\u03A9',
+ '\u03AC': '\u03B1',
+ '\u03AD': '\u03B5',
+ '\u03AE': '\u03B7',
+ '\u03AF': '\u03B9',
+ '\u03CA': '\u03B9',
+ '\u0390': '\u03B9',
+ '\u03CC': '\u03BF',
+ '\u03CD': '\u03C5',
+ '\u03CB': '\u03C5',
+ '\u03B0': '\u03C5',
+ '\u03C9': '\u03C9',
+ '\u03C2': '\u03C3'
+ };
+
+ return diacritics;
+});
+
+S2.define('select2/data/base',[
+ '../utils'
+], function (Utils) {
+ function BaseAdapter ($element, options) {
+ BaseAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseAdapter, Utils.Observable);
+
+ BaseAdapter.prototype.current = function (callback) {
+ throw new Error('The `current` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.query = function (params, callback) {
+ throw new Error('The `query` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.bind = function (container, $container) {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.destroy = function () {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.generateResultId = function (container, data) {
+ var id = '';
+
+ if (container != null) {
+ id += container.id
+ } else {
+ id += Utils.generateChars(4);
+ }
+
+ id += '-result-';
+ id += Utils.generateChars(4);
+
+ if (data.id != null) {
+ id += '-' + data.id.toString();
+ } else {
+ id += '-' + Utils.generateChars(4);
+ }
+ return id;
+ };
+
+ return BaseAdapter;
+});
+
+S2.define('select2/data/select',[
+ './base',
+ '../utils',
+ 'jquery'
+], function (BaseAdapter, Utils, $) {
+ function SelectAdapter ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ SelectAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(SelectAdapter, BaseAdapter);
+
+ SelectAdapter.prototype.current = function (callback) {
+ var data = [];
+ var self = this;
+
+ this.$element.find(':selected').each(function () {
+ var $option = $(this);
+
+ var option = self.item($option);
+
+ data.push(option);
+ });
+
+ callback(data);
+ };
+
+ SelectAdapter.prototype.select = function (data) {
+ var self = this;
+
+ data.selected = true;
+
+ // If data.element is a DOM node, use it instead
+ if ($(data.element).is('option')) {
+ data.element.selected = true;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ if (this.$element.prop('multiple')) {
+ this.current(function (currentData) {
+ var val = [];
+
+ data = [data];
+ data.push.apply(data, currentData);
+
+ for (var d = 0; d < data.length; d++) {
+ var id = data[d].id;
+
+ if ($.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+ self.$element.trigger('change');
+ });
+ } else {
+ var val = data.id;
+
+ this.$element.val(val);
+ this.$element.trigger('change');
+ }
+ };
+
+ SelectAdapter.prototype.unselect = function (data) {
+ var self = this;
+
+ if (!this.$element.prop('multiple')) {
+ return;
+ }
+
+ data.selected = false;
+
+ if ($(data.element).is('option')) {
+ data.element.selected = false;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ this.current(function (currentData) {
+ var val = [];
+
+ for (var d = 0; d < currentData.length; d++) {
+ var id = currentData[d].id;
+
+ if (id !== data.id && $.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+
+ self.$element.trigger('change');
+ });
+ };
+
+ SelectAdapter.prototype.bind = function (container, $container) {
+ var self = this;
+
+ this.container = container;
+
+ container.on('select', function (params) {
+ self.select(params.data);
+ });
+
+ container.on('unselect', function (params) {
+ self.unselect(params.data);
+ });
+ };
+
+ SelectAdapter.prototype.destroy = function () {
+ // Remove anything added to child elements
+ this.$element.find('*').each(function () {
+ // Remove any custom data set by Select2
+ $.removeData(this, 'data');
+ });
+ };
+
+ SelectAdapter.prototype.query = function (params, callback) {
+ var data = [];
+ var self = this;
+
+ var $options = this.$element.children();
+
+ $options.each(function () {
+ var $option = $(this);
+
+ if (!$option.is('option') && !$option.is('optgroup')) {
+ return;
+ }
+
+ var option = self.item($option);
+
+ var matches = self.matches(params, option);
+
+ if (matches !== null) {
+ data.push(matches);
+ }
+ });
+
+ callback({
+ results: data
+ });
+ };
+
+ SelectAdapter.prototype.addOptions = function ($options) {
+ Utils.appendMany(this.$element, $options);
+ };
+
+ SelectAdapter.prototype.option = function (data) {
+ var option;
+
+ if (data.children) {
+ option = document.createElement('optgroup');
+ option.label = data.text;
+ } else {
+ option = document.createElement('option');
+
+ if (option.textContent !== undefined) {
+ option.textContent = data.text;
+ } else {
+ option.innerText = data.text;
+ }
+ }
+
+ if (data.id !== undefined) {
+ option.value = data.id;
+ }
+
+ if (data.disabled) {
+ option.disabled = true;
+ }
+
+ if (data.selected) {
+ option.selected = true;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ var $option = $(option);
+
+ var normalizedData = this._normalizeItem(data);
+ normalizedData.element = option;
+
+ // Override the option's data with the combined data
+ $.data(option, 'data', normalizedData);
+
+ return $option;
+ };
+
+ SelectAdapter.prototype.item = function ($option) {
+ var data = {};
+
+ data = $.data($option[0], 'data');
+
+ if (data != null) {
+ return data;
+ }
+
+ if ($option.is('option')) {
+ data = {
+ id: $option.val(),
+ text: $option.text(),
+ disabled: $option.prop('disabled'),
+ selected: $option.prop('selected'),
+ title: $option.prop('title')
+ };
+ } else if ($option.is('optgroup')) {
+ data = {
+ text: $option.prop('label'),
+ children: [],
+ title: $option.prop('title')
+ };
+
+ var $children = $option.children('option');
+ var children = [];
+
+ for (var c = 0; c < $children.length; c++) {
+ var $child = $($children[c]);
+
+ var child = this.item($child);
+
+ children.push(child);
+ }
+
+ data.children = children;
+ }
+
+ data = this._normalizeItem(data);
+ data.element = $option[0];
+
+ $.data($option[0], 'data', data);
+
+ return data;
+ };
+
+ SelectAdapter.prototype._normalizeItem = function (item) {
+ if (!$.isPlainObject(item)) {
+ item = {
+ id: item,
+ text: item
+ };
+ }
+
+ item = $.extend({}, {
+ text: ''
+ }, item);
+
+ var defaults = {
+ selected: false,
+ disabled: false
+ };
+
+ if (item.id != null) {
+ item.id = item.id.toString();
+ }
+
+ if (item.text != null) {
+ item.text = item.text.toString();
+ }
+
+ if (item._resultId == null && item.id) {
+ item._resultId = this.generateResultId(this.container, item);
+ }
+
+ return $.extend({}, defaults, item);
+ };
+
+ SelectAdapter.prototype.matches = function (params, data) {
+ var matcher = this.options.get('matcher');
+
+ return matcher(params, data);
+ };
+
+ return SelectAdapter;
+});
+
+S2.define('select2/data/array',[
+ './select',
+ '../utils',
+ 'jquery'
+], function (SelectAdapter, Utils, $) {
+ function ArrayAdapter ($element, options) {
+ var data = options.get('data') || [];
+
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
+
+ this.addOptions(this.convertToOptions(data));
+ }
+
+ Utils.Extend(ArrayAdapter, SelectAdapter);
+
+ ArrayAdapter.prototype.select = function (data) {
+ var $option = this.$element.find('option').filter(function (i, elm) {
+ return elm.value == data.id.toString();
+ });
+
+ if ($option.length === 0) {
+ $option = this.option(data);
+
+ this.addOptions($option);
+ }
+
+ ArrayAdapter.__super__.select.call(this, data);
+ };
+
+ ArrayAdapter.prototype.convertToOptions = function (data) {
+ var self = this;
+
+ var $existing = this.$element.find('option');
+ var existingIds = $existing.map(function () {
+ return self.item($(this)).id;
+ }).get();
+
+ var $options = [];
+
+ // Filter out all items except for the one passed in the argument
+ function onlyItem (item) {
+ return function () {
+ return $(this).val() == item.id;
+ };
+ }
+
+ for (var d = 0; d < data.length; d++) {
+ var item = this._normalizeItem(data[d]);
+
+ // Skip items which were pre-loaded, only merge the data
+ if ($.inArray(item.id, existingIds) >= 0) {
+ var $existingOption = $existing.filter(onlyItem(item));
+
+ var existingData = this.item($existingOption);
+ var newData = $.extend(true, {}, item, existingData);
+
+ var $newOption = this.option(newData);
+
+ $existingOption.replaceWith($newOption);
+
+ continue;
+ }
+
+ var $option = this.option(item);
+
+ if (item.children) {
+ var $children = this.convertToOptions(item.children);
+
+ Utils.appendMany($option, $children);
+ }
+
+ $options.push($option);
+ }
+
+ return $options;
+ };
+
+ return ArrayAdapter;
+});
+
+S2.define('select2/data/ajax',[
+ './array',
+ '../utils',
+ 'jquery'
+], function (ArrayAdapter, Utils, $) {
+ function AjaxAdapter ($element, options) {
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
+
+ if (this.ajaxOptions.processResults != null) {
+ this.processResults = this.ajaxOptions.processResults;
+ }
+
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
+ }
+
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
+
+ AjaxAdapter.prototype._applyDefaults = function (options) {
+ var defaults = {
+ data: function (params) {
+ return $.extend({}, params, {
+ q: params.term
+ });
+ },
+ transport: function (params, success, failure) {
+ var $request = $.ajax(params);
+
+ $request.then(success);
+ $request.fail(failure);
+
+ return $request;
+ }
+ };
+
+ return $.extend({}, defaults, options, true);
+ };
+
+ AjaxAdapter.prototype.processResults = function (results) {
+ return results;
+ };
+
+ AjaxAdapter.prototype.query = function (params, callback) {
+ var matches = [];
+ var self = this;
+
+ if (this._request != null) {
+ // JSONP requests cannot always be aborted
+ if ($.isFunction(this._request.abort)) {
+ this._request.abort();
+ }
+
+ this._request = null;
+ }
+
+ var options = $.extend({
+ type: 'GET'
+ }, this.ajaxOptions);
+
+ if (typeof options.url === 'function') {
+ options.url = options.url.call(this.$element, params);
+ }
+
+ if (typeof options.data === 'function') {
+ options.data = options.data.call(this.$element, params);
+ }
+
+ function request () {
+ var $request = options.transport(options, function (data) {
+ var results = self.processResults(data, params);
+
+ if (self.options.get('debug') && window.console && console.error) {
+ // Check to make sure that the response included a `results` key.
+ if (!results || !results.results || !$.isArray(results.results)) {
+ console.error(
+ 'Select2: The AJAX results did not return an array in the ' +
+ '`results` key of the response.'
+ );
+ }
+ }
+
+ callback(results);
+ self.container.focusOnActiveElement();
+ }, function () {
+ // Attempt to detect if a request was aborted
+ // Only works if the transport exposes a status property
+ if ($request.status && $request.status === '0') {
+ return;
+ }
+
+ self.trigger('results:message', {
+ message: 'errorLoading'
+ });
+ });
+
+ self._request = $request;
+ }
+
+ if (this.ajaxOptions.delay && params.term != null) {
+ if (this._queryTimeout) {
+ window.clearTimeout(this._queryTimeout);
+ }
+
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
+ } else {
+ request();
+ }
+ };
+
+ return AjaxAdapter;
+});
+
+S2.define('select2/data/tags',[
+ 'jquery'
+], function ($) {
+ function Tags (decorated, $element, options) {
+ var tags = options.get('tags');
+
+ var createTag = options.get('createTag');
+
+ if (createTag !== undefined) {
+ this.createTag = createTag;
+ }
+
+ var insertTag = options.get('insertTag');
+
+ if (insertTag !== undefined) {
+ this.insertTag = insertTag;
+ }
+
+ decorated.call(this, $element, options);
+
+ if ($.isArray(tags)) {
+ for (var t = 0; t < tags.length; t++) {
+ var tag = tags[t];
+ var item = this._normalizeItem(tag);
+
+ var $option = this.option(item);
+
+ this.$element.append($option);
+ }
+ }
+ }
+
+ Tags.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ this._removeOldTags();
+
+ if (params.term == null || params.page != null) {
+ decorated.call(this, params, callback);
+ return;
+ }
+
+ function wrapper (obj, child) {
+ var data = obj.results;
+
+ for (var i = 0; i < data.length; i++) {
+ var option = data[i];
+
+ var checkChildren = (
+ option.children != null &&
+ !wrapper({
+ results: option.children
+ }, true)
+ );
+
+ var optionText = (option.text || '').toUpperCase();
+ var paramsTerm = (params.term || '').toUpperCase();
+
+ var checkText = optionText === paramsTerm;
+
+ if (checkText || checkChildren) {
+ if (child) {
+ return false;
+ }
+
+ obj.data = data;
+ callback(obj);
+
+ return;
+ }
+ }
+
+ if (child) {
+ return true;
+ }
+
+ var tag = self.createTag(params);
+
+ if (tag != null) {
+ var $option = self.option(tag);
+ $option.attr('data-select2-tag', true);
+
+ self.addOptions([$option]);
+
+ self.insertTag(data, tag);
+ }
+
+ obj.results = data;
+
+ callback(obj);
+ }
+
+ decorated.call(this, params, wrapper);
+ };
+
+ Tags.prototype.createTag = function (decorated, params) {
+ var term = $.trim(params.term);
+
+ if (term === '') {
+ return null;
+ }
+
+ return {
+ id: term,
+ text: term
+ };
+ };
+
+ Tags.prototype.insertTag = function (_, data, tag) {
+ data.unshift(tag);
+ };
+
+ Tags.prototype._removeOldTags = function (_) {
+ var tag = this._lastTag;
+
+ var $options = this.$element.find('option[data-select2-tag]');
+
+ $options.each(function () {
+ if (this.selected) {
+ return;
+ }
+
+ $(this).remove();
+ });
+ };
+
+ return Tags;
+});
+
+S2.define('select2/data/tokenizer',[
+ 'jquery'
+], function ($) {
+ function Tokenizer (decorated, $element, options) {
+ var tokenizer = options.get('tokenizer');
+
+ if (tokenizer !== undefined) {
+ this.tokenizer = tokenizer;
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ this.$search = container.dropdown.$search || container.selection.$search ||
+ $container.find('.select2-search__field');
+ };
+
+ Tokenizer.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ function createAndSelect (data) {
+ // Normalize the data object so we can use it for checks
+ var item = self._normalizeItem(data);
+
+ // Check if the data object already exists as a tag
+ // Select it if it doesn't
+ var $existingOptions = self.$element.find('option').filter(function () {
+ return $(this).val() === item.id;
+ });
+
+ // If an existing option wasn't found for it, create the option
+ if (!$existingOptions.length) {
+ var $option = self.option(item);
+ $option.attr('data-select2-tag', true);
+
+ self._removeOldTags();
+ self.addOptions([$option]);
+ }
+
+ // Select the item, now that we know there is an option for it
+ select(item);
+ }
+
+ function select (data) {
+ self.trigger('select', {
+ data: data
+ });
+ }
+
+ params.term = params.term || '';
+
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
+
+ if (tokenData.term !== params.term) {
+ // Replace the search term if we have the search box
+ if (this.$search.length) {
+ this.$search.val(tokenData.term);
+ this.$search.focus();
+ }
+
+ params.term = tokenData.term;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
+ var separators = options.get('tokenSeparators') || [];
+ var term = params.term;
+ var i = 0;
+
+ var createTag = this.createTag || function (params) {
+ return {
+ id: params.term,
+ text: params.term
+ };
+ };
+
+ while (i < term.length) {
+ var termChar = term[i];
+
+ if ($.inArray(termChar, separators) === -1) {
+ i++;
+
+ continue;
+ }
+
+ var part = term.substr(0, i);
+ var partParams = $.extend({}, params, {
+ term: part
+ });
+
+ var data = createTag(partParams);
+
+ if (data == null) {
+ i++;
+ continue;
+ }
+
+ callback(data);
+
+ // Reset the term to not include the tokenized portion
+ term = term.substr(i + 1) || '';
+ i = 0;
+ }
+
+ return {
+ term: term
+ };
+ };
+
+ return Tokenizer;
+});
+
+S2.define('select2/data/minimumInputLength',[
+
+], function () {
+ function MinimumInputLength (decorated, $e, options) {
+ this.minimumInputLength = options.get('minimumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (params.term.length < this.minimumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooShort',
+ args: {
+ minimum: this.minimumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MinimumInputLength;
+});
+
+S2.define('select2/data/maximumInputLength',[
+
+], function () {
+ function MaximumInputLength (decorated, $e, options) {
+ this.maximumInputLength = options.get('maximumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (this.maximumInputLength > 0 &&
+ params.term.length > this.maximumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooLong',
+ args: {
+ maximum: this.maximumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MaximumInputLength;
+});
+
+S2.define('select2/data/maximumSelectionLength',[
+
+], function (){
+ function MaximumSelectionLength (decorated, $e, options) {
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumSelectionLength.prototype.query =
+ function (decorated, params, callback) {
+ var self = this;
+
+ this.current(function (currentData) {
+ var count = currentData != null ? currentData.length : 0;
+ if (self.maximumSelectionLength > 0 &&
+ count >= self.maximumSelectionLength) {
+ self.trigger('results:message', {
+ message: 'maximumSelected',
+ args: {
+ maximum: self.maximumSelectionLength
+ }
+ });
+ return;
+ }
+ decorated.call(self, params, callback);
+ });
+ };
+
+ return MaximumSelectionLength;
+});
+
+S2.define('select2/dropdown',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Dropdown ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ Dropdown.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Dropdown, Utils.Observable);
+
+ Dropdown.prototype.render = function () {
+ var $dropdown = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ $dropdown.attr('dir', this.options.get('dir'));
+
+ this.$dropdown = $dropdown;
+
+ return $dropdown;
+ };
+
+ Dropdown.prototype.bind = function () {
+ // Should be implemented in subclasses
+ };
+
+ Dropdown.prototype.position = function ($dropdown, $container) {
+ // Should be implmented in subclasses
+ };
+
+ Dropdown.prototype.destroy = function () {
+ // Remove the dropdown from the DOM
+ this.$dropdown.remove();
+ };
+
+ return Dropdown;
+});
+
+S2.define('select2/dropdown/search',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function Search () { }
+
+ Search.prototype.render = function (decorated) {
+ var $rendered = decorated.call(this);
+
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ $rendered.prepend($search);
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ this.$search.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+ });
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$search.on('input', function (evt) {
+ // Unbind the duplicated `keyup` event
+ $(this).off('keyup');
+ });
+
+ this.$search.on('keyup input', function (evt) {
+ self.handleSearch(evt);
+ });
+
+ container.on('open', function () {
+ self.$search.attr('tabindex', 0);
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.focus();
+
+ window.setTimeout(function () {
+ self.$search.focus();
+ }, 0);
+ });
+
+ container.on('close', function () {
+ self.$search.attr('tabindex', -1);
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.val('');
+ });
+
+ container.on('focus', function () {
+ if (container.isOpen()) {
+ self.$search.focus();
+ }
+ });
+
+ container.on('results:all', function (params) {
+ if (params.query.term == null || params.query.term === '') {
+ var showSearch = self.showSearch(params);
+
+ if (showSearch) {
+ self.$searchContainer.removeClass('select2-search--hide');
+ } else {
+ self.$searchContainer.addClass('select2-search--hide');
+ }
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+ };
+
+ Search.prototype.handleSearch = function (evt) {
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.showSearch = function (_, params) {
+ return true;
+ };
+
+ return Search;
+});
+
+S2.define('select2/dropdown/hidePlaceholder',[
+
+], function () {
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ HidePlaceholder.prototype.append = function (decorated, data) {
+ data.results = this.removePlaceholder(data.results);
+
+ decorated.call(this, data);
+ };
+
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
+ var modifiedData = data.slice(0);
+
+ for (var d = data.length - 1; d >= 0; d--) {
+ var item = data[d];
+
+ if (this.placeholder.id === item.id) {
+ modifiedData.splice(d, 1);
+ }
+ }
+
+ return modifiedData;
+ };
+
+ return HidePlaceholder;
+});
+
+S2.define('select2/dropdown/infiniteScroll',[
+ 'jquery'
+], function ($) {
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
+ this.lastParams = {};
+
+ decorated.call(this, $element, options, dataAdapter);
+
+ this.$loadingMore = this.createLoadingMore();
+ this.loading = false;
+ }
+
+ InfiniteScroll.prototype.append = function (decorated, data) {
+ this.$loadingMore.remove();
+ this.loading = false;
+
+ decorated.call(this, data);
+
+ if (this.showLoadingMore(data)) {
+ this.$results.append(this.$loadingMore);
+ }
+ };
+
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('query', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ container.on('query:append', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ this.$results.on('scroll', function () {
+ var isLoadMoreVisible = $.contains(
+ document.documentElement,
+ self.$loadingMore[0]
+ );
+
+ if (self.loading || !isLoadMoreVisible) {
+ return;
+ }
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var loadingMoreOffset = self.$loadingMore.offset().top +
+ self.$loadingMore.outerHeight(false);
+
+ if (currentOffset + 50 >= loadingMoreOffset) {
+ self.loadMore();
+ }
+ });
+ };
+
+ InfiniteScroll.prototype.loadMore = function () {
+ this.loading = true;
+
+ var params = $.extend({}, {page: 1}, this.lastParams);
+
+ params.page++;
+
+ this.trigger('query:append', params);
+ };
+
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
+ return data.pagination && data.pagination.more;
+ };
+
+ InfiniteScroll.prototype.createLoadingMore = function () {
+ var $option = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get('loadingMore');
+
+ $option.html(message(this.lastParams));
+
+ return $option;
+ };
+
+ return InfiniteScroll;
+});
+
+S2.define('select2/dropdown/attachBody',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function AttachBody (decorated, $element, options) {
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
+
+ decorated.call(this, $element, options);
+ }
+
+ AttachBody.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ var setupResultsEvents = false;
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self._showDropdown();
+ self._attachPositioningHandler(container);
+
+ if (!setupResultsEvents) {
+ setupResultsEvents = true;
+
+ container.on('results:all', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+
+ container.on('results:append', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ }
+ });
+
+ container.on('close', function () {
+ self._hideDropdown();
+ self._detachPositioningHandler(container);
+ });
+
+ this.$dropdownContainer.on('mousedown', function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ AttachBody.prototype.destroy = function (decorated) {
+ decorated.call(this);
+
+ this.$dropdownContainer.remove();
+ };
+
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
+ // Clone all of the container classes
+ $dropdown.attr('class', $container.attr('class'));
+
+ $dropdown.removeClass('select2');
+ $dropdown.addClass('select2-container--open');
+
+ $dropdown.css({
+ position: 'absolute',
+ top: -999999
+ });
+
+ this.$container = $container;
+ };
+
+ AttachBody.prototype.render = function (decorated) {
+ var $container = $(' ');
+
+ var $dropdown = decorated.call(this);
+ $container.append($dropdown);
+
+ this.$dropdownContainer = $container;
+
+ return $container;
+ };
+
+ AttachBody.prototype._hideDropdown = function (decorated) {
+ this.$dropdownContainer.detach();
+ };
+
+ AttachBody.prototype._attachPositioningHandler =
+ function (decorated, container) {
+ var self = this;
+
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.each(function () {
+ $(this).data('select2-scroll-position', {
+ x: $(this).scrollLeft(),
+ y: $(this).scrollTop()
+ });
+ });
+
+ $watchers.on(scrollEvent, function (ev) {
+ var position = $(this).data('select2-scroll-position');
+ $(this).scrollTop(position.y);
+ });
+
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
+ function (e) {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ };
+
+ AttachBody.prototype._detachPositioningHandler =
+ function (decorated, container) {
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.off(scrollEvent);
+
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
+ };
+
+ AttachBody.prototype._positionDropdown = function () {
+ var $window = $(window);
+
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
+
+ var newDirection = null;
+
+ var offset = this.$container.offset();
+
+ offset.bottom = offset.top + this.$container.outerHeight(false);
+
+ var container = {
+ height: this.$container.outerHeight(false)
+ };
+
+ container.top = offset.top;
+ container.bottom = offset.top + container.height;
+
+ var dropdown = {
+ height: this.$dropdown.outerHeight(false)
+ };
+
+ var viewport = {
+ top: $window.scrollTop(),
+ bottom: $window.scrollTop() + $window.height()
+ };
+
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
+
+ var css = {
+ left: offset.left,
+ top: container.bottom
+ };
+
+ // Determine what the parent element is to use for calciulating the offset
+ var $offsetParent = this.$dropdownParent;
+
+ // For statically positoned elements, we need to get the element
+ // that is determining the offset
+ if ($offsetParent.css('position') === 'static') {
+ $offsetParent = $offsetParent.offsetParent();
+ }
+
+ var parentOffset = $offsetParent.offset();
+
+ css.top -= parentOffset.top;
+ css.left -= parentOffset.left;
+
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
+ newDirection = 'below';
+ }
+
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
+ newDirection = 'above';
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
+ newDirection = 'below';
+ }
+
+ if (newDirection == 'above' ||
+ (isCurrentlyAbove && newDirection !== 'below')) {
+ css.top = container.top - parentOffset.top - dropdown.height;
+ }
+
+ if (newDirection != null) {
+ this.$dropdown
+ .removeClass('select2-dropdown--below select2-dropdown--above')
+ .addClass('select2-dropdown--' + newDirection);
+ this.$container
+ .removeClass('select2-container--below select2-container--above')
+ .addClass('select2-container--' + newDirection);
+ }
+
+ this.$dropdownContainer.css(css);
+ };
+
+ AttachBody.prototype._resizeDropdown = function () {
+ var css = {
+ width: this.$container.outerWidth(false) + 'px'
+ };
+
+ if (this.options.get('dropdownAutoWidth')) {
+ css.minWidth = css.width;
+ css.position = 'relative';
+ css.width = 'auto';
+ }
+
+ this.$dropdown.css(css);
+ };
+
+ AttachBody.prototype._showDropdown = function (decorated) {
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
+
+ this._positionDropdown();
+ this._resizeDropdown();
+ };
+
+ return AttachBody;
+});
+
+S2.define('select2/dropdown/minimumResultsForSearch',[
+
+], function () {
+ function countResults (data) {
+ var count = 0;
+
+ for (var d = 0; d < data.length; d++) {
+ var item = data[d];
+
+ if (item.children) {
+ count += countResults(item.children);
+ } else {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
+
+ if (this.minimumResultsForSearch < 0) {
+ this.minimumResultsForSearch = Infinity;
+ }
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
+ return false;
+ }
+
+ return decorated.call(this, params);
+ };
+
+ return MinimumResultsForSearch;
+});
+
+S2.define('select2/dropdown/selectOnClose',[
+
+], function () {
+ function SelectOnClose () { }
+
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('close', function (params) {
+ self._handleSelectOnClose(params);
+ });
+ };
+
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
+ if (params && params.originalSelect2Event != null) {
+ var event = params.originalSelect2Event;
+
+ // Don't select an item if the close event was triggered from a select or
+ // unselect event
+ if (event._type === 'select' || event._type === 'unselect') {
+ return;
+ }
+ }
+
+ var $highlightedResults = this.getHighlightedResults();
+
+ // Only select highlighted results
+ if ($highlightedResults.length < 1) {
+ return;
+ }
+
+ var data = $highlightedResults.data('data');
+
+ // Don't re-select already selected resulte
+ if (
+ (data.element != null && data.element.selected) ||
+ (data.element == null && data.selected)
+ ) {
+ return;
+ }
+
+ this.trigger('select', {
+ data: data
+ });
+ };
+
+ return SelectOnClose;
+});
+
+S2.define('select2/dropdown/closeOnSelect',[
+
+], function () {
+ function CloseOnSelect () { }
+
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('select', function (evt) {
+ self._selectTriggered(evt);
+ });
+
+ container.on('unselect', function (evt) {
+ self._selectTriggered(evt);
+ });
+ };
+
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
+ var originalEvent = evt.originalEvent;
+
+ // Don't close if the control key is being held
+ if (originalEvent && originalEvent.ctrlKey) {
+ return;
+ }
+
+ this.trigger('close', {
+ originalEvent: originalEvent,
+ originalSelect2Event: evt
+ });
+ };
+
+ return CloseOnSelect;
+});
+
+S2.define('select2/i18n/en',[],function () {
+ // English
+ return {
+ errorLoading: function () {
+ return 'The results could not be loaded.';
+ },
+ inputTooLong: function (args) {
+ var overChars = args.input.length - args.maximum;
+
+ var message = 'Please delete ' + overChars + ' character';
+
+ if (overChars != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ inputTooShort: function (args) {
+ var remainingChars = args.minimum - args.input.length;
+
+ var message = 'Please enter ' + remainingChars + ' or more characters';
+
+ return message;
+ },
+ loadingMore: function () {
+ return 'Loading more results…';
+ },
+ maximumSelected: function (args) {
+ var message = 'You can only select ' + args.maximum + ' item';
+
+ if (args.maximum != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ noResults: function () {
+ return 'No results found';
+ },
+ searching: function () {
+ return 'Searching…';
+ }
+ };
+});
+
+S2.define('select2/defaults',[
+ 'jquery',
+ 'require',
+
+ './results',
+
+ './selection/single',
+ './selection/multiple',
+ './selection/placeholder',
+ './selection/allowClear',
+ './selection/search',
+ './selection/eventRelay',
+
+ './utils',
+ './translation',
+ './diacritics',
+
+ './data/select',
+ './data/array',
+ './data/ajax',
+ './data/tags',
+ './data/tokenizer',
+ './data/minimumInputLength',
+ './data/maximumInputLength',
+ './data/maximumSelectionLength',
+
+ './dropdown',
+ './dropdown/search',
+ './dropdown/hidePlaceholder',
+ './dropdown/infiniteScroll',
+ './dropdown/attachBody',
+ './dropdown/minimumResultsForSearch',
+ './dropdown/selectOnClose',
+ './dropdown/closeOnSelect',
+
+ './i18n/en'
+], function ($, require,
+
+ ResultsList,
+
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
+ SelectionSearch, EventRelay,
+
+ Utils, Translation, DIACRITICS,
+
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
+
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
+
+ EnglishTranslation) {
+ function Defaults () {
+ this.reset();
+ }
+
+ Defaults.prototype.apply = function (options) {
+ options = $.extend(true, {}, this.defaults, options);
+
+ if (options.dataAdapter == null) {
+ if (options.ajax != null) {
+ options.dataAdapter = AjaxData;
+ } else if (options.data != null) {
+ options.dataAdapter = ArrayData;
+ } else {
+ options.dataAdapter = SelectData;
+ }
+
+ if (options.minimumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MinimumInputLength
+ );
+ }
+
+ if (options.maximumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumInputLength
+ );
+ }
+
+ if (options.maximumSelectionLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumSelectionLength
+ );
+ }
+
+ if (options.tags) {
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
+ }
+
+ if (options.tokenSeparators != null || options.tokenizer != null) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Tokenizer
+ );
+ }
+
+ if (options.query != null) {
+ var Query = require(options.amdBase + 'compat/query');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Query
+ );
+ }
+
+ if (options.initSelection != null) {
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ InitSelection
+ );
+ }
+ }
+
+ if (options.resultsAdapter == null) {
+ options.resultsAdapter = ResultsList;
+
+ if (options.ajax != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ InfiniteScroll
+ );
+ }
+
+ if (options.placeholder != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ HidePlaceholder
+ );
+ }
+
+ if (options.selectOnClose) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ SelectOnClose
+ );
+ }
+ }
+
+ if (options.dropdownAdapter == null) {
+ if (options.multiple) {
+ options.dropdownAdapter = Dropdown;
+ } else {
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
+
+ options.dropdownAdapter = SearchableDropdown;
+ }
+
+ if (options.minimumResultsForSearch !== 0) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ MinimumResultsForSearch
+ );
+ }
+
+ if (options.closeOnSelect) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ CloseOnSelect
+ );
+ }
+
+ if (
+ options.dropdownCssClass != null ||
+ options.dropdownCss != null ||
+ options.adaptDropdownCssClass != null
+ ) {
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ DropdownCSS
+ );
+ }
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ AttachBody
+ );
+ }
+
+ if (options.selectionAdapter == null) {
+ if (options.multiple) {
+ options.selectionAdapter = MultipleSelection;
+ } else {
+ options.selectionAdapter = SingleSelection;
+ }
+
+ // Add the placeholder mixin if a placeholder was specified
+ if (options.placeholder != null) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ Placeholder
+ );
+ }
+
+ if (options.allowClear) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ AllowClear
+ );
+ }
+
+ if (options.multiple) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ SelectionSearch
+ );
+ }
+
+ if (
+ options.containerCssClass != null ||
+ options.containerCss != null ||
+ options.adaptContainerCssClass != null
+ ) {
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ ContainerCSS
+ );
+ }
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ EventRelay
+ );
+ }
+
+ if (typeof options.language === 'string') {
+ // Check if the language is specified with a region
+ if (options.language.indexOf('-') > 0) {
+ // Extract the region information if it is included
+ var languageParts = options.language.split('-');
+ var baseLanguage = languageParts[0];
+
+ options.language = [options.language, baseLanguage];
+ } else {
+ options.language = [options.language];
+ }
+ }
+
+ if ($.isArray(options.language)) {
+ var languages = new Translation();
+ options.language.push('en');
+
+ var languageNames = options.language;
+
+ for (var l = 0; l < languageNames.length; l++) {
+ var name = languageNames[l];
+ var language = {};
+
+ try {
+ // Try to load it with the original name
+ language = Translation.loadPath(name);
+ } catch (e) {
+ try {
+ // If we couldn't load it, check if it wasn't the full path
+ name = this.defaults.amdLanguageBase + name;
+ language = Translation.loadPath(name);
+ } catch (ex) {
+ // The translation could not be loaded at all. Sometimes this is
+ // because of a configuration problem, other times this can be
+ // because of how Select2 helps load all possible translation files.
+ if (options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The language file for "' + name + '" could not be ' +
+ 'automatically loaded. A fallback will be used instead.'
+ );
+ }
+
+ continue;
+ }
+ }
+
+ languages.extend(language);
+ }
+
+ options.translations = languages;
+ } else {
+ var baseTranslation = Translation.loadPath(
+ this.defaults.amdLanguageBase + 'en'
+ );
+ var customTranslation = new Translation(options.language);
+
+ customTranslation.extend(baseTranslation);
+
+ options.translations = customTranslation;
+ }
+
+ return options;
+ };
+
+ Defaults.prototype.reset = function () {
+ function stripDiacritics (text) {
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
+ function match(a) {
+ return DIACRITICS[a] || a;
+ }
+
+ return text.replace(/[^\u0000-\u007E]/g, match);
+ }
+
+ function matcher (params, data) {
+ // Always return the object if there is nothing to compare
+ if ($.trim(params.term) === '') {
+ return data;
+ }
+
+ // Do a recursive check for options with children
+ if (data.children && data.children.length > 0) {
+ // Clone the data object if there are children
+ // This is required as we modify the object to remove any non-matches
+ var match = $.extend(true, {}, data);
+
+ // Check each child of the option
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ var matches = matcher(params, child);
+
+ // If there wasn't a match, remove the object in the array
+ if (matches == null) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ // If any children matched, return the new object
+ if (match.children.length > 0) {
+ return match;
+ }
+
+ // If there were no matching children, check just the plain object
+ return matcher(params, match);
+ }
+
+ var original = stripDiacritics(data.text).toUpperCase();
+ var term = stripDiacritics(params.term).toUpperCase();
+
+ // Check if the text contains the term
+ if (original.indexOf(term) > -1) {
+ return data;
+ }
+
+ // If it doesn't contain the term, don't return anything
+ return null;
+ }
+
+ this.defaults = {
+ amdBase: './',
+ amdLanguageBase: './i18n/',
+ closeOnSelect: true,
+ debug: false,
+ dropdownAutoWidth: false,
+ escapeMarkup: Utils.escapeMarkup,
+ language: EnglishTranslation,
+ matcher: matcher,
+ minimumInputLength: 0,
+ maximumInputLength: 0,
+ maximumSelectionLength: 0,
+ minimumResultsForSearch: 0,
+ selectOnClose: false,
+ sorter: function (data) {
+ return data;
+ },
+ templateResult: function (result) {
+ return result.text;
+ },
+ templateSelection: function (selection) {
+ return selection.text;
+ },
+ theme: 'default',
+ width: 'resolve'
+ };
+ };
+
+ Defaults.prototype.set = function (key, value) {
+ var camelKey = $.camelCase(key);
+
+ var data = {};
+ data[camelKey] = value;
+
+ var convertedData = Utils._convertData(data);
+
+ $.extend(this.defaults, convertedData);
+ };
+
+ var defaults = new Defaults();
+
+ return defaults;
+});
+
+S2.define('select2/options',[
+ 'require',
+ 'jquery',
+ './defaults',
+ './utils'
+], function (require, $, Defaults, Utils) {
+ function Options (options, $element) {
+ this.options = options;
+
+ if ($element != null) {
+ this.fromElement($element);
+ }
+
+ this.options = Defaults.apply(this.options);
+
+ if ($element && $element.is('input')) {
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
+
+ this.options.dataAdapter = Utils.Decorate(
+ this.options.dataAdapter,
+ InputCompat
+ );
+ }
+ }
+
+ Options.prototype.fromElement = function ($e) {
+ var excludedData = ['select2'];
+
+ if (this.options.multiple == null) {
+ this.options.multiple = $e.prop('multiple');
+ }
+
+ if (this.options.disabled == null) {
+ this.options.disabled = $e.prop('disabled');
+ }
+
+ if (this.options.language == null) {
+ if ($e.prop('lang')) {
+ this.options.language = $e.prop('lang').toLowerCase();
+ } else if ($e.closest('[lang]').prop('lang')) {
+ this.options.language = $e.closest('[lang]').prop('lang');
+ }
+ }
+
+ if (this.options.dir == null) {
+ if ($e.prop('dir')) {
+ this.options.dir = $e.prop('dir');
+ } else if ($e.closest('[dir]').prop('dir')) {
+ this.options.dir = $e.closest('[dir]').prop('dir');
+ } else {
+ this.options.dir = 'ltr';
+ }
+ }
+
+ $e.prop('disabled', this.options.disabled);
+ $e.prop('multiple', this.options.multiple);
+
+ if ($e.data('select2Tags')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
+ 'removed in future versions of Select2.'
+ );
+ }
+
+ $e.data('data', $e.data('select2Tags'));
+ $e.data('tags', true);
+ }
+
+ if ($e.data('ajaxUrl')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
+ '`data-ajax--url` and support for the old attribute will be removed' +
+ ' in future versions of Select2.'
+ );
+ }
+
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
+ $e.data('ajax--url', $e.data('ajaxUrl'));
+ }
+
+ var dataset = {};
+
+ // Prefer the element's `dataset` attribute if it exists
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
+ } else {
+ dataset = $e.data();
+ }
+
+ var data = $.extend(true, {}, dataset);
+
+ data = Utils._convertData(data);
+
+ for (var key in data) {
+ if ($.inArray(key, excludedData) > -1) {
+ continue;
+ }
+
+ if ($.isPlainObject(this.options[key])) {
+ $.extend(this.options[key], data[key]);
+ } else {
+ this.options[key] = data[key];
+ }
+ }
+
+ return this;
+ };
+
+ Options.prototype.get = function (key) {
+ return this.options[key];
+ };
+
+ Options.prototype.set = function (key, val) {
+ this.options[key] = val;
+ };
+
+ return Options;
+});
+
+S2.define('select2/core',[
+ 'jquery',
+ './options',
+ './utils',
+ './keys'
+], function ($, Options, Utils, KEYS) {
+ var Select2 = function ($element, options) {
+ if ($element.data('select2') != null) {
+ $element.data('select2').destroy();
+ }
+
+ this.$element = $element;
+
+ this.id = this._generateId($element);
+
+ options = options || {};
+
+ this.options = new Options(options, $element);
+
+ Select2.__super__.constructor.call(this);
+
+ // Set up the tabindex
+
+ var tabindex = $element.attr('tabindex') || 0;
+ $element.data('old-tabindex', tabindex);
+ $element.attr('tabindex', '-1');
+
+ // Set up containers and adapters
+
+ var DataAdapter = this.options.get('dataAdapter');
+ this.dataAdapter = new DataAdapter($element, this.options);
+
+ var $container = this.render();
+
+ this._placeContainer($container);
+
+ var SelectionAdapter = this.options.get('selectionAdapter');
+ this.selection = new SelectionAdapter($element, this.options);
+ this.$selection = this.selection.render();
+
+ this.selection.position(this.$selection, $container);
+
+ var DropdownAdapter = this.options.get('dropdownAdapter');
+ this.dropdown = new DropdownAdapter($element, this.options);
+ this.$dropdown = this.dropdown.render();
+
+ this.dropdown.position(this.$dropdown, $container);
+
+ var ResultsAdapter = this.options.get('resultsAdapter');
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
+ this.$results = this.results.render();
+
+ this.results.position(this.$results, this.$dropdown);
+
+ // Bind events
+
+ var self = this;
+
+ // Bind the container to all of the adapters
+ this._bindAdapters();
+
+ // Register any DOM event handlers
+ this._registerDomEvents();
+
+ // Register any internal event handlers
+ this._registerDataEvents();
+ this._registerSelectionEvents();
+ this._registerDropdownEvents();
+ this._registerResultsEvents();
+ this._registerEvents();
+
+ // Set the initial state
+ this.dataAdapter.current(function (initialData) {
+ self.trigger('selection:update', {
+ data: initialData
+ });
+ });
+
+ // Hide the original select
+ $element.addClass('select2-hidden-accessible');
+ $element.attr('aria-hidden', 'true');
+
+ // Synchronize any monitored attributes
+ this._syncAttributes();
+
+ $element.data('select2', this);
+ };
+
+ Utils.Extend(Select2, Utils.Observable);
+
+ Select2.prototype._generateId = function ($element) {
+ var id = '';
+
+ if ($element.attr('id') != null) {
+ id = $element.attr('id');
+ } else if ($element.attr('name') != null) {
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
+ } else {
+ id = Utils.generateChars(4);
+ }
+
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
+ id = 'select2-' + id;
+
+ return id;
+ };
+
+ Select2.prototype._placeContainer = function ($container) {
+ $container.insertAfter(this.$element);
+
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
+
+ if (width != null) {
+ $container.css('width', width);
+ }
+ };
+
+ Select2.prototype._resolveWidth = function ($element, method) {
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
+
+ if (method == 'resolve') {
+ var styleWidth = this._resolveWidth($element, 'style');
+
+ if (styleWidth != null) {
+ return styleWidth;
+ }
+
+ return this._resolveWidth($element, 'element');
+ }
+
+ if (method == 'element') {
+ var elementWidth = $element.outerWidth(false);
+
+ if (elementWidth <= 0) {
+ return 'auto';
+ }
+
+ return elementWidth + 'px';
+ }
+
+ if (method == 'style') {
+ var style = $element.attr('style');
+
+ if (typeof(style) !== 'string') {
+ return null;
+ }
+
+ var attrs = style.split(';');
+
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
+ var attr = attrs[i].replace(/\s/g, '');
+ var matches = attr.match(WIDTH);
+
+ if (matches !== null && matches.length >= 1) {
+ return matches[1];
+ }
+ }
+
+ return null;
+ }
+
+ return method;
+ };
+
+ Select2.prototype._bindAdapters = function () {
+ this.dataAdapter.bind(this, this.$container);
+ this.selection.bind(this, this.$container);
+
+ this.dropdown.bind(this, this.$container);
+ this.results.bind(this, this.$container);
+ };
+
+ Select2.prototype._registerDomEvents = function () {
+ var self = this;
+
+ this.$element.on('change.select2', function () {
+ self.dataAdapter.current(function (data) {
+ self.trigger('selection:update', {
+ data: data
+ });
+ });
+ });
+
+ this.$element.on('focus.select2', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this._syncA = Utils.bind(this._syncAttributes, this);
+ this._syncS = Utils.bind(this._syncSubtree, this);
+
+ if (this.$element[0].attachEvent) {
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
+ }
+
+ var observer = window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver
+ ;
+
+ if (observer != null) {
+ this._observer = new observer(function (mutations) {
+ $.each(mutations, self._syncA);
+ $.each(mutations, self._syncS);
+ });
+ this._observer.observe(this.$element[0], {
+ attributes: true,
+ childList: true,
+ subtree: false
+ });
+ } else if (this.$element[0].addEventListener) {
+ this.$element[0].addEventListener(
+ 'DOMAttrModified',
+ self._syncA,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeInserted',
+ self._syncS,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeRemoved',
+ self._syncS,
+ false
+ );
+ }
+ };
+
+ Select2.prototype._registerDataEvents = function () {
+ var self = this;
+
+ this.dataAdapter.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerSelectionEvents = function () {
+ var self = this;
+ var nonRelayEvents = ['toggle', 'focus'];
+
+ this.selection.on('toggle', function () {
+ self.toggleDropdown();
+ });
+
+ this.selection.on('focus', function (params) {
+ self.focus(params);
+ });
+
+ this.selection.on('*', function (name, params) {
+ if ($.inArray(name, nonRelayEvents) !== -1) {
+ return;
+ }
+
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerDropdownEvents = function () {
+ var self = this;
+
+ this.dropdown.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerResultsEvents = function () {
+ var self = this;
+
+ this.results.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerEvents = function () {
+ var self = this;
+
+ this.on('open', function () {
+ self.$container.addClass('select2-container--open');
+ });
+
+ this.on('close', function () {
+ self.$container.removeClass('select2-container--open');
+ });
+
+ this.on('enable', function () {
+ self.$container.removeClass('select2-container--disabled');
+ });
+
+ this.on('disable', function () {
+ self.$container.addClass('select2-container--disabled');
+ });
+
+ this.on('blur', function () {
+ self.$container.removeClass('select2-container--focus');
+ });
+
+ this.on('query', function (params) {
+ if (!self.isOpen()) {
+ self.trigger('open', {});
+ }
+
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:all', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('query:append', function (params) {
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:append', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('open', function(){
+ // Focus on the active element when opening dropdown.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1);
+ });
+
+ $(document).on('keydown', function (evt) {
+ var key = evt.which;
+ if (self.isOpen()) {
+ if (key === KEYS.ESC || key === KEYS.TAB ||
+ (key === KEYS.UP && evt.altKey)) {
+ self.close();
+
+ evt.preventDefault();
+ } else if (key === KEYS.ENTER) {
+ self.trigger('results:select', {});
+
+ evt.preventDefault();
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
+ self.trigger('results:toggle', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.UP) {
+ self.trigger('results:previous', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.DOWN) {
+ self.trigger('results:next', {});
+
+ evt.preventDefault();
+ }
+
+ // Move the focus to the selected element on keyboard navigation.
+ // Required for screen readers to work properly.
+ if (key === KEYS.DOWN || key === KEYS.UP) {
+ self.focusOnActiveElement();
+ } else {
+ // Focus on the search if user starts typing.
+ var $searchField = self.$dropdown.find('.select2-search__field');
+ if (! $searchField.length) {
+ $searchField = self.$container.find('.select2-search__field');
+ }
+ $searchField.focus();
+ // Focus back to active selection when finished typing.
+ // Small delay so typed character can be read by screen reader.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1000);
+ }
+
+ } else if (self.hasFocus()) {
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
+ (key === KEYS.DOWN && evt.altKey)) {
+ self.open();
+ evt.preventDefault();
+ }
+ }
+ });
+ };
+
+ Select2.prototype.focusOnActiveElement = function () {
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
+ if (! Utils.isTouchscreen()) {
+ this.$results.find('li.select2-results__option--highlighted').focus();
+ }
+ };
+
+ Select2.prototype._syncAttributes = function () {
+ this.options.set('disabled', this.$element.prop('disabled'));
+
+ if (this.options.get('disabled')) {
+ if (this.isOpen()) {
+ this.close();
+ }
+
+ this.trigger('disable', {});
+ } else {
+ this.trigger('enable', {});
+ }
+ };
+
+ Select2.prototype._syncSubtree = function (evt, mutations) {
+ var changed = false;
+ var self = this;
+
+ // Ignore any mutation events raised for elements that aren't options or
+ // optgroups. This handles the case when the select element is destroyed
+ if (
+ evt && evt.target && (
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
+ )
+ ) {
+ return;
+ }
+
+ if (!mutations) {
+ // If mutation events aren't supported, then we can only assume that the
+ // change affected the selections
+ changed = true;
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
+ var node = mutations.addedNodes[n];
+
+ if (node.selected) {
+ changed = true;
+ }
+ }
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
+ changed = true;
+ }
+
+ // Only re-pull the data if we think there is a change
+ if (changed) {
+ this.dataAdapter.current(function (currentData) {
+ self.trigger('selection:update', {
+ data: currentData
+ });
+ });
+ }
+ };
+
+ /**
+ * Override the trigger method to automatically trigger pre-events when
+ * there are events that can be prevented.
+ */
+ Select2.prototype.trigger = function (name, args) {
+ var actualTrigger = Select2.__super__.trigger;
+ var preTriggerMap = {
+ 'open': 'opening',
+ 'close': 'closing',
+ 'select': 'selecting',
+ 'unselect': 'unselecting'
+ };
+
+ if (args === undefined) {
+ args = {};
+ }
+
+ if (name in preTriggerMap) {
+ var preTriggerName = preTriggerMap[name];
+ var preTriggerArgs = {
+ prevented: false,
+ name: name,
+ args: args
+ };
+
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
+
+ if (preTriggerArgs.prevented) {
+ args.prevented = true;
+
+ return;
+ }
+ }
+
+ actualTrigger.call(this, name, args);
+ };
+
+ Select2.prototype.toggleDropdown = function () {
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ if (this.isOpen()) {
+ this.close();
+ } else {
+ this.open();
+ }
+ };
+
+ Select2.prototype.open = function () {
+ if (this.isOpen()) {
+ return;
+ }
+
+ this.trigger('query', {});
+ };
+
+ Select2.prototype.close = function () {
+ if (!this.isOpen()) {
+ return;
+ }
+
+ this.trigger('close', {});
+ };
+
+ Select2.prototype.isOpen = function () {
+ return this.$container.hasClass('select2-container--open');
+ };
+
+ Select2.prototype.hasFocus = function () {
+ return this.$container.hasClass('select2-container--focus');
+ };
+
+ Select2.prototype.focus = function (data) {
+ // No need to re-trigger focus events if we are already focused
+ if (this.hasFocus()) {
+ return;
+ }
+
+ this.$container.addClass('select2-container--focus');
+ this.trigger('focus', {});
+ };
+
+ Select2.prototype.enable = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
+ ' instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ args = [true];
+ }
+
+ var disabled = !args[0];
+
+ this.$element.prop('disabled', disabled);
+ };
+
+ Select2.prototype.data = function () {
+ if (this.options.get('debug') &&
+ arguments.length > 0 && window.console && console.warn) {
+ console.warn(
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
+ 'should consider setting the value instead using `$element.val()`.'
+ );
+ }
+
+ var data = [];
+
+ this.dataAdapter.current(function (currentData) {
+ data = currentData;
+ });
+
+ return data;
+ };
+
+ Select2.prototype.val = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
+ ' removed in later Select2 versions. Use $element.val() instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ return this.$element.val();
+ }
+
+ var newVal = args[0];
+
+ if ($.isArray(newVal)) {
+ newVal = $.map(newVal, function (obj) {
+ return obj.toString();
+ });
+ }
+
+ this.$element.val(newVal).trigger('change');
+ };
+
+ Select2.prototype.destroy = function () {
+ this.$container.remove();
+
+ if (this.$element[0].detachEvent) {
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
+ }
+
+ if (this._observer != null) {
+ this._observer.disconnect();
+ this._observer = null;
+ } else if (this.$element[0].removeEventListener) {
+ this.$element[0]
+ .removeEventListener('DOMAttrModified', this._syncA, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
+ }
+
+ this._syncA = null;
+ this._syncS = null;
+
+ this.$element.off('.select2');
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
+
+ this.$element.removeClass('select2-hidden-accessible');
+ this.$element.attr('aria-hidden', 'false');
+ this.$element.removeData('select2');
+
+ this.dataAdapter.destroy();
+ this.selection.destroy();
+ this.dropdown.destroy();
+ this.results.destroy();
+
+ this.dataAdapter = null;
+ this.selection = null;
+ this.dropdown = null;
+ this.results = null;
+ };
+
+ Select2.prototype.render = function () {
+ var $container = $(
+ '' +
+ ' ' +
+ ' ' +
+ ' '
+ );
+
+ $container.attr('dir', this.options.get('dir'));
+
+ this.$container = $container;
+
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
+
+ $container.data('element', this.$element);
+
+ return $container;
+ };
+
+ return Select2;
+});
+
+S2.define('jquery-mousewheel',[
+ 'jquery'
+], function ($) {
+ // Used to shim jQuery.mousewheel for non-full builds.
+ return $;
+});
+
+S2.define('jquery.select2',[
+ 'jquery',
+ 'jquery-mousewheel',
+
+ './select2/core',
+ './select2/defaults'
+], function ($, _, Select2, Defaults) {
+ if ($.fn.selectWoo == null) {
+ // All methods that should return the element
+ var thisMethods = ['open', 'close', 'destroy'];
+
+ $.fn.selectWoo = function (options) {
+ options = options || {};
+
+ if (typeof options === 'object') {
+ this.each(function () {
+ var instanceOptions = $.extend(true, {}, options);
+
+ var instance = new Select2($(this), instanceOptions);
+ });
+
+ return this;
+ } else if (typeof options === 'string') {
+ var ret;
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var instance = $(this).data('select2');
+
+ if (instance == null && window.console && console.error) {
+ console.error(
+ 'The select2(\'' + options + '\') method was called on an ' +
+ 'element that is not using Select2.'
+ );
+ }
+
+ ret = instance[options].apply(instance, args);
+ });
+
+ // Check if we should be returning `this`
+ if ($.inArray(options, thisMethods) > -1) {
+ return this;
+ }
+
+ return ret;
+ } else {
+ throw new Error('Invalid arguments for Select2: ' + options);
+ }
+ };
+ }
+
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
+ }
+
+ if ($.fn.selectWoo.defaults == null) {
+ $.fn.selectWoo.defaults = Defaults;
+ }
+
+ // Also register selectWoo under select2 if select2 is not already present.
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
+
+ return Select2;
+});
+
+ // Return the AMD loader configuration so it can be used outside of this file
+ return {
+ define: S2.define,
+ require: S2.require
+ };
+}());
+
+ // Autoload the jQuery bindings
+ // We know that all of the modules exist above this, so we're safe
+ var select2 = S2.require('jquery.select2');
+
+ // Hold the AMD module references on the jQuery function that was just loaded
+ // This allows Select2 to use the internal loader outside of this file, such
+ // as in the language files.
+ jQuery.fn.select2.amd = S2;
+ jQuery.fn.selectWoo.amd = S2;
+
+ // Return the Select2 instance for anyone who is importing it.
+ return select2;
+}));
diff --git a/functions/kirki/assets/vendor/selectWoo/js/select2.min.js b/functions/kirki/assets/vendor/selectWoo/js/select2.min.js
new file mode 100644
index 0000000..bf9600c
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/select2.min.js
@@ -0,0 +1 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a(' '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[data-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("data-selected","true"):b.attr("data-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a(' ');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.options.get("minimumResultsForSearch");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),window.setTimeout(function(){d.$selection.focus()},1),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(' '),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a(" ")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html(''),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('× ')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('× ');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a(' ');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f),e.container.focusOnActiveElement()},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a(' ');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a(' '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(" "),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null!=a.fn.select2&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.js b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.js
new file mode 100644
index 0000000..d973690
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.js
@@ -0,0 +1,6553 @@
+/*!
+ * SelectWoo 1.0.1
+ * https://github.com/woocommerce/selectWoo
+ *
+ * Released under the MIT license
+ * https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = function (root, jQuery) {
+ if (jQuery === undefined) {
+ // require('jQuery') returns a factory that requires window to
+ // build a jQuery instance, we normalize how we use modules
+ // that require this pattern but the window provided is a noop
+ // if it's defined (how jquery works)
+ if (typeof window !== 'undefined') {
+ jQuery = require('jquery');
+ }
+ else {
+ jQuery = require('jquery')(root);
+ }
+ }
+ factory(jQuery);
+ return jQuery;
+ };
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+} (function (jQuery) {
+ // This is needed so we can catch the AMD loader configuration and use it
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
+ // returns the AMD loader references.
+ var S2 =(function () {
+ // Restore the Select2 AMD loader so it can be used
+ // Needed mostly in the language files, where the loader is not inserted
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
+ var S2 = jQuery.fn.select2.amd;
+ }
+var S2;(function () { if (!S2 || !S2.requirejs) {
+if (!S2) { S2 = {}; } else { require = S2; }
+/**
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
+ */
+//Going sloppy to avoid 'use strict' string cost, but strict practices should
+//be followed.
+/*global setTimeout: false */
+
+var requirejs, require, define;
+(function (undef) {
+ var main, req, makeMap, handlers,
+ defined = {},
+ waiting = {},
+ config = {},
+ defining = {},
+ hasOwn = Object.prototype.hasOwnProperty,
+ aps = [].slice,
+ jsSuffixRegExp = /\.js$/;
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName) {
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
+ baseParts = baseName && baseName.split("/"),
+ map = config.map,
+ starMap = (map && map['*']) || {};
+
+ //Adjust any relative paths.
+ if (name) {
+ name = name.split('/');
+ lastIndex = name.length - 1;
+
+ // If wanting node ID compatibility, strip .js from end
+ // of IDs. Have to do this here, and not in nameToUrl
+ // because node allows either .js or non .js to map
+ // to same file.
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
+ }
+
+ // Starts with a '.' so need the baseName
+ if (name[0].charAt(0) === '.' && baseParts) {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ name = normalizedBaseParts.concat(name);
+ }
+
+ //start trimDots
+ for (i = 0; i < name.length; i++) {
+ part = name[i];
+ if (part === '.') {
+ name.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ // If at the start, or previous value is still ..,
+ // keep them so that when converted to a path it may
+ // still work when converted to a path, even though
+ // as an ID it is less than ideal. In larger point
+ // releases, may be better to just kick out an error.
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
+ continue;
+ } else if (i > 0) {
+ name.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ //end trimDots
+
+ name = name.join('/');
+ }
+
+ //Apply map config if available.
+ if ((baseParts || starMap) && map) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join("/");
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = map[baseParts.slice(0, j).join('/')];
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = mapValue[nameSegment];
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
+ foundStarMap = starMap[nameSegment];
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function makeRequire(relName, forceSync) {
+ return function () {
+ //A version of a require function that passes a moduleName
+ //value for items that may need to
+ //look up paths relative to the moduleName
+ var args = aps.call(arguments, 0);
+
+ //If first arg is not require('string'), and there is only
+ //one arg, it is the array form without a callback. Insert
+ //a null so that the following concat is correct.
+ if (typeof args[0] !== 'string' && args.length === 1) {
+ args.push(null);
+ }
+ return req.apply(undef, args.concat([relName, forceSync]));
+ };
+ }
+
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(depName) {
+ return function (value) {
+ defined[depName] = value;
+ };
+ }
+
+ function callDep(name) {
+ if (hasProp(waiting, name)) {
+ var args = waiting[name];
+ delete waiting[name];
+ defining[name] = true;
+ main.apply(undef, args);
+ }
+
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
+ throw new Error('No ' + name);
+ }
+ return defined[name];
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ //Creates a parts array for a relName where first part is plugin ID,
+ //second part is resource ID. Assumes relName has already been normalized.
+ function makeRelParts(relName) {
+ return relName ? splitPrefix(relName) : [];
+ }
+
+ /**
+ * Makes a name map, normalizing the name, and using a plugin
+ * for normalization if necessary. Grabs a ref to plugin
+ * too, as an optimization.
+ */
+ makeMap = function (name, relParts) {
+ var plugin,
+ parts = splitPrefix(name),
+ prefix = parts[0],
+ relResourceName = relParts[1];
+
+ name = parts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, relResourceName);
+ plugin = callDep(prefix);
+ }
+
+ //Normalize according
+ if (prefix) {
+ if (plugin && plugin.normalize) {
+ name = plugin.normalize(name, makeNormalize(relResourceName));
+ } else {
+ name = normalize(name, relResourceName);
+ }
+ } else {
+ name = normalize(name, relResourceName);
+ parts = splitPrefix(name);
+ prefix = parts[0];
+ name = parts[1];
+ if (prefix) {
+ plugin = callDep(prefix);
+ }
+ }
+
+ //Using ridiculous property names for space reasons
+ return {
+ f: prefix ? prefix + '!' + name : name, //fullName
+ n: name,
+ pr: prefix,
+ p: plugin
+ };
+ };
+
+ function makeConfig(name) {
+ return function () {
+ return (config && config.config && config.config[name]) || {};
+ };
+ }
+
+ handlers = {
+ require: function (name) {
+ return makeRequire(name);
+ },
+ exports: function (name) {
+ var e = defined[name];
+ if (typeof e !== 'undefined') {
+ return e;
+ } else {
+ return (defined[name] = {});
+ }
+ },
+ module: function (name) {
+ return {
+ id: name,
+ uri: '',
+ exports: defined[name],
+ config: makeConfig(name)
+ };
+ }
+ };
+
+ main = function (name, deps, callback, relName) {
+ var cjsModule, depName, ret, map, i, relParts,
+ args = [],
+ callbackType = typeof callback,
+ usingExports;
+
+ //Use name if no relName
+ relName = relName || name;
+ relParts = makeRelParts(relName);
+
+ //Call the callback to define the module, if necessary.
+ if (callbackType === 'undefined' || callbackType === 'function') {
+ //Pull out the defined dependencies and pass the ordered
+ //values to the callback.
+ //Default to [require, exports, module] if no deps
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
+ for (i = 0; i < deps.length; i += 1) {
+ map = makeMap(deps[i], relParts);
+ depName = map.f;
+
+ //Fast path CommonJS standard dependencies.
+ if (depName === "require") {
+ args[i] = handlers.require(name);
+ } else if (depName === "exports") {
+ //CommonJS module spec 1.1
+ args[i] = handlers.exports(name);
+ usingExports = true;
+ } else if (depName === "module") {
+ //CommonJS module spec 1.1
+ cjsModule = args[i] = handlers.module(name);
+ } else if (hasProp(defined, depName) ||
+ hasProp(waiting, depName) ||
+ hasProp(defining, depName)) {
+ args[i] = callDep(depName);
+ } else if (map.p) {
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
+ args[i] = defined[depName];
+ } else {
+ throw new Error(name + ' missing ' + depName);
+ }
+ }
+
+ ret = callback ? callback.apply(defined[name], args) : undefined;
+
+ if (name) {
+ //If setting exports via "module" is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ if (cjsModule && cjsModule.exports !== undef &&
+ cjsModule.exports !== defined[name]) {
+ defined[name] = cjsModule.exports;
+ } else if (ret !== undef || !usingExports) {
+ //Use the return value from the function.
+ defined[name] = ret;
+ }
+ }
+ } else if (name) {
+ //May just be an object definition for the module. Only
+ //worry about defining if have a module name.
+ defined[name] = callback;
+ }
+ };
+
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
+ if (typeof deps === "string") {
+ if (handlers[deps]) {
+ //callback in this case is really relName
+ return handlers[deps](callback);
+ }
+ //Just return the module wanted. In this scenario, the
+ //deps arg is the module name, and second arg (if passed)
+ //is just the relName.
+ //Normalize module name, if it contains . or ..
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
+ } else if (!deps.splice) {
+ //deps is a config object, not an array.
+ config = deps;
+ if (config.deps) {
+ req(config.deps, config.callback);
+ }
+ if (!callback) {
+ return;
+ }
+
+ if (callback.splice) {
+ //callback is an array, which means it is a dependency list.
+ //Adjust args if there are dependencies
+ deps = callback;
+ callback = relName;
+ relName = null;
+ } else {
+ deps = undef;
+ }
+ }
+
+ //Support require(['a'])
+ callback = callback || function () {};
+
+ //If relName is a function, it is an errback handler,
+ //so remove it.
+ if (typeof relName === 'function') {
+ relName = forceSync;
+ forceSync = alt;
+ }
+
+ //Simulate async callback;
+ if (forceSync) {
+ main(undef, deps, callback, relName);
+ } else {
+ //Using a non-zero value because of concern for what old browsers
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
+ //If want a value immediately, use require('id') instead -- something
+ //that works in almond on the global level, but not guaranteed and
+ //unlikely to work in other AMD implementations.
+ setTimeout(function () {
+ main(undef, deps, callback, relName);
+ }, 4);
+ }
+
+ return req;
+ };
+
+ /**
+ * Just drops the config on the floor, but returns req in case
+ * the config return value is used.
+ */
+ req.config = function (cfg) {
+ return req(cfg);
+ };
+
+ /**
+ * Expose module registry for debugging and tooling
+ */
+ requirejs._defined = defined;
+
+ define = function (name, deps, callback) {
+ if (typeof name !== 'string') {
+ throw new Error('See almond README: incorrect module build, no module name');
+ }
+
+ //This module may not have dependencies
+ if (!deps.splice) {
+ //deps is not an array, so probably means
+ //an object literal or factory function for
+ //the value. Adjust args.
+ callback = deps;
+ deps = [];
+ }
+
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
+ waiting[name] = [name, deps, callback];
+ }
+ };
+
+ define.amd = {
+ jQuery: true
+ };
+}());
+
+S2.requirejs = requirejs;S2.require = require;S2.define = define;
+}
+}());
+S2.define("almond", function(){});
+
+/* global jQuery:false, $:false */
+S2.define('jquery',[],function () {
+ var _$ = jQuery || $;
+
+ if (_$ == null && console && console.error) {
+ console.error(
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
+ 'web page.'
+ );
+ }
+
+ return _$;
+});
+
+S2.define('select2/utils',[
+ 'jquery'
+], function ($) {
+ var Utils = {};
+
+ Utils.Extend = function (ChildClass, SuperClass) {
+ var __hasProp = {}.hasOwnProperty;
+
+ function BaseConstructor () {
+ this.constructor = ChildClass;
+ }
+
+ for (var key in SuperClass) {
+ if (__hasProp.call(SuperClass, key)) {
+ ChildClass[key] = SuperClass[key];
+ }
+ }
+
+ BaseConstructor.prototype = SuperClass.prototype;
+ ChildClass.prototype = new BaseConstructor();
+ ChildClass.__super__ = SuperClass.prototype;
+
+ return ChildClass;
+ };
+
+ function getMethods (theClass) {
+ var proto = theClass.prototype;
+
+ var methods = [];
+
+ for (var methodName in proto) {
+ var m = proto[methodName];
+
+ if (typeof m !== 'function') {
+ continue;
+ }
+
+ if (methodName === 'constructor') {
+ continue;
+ }
+
+ methods.push(methodName);
+ }
+
+ return methods;
+ }
+
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
+ var decoratedMethods = getMethods(DecoratorClass);
+ var superMethods = getMethods(SuperClass);
+
+ function DecoratedClass () {
+ var unshift = Array.prototype.unshift;
+
+ var argCount = DecoratorClass.prototype.constructor.length;
+
+ var calledConstructor = SuperClass.prototype.constructor;
+
+ if (argCount > 0) {
+ unshift.call(arguments, SuperClass.prototype.constructor);
+
+ calledConstructor = DecoratorClass.prototype.constructor;
+ }
+
+ calledConstructor.apply(this, arguments);
+ }
+
+ DecoratorClass.displayName = SuperClass.displayName;
+
+ function ctr () {
+ this.constructor = DecoratedClass;
+ }
+
+ DecoratedClass.prototype = new ctr();
+
+ for (var m = 0; m < superMethods.length; m++) {
+ var superMethod = superMethods[m];
+
+ DecoratedClass.prototype[superMethod] =
+ SuperClass.prototype[superMethod];
+ }
+
+ var calledMethod = function (methodName) {
+ // Stub out the original method if it's not decorating an actual method
+ var originalMethod = function () {};
+
+ if (methodName in DecoratedClass.prototype) {
+ originalMethod = DecoratedClass.prototype[methodName];
+ }
+
+ var decoratedMethod = DecoratorClass.prototype[methodName];
+
+ return function () {
+ var unshift = Array.prototype.unshift;
+
+ unshift.call(arguments, originalMethod);
+
+ return decoratedMethod.apply(this, arguments);
+ };
+ };
+
+ for (var d = 0; d < decoratedMethods.length; d++) {
+ var decoratedMethod = decoratedMethods[d];
+
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
+ }
+
+ return DecoratedClass;
+ };
+
+ var Observable = function () {
+ this.listeners = {};
+ };
+
+ Observable.prototype.on = function (event, callback) {
+ this.listeners = this.listeners || {};
+
+ if (event in this.listeners) {
+ this.listeners[event].push(callback);
+ } else {
+ this.listeners[event] = [callback];
+ }
+ };
+
+ Observable.prototype.trigger = function (event) {
+ var slice = Array.prototype.slice;
+ var params = slice.call(arguments, 1);
+
+ this.listeners = this.listeners || {};
+
+ // Params should always come in as an array
+ if (params == null) {
+ params = [];
+ }
+
+ // If there are no arguments to the event, use a temporary object
+ if (params.length === 0) {
+ params.push({});
+ }
+
+ // Set the `_type` of the first object to the event
+ params[0]._type = event;
+
+ if (event in this.listeners) {
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
+ }
+
+ if ('*' in this.listeners) {
+ this.invoke(this.listeners['*'], arguments);
+ }
+ };
+
+ Observable.prototype.invoke = function (listeners, params) {
+ for (var i = 0, len = listeners.length; i < len; i++) {
+ listeners[i].apply(this, params);
+ }
+ };
+
+ Utils.Observable = Observable;
+
+ Utils.generateChars = function (length) {
+ var chars = '';
+
+ for (var i = 0; i < length; i++) {
+ var randomChar = Math.floor(Math.random() * 36);
+ chars += randomChar.toString(36);
+ }
+
+ return chars;
+ };
+
+ Utils.bind = function (func, context) {
+ return function () {
+ func.apply(context, arguments);
+ };
+ };
+
+ Utils._convertData = function (data) {
+ for (var originalKey in data) {
+ var keys = originalKey.split('-');
+
+ var dataLevel = data;
+
+ if (keys.length === 1) {
+ continue;
+ }
+
+ for (var k = 0; k < keys.length; k++) {
+ var key = keys[k];
+
+ // Lowercase the first letter
+ // By default, dash-separated becomes camelCase
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
+
+ if (!(key in dataLevel)) {
+ dataLevel[key] = {};
+ }
+
+ if (k == keys.length - 1) {
+ dataLevel[key] = data[originalKey];
+ }
+
+ dataLevel = dataLevel[key];
+ }
+
+ delete data[originalKey];
+ }
+
+ return data;
+ };
+
+ Utils.hasScroll = function (index, el) {
+ // Adapted from the function created by @ShadowScripter
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
+ // The original code can be found at
+ // http://codereview.stackexchange.com/q/13338
+ // and was designed to be used with the Sizzle selector engine.
+
+ var $el = $(el);
+ var overflowX = el.style.overflowX;
+ var overflowY = el.style.overflowY;
+
+ //Check both x and y declarations
+ if (overflowX === overflowY &&
+ (overflowY === 'hidden' || overflowY === 'visible')) {
+ return false;
+ }
+
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
+ return true;
+ }
+
+ return ($el.innerHeight() < el.scrollHeight ||
+ $el.innerWidth() < el.scrollWidth);
+ };
+
+ Utils.escapeMarkup = function (markup) {
+ var replaceMap = {
+ '\\': '\',
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '\'': ''',
+ '/': '/'
+ };
+
+ // Do not try to escape the markup if it's not a string
+ if (typeof markup !== 'string') {
+ return markup;
+ }
+
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
+ return replaceMap[match];
+ });
+ };
+
+ // Append an array of jQuery nodes to a given element.
+ Utils.appendMany = function ($element, $nodes) {
+ // jQuery 1.7.x does not support $.fn.append() with an array
+ // Fall back to a jQuery object collection using $.fn.add()
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
+ var $jqNodes = $();
+
+ $.map($nodes, function (node) {
+ $jqNodes = $jqNodes.add(node);
+ });
+
+ $nodes = $jqNodes;
+ }
+
+ $element.append($nodes);
+ };
+
+ // Determine whether the browser is on a touchscreen device.
+ Utils.isTouchscreen = function() {
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
+ }
+ return Utils._isTouchscreenCache;
+ }
+
+ return Utils;
+});
+
+S2.define('select2/results',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Results ($element, options, dataAdapter) {
+ this.$element = $element;
+ this.data = dataAdapter;
+ this.options = options;
+
+ Results.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Results, Utils.Observable);
+
+ Results.prototype.render = function () {
+ var $results = $(
+ ''
+ );
+
+ if (this.options.get('multiple')) {
+ $results.attr('aria-multiselectable', 'true');
+ }
+
+ this.$results = $results;
+
+ return $results;
+ };
+
+ Results.prototype.clear = function () {
+ this.$results.empty();
+ };
+
+ Results.prototype.displayMessage = function (params) {
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ this.clear();
+ this.hideLoading();
+
+ var $message = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get(params.message);
+
+ $message.append(
+ escapeMarkup(
+ message(params.args)
+ )
+ );
+
+ $message[0].className += ' select2-results__message';
+
+ this.$results.append($message);
+ };
+
+ Results.prototype.hideMessages = function () {
+ this.$results.find('.select2-results__message').remove();
+ };
+
+ Results.prototype.append = function (data) {
+ this.hideLoading();
+
+ var $options = [];
+
+ if (data.results == null || data.results.length === 0) {
+ if (this.$results.children().length === 0) {
+ this.trigger('results:message', {
+ message: 'noResults'
+ });
+ }
+
+ return;
+ }
+
+ data.results = this.sort(data.results);
+
+ for (var d = 0; d < data.results.length; d++) {
+ var item = data.results[d];
+
+ var $option = this.option(item);
+
+ $options.push($option);
+ }
+
+ this.$results.append($options);
+ };
+
+ Results.prototype.position = function ($results, $dropdown) {
+ var $resultsContainer = $dropdown.find('.select2-results');
+ $resultsContainer.append($results);
+ };
+
+ Results.prototype.sort = function (data) {
+ var sorter = this.options.get('sorter');
+
+ return sorter(data);
+ };
+
+ Results.prototype.highlightFirstItem = function () {
+ var $options = this.$results
+ .find('.select2-results__option[data-selected]');
+
+ var $selected = $options.filter('[data-selected=true]');
+
+ // Check if there are any selected options
+ if ($selected.length > 0) {
+ // If there are selected options, highlight the first
+ $selected.first().trigger('mouseenter');
+ } else {
+ // If there are no selected options, highlight the first option
+ // in the dropdown
+ $options.first().trigger('mouseenter');
+ }
+
+ this.ensureHighlightVisible();
+ };
+
+ Results.prototype.setClasses = function () {
+ var self = this;
+
+ this.data.current(function (selected) {
+ var selectedIds = $.map(selected, function (s) {
+ return s.id.toString();
+ });
+
+ var $options = self.$results
+ .find('.select2-results__option[data-selected]');
+
+ $options.each(function () {
+ var $option = $(this);
+
+ var item = $.data(this, 'data');
+
+ // id needs to be converted to a string when comparing
+ var id = '' + item.id;
+
+ if ((item.element != null && item.element.selected) ||
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
+ $option.attr('data-selected', 'true');
+ } else {
+ $option.attr('data-selected', 'false');
+ }
+ });
+
+ });
+ };
+
+ Results.prototype.showLoading = function (params) {
+ this.hideLoading();
+
+ var loadingMore = this.options.get('translations').get('searching');
+
+ var loading = {
+ disabled: true,
+ loading: true,
+ text: loadingMore(params)
+ };
+ var $loading = this.option(loading);
+ $loading.className += ' loading-results';
+
+ this.$results.prepend($loading);
+ };
+
+ Results.prototype.hideLoading = function () {
+ this.$results.find('.loading-results').remove();
+ };
+
+ Results.prototype.option = function (data) {
+ var option = document.createElement('li');
+ option.className = 'select2-results__option';
+
+ var attrs = {
+ 'role': 'option',
+ 'data-selected': 'false',
+ 'tabindex': -1
+ };
+
+ if (data.disabled) {
+ delete attrs['data-selected'];
+ attrs['aria-disabled'] = 'true';
+ }
+
+ if (data.id == null) {
+ delete attrs['data-selected'];
+ }
+
+ if (data._resultId != null) {
+ option.id = data._resultId;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ if (data.children) {
+ attrs['aria-label'] = data.text;
+ delete attrs['data-selected'];
+ }
+
+ for (var attr in attrs) {
+ var val = attrs[attr];
+
+ option.setAttribute(attr, val);
+ }
+
+ if (data.children) {
+ var $option = $(option);
+
+ var label = document.createElement('strong');
+ label.className = 'select2-results__group';
+
+ var $label = $(label);
+ this.template(data, label);
+ $label.attr('role', 'presentation');
+
+ var $children = [];
+
+ for (var c = 0; c < data.children.length; c++) {
+ var child = data.children[c];
+
+ var $child = this.option(child);
+
+ $children.push($child);
+ }
+
+ var $childrenContainer = $('', {
+ 'class': 'select2-results__options select2-results__options--nested',
+ 'role': 'listbox'
+ });
+ $childrenContainer.append($children);
+ $option.attr('role', 'list');
+
+ $option.append(label);
+ $option.append($childrenContainer);
+ } else {
+ this.template(data, option);
+ }
+
+ $.data(option, 'data', data);
+
+ return option;
+ };
+
+ Results.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-results';
+
+ this.$results.attr('id', id);
+
+ container.on('results:all', function (params) {
+ self.clear();
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ self.highlightFirstItem();
+ }
+ });
+
+ container.on('results:append', function (params) {
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ }
+ });
+
+ container.on('query', function (params) {
+ self.hideMessages();
+ self.showLoading(params);
+ });
+
+ container.on('select', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('unselect', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expended="true"
+ self.$results.attr('aria-expanded', 'true');
+ self.$results.attr('aria-hidden', 'false');
+
+ self.setClasses();
+ self.ensureHighlightVisible();
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expended="false"
+ self.$results.attr('aria-expanded', 'false');
+ self.$results.attr('aria-hidden', 'true');
+ self.$results.removeAttr('aria-activedescendant');
+ });
+
+ container.on('results:toggle', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ $highlighted.trigger('mouseup');
+ });
+
+ container.on('results:select', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var data = $highlighted.data('data');
+
+ if ($highlighted.attr('data-selected') == 'true') {
+ self.trigger('close', {});
+ } else {
+ self.trigger('select', {
+ data: data
+ });
+ }
+ });
+
+ container.on('results:previous', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ // If we are already at te top, don't move further
+ if (currentIndex === 0) {
+ return;
+ }
+
+ var nextIndex = currentIndex - 1;
+
+ // If none are highlighted, highlight the first
+ if ($highlighted.length === 0) {
+ nextIndex = 0;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top;
+ var nextTop = $next.offset().top;
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextTop - currentOffset < 0) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:next', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var nextIndex = currentIndex + 1;
+
+ // If we are at the last option, stay there
+ if (nextIndex >= $options.length) {
+ return;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextBottom > currentOffset) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
+ });
+
+ container.on('results:message', function (params) {
+ self.displayMessage(params);
+ });
+
+ if ($.fn.mousewheel) {
+ this.$results.on('mousewheel', function (e) {
+ var top = self.$results.scrollTop();
+
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
+
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
+
+ if (isAtTop) {
+ self.$results.scrollTop(0);
+
+ e.preventDefault();
+ e.stopPropagation();
+ } else if (isAtBottom) {
+ self.$results.scrollTop(
+ self.$results.get(0).scrollHeight - self.$results.height()
+ );
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ }
+
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
+ function (evt) {
+ var $this = $(this);
+
+ var data = $this.data('data');
+
+ if ($this.attr('data-selected') === 'true') {
+ if (self.options.get('multiple')) {
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ } else {
+ self.trigger('close', {});
+ }
+
+ return;
+ }
+
+ self.trigger('select', {
+ originalEvent: evt,
+ data: data
+ });
+ });
+
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
+ function (evt) {
+ var data = $(this).data('data');
+
+ self.getHighlightedResults()
+ .removeClass('select2-results__option--highlighted')
+ .attr('aria-selected', 'false');
+
+ self.trigger('results:focus', {
+ data: data,
+ element: $(this)
+ });
+ });
+ };
+
+ Results.prototype.getHighlightedResults = function () {
+ var $highlighted = this.$results
+ .find('.select2-results__option--highlighted');
+
+ return $highlighted;
+ };
+
+ Results.prototype.destroy = function () {
+ this.$results.remove();
+ };
+
+ Results.prototype.ensureHighlightVisible = function () {
+ var $highlighted = this.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var $options = this.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var currentOffset = this.$results.offset().top;
+ var nextTop = $highlighted.offset().top;
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
+
+ var offsetDelta = nextTop - currentOffset;
+ nextOffset -= $highlighted.outerHeight(false) * 2;
+
+ if (currentIndex <= 2) {
+ this.$results.scrollTop(0);
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
+ this.$results.scrollTop(nextOffset);
+ }
+ };
+
+ Results.prototype.template = function (result, container) {
+ var template = this.options.get('templateResult');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ var content = template(result, container);
+
+ if (content == null) {
+ container.style.display = 'none';
+ } else if (typeof content === 'string') {
+ container.innerHTML = escapeMarkup(content);
+ } else {
+ $(container).append(content);
+ }
+ };
+
+ return Results;
+});
+
+S2.define('select2/keys',[
+
+], function () {
+ var KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ ENTER: 13,
+ SHIFT: 16,
+ CTRL: 17,
+ ALT: 18,
+ ESC: 27,
+ SPACE: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DELETE: 46
+ };
+
+ return KEYS;
+});
+
+S2.define('select2/selection/base',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function BaseSelection ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ BaseSelection.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseSelection, Utils.Observable);
+
+ BaseSelection.prototype.render = function () {
+ var $selection = $(
+ '' +
+ ' '
+ );
+
+ this._tabindex = 0;
+
+ if (this.$element.data('old-tabindex') != null) {
+ this._tabindex = this.$element.data('old-tabindex');
+ } else if (this.$element.attr('tabindex') != null) {
+ this._tabindex = this.$element.attr('tabindex');
+ }
+
+ $selection.attr('title', this.$element.attr('title'));
+ $selection.attr('tabindex', this._tabindex);
+
+ this.$selection = $selection;
+
+ return $selection;
+ };
+
+ BaseSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-container';
+ var resultsId = container.id + '-results';
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
+
+ this.container = container;
+
+ this.$selection.on('focus', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('blur', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ if (evt.which === KEYS.SPACE) {
+ evt.preventDefault();
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expanded="true"
+ self.$selection.attr('aria-expanded', 'true');
+ self.$selection.attr('aria-owns', resultsId);
+
+ self._attachCloseHandler(container);
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expanded="false"
+ self.$selection.attr('aria-expanded', 'false');
+ self.$selection.removeAttr('aria-activedescendant');
+ self.$selection.removeAttr('aria-owns');
+
+ // This needs to be delayed as the active element is the body when the
+ // key is pressed.
+ window.setTimeout(function () {
+ self.$selection.focus();
+ }, 1);
+
+ self._detachCloseHandler(container);
+ });
+
+ container.on('enable', function () {
+ self.$selection.attr('tabindex', self._tabindex);
+ });
+
+ container.on('disable', function () {
+ self.$selection.attr('tabindex', '-1');
+ });
+ };
+
+ BaseSelection.prototype._handleBlur = function (evt) {
+ var self = this;
+
+ // This needs to be delayed as the active element is the body when the tab
+ // key is pressed, possibly along with others.
+ window.setTimeout(function () {
+ // Don't trigger `blur` if the focus is still in the selection
+ if (
+ (document.activeElement == self.$selection[0]) ||
+ ($.contains(self.$selection[0], document.activeElement))
+ ) {
+ return;
+ }
+
+ self.trigger('blur', evt);
+ }, 1);
+ };
+
+ BaseSelection.prototype._attachCloseHandler = function (container) {
+ var self = this;
+
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
+ var $target = $(e.target);
+
+ var $select = $target.closest('.select2');
+
+ var $all = $('.select2.select2-container--open');
+
+ $all.each(function () {
+ var $this = $(this);
+
+ if (this == $select[0]) {
+ return;
+ }
+
+ var $element = $this.data('element');
+
+ $element.select2('close');
+ });
+ });
+ };
+
+ BaseSelection.prototype._detachCloseHandler = function (container) {
+ $(document.body).off('mousedown.select2.' + container.id);
+ };
+
+ BaseSelection.prototype.position = function ($selection, $container) {
+ var $selectionContainer = $container.find('.selection');
+ $selectionContainer.append($selection);
+ };
+
+ BaseSelection.prototype.destroy = function () {
+ this._detachCloseHandler(this.container);
+ };
+
+ BaseSelection.prototype.update = function (data) {
+ throw new Error('The `update` method must be defined in child classes.');
+ };
+
+ return BaseSelection;
+});
+
+S2.define('select2/selection/single',[
+ 'jquery',
+ './base',
+ '../utils',
+ '../keys'
+], function ($, BaseSelection, Utils, KEYS) {
+ function SingleSelection () {
+ SingleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(SingleSelection, BaseSelection);
+
+ SingleSelection.prototype.render = function () {
+ var $selection = SingleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--single');
+
+ $selection.html(
+ ' ' +
+ '' +
+ ' ' +
+ ' '
+ );
+
+ return $selection;
+ };
+
+ SingleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ SingleSelection.__super__.bind.apply(this, arguments);
+
+ var id = container.id + '-container';
+
+ this.$selection.find('.select2-selection__rendered')
+ .attr('id', id)
+ .attr('role', 'textbox')
+ .attr('aria-readonly', 'true');
+ this.$selection.attr('aria-labelledby', id);
+
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
+ this.$selection.attr('role', 'combobox');
+
+ this.$selection.on('mousedown', function (evt) {
+ // Only respond to left clicks
+ if (evt.which !== 1) {
+ return;
+ }
+
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on('focus', function (evt) {
+ // User focuses on the container
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
+ container.open();
+ }
+ });
+
+ this.$selection.on('blur', function (evt) {
+ // User exits the container
+ });
+
+ container.on('focus', function (evt) {
+ if (!container.isOpen()) {
+ self.$selection.focus();
+ }
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+ };
+
+ SingleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ SingleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ SingleSelection.prototype.selectionContainer = function () {
+ return $(' ');
+ };
+
+ SingleSelection.prototype.update = function (data) {
+ if (data.length === 0) {
+ this.clear();
+ return;
+ }
+
+ var selection = data[0];
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+ var formatted = this.display(selection, $rendered);
+
+ $rendered.empty().append(formatted);
+ $rendered.prop('title', selection.title || selection.text);
+ };
+
+ return SingleSelection;
+});
+
+S2.define('select2/selection/multiple',[
+ 'jquery',
+ './base',
+ '../utils'
+], function ($, BaseSelection, Utils) {
+ function MultipleSelection ($element, options) {
+ MultipleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(MultipleSelection, BaseSelection);
+
+ MultipleSelection.prototype.render = function () {
+ var $selection = MultipleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--multiple');
+
+ $selection.html(
+ ''
+ );
+
+ return $selection;
+ };
+
+ MultipleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ MultipleSelection.__super__.bind.apply(this, arguments);
+
+ this.$selection.on('click', function (evt) {
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on(
+ 'click',
+ '.select2-selection__choice__remove',
+ function (evt) {
+ // Ignore the event if it is disabled
+ if (self.options.get('disabled')) {
+ return;
+ }
+
+ var $remove = $(this);
+ var $selection = $remove.parent();
+
+ var data = $selection.data('data');
+
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ }
+ );
+ };
+
+ MultipleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ MultipleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ MultipleSelection.prototype.selectionContainer = function () {
+ var $container = $(
+ '' +
+ '' +
+ '×' +
+ ' ' +
+ ' '
+ );
+
+ return $container;
+ };
+
+ MultipleSelection.prototype.update = function (data) {
+ var self = this;
+ this.clear();
+
+ if (data.length === 0) {
+ return;
+ }
+
+ var $selections = [];
+
+ for (var d = 0; d < data.length; d++) {
+ var selection = data[d];
+
+ var $selection = this.selectionContainer();
+ var formatted = this.display(selection, $selection).trim();
+
+ $selection.append(formatted);
+ $selection.prop('title', selection.title || selection.text);
+
+ $selection.data('data', selection);
+
+ $selections.push($selection);
+ }
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+
+ Utils.appendMany($rendered, $selections);
+
+ // Return cursor to search field after updating.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ if ('undefined' !== typeof this.$search) {
+ setTimeout(function(){
+ self.$search.focus();
+ }, 1);
+ }
+ };
+
+ return MultipleSelection;
+});
+
+S2.define('select2/selection/placeholder',[
+ '../utils'
+], function (Utils) {
+ function Placeholder (decorated, $element, options) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options);
+ }
+
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
+ var $placeholder = this.selectionContainer();
+
+ $placeholder.html(this.display(placeholder));
+ $placeholder.addClass('select2-selection__placeholder')
+ .removeClass('select2-selection__choice');
+
+ return $placeholder;
+ };
+
+ Placeholder.prototype.update = function (decorated, data) {
+ var singlePlaceholder = (
+ data.length == 1 && data[0].id != this.placeholder.id
+ );
+ var multipleSelections = data.length > 1;
+
+ if (multipleSelections || singlePlaceholder) {
+ return decorated.call(this, data);
+ }
+
+ this.clear();
+
+ var $placeholder = this.createPlaceholder(this.placeholder);
+
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
+ };
+
+ return Placeholder;
+});
+
+S2.define('select2/selection/allowClear',[
+ 'jquery',
+ '../keys'
+], function ($, KEYS) {
+ function AllowClear () { }
+
+ AllowClear.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ if (this.placeholder == null) {
+ if (this.options.get('debug') && window.console && console.error) {
+ console.error(
+ 'Select2: The `allowClear` option should be used in combination ' +
+ 'with the `placeholder` option.'
+ );
+ }
+ }
+
+ this.$selection.on('mousedown', '.select2-selection__clear',
+ function (evt) {
+ self._handleClear(evt);
+ });
+
+ container.on('keypress', function (evt) {
+ self._handleKeyboardClear(evt, container);
+ });
+ };
+
+ AllowClear.prototype._handleClear = function (_, evt) {
+ // Ignore the event if it is disabled
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ var $clear = this.$selection.find('.select2-selection__clear');
+
+ // Ignore the event if nothing has been selected
+ if ($clear.length === 0) {
+ return;
+ }
+
+ evt.stopPropagation();
+
+ var data = $clear.data('data');
+
+ for (var d = 0; d < data.length; d++) {
+ var unselectData = {
+ data: data[d]
+ };
+
+ // Trigger the `unselect` event, so people can prevent it from being
+ // cleared.
+ this.trigger('unselect', unselectData);
+
+ // If the event was prevented, don't clear it out.
+ if (unselectData.prevented) {
+ return;
+ }
+ }
+
+ this.$element.val(this.placeholder.id).trigger('change');
+
+ this.trigger('toggle', {});
+ };
+
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
+ if (container.isOpen()) {
+ return;
+ }
+
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
+ this._handleClear(evt);
+ }
+ };
+
+ AllowClear.prototype.update = function (decorated, data) {
+ decorated.call(this, data);
+
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
+ data.length === 0) {
+ return;
+ }
+
+ var $remove = $(
+ '' +
+ '×' +
+ ' '
+ );
+ $remove.data('data', data);
+
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
+ };
+
+ return AllowClear;
+});
+
+S2.define('select2/selection/search',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function Search (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ Search.prototype.render = function (decorated) {
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ var $rendered = decorated.call(this);
+
+ this._transferTabIndex();
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.trigger('focus');
+ });
+
+ container.on('close', function () {
+ self.$search.val('');
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.trigger('focus');
+ });
+
+ container.on('enable', function () {
+ self.$search.prop('disabled', false);
+
+ self._transferTabIndex();
+ });
+
+ container.on('disable', function () {
+ self.$search.prop('disabled', true);
+ });
+
+ container.on('focus', function (evt) {
+ self.$search.trigger('focus');
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
+ evt.stopPropagation();
+
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+
+ var key = evt.which;
+
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
+ var $previousChoice = self.$searchContainer
+ .prev('.select2-selection__choice');
+
+ if ($previousChoice.length > 0) {
+ var item = $previousChoice.data('data');
+
+ self.searchRemoveChoice(item);
+
+ evt.preventDefault();
+ }
+ }
+ });
+
+ // Try to detect the IE version should the `documentMode` property that
+ // is stored on the document. This is only implemented in IE and is
+ // slightly cleaner than doing a user agent check.
+ // This property is not available in Edge, but Edge also doesn't have
+ // this bug.
+ var msie = document.documentMode;
+ var disableInputEvents = msie && msie <= 11;
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$selection.on(
+ 'input.searchcheck',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents) {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ // Unbind the duplicated `keyup` event
+ self.$selection.off('keyup.search');
+ }
+ );
+
+ this.$selection.on(
+ 'keyup.search input.search',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents && evt.type === 'input') {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ var key = evt.which;
+
+ // We can freely ignore events from modifier keys
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
+ return;
+ }
+
+ // Tabbing will be handled during the `keydown` phase
+ if (key == KEYS.TAB) {
+ return;
+ }
+
+ self.handleSearch(evt);
+ }
+ );
+ };
+
+ /**
+ * This method will transfer the tabindex attribute from the rendered
+ * selection to the search box. This allows for the search box to be used as
+ * the primary focus instead of the selection container.
+ *
+ * @private
+ */
+ Search.prototype._transferTabIndex = function (decorated) {
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
+ this.$selection.attr('tabindex', '-1');
+ };
+
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
+ this.$search.attr('placeholder', placeholder.text);
+ };
+
+ Search.prototype.update = function (decorated, data) {
+ var searchHadFocus = this.$search[0] == document.activeElement;
+
+ this.$search.attr('placeholder', '');
+
+ decorated.call(this, data);
+
+ this.$selection.find('.select2-selection__rendered')
+ .append(this.$searchContainer);
+
+ this.resizeSearch();
+ if (searchHadFocus) {
+ this.$search.focus();
+ }
+ };
+
+ Search.prototype.handleSearch = function () {
+ this.resizeSearch();
+
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
+ this.trigger('unselect', {
+ data: item
+ });
+
+ this.$search.val(item.text);
+ this.handleSearch();
+ };
+
+ Search.prototype.resizeSearch = function () {
+ this.$search.css('width', '25px');
+
+ var width = '';
+
+ if (this.$search.attr('placeholder') !== '') {
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
+ } else {
+ var minimumWidth = this.$search.val().length + 1;
+
+ width = (minimumWidth * 0.75) + 'em';
+ }
+
+ this.$search.css('width', width);
+ };
+
+ return Search;
+});
+
+S2.define('select2/selection/eventRelay',[
+ 'jquery'
+], function ($) {
+ function EventRelay () { }
+
+ EventRelay.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var relayEvents = [
+ 'open', 'opening',
+ 'close', 'closing',
+ 'select', 'selecting',
+ 'unselect', 'unselecting'
+ ];
+
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
+
+ decorated.call(this, container, $container);
+
+ container.on('*', function (name, params) {
+ // Ignore events that should not be relayed
+ if ($.inArray(name, relayEvents) === -1) {
+ return;
+ }
+
+ // The parameters should always be an object
+ params = params || {};
+
+ // Generate the jQuery event for the Select2 event
+ var evt = $.Event('select2:' + name, {
+ params: params
+ });
+
+ self.$element.trigger(evt);
+
+ // Only handle preventable events if it was one
+ if ($.inArray(name, preventableEvents) === -1) {
+ return;
+ }
+
+ params.prevented = evt.isDefaultPrevented();
+ });
+ };
+
+ return EventRelay;
+});
+
+S2.define('select2/translation',[
+ 'jquery',
+ 'require'
+], function ($, require) {
+ function Translation (dict) {
+ this.dict = dict || {};
+ }
+
+ Translation.prototype.all = function () {
+ return this.dict;
+ };
+
+ Translation.prototype.get = function (key) {
+ return this.dict[key];
+ };
+
+ Translation.prototype.extend = function (translation) {
+ this.dict = $.extend({}, translation.all(), this.dict);
+ };
+
+ // Static functions
+
+ Translation._cache = {};
+
+ Translation.loadPath = function (path) {
+ if (!(path in Translation._cache)) {
+ var translations = require(path);
+
+ Translation._cache[path] = translations;
+ }
+
+ return new Translation(Translation._cache[path]);
+ };
+
+ return Translation;
+});
+
+S2.define('select2/diacritics',[
+
+], function () {
+ var diacritics = {
+ '\u24B6': 'A',
+ '\uFF21': 'A',
+ '\u00C0': 'A',
+ '\u00C1': 'A',
+ '\u00C2': 'A',
+ '\u1EA6': 'A',
+ '\u1EA4': 'A',
+ '\u1EAA': 'A',
+ '\u1EA8': 'A',
+ '\u00C3': 'A',
+ '\u0100': 'A',
+ '\u0102': 'A',
+ '\u1EB0': 'A',
+ '\u1EAE': 'A',
+ '\u1EB4': 'A',
+ '\u1EB2': 'A',
+ '\u0226': 'A',
+ '\u01E0': 'A',
+ '\u00C4': 'A',
+ '\u01DE': 'A',
+ '\u1EA2': 'A',
+ '\u00C5': 'A',
+ '\u01FA': 'A',
+ '\u01CD': 'A',
+ '\u0200': 'A',
+ '\u0202': 'A',
+ '\u1EA0': 'A',
+ '\u1EAC': 'A',
+ '\u1EB6': 'A',
+ '\u1E00': 'A',
+ '\u0104': 'A',
+ '\u023A': 'A',
+ '\u2C6F': 'A',
+ '\uA732': 'AA',
+ '\u00C6': 'AE',
+ '\u01FC': 'AE',
+ '\u01E2': 'AE',
+ '\uA734': 'AO',
+ '\uA736': 'AU',
+ '\uA738': 'AV',
+ '\uA73A': 'AV',
+ '\uA73C': 'AY',
+ '\u24B7': 'B',
+ '\uFF22': 'B',
+ '\u1E02': 'B',
+ '\u1E04': 'B',
+ '\u1E06': 'B',
+ '\u0243': 'B',
+ '\u0182': 'B',
+ '\u0181': 'B',
+ '\u24B8': 'C',
+ '\uFF23': 'C',
+ '\u0106': 'C',
+ '\u0108': 'C',
+ '\u010A': 'C',
+ '\u010C': 'C',
+ '\u00C7': 'C',
+ '\u1E08': 'C',
+ '\u0187': 'C',
+ '\u023B': 'C',
+ '\uA73E': 'C',
+ '\u24B9': 'D',
+ '\uFF24': 'D',
+ '\u1E0A': 'D',
+ '\u010E': 'D',
+ '\u1E0C': 'D',
+ '\u1E10': 'D',
+ '\u1E12': 'D',
+ '\u1E0E': 'D',
+ '\u0110': 'D',
+ '\u018B': 'D',
+ '\u018A': 'D',
+ '\u0189': 'D',
+ '\uA779': 'D',
+ '\u01F1': 'DZ',
+ '\u01C4': 'DZ',
+ '\u01F2': 'Dz',
+ '\u01C5': 'Dz',
+ '\u24BA': 'E',
+ '\uFF25': 'E',
+ '\u00C8': 'E',
+ '\u00C9': 'E',
+ '\u00CA': 'E',
+ '\u1EC0': 'E',
+ '\u1EBE': 'E',
+ '\u1EC4': 'E',
+ '\u1EC2': 'E',
+ '\u1EBC': 'E',
+ '\u0112': 'E',
+ '\u1E14': 'E',
+ '\u1E16': 'E',
+ '\u0114': 'E',
+ '\u0116': 'E',
+ '\u00CB': 'E',
+ '\u1EBA': 'E',
+ '\u011A': 'E',
+ '\u0204': 'E',
+ '\u0206': 'E',
+ '\u1EB8': 'E',
+ '\u1EC6': 'E',
+ '\u0228': 'E',
+ '\u1E1C': 'E',
+ '\u0118': 'E',
+ '\u1E18': 'E',
+ '\u1E1A': 'E',
+ '\u0190': 'E',
+ '\u018E': 'E',
+ '\u24BB': 'F',
+ '\uFF26': 'F',
+ '\u1E1E': 'F',
+ '\u0191': 'F',
+ '\uA77B': 'F',
+ '\u24BC': 'G',
+ '\uFF27': 'G',
+ '\u01F4': 'G',
+ '\u011C': 'G',
+ '\u1E20': 'G',
+ '\u011E': 'G',
+ '\u0120': 'G',
+ '\u01E6': 'G',
+ '\u0122': 'G',
+ '\u01E4': 'G',
+ '\u0193': 'G',
+ '\uA7A0': 'G',
+ '\uA77D': 'G',
+ '\uA77E': 'G',
+ '\u24BD': 'H',
+ '\uFF28': 'H',
+ '\u0124': 'H',
+ '\u1E22': 'H',
+ '\u1E26': 'H',
+ '\u021E': 'H',
+ '\u1E24': 'H',
+ '\u1E28': 'H',
+ '\u1E2A': 'H',
+ '\u0126': 'H',
+ '\u2C67': 'H',
+ '\u2C75': 'H',
+ '\uA78D': 'H',
+ '\u24BE': 'I',
+ '\uFF29': 'I',
+ '\u00CC': 'I',
+ '\u00CD': 'I',
+ '\u00CE': 'I',
+ '\u0128': 'I',
+ '\u012A': 'I',
+ '\u012C': 'I',
+ '\u0130': 'I',
+ '\u00CF': 'I',
+ '\u1E2E': 'I',
+ '\u1EC8': 'I',
+ '\u01CF': 'I',
+ '\u0208': 'I',
+ '\u020A': 'I',
+ '\u1ECA': 'I',
+ '\u012E': 'I',
+ '\u1E2C': 'I',
+ '\u0197': 'I',
+ '\u24BF': 'J',
+ '\uFF2A': 'J',
+ '\u0134': 'J',
+ '\u0248': 'J',
+ '\u24C0': 'K',
+ '\uFF2B': 'K',
+ '\u1E30': 'K',
+ '\u01E8': 'K',
+ '\u1E32': 'K',
+ '\u0136': 'K',
+ '\u1E34': 'K',
+ '\u0198': 'K',
+ '\u2C69': 'K',
+ '\uA740': 'K',
+ '\uA742': 'K',
+ '\uA744': 'K',
+ '\uA7A2': 'K',
+ '\u24C1': 'L',
+ '\uFF2C': 'L',
+ '\u013F': 'L',
+ '\u0139': 'L',
+ '\u013D': 'L',
+ '\u1E36': 'L',
+ '\u1E38': 'L',
+ '\u013B': 'L',
+ '\u1E3C': 'L',
+ '\u1E3A': 'L',
+ '\u0141': 'L',
+ '\u023D': 'L',
+ '\u2C62': 'L',
+ '\u2C60': 'L',
+ '\uA748': 'L',
+ '\uA746': 'L',
+ '\uA780': 'L',
+ '\u01C7': 'LJ',
+ '\u01C8': 'Lj',
+ '\u24C2': 'M',
+ '\uFF2D': 'M',
+ '\u1E3E': 'M',
+ '\u1E40': 'M',
+ '\u1E42': 'M',
+ '\u2C6E': 'M',
+ '\u019C': 'M',
+ '\u24C3': 'N',
+ '\uFF2E': 'N',
+ '\u01F8': 'N',
+ '\u0143': 'N',
+ '\u00D1': 'N',
+ '\u1E44': 'N',
+ '\u0147': 'N',
+ '\u1E46': 'N',
+ '\u0145': 'N',
+ '\u1E4A': 'N',
+ '\u1E48': 'N',
+ '\u0220': 'N',
+ '\u019D': 'N',
+ '\uA790': 'N',
+ '\uA7A4': 'N',
+ '\u01CA': 'NJ',
+ '\u01CB': 'Nj',
+ '\u24C4': 'O',
+ '\uFF2F': 'O',
+ '\u00D2': 'O',
+ '\u00D3': 'O',
+ '\u00D4': 'O',
+ '\u1ED2': 'O',
+ '\u1ED0': 'O',
+ '\u1ED6': 'O',
+ '\u1ED4': 'O',
+ '\u00D5': 'O',
+ '\u1E4C': 'O',
+ '\u022C': 'O',
+ '\u1E4E': 'O',
+ '\u014C': 'O',
+ '\u1E50': 'O',
+ '\u1E52': 'O',
+ '\u014E': 'O',
+ '\u022E': 'O',
+ '\u0230': 'O',
+ '\u00D6': 'O',
+ '\u022A': 'O',
+ '\u1ECE': 'O',
+ '\u0150': 'O',
+ '\u01D1': 'O',
+ '\u020C': 'O',
+ '\u020E': 'O',
+ '\u01A0': 'O',
+ '\u1EDC': 'O',
+ '\u1EDA': 'O',
+ '\u1EE0': 'O',
+ '\u1EDE': 'O',
+ '\u1EE2': 'O',
+ '\u1ECC': 'O',
+ '\u1ED8': 'O',
+ '\u01EA': 'O',
+ '\u01EC': 'O',
+ '\u00D8': 'O',
+ '\u01FE': 'O',
+ '\u0186': 'O',
+ '\u019F': 'O',
+ '\uA74A': 'O',
+ '\uA74C': 'O',
+ '\u01A2': 'OI',
+ '\uA74E': 'OO',
+ '\u0222': 'OU',
+ '\u24C5': 'P',
+ '\uFF30': 'P',
+ '\u1E54': 'P',
+ '\u1E56': 'P',
+ '\u01A4': 'P',
+ '\u2C63': 'P',
+ '\uA750': 'P',
+ '\uA752': 'P',
+ '\uA754': 'P',
+ '\u24C6': 'Q',
+ '\uFF31': 'Q',
+ '\uA756': 'Q',
+ '\uA758': 'Q',
+ '\u024A': 'Q',
+ '\u24C7': 'R',
+ '\uFF32': 'R',
+ '\u0154': 'R',
+ '\u1E58': 'R',
+ '\u0158': 'R',
+ '\u0210': 'R',
+ '\u0212': 'R',
+ '\u1E5A': 'R',
+ '\u1E5C': 'R',
+ '\u0156': 'R',
+ '\u1E5E': 'R',
+ '\u024C': 'R',
+ '\u2C64': 'R',
+ '\uA75A': 'R',
+ '\uA7A6': 'R',
+ '\uA782': 'R',
+ '\u24C8': 'S',
+ '\uFF33': 'S',
+ '\u1E9E': 'S',
+ '\u015A': 'S',
+ '\u1E64': 'S',
+ '\u015C': 'S',
+ '\u1E60': 'S',
+ '\u0160': 'S',
+ '\u1E66': 'S',
+ '\u1E62': 'S',
+ '\u1E68': 'S',
+ '\u0218': 'S',
+ '\u015E': 'S',
+ '\u2C7E': 'S',
+ '\uA7A8': 'S',
+ '\uA784': 'S',
+ '\u24C9': 'T',
+ '\uFF34': 'T',
+ '\u1E6A': 'T',
+ '\u0164': 'T',
+ '\u1E6C': 'T',
+ '\u021A': 'T',
+ '\u0162': 'T',
+ '\u1E70': 'T',
+ '\u1E6E': 'T',
+ '\u0166': 'T',
+ '\u01AC': 'T',
+ '\u01AE': 'T',
+ '\u023E': 'T',
+ '\uA786': 'T',
+ '\uA728': 'TZ',
+ '\u24CA': 'U',
+ '\uFF35': 'U',
+ '\u00D9': 'U',
+ '\u00DA': 'U',
+ '\u00DB': 'U',
+ '\u0168': 'U',
+ '\u1E78': 'U',
+ '\u016A': 'U',
+ '\u1E7A': 'U',
+ '\u016C': 'U',
+ '\u00DC': 'U',
+ '\u01DB': 'U',
+ '\u01D7': 'U',
+ '\u01D5': 'U',
+ '\u01D9': 'U',
+ '\u1EE6': 'U',
+ '\u016E': 'U',
+ '\u0170': 'U',
+ '\u01D3': 'U',
+ '\u0214': 'U',
+ '\u0216': 'U',
+ '\u01AF': 'U',
+ '\u1EEA': 'U',
+ '\u1EE8': 'U',
+ '\u1EEE': 'U',
+ '\u1EEC': 'U',
+ '\u1EF0': 'U',
+ '\u1EE4': 'U',
+ '\u1E72': 'U',
+ '\u0172': 'U',
+ '\u1E76': 'U',
+ '\u1E74': 'U',
+ '\u0244': 'U',
+ '\u24CB': 'V',
+ '\uFF36': 'V',
+ '\u1E7C': 'V',
+ '\u1E7E': 'V',
+ '\u01B2': 'V',
+ '\uA75E': 'V',
+ '\u0245': 'V',
+ '\uA760': 'VY',
+ '\u24CC': 'W',
+ '\uFF37': 'W',
+ '\u1E80': 'W',
+ '\u1E82': 'W',
+ '\u0174': 'W',
+ '\u1E86': 'W',
+ '\u1E84': 'W',
+ '\u1E88': 'W',
+ '\u2C72': 'W',
+ '\u24CD': 'X',
+ '\uFF38': 'X',
+ '\u1E8A': 'X',
+ '\u1E8C': 'X',
+ '\u24CE': 'Y',
+ '\uFF39': 'Y',
+ '\u1EF2': 'Y',
+ '\u00DD': 'Y',
+ '\u0176': 'Y',
+ '\u1EF8': 'Y',
+ '\u0232': 'Y',
+ '\u1E8E': 'Y',
+ '\u0178': 'Y',
+ '\u1EF6': 'Y',
+ '\u1EF4': 'Y',
+ '\u01B3': 'Y',
+ '\u024E': 'Y',
+ '\u1EFE': 'Y',
+ '\u24CF': 'Z',
+ '\uFF3A': 'Z',
+ '\u0179': 'Z',
+ '\u1E90': 'Z',
+ '\u017B': 'Z',
+ '\u017D': 'Z',
+ '\u1E92': 'Z',
+ '\u1E94': 'Z',
+ '\u01B5': 'Z',
+ '\u0224': 'Z',
+ '\u2C7F': 'Z',
+ '\u2C6B': 'Z',
+ '\uA762': 'Z',
+ '\u24D0': 'a',
+ '\uFF41': 'a',
+ '\u1E9A': 'a',
+ '\u00E0': 'a',
+ '\u00E1': 'a',
+ '\u00E2': 'a',
+ '\u1EA7': 'a',
+ '\u1EA5': 'a',
+ '\u1EAB': 'a',
+ '\u1EA9': 'a',
+ '\u00E3': 'a',
+ '\u0101': 'a',
+ '\u0103': 'a',
+ '\u1EB1': 'a',
+ '\u1EAF': 'a',
+ '\u1EB5': 'a',
+ '\u1EB3': 'a',
+ '\u0227': 'a',
+ '\u01E1': 'a',
+ '\u00E4': 'a',
+ '\u01DF': 'a',
+ '\u1EA3': 'a',
+ '\u00E5': 'a',
+ '\u01FB': 'a',
+ '\u01CE': 'a',
+ '\u0201': 'a',
+ '\u0203': 'a',
+ '\u1EA1': 'a',
+ '\u1EAD': 'a',
+ '\u1EB7': 'a',
+ '\u1E01': 'a',
+ '\u0105': 'a',
+ '\u2C65': 'a',
+ '\u0250': 'a',
+ '\uA733': 'aa',
+ '\u00E6': 'ae',
+ '\u01FD': 'ae',
+ '\u01E3': 'ae',
+ '\uA735': 'ao',
+ '\uA737': 'au',
+ '\uA739': 'av',
+ '\uA73B': 'av',
+ '\uA73D': 'ay',
+ '\u24D1': 'b',
+ '\uFF42': 'b',
+ '\u1E03': 'b',
+ '\u1E05': 'b',
+ '\u1E07': 'b',
+ '\u0180': 'b',
+ '\u0183': 'b',
+ '\u0253': 'b',
+ '\u24D2': 'c',
+ '\uFF43': 'c',
+ '\u0107': 'c',
+ '\u0109': 'c',
+ '\u010B': 'c',
+ '\u010D': 'c',
+ '\u00E7': 'c',
+ '\u1E09': 'c',
+ '\u0188': 'c',
+ '\u023C': 'c',
+ '\uA73F': 'c',
+ '\u2184': 'c',
+ '\u24D3': 'd',
+ '\uFF44': 'd',
+ '\u1E0B': 'd',
+ '\u010F': 'd',
+ '\u1E0D': 'd',
+ '\u1E11': 'd',
+ '\u1E13': 'd',
+ '\u1E0F': 'd',
+ '\u0111': 'd',
+ '\u018C': 'd',
+ '\u0256': 'd',
+ '\u0257': 'd',
+ '\uA77A': 'd',
+ '\u01F3': 'dz',
+ '\u01C6': 'dz',
+ '\u24D4': 'e',
+ '\uFF45': 'e',
+ '\u00E8': 'e',
+ '\u00E9': 'e',
+ '\u00EA': 'e',
+ '\u1EC1': 'e',
+ '\u1EBF': 'e',
+ '\u1EC5': 'e',
+ '\u1EC3': 'e',
+ '\u1EBD': 'e',
+ '\u0113': 'e',
+ '\u1E15': 'e',
+ '\u1E17': 'e',
+ '\u0115': 'e',
+ '\u0117': 'e',
+ '\u00EB': 'e',
+ '\u1EBB': 'e',
+ '\u011B': 'e',
+ '\u0205': 'e',
+ '\u0207': 'e',
+ '\u1EB9': 'e',
+ '\u1EC7': 'e',
+ '\u0229': 'e',
+ '\u1E1D': 'e',
+ '\u0119': 'e',
+ '\u1E19': 'e',
+ '\u1E1B': 'e',
+ '\u0247': 'e',
+ '\u025B': 'e',
+ '\u01DD': 'e',
+ '\u24D5': 'f',
+ '\uFF46': 'f',
+ '\u1E1F': 'f',
+ '\u0192': 'f',
+ '\uA77C': 'f',
+ '\u24D6': 'g',
+ '\uFF47': 'g',
+ '\u01F5': 'g',
+ '\u011D': 'g',
+ '\u1E21': 'g',
+ '\u011F': 'g',
+ '\u0121': 'g',
+ '\u01E7': 'g',
+ '\u0123': 'g',
+ '\u01E5': 'g',
+ '\u0260': 'g',
+ '\uA7A1': 'g',
+ '\u1D79': 'g',
+ '\uA77F': 'g',
+ '\u24D7': 'h',
+ '\uFF48': 'h',
+ '\u0125': 'h',
+ '\u1E23': 'h',
+ '\u1E27': 'h',
+ '\u021F': 'h',
+ '\u1E25': 'h',
+ '\u1E29': 'h',
+ '\u1E2B': 'h',
+ '\u1E96': 'h',
+ '\u0127': 'h',
+ '\u2C68': 'h',
+ '\u2C76': 'h',
+ '\u0265': 'h',
+ '\u0195': 'hv',
+ '\u24D8': 'i',
+ '\uFF49': 'i',
+ '\u00EC': 'i',
+ '\u00ED': 'i',
+ '\u00EE': 'i',
+ '\u0129': 'i',
+ '\u012B': 'i',
+ '\u012D': 'i',
+ '\u00EF': 'i',
+ '\u1E2F': 'i',
+ '\u1EC9': 'i',
+ '\u01D0': 'i',
+ '\u0209': 'i',
+ '\u020B': 'i',
+ '\u1ECB': 'i',
+ '\u012F': 'i',
+ '\u1E2D': 'i',
+ '\u0268': 'i',
+ '\u0131': 'i',
+ '\u24D9': 'j',
+ '\uFF4A': 'j',
+ '\u0135': 'j',
+ '\u01F0': 'j',
+ '\u0249': 'j',
+ '\u24DA': 'k',
+ '\uFF4B': 'k',
+ '\u1E31': 'k',
+ '\u01E9': 'k',
+ '\u1E33': 'k',
+ '\u0137': 'k',
+ '\u1E35': 'k',
+ '\u0199': 'k',
+ '\u2C6A': 'k',
+ '\uA741': 'k',
+ '\uA743': 'k',
+ '\uA745': 'k',
+ '\uA7A3': 'k',
+ '\u24DB': 'l',
+ '\uFF4C': 'l',
+ '\u0140': 'l',
+ '\u013A': 'l',
+ '\u013E': 'l',
+ '\u1E37': 'l',
+ '\u1E39': 'l',
+ '\u013C': 'l',
+ '\u1E3D': 'l',
+ '\u1E3B': 'l',
+ '\u017F': 'l',
+ '\u0142': 'l',
+ '\u019A': 'l',
+ '\u026B': 'l',
+ '\u2C61': 'l',
+ '\uA749': 'l',
+ '\uA781': 'l',
+ '\uA747': 'l',
+ '\u01C9': 'lj',
+ '\u24DC': 'm',
+ '\uFF4D': 'm',
+ '\u1E3F': 'm',
+ '\u1E41': 'm',
+ '\u1E43': 'm',
+ '\u0271': 'm',
+ '\u026F': 'm',
+ '\u24DD': 'n',
+ '\uFF4E': 'n',
+ '\u01F9': 'n',
+ '\u0144': 'n',
+ '\u00F1': 'n',
+ '\u1E45': 'n',
+ '\u0148': 'n',
+ '\u1E47': 'n',
+ '\u0146': 'n',
+ '\u1E4B': 'n',
+ '\u1E49': 'n',
+ '\u019E': 'n',
+ '\u0272': 'n',
+ '\u0149': 'n',
+ '\uA791': 'n',
+ '\uA7A5': 'n',
+ '\u01CC': 'nj',
+ '\u24DE': 'o',
+ '\uFF4F': 'o',
+ '\u00F2': 'o',
+ '\u00F3': 'o',
+ '\u00F4': 'o',
+ '\u1ED3': 'o',
+ '\u1ED1': 'o',
+ '\u1ED7': 'o',
+ '\u1ED5': 'o',
+ '\u00F5': 'o',
+ '\u1E4D': 'o',
+ '\u022D': 'o',
+ '\u1E4F': 'o',
+ '\u014D': 'o',
+ '\u1E51': 'o',
+ '\u1E53': 'o',
+ '\u014F': 'o',
+ '\u022F': 'o',
+ '\u0231': 'o',
+ '\u00F6': 'o',
+ '\u022B': 'o',
+ '\u1ECF': 'o',
+ '\u0151': 'o',
+ '\u01D2': 'o',
+ '\u020D': 'o',
+ '\u020F': 'o',
+ '\u01A1': 'o',
+ '\u1EDD': 'o',
+ '\u1EDB': 'o',
+ '\u1EE1': 'o',
+ '\u1EDF': 'o',
+ '\u1EE3': 'o',
+ '\u1ECD': 'o',
+ '\u1ED9': 'o',
+ '\u01EB': 'o',
+ '\u01ED': 'o',
+ '\u00F8': 'o',
+ '\u01FF': 'o',
+ '\u0254': 'o',
+ '\uA74B': 'o',
+ '\uA74D': 'o',
+ '\u0275': 'o',
+ '\u01A3': 'oi',
+ '\u0223': 'ou',
+ '\uA74F': 'oo',
+ '\u24DF': 'p',
+ '\uFF50': 'p',
+ '\u1E55': 'p',
+ '\u1E57': 'p',
+ '\u01A5': 'p',
+ '\u1D7D': 'p',
+ '\uA751': 'p',
+ '\uA753': 'p',
+ '\uA755': 'p',
+ '\u24E0': 'q',
+ '\uFF51': 'q',
+ '\u024B': 'q',
+ '\uA757': 'q',
+ '\uA759': 'q',
+ '\u24E1': 'r',
+ '\uFF52': 'r',
+ '\u0155': 'r',
+ '\u1E59': 'r',
+ '\u0159': 'r',
+ '\u0211': 'r',
+ '\u0213': 'r',
+ '\u1E5B': 'r',
+ '\u1E5D': 'r',
+ '\u0157': 'r',
+ '\u1E5F': 'r',
+ '\u024D': 'r',
+ '\u027D': 'r',
+ '\uA75B': 'r',
+ '\uA7A7': 'r',
+ '\uA783': 'r',
+ '\u24E2': 's',
+ '\uFF53': 's',
+ '\u00DF': 's',
+ '\u015B': 's',
+ '\u1E65': 's',
+ '\u015D': 's',
+ '\u1E61': 's',
+ '\u0161': 's',
+ '\u1E67': 's',
+ '\u1E63': 's',
+ '\u1E69': 's',
+ '\u0219': 's',
+ '\u015F': 's',
+ '\u023F': 's',
+ '\uA7A9': 's',
+ '\uA785': 's',
+ '\u1E9B': 's',
+ '\u24E3': 't',
+ '\uFF54': 't',
+ '\u1E6B': 't',
+ '\u1E97': 't',
+ '\u0165': 't',
+ '\u1E6D': 't',
+ '\u021B': 't',
+ '\u0163': 't',
+ '\u1E71': 't',
+ '\u1E6F': 't',
+ '\u0167': 't',
+ '\u01AD': 't',
+ '\u0288': 't',
+ '\u2C66': 't',
+ '\uA787': 't',
+ '\uA729': 'tz',
+ '\u24E4': 'u',
+ '\uFF55': 'u',
+ '\u00F9': 'u',
+ '\u00FA': 'u',
+ '\u00FB': 'u',
+ '\u0169': 'u',
+ '\u1E79': 'u',
+ '\u016B': 'u',
+ '\u1E7B': 'u',
+ '\u016D': 'u',
+ '\u00FC': 'u',
+ '\u01DC': 'u',
+ '\u01D8': 'u',
+ '\u01D6': 'u',
+ '\u01DA': 'u',
+ '\u1EE7': 'u',
+ '\u016F': 'u',
+ '\u0171': 'u',
+ '\u01D4': 'u',
+ '\u0215': 'u',
+ '\u0217': 'u',
+ '\u01B0': 'u',
+ '\u1EEB': 'u',
+ '\u1EE9': 'u',
+ '\u1EEF': 'u',
+ '\u1EED': 'u',
+ '\u1EF1': 'u',
+ '\u1EE5': 'u',
+ '\u1E73': 'u',
+ '\u0173': 'u',
+ '\u1E77': 'u',
+ '\u1E75': 'u',
+ '\u0289': 'u',
+ '\u24E5': 'v',
+ '\uFF56': 'v',
+ '\u1E7D': 'v',
+ '\u1E7F': 'v',
+ '\u028B': 'v',
+ '\uA75F': 'v',
+ '\u028C': 'v',
+ '\uA761': 'vy',
+ '\u24E6': 'w',
+ '\uFF57': 'w',
+ '\u1E81': 'w',
+ '\u1E83': 'w',
+ '\u0175': 'w',
+ '\u1E87': 'w',
+ '\u1E85': 'w',
+ '\u1E98': 'w',
+ '\u1E89': 'w',
+ '\u2C73': 'w',
+ '\u24E7': 'x',
+ '\uFF58': 'x',
+ '\u1E8B': 'x',
+ '\u1E8D': 'x',
+ '\u24E8': 'y',
+ '\uFF59': 'y',
+ '\u1EF3': 'y',
+ '\u00FD': 'y',
+ '\u0177': 'y',
+ '\u1EF9': 'y',
+ '\u0233': 'y',
+ '\u1E8F': 'y',
+ '\u00FF': 'y',
+ '\u1EF7': 'y',
+ '\u1E99': 'y',
+ '\u1EF5': 'y',
+ '\u01B4': 'y',
+ '\u024F': 'y',
+ '\u1EFF': 'y',
+ '\u24E9': 'z',
+ '\uFF5A': 'z',
+ '\u017A': 'z',
+ '\u1E91': 'z',
+ '\u017C': 'z',
+ '\u017E': 'z',
+ '\u1E93': 'z',
+ '\u1E95': 'z',
+ '\u01B6': 'z',
+ '\u0225': 'z',
+ '\u0240': 'z',
+ '\u2C6C': 'z',
+ '\uA763': 'z',
+ '\u0386': '\u0391',
+ '\u0388': '\u0395',
+ '\u0389': '\u0397',
+ '\u038A': '\u0399',
+ '\u03AA': '\u0399',
+ '\u038C': '\u039F',
+ '\u038E': '\u03A5',
+ '\u03AB': '\u03A5',
+ '\u038F': '\u03A9',
+ '\u03AC': '\u03B1',
+ '\u03AD': '\u03B5',
+ '\u03AE': '\u03B7',
+ '\u03AF': '\u03B9',
+ '\u03CA': '\u03B9',
+ '\u0390': '\u03B9',
+ '\u03CC': '\u03BF',
+ '\u03CD': '\u03C5',
+ '\u03CB': '\u03C5',
+ '\u03B0': '\u03C5',
+ '\u03C9': '\u03C9',
+ '\u03C2': '\u03C3'
+ };
+
+ return diacritics;
+});
+
+S2.define('select2/data/base',[
+ '../utils'
+], function (Utils) {
+ function BaseAdapter ($element, options) {
+ BaseAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseAdapter, Utils.Observable);
+
+ BaseAdapter.prototype.current = function (callback) {
+ throw new Error('The `current` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.query = function (params, callback) {
+ throw new Error('The `query` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.bind = function (container, $container) {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.destroy = function () {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.generateResultId = function (container, data) {
+ var id = '';
+
+ if (container != null) {
+ id += container.id
+ } else {
+ id += Utils.generateChars(4);
+ }
+
+ id += '-result-';
+ id += Utils.generateChars(4);
+
+ if (data.id != null) {
+ id += '-' + data.id.toString();
+ } else {
+ id += '-' + Utils.generateChars(4);
+ }
+ return id;
+ };
+
+ return BaseAdapter;
+});
+
+S2.define('select2/data/select',[
+ './base',
+ '../utils',
+ 'jquery'
+], function (BaseAdapter, Utils, $) {
+ function SelectAdapter ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ SelectAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(SelectAdapter, BaseAdapter);
+
+ SelectAdapter.prototype.current = function (callback) {
+ var data = [];
+ var self = this;
+
+ this.$element.find(':selected').each(function () {
+ var $option = $(this);
+
+ var option = self.item($option);
+
+ data.push(option);
+ });
+
+ callback(data);
+ };
+
+ SelectAdapter.prototype.select = function (data) {
+ var self = this;
+
+ data.selected = true;
+
+ // If data.element is a DOM node, use it instead
+ if ($(data.element).is('option')) {
+ data.element.selected = true;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ if (this.$element.prop('multiple')) {
+ this.current(function (currentData) {
+ var val = [];
+
+ data = [data];
+ data.push.apply(data, currentData);
+
+ for (var d = 0; d < data.length; d++) {
+ var id = data[d].id;
+
+ if ($.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+ self.$element.trigger('change');
+ });
+ } else {
+ var val = data.id;
+
+ this.$element.val(val);
+ this.$element.trigger('change');
+ }
+ };
+
+ SelectAdapter.prototype.unselect = function (data) {
+ var self = this;
+
+ if (!this.$element.prop('multiple')) {
+ return;
+ }
+
+ data.selected = false;
+
+ if ($(data.element).is('option')) {
+ data.element.selected = false;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ this.current(function (currentData) {
+ var val = [];
+
+ for (var d = 0; d < currentData.length; d++) {
+ var id = currentData[d].id;
+
+ if (id !== data.id && $.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+
+ self.$element.trigger('change');
+ });
+ };
+
+ SelectAdapter.prototype.bind = function (container, $container) {
+ var self = this;
+
+ this.container = container;
+
+ container.on('select', function (params) {
+ self.select(params.data);
+ });
+
+ container.on('unselect', function (params) {
+ self.unselect(params.data);
+ });
+ };
+
+ SelectAdapter.prototype.destroy = function () {
+ // Remove anything added to child elements
+ this.$element.find('*').each(function () {
+ // Remove any custom data set by Select2
+ $.removeData(this, 'data');
+ });
+ };
+
+ SelectAdapter.prototype.query = function (params, callback) {
+ var data = [];
+ var self = this;
+
+ var $options = this.$element.children();
+
+ $options.each(function () {
+ var $option = $(this);
+
+ if (!$option.is('option') && !$option.is('optgroup')) {
+ return;
+ }
+
+ var option = self.item($option);
+
+ var matches = self.matches(params, option);
+
+ if (matches !== null) {
+ data.push(matches);
+ }
+ });
+
+ callback({
+ results: data
+ });
+ };
+
+ SelectAdapter.prototype.addOptions = function ($options) {
+ Utils.appendMany(this.$element, $options);
+ };
+
+ SelectAdapter.prototype.option = function (data) {
+ var option;
+
+ if (data.children) {
+ option = document.createElement('optgroup');
+ option.label = data.text;
+ } else {
+ option = document.createElement('option');
+
+ if (option.textContent !== undefined) {
+ option.textContent = data.text;
+ } else {
+ option.innerText = data.text;
+ }
+ }
+
+ if (data.id !== undefined) {
+ option.value = data.id;
+ }
+
+ if (data.disabled) {
+ option.disabled = true;
+ }
+
+ if (data.selected) {
+ option.selected = true;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ var $option = $(option);
+
+ var normalizedData = this._normalizeItem(data);
+ normalizedData.element = option;
+
+ // Override the option's data with the combined data
+ $.data(option, 'data', normalizedData);
+
+ return $option;
+ };
+
+ SelectAdapter.prototype.item = function ($option) {
+ var data = {};
+
+ data = $.data($option[0], 'data');
+
+ if (data != null) {
+ return data;
+ }
+
+ if ($option.is('option')) {
+ data = {
+ id: $option.val(),
+ text: $option.text(),
+ disabled: $option.prop('disabled'),
+ selected: $option.prop('selected'),
+ title: $option.prop('title')
+ };
+ } else if ($option.is('optgroup')) {
+ data = {
+ text: $option.prop('label'),
+ children: [],
+ title: $option.prop('title')
+ };
+
+ var $children = $option.children('option');
+ var children = [];
+
+ for (var c = 0; c < $children.length; c++) {
+ var $child = $($children[c]);
+
+ var child = this.item($child);
+
+ children.push(child);
+ }
+
+ data.children = children;
+ }
+
+ data = this._normalizeItem(data);
+ data.element = $option[0];
+
+ $.data($option[0], 'data', data);
+
+ return data;
+ };
+
+ SelectAdapter.prototype._normalizeItem = function (item) {
+ if (!$.isPlainObject(item)) {
+ item = {
+ id: item,
+ text: item
+ };
+ }
+
+ item = $.extend({}, {
+ text: ''
+ }, item);
+
+ var defaults = {
+ selected: false,
+ disabled: false
+ };
+
+ if (item.id != null) {
+ item.id = item.id.toString();
+ }
+
+ if (item.text != null) {
+ item.text = item.text.toString();
+ }
+
+ if (item._resultId == null && item.id) {
+ item._resultId = this.generateResultId(this.container, item);
+ }
+
+ return $.extend({}, defaults, item);
+ };
+
+ SelectAdapter.prototype.matches = function (params, data) {
+ var matcher = this.options.get('matcher');
+
+ return matcher(params, data);
+ };
+
+ return SelectAdapter;
+});
+
+S2.define('select2/data/array',[
+ './select',
+ '../utils',
+ 'jquery'
+], function (SelectAdapter, Utils, $) {
+ function ArrayAdapter ($element, options) {
+ var data = options.get('data') || [];
+
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
+
+ this.addOptions(this.convertToOptions(data));
+ }
+
+ Utils.Extend(ArrayAdapter, SelectAdapter);
+
+ ArrayAdapter.prototype.select = function (data) {
+ var $option = this.$element.find('option').filter(function (i, elm) {
+ return elm.value == data.id.toString();
+ });
+
+ if ($option.length === 0) {
+ $option = this.option(data);
+
+ this.addOptions($option);
+ }
+
+ ArrayAdapter.__super__.select.call(this, data);
+ };
+
+ ArrayAdapter.prototype.convertToOptions = function (data) {
+ var self = this;
+
+ var $existing = this.$element.find('option');
+ var existingIds = $existing.map(function () {
+ return self.item($(this)).id;
+ }).get();
+
+ var $options = [];
+
+ // Filter out all items except for the one passed in the argument
+ function onlyItem (item) {
+ return function () {
+ return $(this).val() == item.id;
+ };
+ }
+
+ for (var d = 0; d < data.length; d++) {
+ var item = this._normalizeItem(data[d]);
+
+ // Skip items which were pre-loaded, only merge the data
+ if ($.inArray(item.id, existingIds) >= 0) {
+ var $existingOption = $existing.filter(onlyItem(item));
+
+ var existingData = this.item($existingOption);
+ var newData = $.extend(true, {}, item, existingData);
+
+ var $newOption = this.option(newData);
+
+ $existingOption.replaceWith($newOption);
+
+ continue;
+ }
+
+ var $option = this.option(item);
+
+ if (item.children) {
+ var $children = this.convertToOptions(item.children);
+
+ Utils.appendMany($option, $children);
+ }
+
+ $options.push($option);
+ }
+
+ return $options;
+ };
+
+ return ArrayAdapter;
+});
+
+S2.define('select2/data/ajax',[
+ './array',
+ '../utils',
+ 'jquery'
+], function (ArrayAdapter, Utils, $) {
+ function AjaxAdapter ($element, options) {
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
+
+ if (this.ajaxOptions.processResults != null) {
+ this.processResults = this.ajaxOptions.processResults;
+ }
+
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
+ }
+
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
+
+ AjaxAdapter.prototype._applyDefaults = function (options) {
+ var defaults = {
+ data: function (params) {
+ return $.extend({}, params, {
+ q: params.term
+ });
+ },
+ transport: function (params, success, failure) {
+ var $request = $.ajax(params);
+
+ $request.then(success);
+ $request.fail(failure);
+
+ return $request;
+ }
+ };
+
+ return $.extend({}, defaults, options, true);
+ };
+
+ AjaxAdapter.prototype.processResults = function (results) {
+ return results;
+ };
+
+ AjaxAdapter.prototype.query = function (params, callback) {
+ var matches = [];
+ var self = this;
+
+ if (this._request != null) {
+ // JSONP requests cannot always be aborted
+ if ($.isFunction(this._request.abort)) {
+ this._request.abort();
+ }
+
+ this._request = null;
+ }
+
+ var options = $.extend({
+ type: 'GET'
+ }, this.ajaxOptions);
+
+ if (typeof options.url === 'function') {
+ options.url = options.url.call(this.$element, params);
+ }
+
+ if (typeof options.data === 'function') {
+ options.data = options.data.call(this.$element, params);
+ }
+
+ function request () {
+ var $request = options.transport(options, function (data) {
+ var results = self.processResults(data, params);
+
+ if (self.options.get('debug') && window.console && console.error) {
+ // Check to make sure that the response included a `results` key.
+ if (!results || !results.results || !$.isArray(results.results)) {
+ console.error(
+ 'Select2: The AJAX results did not return an array in the ' +
+ '`results` key of the response.'
+ );
+ }
+ }
+
+ callback(results);
+ self.container.focusOnActiveElement();
+ }, function () {
+ // Attempt to detect if a request was aborted
+ // Only works if the transport exposes a status property
+ if ($request.status && $request.status === '0') {
+ return;
+ }
+
+ self.trigger('results:message', {
+ message: 'errorLoading'
+ });
+ });
+
+ self._request = $request;
+ }
+
+ if (this.ajaxOptions.delay && params.term != null) {
+ if (this._queryTimeout) {
+ window.clearTimeout(this._queryTimeout);
+ }
+
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
+ } else {
+ request();
+ }
+ };
+
+ return AjaxAdapter;
+});
+
+S2.define('select2/data/tags',[
+ 'jquery'
+], function ($) {
+ function Tags (decorated, $element, options) {
+ var tags = options.get('tags');
+
+ var createTag = options.get('createTag');
+
+ if (createTag !== undefined) {
+ this.createTag = createTag;
+ }
+
+ var insertTag = options.get('insertTag');
+
+ if (insertTag !== undefined) {
+ this.insertTag = insertTag;
+ }
+
+ decorated.call(this, $element, options);
+
+ if ($.isArray(tags)) {
+ for (var t = 0; t < tags.length; t++) {
+ var tag = tags[t];
+ var item = this._normalizeItem(tag);
+
+ var $option = this.option(item);
+
+ this.$element.append($option);
+ }
+ }
+ }
+
+ Tags.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ this._removeOldTags();
+
+ if (params.term == null || params.page != null) {
+ decorated.call(this, params, callback);
+ return;
+ }
+
+ function wrapper (obj, child) {
+ var data = obj.results;
+
+ for (var i = 0; i < data.length; i++) {
+ var option = data[i];
+
+ var checkChildren = (
+ option.children != null &&
+ !wrapper({
+ results: option.children
+ }, true)
+ );
+
+ var optionText = (option.text || '').toUpperCase();
+ var paramsTerm = (params.term || '').toUpperCase();
+
+ var checkText = optionText === paramsTerm;
+
+ if (checkText || checkChildren) {
+ if (child) {
+ return false;
+ }
+
+ obj.data = data;
+ callback(obj);
+
+ return;
+ }
+ }
+
+ if (child) {
+ return true;
+ }
+
+ var tag = self.createTag(params);
+
+ if (tag != null) {
+ var $option = self.option(tag);
+ $option.attr('data-select2-tag', true);
+
+ self.addOptions([$option]);
+
+ self.insertTag(data, tag);
+ }
+
+ obj.results = data;
+
+ callback(obj);
+ }
+
+ decorated.call(this, params, wrapper);
+ };
+
+ Tags.prototype.createTag = function (decorated, params) {
+ var term = $.trim(params.term);
+
+ if (term === '') {
+ return null;
+ }
+
+ return {
+ id: term,
+ text: term
+ };
+ };
+
+ Tags.prototype.insertTag = function (_, data, tag) {
+ data.unshift(tag);
+ };
+
+ Tags.prototype._removeOldTags = function (_) {
+ var tag = this._lastTag;
+
+ var $options = this.$element.find('option[data-select2-tag]');
+
+ $options.each(function () {
+ if (this.selected) {
+ return;
+ }
+
+ $(this).remove();
+ });
+ };
+
+ return Tags;
+});
+
+S2.define('select2/data/tokenizer',[
+ 'jquery'
+], function ($) {
+ function Tokenizer (decorated, $element, options) {
+ var tokenizer = options.get('tokenizer');
+
+ if (tokenizer !== undefined) {
+ this.tokenizer = tokenizer;
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ this.$search = container.dropdown.$search || container.selection.$search ||
+ $container.find('.select2-search__field');
+ };
+
+ Tokenizer.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ function createAndSelect (data) {
+ // Normalize the data object so we can use it for checks
+ var item = self._normalizeItem(data);
+
+ // Check if the data object already exists as a tag
+ // Select it if it doesn't
+ var $existingOptions = self.$element.find('option').filter(function () {
+ return $(this).val() === item.id;
+ });
+
+ // If an existing option wasn't found for it, create the option
+ if (!$existingOptions.length) {
+ var $option = self.option(item);
+ $option.attr('data-select2-tag', true);
+
+ self._removeOldTags();
+ self.addOptions([$option]);
+ }
+
+ // Select the item, now that we know there is an option for it
+ select(item);
+ }
+
+ function select (data) {
+ self.trigger('select', {
+ data: data
+ });
+ }
+
+ params.term = params.term || '';
+
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
+
+ if (tokenData.term !== params.term) {
+ // Replace the search term if we have the search box
+ if (this.$search.length) {
+ this.$search.val(tokenData.term);
+ this.$search.focus();
+ }
+
+ params.term = tokenData.term;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
+ var separators = options.get('tokenSeparators') || [];
+ var term = params.term;
+ var i = 0;
+
+ var createTag = this.createTag || function (params) {
+ return {
+ id: params.term,
+ text: params.term
+ };
+ };
+
+ while (i < term.length) {
+ var termChar = term[i];
+
+ if ($.inArray(termChar, separators) === -1) {
+ i++;
+
+ continue;
+ }
+
+ var part = term.substr(0, i);
+ var partParams = $.extend({}, params, {
+ term: part
+ });
+
+ var data = createTag(partParams);
+
+ if (data == null) {
+ i++;
+ continue;
+ }
+
+ callback(data);
+
+ // Reset the term to not include the tokenized portion
+ term = term.substr(i + 1) || '';
+ i = 0;
+ }
+
+ return {
+ term: term
+ };
+ };
+
+ return Tokenizer;
+});
+
+S2.define('select2/data/minimumInputLength',[
+
+], function () {
+ function MinimumInputLength (decorated, $e, options) {
+ this.minimumInputLength = options.get('minimumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (params.term.length < this.minimumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooShort',
+ args: {
+ minimum: this.minimumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MinimumInputLength;
+});
+
+S2.define('select2/data/maximumInputLength',[
+
+], function () {
+ function MaximumInputLength (decorated, $e, options) {
+ this.maximumInputLength = options.get('maximumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (this.maximumInputLength > 0 &&
+ params.term.length > this.maximumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooLong',
+ args: {
+ maximum: this.maximumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MaximumInputLength;
+});
+
+S2.define('select2/data/maximumSelectionLength',[
+
+], function (){
+ function MaximumSelectionLength (decorated, $e, options) {
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumSelectionLength.prototype.query =
+ function (decorated, params, callback) {
+ var self = this;
+
+ this.current(function (currentData) {
+ var count = currentData != null ? currentData.length : 0;
+ if (self.maximumSelectionLength > 0 &&
+ count >= self.maximumSelectionLength) {
+ self.trigger('results:message', {
+ message: 'maximumSelected',
+ args: {
+ maximum: self.maximumSelectionLength
+ }
+ });
+ return;
+ }
+ decorated.call(self, params, callback);
+ });
+ };
+
+ return MaximumSelectionLength;
+});
+
+S2.define('select2/dropdown',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Dropdown ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ Dropdown.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Dropdown, Utils.Observable);
+
+ Dropdown.prototype.render = function () {
+ var $dropdown = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ $dropdown.attr('dir', this.options.get('dir'));
+
+ this.$dropdown = $dropdown;
+
+ return $dropdown;
+ };
+
+ Dropdown.prototype.bind = function () {
+ // Should be implemented in subclasses
+ };
+
+ Dropdown.prototype.position = function ($dropdown, $container) {
+ // Should be implmented in subclasses
+ };
+
+ Dropdown.prototype.destroy = function () {
+ // Remove the dropdown from the DOM
+ this.$dropdown.remove();
+ };
+
+ return Dropdown;
+});
+
+S2.define('select2/dropdown/search',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function Search () { }
+
+ Search.prototype.render = function (decorated) {
+ var $rendered = decorated.call(this);
+
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ $rendered.prepend($search);
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ this.$search.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+ });
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$search.on('input', function (evt) {
+ // Unbind the duplicated `keyup` event
+ $(this).off('keyup');
+ });
+
+ this.$search.on('keyup input', function (evt) {
+ self.handleSearch(evt);
+ });
+
+ container.on('open', function () {
+ self.$search.attr('tabindex', 0);
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.focus();
+
+ window.setTimeout(function () {
+ self.$search.focus();
+ }, 0);
+ });
+
+ container.on('close', function () {
+ self.$search.attr('tabindex', -1);
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.val('');
+ });
+
+ container.on('focus', function () {
+ if (container.isOpen()) {
+ self.$search.focus();
+ }
+ });
+
+ container.on('results:all', function (params) {
+ if (params.query.term == null || params.query.term === '') {
+ var showSearch = self.showSearch(params);
+
+ if (showSearch) {
+ self.$searchContainer.removeClass('select2-search--hide');
+ } else {
+ self.$searchContainer.addClass('select2-search--hide');
+ }
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+ };
+
+ Search.prototype.handleSearch = function (evt) {
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.showSearch = function (_, params) {
+ return true;
+ };
+
+ return Search;
+});
+
+S2.define('select2/dropdown/hidePlaceholder',[
+
+], function () {
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ HidePlaceholder.prototype.append = function (decorated, data) {
+ data.results = this.removePlaceholder(data.results);
+
+ decorated.call(this, data);
+ };
+
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
+ var modifiedData = data.slice(0);
+
+ for (var d = data.length - 1; d >= 0; d--) {
+ var item = data[d];
+
+ if (this.placeholder.id === item.id) {
+ modifiedData.splice(d, 1);
+ }
+ }
+
+ return modifiedData;
+ };
+
+ return HidePlaceholder;
+});
+
+S2.define('select2/dropdown/infiniteScroll',[
+ 'jquery'
+], function ($) {
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
+ this.lastParams = {};
+
+ decorated.call(this, $element, options, dataAdapter);
+
+ this.$loadingMore = this.createLoadingMore();
+ this.loading = false;
+ }
+
+ InfiniteScroll.prototype.append = function (decorated, data) {
+ this.$loadingMore.remove();
+ this.loading = false;
+
+ decorated.call(this, data);
+
+ if (this.showLoadingMore(data)) {
+ this.$results.append(this.$loadingMore);
+ }
+ };
+
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('query', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ container.on('query:append', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ this.$results.on('scroll', function () {
+ var isLoadMoreVisible = $.contains(
+ document.documentElement,
+ self.$loadingMore[0]
+ );
+
+ if (self.loading || !isLoadMoreVisible) {
+ return;
+ }
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var loadingMoreOffset = self.$loadingMore.offset().top +
+ self.$loadingMore.outerHeight(false);
+
+ if (currentOffset + 50 >= loadingMoreOffset) {
+ self.loadMore();
+ }
+ });
+ };
+
+ InfiniteScroll.prototype.loadMore = function () {
+ this.loading = true;
+
+ var params = $.extend({}, {page: 1}, this.lastParams);
+
+ params.page++;
+
+ this.trigger('query:append', params);
+ };
+
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
+ return data.pagination && data.pagination.more;
+ };
+
+ InfiniteScroll.prototype.createLoadingMore = function () {
+ var $option = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get('loadingMore');
+
+ $option.html(message(this.lastParams));
+
+ return $option;
+ };
+
+ return InfiniteScroll;
+});
+
+S2.define('select2/dropdown/attachBody',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function AttachBody (decorated, $element, options) {
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
+
+ decorated.call(this, $element, options);
+ }
+
+ AttachBody.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ var setupResultsEvents = false;
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self._showDropdown();
+ self._attachPositioningHandler(container);
+
+ if (!setupResultsEvents) {
+ setupResultsEvents = true;
+
+ container.on('results:all', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+
+ container.on('results:append', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ }
+ });
+
+ container.on('close', function () {
+ self._hideDropdown();
+ self._detachPositioningHandler(container);
+ });
+
+ this.$dropdownContainer.on('mousedown', function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ AttachBody.prototype.destroy = function (decorated) {
+ decorated.call(this);
+
+ this.$dropdownContainer.remove();
+ };
+
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
+ // Clone all of the container classes
+ $dropdown.attr('class', $container.attr('class'));
+
+ $dropdown.removeClass('select2');
+ $dropdown.addClass('select2-container--open');
+
+ $dropdown.css({
+ position: 'absolute',
+ top: -999999
+ });
+
+ this.$container = $container;
+ };
+
+ AttachBody.prototype.render = function (decorated) {
+ var $container = $(' ');
+
+ var $dropdown = decorated.call(this);
+ $container.append($dropdown);
+
+ this.$dropdownContainer = $container;
+
+ return $container;
+ };
+
+ AttachBody.prototype._hideDropdown = function (decorated) {
+ this.$dropdownContainer.detach();
+ };
+
+ AttachBody.prototype._attachPositioningHandler =
+ function (decorated, container) {
+ var self = this;
+
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.each(function () {
+ $(this).data('select2-scroll-position', {
+ x: $(this).scrollLeft(),
+ y: $(this).scrollTop()
+ });
+ });
+
+ $watchers.on(scrollEvent, function (ev) {
+ var position = $(this).data('select2-scroll-position');
+ $(this).scrollTop(position.y);
+ });
+
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
+ function (e) {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ };
+
+ AttachBody.prototype._detachPositioningHandler =
+ function (decorated, container) {
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.off(scrollEvent);
+
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
+ };
+
+ AttachBody.prototype._positionDropdown = function () {
+ var $window = $(window);
+
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
+
+ var newDirection = null;
+
+ var offset = this.$container.offset();
+
+ offset.bottom = offset.top + this.$container.outerHeight(false);
+
+ var container = {
+ height: this.$container.outerHeight(false)
+ };
+
+ container.top = offset.top;
+ container.bottom = offset.top + container.height;
+
+ var dropdown = {
+ height: this.$dropdown.outerHeight(false)
+ };
+
+ var viewport = {
+ top: $window.scrollTop(),
+ bottom: $window.scrollTop() + $window.height()
+ };
+
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
+
+ var css = {
+ left: offset.left,
+ top: container.bottom
+ };
+
+ // Determine what the parent element is to use for calciulating the offset
+ var $offsetParent = this.$dropdownParent;
+
+ // For statically positoned elements, we need to get the element
+ // that is determining the offset
+ if ($offsetParent.css('position') === 'static') {
+ $offsetParent = $offsetParent.offsetParent();
+ }
+
+ var parentOffset = $offsetParent.offset();
+
+ css.top -= parentOffset.top;
+ css.left -= parentOffset.left;
+
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
+ newDirection = 'below';
+ }
+
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
+ newDirection = 'above';
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
+ newDirection = 'below';
+ }
+
+ if (newDirection == 'above' ||
+ (isCurrentlyAbove && newDirection !== 'below')) {
+ css.top = container.top - parentOffset.top - dropdown.height;
+ }
+
+ if (newDirection != null) {
+ this.$dropdown
+ .removeClass('select2-dropdown--below select2-dropdown--above')
+ .addClass('select2-dropdown--' + newDirection);
+ this.$container
+ .removeClass('select2-container--below select2-container--above')
+ .addClass('select2-container--' + newDirection);
+ }
+
+ this.$dropdownContainer.css(css);
+ };
+
+ AttachBody.prototype._resizeDropdown = function () {
+ var css = {
+ width: this.$container.outerWidth(false) + 'px'
+ };
+
+ if (this.options.get('dropdownAutoWidth')) {
+ css.minWidth = css.width;
+ css.position = 'relative';
+ css.width = 'auto';
+ }
+
+ this.$dropdown.css(css);
+ };
+
+ AttachBody.prototype._showDropdown = function (decorated) {
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
+
+ this._positionDropdown();
+ this._resizeDropdown();
+ };
+
+ return AttachBody;
+});
+
+S2.define('select2/dropdown/minimumResultsForSearch',[
+
+], function () {
+ function countResults (data) {
+ var count = 0;
+
+ for (var d = 0; d < data.length; d++) {
+ var item = data[d];
+
+ if (item.children) {
+ count += countResults(item.children);
+ } else {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
+
+ if (this.minimumResultsForSearch < 0) {
+ this.minimumResultsForSearch = Infinity;
+ }
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
+ return false;
+ }
+
+ return decorated.call(this, params);
+ };
+
+ return MinimumResultsForSearch;
+});
+
+S2.define('select2/dropdown/selectOnClose',[
+
+], function () {
+ function SelectOnClose () { }
+
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('close', function (params) {
+ self._handleSelectOnClose(params);
+ });
+ };
+
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
+ if (params && params.originalSelect2Event != null) {
+ var event = params.originalSelect2Event;
+
+ // Don't select an item if the close event was triggered from a select or
+ // unselect event
+ if (event._type === 'select' || event._type === 'unselect') {
+ return;
+ }
+ }
+
+ var $highlightedResults = this.getHighlightedResults();
+
+ // Only select highlighted results
+ if ($highlightedResults.length < 1) {
+ return;
+ }
+
+ var data = $highlightedResults.data('data');
+
+ // Don't re-select already selected resulte
+ if (
+ (data.element != null && data.element.selected) ||
+ (data.element == null && data.selected)
+ ) {
+ return;
+ }
+
+ this.trigger('select', {
+ data: data
+ });
+ };
+
+ return SelectOnClose;
+});
+
+S2.define('select2/dropdown/closeOnSelect',[
+
+], function () {
+ function CloseOnSelect () { }
+
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('select', function (evt) {
+ self._selectTriggered(evt);
+ });
+
+ container.on('unselect', function (evt) {
+ self._selectTriggered(evt);
+ });
+ };
+
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
+ var originalEvent = evt.originalEvent;
+
+ // Don't close if the control key is being held
+ if (originalEvent && originalEvent.ctrlKey) {
+ return;
+ }
+
+ this.trigger('close', {
+ originalEvent: originalEvent,
+ originalSelect2Event: evt
+ });
+ };
+
+ return CloseOnSelect;
+});
+
+S2.define('select2/i18n/en',[],function () {
+ // English
+ return {
+ errorLoading: function () {
+ return 'The results could not be loaded.';
+ },
+ inputTooLong: function (args) {
+ var overChars = args.input.length - args.maximum;
+
+ var message = 'Please delete ' + overChars + ' character';
+
+ if (overChars != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ inputTooShort: function (args) {
+ var remainingChars = args.minimum - args.input.length;
+
+ var message = 'Please enter ' + remainingChars + ' or more characters';
+
+ return message;
+ },
+ loadingMore: function () {
+ return 'Loading more results…';
+ },
+ maximumSelected: function (args) {
+ var message = 'You can only select ' + args.maximum + ' item';
+
+ if (args.maximum != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ noResults: function () {
+ return 'No results found';
+ },
+ searching: function () {
+ return 'Searching…';
+ }
+ };
+});
+
+S2.define('select2/defaults',[
+ 'jquery',
+ 'require',
+
+ './results',
+
+ './selection/single',
+ './selection/multiple',
+ './selection/placeholder',
+ './selection/allowClear',
+ './selection/search',
+ './selection/eventRelay',
+
+ './utils',
+ './translation',
+ './diacritics',
+
+ './data/select',
+ './data/array',
+ './data/ajax',
+ './data/tags',
+ './data/tokenizer',
+ './data/minimumInputLength',
+ './data/maximumInputLength',
+ './data/maximumSelectionLength',
+
+ './dropdown',
+ './dropdown/search',
+ './dropdown/hidePlaceholder',
+ './dropdown/infiniteScroll',
+ './dropdown/attachBody',
+ './dropdown/minimumResultsForSearch',
+ './dropdown/selectOnClose',
+ './dropdown/closeOnSelect',
+
+ './i18n/en'
+], function ($, require,
+
+ ResultsList,
+
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
+ SelectionSearch, EventRelay,
+
+ Utils, Translation, DIACRITICS,
+
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
+
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
+
+ EnglishTranslation) {
+ function Defaults () {
+ this.reset();
+ }
+
+ Defaults.prototype.apply = function (options) {
+ options = $.extend(true, {}, this.defaults, options);
+
+ if (options.dataAdapter == null) {
+ if (options.ajax != null) {
+ options.dataAdapter = AjaxData;
+ } else if (options.data != null) {
+ options.dataAdapter = ArrayData;
+ } else {
+ options.dataAdapter = SelectData;
+ }
+
+ if (options.minimumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MinimumInputLength
+ );
+ }
+
+ if (options.maximumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumInputLength
+ );
+ }
+
+ if (options.maximumSelectionLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumSelectionLength
+ );
+ }
+
+ if (options.tags) {
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
+ }
+
+ if (options.tokenSeparators != null || options.tokenizer != null) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Tokenizer
+ );
+ }
+
+ if (options.query != null) {
+ var Query = require(options.amdBase + 'compat/query');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Query
+ );
+ }
+
+ if (options.initSelection != null) {
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ InitSelection
+ );
+ }
+ }
+
+ if (options.resultsAdapter == null) {
+ options.resultsAdapter = ResultsList;
+
+ if (options.ajax != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ InfiniteScroll
+ );
+ }
+
+ if (options.placeholder != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ HidePlaceholder
+ );
+ }
+
+ if (options.selectOnClose) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ SelectOnClose
+ );
+ }
+ }
+
+ if (options.dropdownAdapter == null) {
+ if (options.multiple) {
+ options.dropdownAdapter = Dropdown;
+ } else {
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
+
+ options.dropdownAdapter = SearchableDropdown;
+ }
+
+ if (options.minimumResultsForSearch !== 0) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ MinimumResultsForSearch
+ );
+ }
+
+ if (options.closeOnSelect) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ CloseOnSelect
+ );
+ }
+
+ if (
+ options.dropdownCssClass != null ||
+ options.dropdownCss != null ||
+ options.adaptDropdownCssClass != null
+ ) {
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ DropdownCSS
+ );
+ }
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ AttachBody
+ );
+ }
+
+ if (options.selectionAdapter == null) {
+ if (options.multiple) {
+ options.selectionAdapter = MultipleSelection;
+ } else {
+ options.selectionAdapter = SingleSelection;
+ }
+
+ // Add the placeholder mixin if a placeholder was specified
+ if (options.placeholder != null) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ Placeholder
+ );
+ }
+
+ if (options.allowClear) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ AllowClear
+ );
+ }
+
+ if (options.multiple) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ SelectionSearch
+ );
+ }
+
+ if (
+ options.containerCssClass != null ||
+ options.containerCss != null ||
+ options.adaptContainerCssClass != null
+ ) {
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ ContainerCSS
+ );
+ }
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ EventRelay
+ );
+ }
+
+ if (typeof options.language === 'string') {
+ // Check if the language is specified with a region
+ if (options.language.indexOf('-') > 0) {
+ // Extract the region information if it is included
+ var languageParts = options.language.split('-');
+ var baseLanguage = languageParts[0];
+
+ options.language = [options.language, baseLanguage];
+ } else {
+ options.language = [options.language];
+ }
+ }
+
+ if ($.isArray(options.language)) {
+ var languages = new Translation();
+ options.language.push('en');
+
+ var languageNames = options.language;
+
+ for (var l = 0; l < languageNames.length; l++) {
+ var name = languageNames[l];
+ var language = {};
+
+ try {
+ // Try to load it with the original name
+ language = Translation.loadPath(name);
+ } catch (e) {
+ try {
+ // If we couldn't load it, check if it wasn't the full path
+ name = this.defaults.amdLanguageBase + name;
+ language = Translation.loadPath(name);
+ } catch (ex) {
+ // The translation could not be loaded at all. Sometimes this is
+ // because of a configuration problem, other times this can be
+ // because of how Select2 helps load all possible translation files.
+ if (options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The language file for "' + name + '" could not be ' +
+ 'automatically loaded. A fallback will be used instead.'
+ );
+ }
+
+ continue;
+ }
+ }
+
+ languages.extend(language);
+ }
+
+ options.translations = languages;
+ } else {
+ var baseTranslation = Translation.loadPath(
+ this.defaults.amdLanguageBase + 'en'
+ );
+ var customTranslation = new Translation(options.language);
+
+ customTranslation.extend(baseTranslation);
+
+ options.translations = customTranslation;
+ }
+
+ return options;
+ };
+
+ Defaults.prototype.reset = function () {
+ function stripDiacritics (text) {
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
+ function match(a) {
+ return DIACRITICS[a] || a;
+ }
+
+ return text.replace(/[^\u0000-\u007E]/g, match);
+ }
+
+ function matcher (params, data) {
+ // Always return the object if there is nothing to compare
+ if ($.trim(params.term) === '') {
+ return data;
+ }
+
+ // Do a recursive check for options with children
+ if (data.children && data.children.length > 0) {
+ // Clone the data object if there are children
+ // This is required as we modify the object to remove any non-matches
+ var match = $.extend(true, {}, data);
+
+ // Check each child of the option
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ var matches = matcher(params, child);
+
+ // If there wasn't a match, remove the object in the array
+ if (matches == null) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ // If any children matched, return the new object
+ if (match.children.length > 0) {
+ return match;
+ }
+
+ // If there were no matching children, check just the plain object
+ return matcher(params, match);
+ }
+
+ var original = stripDiacritics(data.text).toUpperCase();
+ var term = stripDiacritics(params.term).toUpperCase();
+
+ // Check if the text contains the term
+ if (original.indexOf(term) > -1) {
+ return data;
+ }
+
+ // If it doesn't contain the term, don't return anything
+ return null;
+ }
+
+ this.defaults = {
+ amdBase: './',
+ amdLanguageBase: './i18n/',
+ closeOnSelect: true,
+ debug: false,
+ dropdownAutoWidth: false,
+ escapeMarkup: Utils.escapeMarkup,
+ language: EnglishTranslation,
+ matcher: matcher,
+ minimumInputLength: 0,
+ maximumInputLength: 0,
+ maximumSelectionLength: 0,
+ minimumResultsForSearch: 0,
+ selectOnClose: false,
+ sorter: function (data) {
+ return data;
+ },
+ templateResult: function (result) {
+ return result.text;
+ },
+ templateSelection: function (selection) {
+ return selection.text;
+ },
+ theme: 'default',
+ width: 'resolve'
+ };
+ };
+
+ Defaults.prototype.set = function (key, value) {
+ var camelKey = $.camelCase(key);
+
+ var data = {};
+ data[camelKey] = value;
+
+ var convertedData = Utils._convertData(data);
+
+ $.extend(this.defaults, convertedData);
+ };
+
+ var defaults = new Defaults();
+
+ return defaults;
+});
+
+S2.define('select2/options',[
+ 'require',
+ 'jquery',
+ './defaults',
+ './utils'
+], function (require, $, Defaults, Utils) {
+ function Options (options, $element) {
+ this.options = options;
+
+ if ($element != null) {
+ this.fromElement($element);
+ }
+
+ this.options = Defaults.apply(this.options);
+
+ if ($element && $element.is('input')) {
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
+
+ this.options.dataAdapter = Utils.Decorate(
+ this.options.dataAdapter,
+ InputCompat
+ );
+ }
+ }
+
+ Options.prototype.fromElement = function ($e) {
+ var excludedData = ['select2'];
+
+ if (this.options.multiple == null) {
+ this.options.multiple = $e.prop('multiple');
+ }
+
+ if (this.options.disabled == null) {
+ this.options.disabled = $e.prop('disabled');
+ }
+
+ if (this.options.language == null) {
+ if ($e.prop('lang')) {
+ this.options.language = $e.prop('lang').toLowerCase();
+ } else if ($e.closest('[lang]').prop('lang')) {
+ this.options.language = $e.closest('[lang]').prop('lang');
+ }
+ }
+
+ if (this.options.dir == null) {
+ if ($e.prop('dir')) {
+ this.options.dir = $e.prop('dir');
+ } else if ($e.closest('[dir]').prop('dir')) {
+ this.options.dir = $e.closest('[dir]').prop('dir');
+ } else {
+ this.options.dir = 'ltr';
+ }
+ }
+
+ $e.prop('disabled', this.options.disabled);
+ $e.prop('multiple', this.options.multiple);
+
+ if ($e.data('select2Tags')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
+ 'removed in future versions of Select2.'
+ );
+ }
+
+ $e.data('data', $e.data('select2Tags'));
+ $e.data('tags', true);
+ }
+
+ if ($e.data('ajaxUrl')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
+ '`data-ajax--url` and support for the old attribute will be removed' +
+ ' in future versions of Select2.'
+ );
+ }
+
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
+ $e.data('ajax--url', $e.data('ajaxUrl'));
+ }
+
+ var dataset = {};
+
+ // Prefer the element's `dataset` attribute if it exists
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
+ } else {
+ dataset = $e.data();
+ }
+
+ var data = $.extend(true, {}, dataset);
+
+ data = Utils._convertData(data);
+
+ for (var key in data) {
+ if ($.inArray(key, excludedData) > -1) {
+ continue;
+ }
+
+ if ($.isPlainObject(this.options[key])) {
+ $.extend(this.options[key], data[key]);
+ } else {
+ this.options[key] = data[key];
+ }
+ }
+
+ return this;
+ };
+
+ Options.prototype.get = function (key) {
+ return this.options[key];
+ };
+
+ Options.prototype.set = function (key, val) {
+ this.options[key] = val;
+ };
+
+ return Options;
+});
+
+S2.define('select2/core',[
+ 'jquery',
+ './options',
+ './utils',
+ './keys'
+], function ($, Options, Utils, KEYS) {
+ var Select2 = function ($element, options) {
+ if ($element.data('select2') != null) {
+ $element.data('select2').destroy();
+ }
+
+ this.$element = $element;
+
+ this.id = this._generateId($element);
+
+ options = options || {};
+
+ this.options = new Options(options, $element);
+
+ Select2.__super__.constructor.call(this);
+
+ // Set up the tabindex
+
+ var tabindex = $element.attr('tabindex') || 0;
+ $element.data('old-tabindex', tabindex);
+ $element.attr('tabindex', '-1');
+
+ // Set up containers and adapters
+
+ var DataAdapter = this.options.get('dataAdapter');
+ this.dataAdapter = new DataAdapter($element, this.options);
+
+ var $container = this.render();
+
+ this._placeContainer($container);
+
+ var SelectionAdapter = this.options.get('selectionAdapter');
+ this.selection = new SelectionAdapter($element, this.options);
+ this.$selection = this.selection.render();
+
+ this.selection.position(this.$selection, $container);
+
+ var DropdownAdapter = this.options.get('dropdownAdapter');
+ this.dropdown = new DropdownAdapter($element, this.options);
+ this.$dropdown = this.dropdown.render();
+
+ this.dropdown.position(this.$dropdown, $container);
+
+ var ResultsAdapter = this.options.get('resultsAdapter');
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
+ this.$results = this.results.render();
+
+ this.results.position(this.$results, this.$dropdown);
+
+ // Bind events
+
+ var self = this;
+
+ // Bind the container to all of the adapters
+ this._bindAdapters();
+
+ // Register any DOM event handlers
+ this._registerDomEvents();
+
+ // Register any internal event handlers
+ this._registerDataEvents();
+ this._registerSelectionEvents();
+ this._registerDropdownEvents();
+ this._registerResultsEvents();
+ this._registerEvents();
+
+ // Set the initial state
+ this.dataAdapter.current(function (initialData) {
+ self.trigger('selection:update', {
+ data: initialData
+ });
+ });
+
+ // Hide the original select
+ $element.addClass('select2-hidden-accessible');
+ $element.attr('aria-hidden', 'true');
+
+ // Synchronize any monitored attributes
+ this._syncAttributes();
+
+ $element.data('select2', this);
+ };
+
+ Utils.Extend(Select2, Utils.Observable);
+
+ Select2.prototype._generateId = function ($element) {
+ var id = '';
+
+ if ($element.attr('id') != null) {
+ id = $element.attr('id');
+ } else if ($element.attr('name') != null) {
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
+ } else {
+ id = Utils.generateChars(4);
+ }
+
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
+ id = 'select2-' + id;
+
+ return id;
+ };
+
+ Select2.prototype._placeContainer = function ($container) {
+ $container.insertAfter(this.$element);
+
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
+
+ if (width != null) {
+ $container.css('width', width);
+ }
+ };
+
+ Select2.prototype._resolveWidth = function ($element, method) {
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
+
+ if (method == 'resolve') {
+ var styleWidth = this._resolveWidth($element, 'style');
+
+ if (styleWidth != null) {
+ return styleWidth;
+ }
+
+ return this._resolveWidth($element, 'element');
+ }
+
+ if (method == 'element') {
+ var elementWidth = $element.outerWidth(false);
+
+ if (elementWidth <= 0) {
+ return 'auto';
+ }
+
+ return elementWidth + 'px';
+ }
+
+ if (method == 'style') {
+ var style = $element.attr('style');
+
+ if (typeof(style) !== 'string') {
+ return null;
+ }
+
+ var attrs = style.split(';');
+
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
+ var attr = attrs[i].replace(/\s/g, '');
+ var matches = attr.match(WIDTH);
+
+ if (matches !== null && matches.length >= 1) {
+ return matches[1];
+ }
+ }
+
+ return null;
+ }
+
+ return method;
+ };
+
+ Select2.prototype._bindAdapters = function () {
+ this.dataAdapter.bind(this, this.$container);
+ this.selection.bind(this, this.$container);
+
+ this.dropdown.bind(this, this.$container);
+ this.results.bind(this, this.$container);
+ };
+
+ Select2.prototype._registerDomEvents = function () {
+ var self = this;
+
+ this.$element.on('change.select2', function () {
+ self.dataAdapter.current(function (data) {
+ self.trigger('selection:update', {
+ data: data
+ });
+ });
+ });
+
+ this.$element.on('focus.select2', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this._syncA = Utils.bind(this._syncAttributes, this);
+ this._syncS = Utils.bind(this._syncSubtree, this);
+
+ if (this.$element[0].attachEvent) {
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
+ }
+
+ var observer = window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver
+ ;
+
+ if (observer != null) {
+ this._observer = new observer(function (mutations) {
+ $.each(mutations, self._syncA);
+ $.each(mutations, self._syncS);
+ });
+ this._observer.observe(this.$element[0], {
+ attributes: true,
+ childList: true,
+ subtree: false
+ });
+ } else if (this.$element[0].addEventListener) {
+ this.$element[0].addEventListener(
+ 'DOMAttrModified',
+ self._syncA,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeInserted',
+ self._syncS,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeRemoved',
+ self._syncS,
+ false
+ );
+ }
+ };
+
+ Select2.prototype._registerDataEvents = function () {
+ var self = this;
+
+ this.dataAdapter.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerSelectionEvents = function () {
+ var self = this;
+ var nonRelayEvents = ['toggle', 'focus'];
+
+ this.selection.on('toggle', function () {
+ self.toggleDropdown();
+ });
+
+ this.selection.on('focus', function (params) {
+ self.focus(params);
+ });
+
+ this.selection.on('*', function (name, params) {
+ if ($.inArray(name, nonRelayEvents) !== -1) {
+ return;
+ }
+
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerDropdownEvents = function () {
+ var self = this;
+
+ this.dropdown.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerResultsEvents = function () {
+ var self = this;
+
+ this.results.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerEvents = function () {
+ var self = this;
+
+ this.on('open', function () {
+ self.$container.addClass('select2-container--open');
+ });
+
+ this.on('close', function () {
+ self.$container.removeClass('select2-container--open');
+ });
+
+ this.on('enable', function () {
+ self.$container.removeClass('select2-container--disabled');
+ });
+
+ this.on('disable', function () {
+ self.$container.addClass('select2-container--disabled');
+ });
+
+ this.on('blur', function () {
+ self.$container.removeClass('select2-container--focus');
+ });
+
+ this.on('query', function (params) {
+ if (!self.isOpen()) {
+ self.trigger('open', {});
+ }
+
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:all', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('query:append', function (params) {
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:append', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('open', function(){
+ // Focus on the active element when opening dropdown.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1);
+ });
+
+ $(document).on('keydown', function (evt) {
+ var key = evt.which;
+ if (self.isOpen()) {
+ if (key === KEYS.ESC || key === KEYS.TAB ||
+ (key === KEYS.UP && evt.altKey)) {
+ self.close();
+
+ evt.preventDefault();
+ } else if (key === KEYS.ENTER) {
+ self.trigger('results:select', {});
+
+ evt.preventDefault();
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
+ self.trigger('results:toggle', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.UP) {
+ self.trigger('results:previous', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.DOWN) {
+ self.trigger('results:next', {});
+
+ evt.preventDefault();
+ }
+
+ // Move the focus to the selected element on keyboard navigation.
+ // Required for screen readers to work properly.
+ if (key === KEYS.DOWN || key === KEYS.UP) {
+ self.focusOnActiveElement();
+ } else {
+ // Focus on the search if user starts typing.
+ var $searchField = self.$dropdown.find('.select2-search__field');
+ if (! $searchField.length) {
+ $searchField = self.$container.find('.select2-search__field');
+ }
+ $searchField.focus();
+ // Focus back to active selection when finished typing.
+ // Small delay so typed character can be read by screen reader.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1000);
+ }
+
+ } else if (self.hasFocus()) {
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
+ (key === KEYS.DOWN && evt.altKey)) {
+ self.open();
+ evt.preventDefault();
+ }
+ }
+ });
+ };
+
+ Select2.prototype.focusOnActiveElement = function () {
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
+ if (! Utils.isTouchscreen()) {
+ this.$results.find('li.select2-results__option--highlighted').focus();
+ }
+ };
+
+ Select2.prototype._syncAttributes = function () {
+ this.options.set('disabled', this.$element.prop('disabled'));
+
+ if (this.options.get('disabled')) {
+ if (this.isOpen()) {
+ this.close();
+ }
+
+ this.trigger('disable', {});
+ } else {
+ this.trigger('enable', {});
+ }
+ };
+
+ Select2.prototype._syncSubtree = function (evt, mutations) {
+ var changed = false;
+ var self = this;
+
+ // Ignore any mutation events raised for elements that aren't options or
+ // optgroups. This handles the case when the select element is destroyed
+ if (
+ evt && evt.target && (
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
+ )
+ ) {
+ return;
+ }
+
+ if (!mutations) {
+ // If mutation events aren't supported, then we can only assume that the
+ // change affected the selections
+ changed = true;
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
+ var node = mutations.addedNodes[n];
+
+ if (node.selected) {
+ changed = true;
+ }
+ }
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
+ changed = true;
+ }
+
+ // Only re-pull the data if we think there is a change
+ if (changed) {
+ this.dataAdapter.current(function (currentData) {
+ self.trigger('selection:update', {
+ data: currentData
+ });
+ });
+ }
+ };
+
+ /**
+ * Override the trigger method to automatically trigger pre-events when
+ * there are events that can be prevented.
+ */
+ Select2.prototype.trigger = function (name, args) {
+ var actualTrigger = Select2.__super__.trigger;
+ var preTriggerMap = {
+ 'open': 'opening',
+ 'close': 'closing',
+ 'select': 'selecting',
+ 'unselect': 'unselecting'
+ };
+
+ if (args === undefined) {
+ args = {};
+ }
+
+ if (name in preTriggerMap) {
+ var preTriggerName = preTriggerMap[name];
+ var preTriggerArgs = {
+ prevented: false,
+ name: name,
+ args: args
+ };
+
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
+
+ if (preTriggerArgs.prevented) {
+ args.prevented = true;
+
+ return;
+ }
+ }
+
+ actualTrigger.call(this, name, args);
+ };
+
+ Select2.prototype.toggleDropdown = function () {
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ if (this.isOpen()) {
+ this.close();
+ } else {
+ this.open();
+ }
+ };
+
+ Select2.prototype.open = function () {
+ if (this.isOpen()) {
+ return;
+ }
+
+ this.trigger('query', {});
+ };
+
+ Select2.prototype.close = function () {
+ if (!this.isOpen()) {
+ return;
+ }
+
+ this.trigger('close', {});
+ };
+
+ Select2.prototype.isOpen = function () {
+ return this.$container.hasClass('select2-container--open');
+ };
+
+ Select2.prototype.hasFocus = function () {
+ return this.$container.hasClass('select2-container--focus');
+ };
+
+ Select2.prototype.focus = function (data) {
+ // No need to re-trigger focus events if we are already focused
+ if (this.hasFocus()) {
+ return;
+ }
+
+ this.$container.addClass('select2-container--focus');
+ this.trigger('focus', {});
+ };
+
+ Select2.prototype.enable = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
+ ' instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ args = [true];
+ }
+
+ var disabled = !args[0];
+
+ this.$element.prop('disabled', disabled);
+ };
+
+ Select2.prototype.data = function () {
+ if (this.options.get('debug') &&
+ arguments.length > 0 && window.console && console.warn) {
+ console.warn(
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
+ 'should consider setting the value instead using `$element.val()`.'
+ );
+ }
+
+ var data = [];
+
+ this.dataAdapter.current(function (currentData) {
+ data = currentData;
+ });
+
+ return data;
+ };
+
+ Select2.prototype.val = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
+ ' removed in later Select2 versions. Use $element.val() instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ return this.$element.val();
+ }
+
+ var newVal = args[0];
+
+ if ($.isArray(newVal)) {
+ newVal = $.map(newVal, function (obj) {
+ return obj.toString();
+ });
+ }
+
+ this.$element.val(newVal).trigger('change');
+ };
+
+ Select2.prototype.destroy = function () {
+ this.$container.remove();
+
+ if (this.$element[0].detachEvent) {
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
+ }
+
+ if (this._observer != null) {
+ this._observer.disconnect();
+ this._observer = null;
+ } else if (this.$element[0].removeEventListener) {
+ this.$element[0]
+ .removeEventListener('DOMAttrModified', this._syncA, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
+ }
+
+ this._syncA = null;
+ this._syncS = null;
+
+ this.$element.off('.select2');
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
+
+ this.$element.removeClass('select2-hidden-accessible');
+ this.$element.attr('aria-hidden', 'false');
+ this.$element.removeData('select2');
+
+ this.dataAdapter.destroy();
+ this.selection.destroy();
+ this.dropdown.destroy();
+ this.results.destroy();
+
+ this.dataAdapter = null;
+ this.selection = null;
+ this.dropdown = null;
+ this.results = null;
+ };
+
+ Select2.prototype.render = function () {
+ var $container = $(
+ '' +
+ ' ' +
+ ' ' +
+ ' '
+ );
+
+ $container.attr('dir', this.options.get('dir'));
+
+ this.$container = $container;
+
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
+
+ $container.data('element', this.$element);
+
+ return $container;
+ };
+
+ return Select2;
+});
+
+S2.define('select2/compat/utils',[
+ 'jquery'
+], function ($) {
+ function syncCssClasses ($dest, $src, adapter) {
+ var classes, replacements = [], adapted;
+
+ classes = $.trim($dest.attr('class'));
+
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+
+ $(classes.split(/\s+/)).each(function () {
+ // Save all Select2 classes
+ if (this.indexOf('select2-') === 0) {
+ replacements.push(this);
+ }
+ });
+ }
+
+ classes = $.trim($src.attr('class'));
+
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+
+ $(classes.split(/\s+/)).each(function () {
+ // Only adapt non-Select2 classes
+ if (this.indexOf('select2-') !== 0) {
+ adapted = adapter(this);
+
+ if (adapted != null) {
+ replacements.push(adapted);
+ }
+ }
+ });
+ }
+
+ $dest.attr('class', replacements.join(' '));
+ }
+
+ return {
+ syncCssClasses: syncCssClasses
+ };
+});
+
+S2.define('select2/compat/containerCss',[
+ 'jquery',
+ './utils'
+], function ($, CompatUtils) {
+ // No-op CSS adapter that discards all classes by default
+ function _containerAdapter (clazz) {
+ return null;
+ }
+
+ function ContainerCSS () { }
+
+ ContainerCSS.prototype.render = function (decorated) {
+ var $container = decorated.call(this);
+
+ var containerCssClass = this.options.get('containerCssClass') || '';
+
+ if ($.isFunction(containerCssClass)) {
+ containerCssClass = containerCssClass(this.$element);
+ }
+
+ var containerCssAdapter = this.options.get('adaptContainerCssClass');
+ containerCssAdapter = containerCssAdapter || _containerAdapter;
+
+ if (containerCssClass.indexOf(':all:') !== -1) {
+ containerCssClass = containerCssClass.replace(':all:', '');
+
+ var _cssAdapter = containerCssAdapter;
+
+ containerCssAdapter = function (clazz) {
+ var adapted = _cssAdapter(clazz);
+
+ if (adapted != null) {
+ // Append the old one along with the adapted one
+ return adapted + ' ' + clazz;
+ }
+
+ return clazz;
+ };
+ }
+
+ var containerCss = this.options.get('containerCss') || {};
+
+ if ($.isFunction(containerCss)) {
+ containerCss = containerCss(this.$element);
+ }
+
+ CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
+
+ $container.css(containerCss);
+ $container.addClass(containerCssClass);
+
+ return $container;
+ };
+
+ return ContainerCSS;
+});
+
+S2.define('select2/compat/dropdownCss',[
+ 'jquery',
+ './utils'
+], function ($, CompatUtils) {
+ // No-op CSS adapter that discards all classes by default
+ function _dropdownAdapter (clazz) {
+ return null;
+ }
+
+ function DropdownCSS () { }
+
+ DropdownCSS.prototype.render = function (decorated) {
+ var $dropdown = decorated.call(this);
+
+ var dropdownCssClass = this.options.get('dropdownCssClass') || '';
+
+ if ($.isFunction(dropdownCssClass)) {
+ dropdownCssClass = dropdownCssClass(this.$element);
+ }
+
+ var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
+ dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
+
+ if (dropdownCssClass.indexOf(':all:') !== -1) {
+ dropdownCssClass = dropdownCssClass.replace(':all:', '');
+
+ var _cssAdapter = dropdownCssAdapter;
+
+ dropdownCssAdapter = function (clazz) {
+ var adapted = _cssAdapter(clazz);
+
+ if (adapted != null) {
+ // Append the old one along with the adapted one
+ return adapted + ' ' + clazz;
+ }
+
+ return clazz;
+ };
+ }
+
+ var dropdownCss = this.options.get('dropdownCss') || {};
+
+ if ($.isFunction(dropdownCss)) {
+ dropdownCss = dropdownCss(this.$element);
+ }
+
+ CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
+
+ $dropdown.css(dropdownCss);
+ $dropdown.addClass(dropdownCssClass);
+
+ return $dropdown;
+ };
+
+ return DropdownCSS;
+});
+
+S2.define('select2/compat/initSelection',[
+ 'jquery'
+], function ($) {
+ function InitSelection (decorated, $element, options) {
+ if (options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `initSelection` option has been deprecated in favor' +
+ ' of a custom data adapter that overrides the `current` method. ' +
+ 'This method is now called multiple times instead of a single ' +
+ 'time when the instance is initialized. Support will be removed ' +
+ 'for the `initSelection` option in future versions of Select2'
+ );
+ }
+
+ this.initSelection = options.get('initSelection');
+ this._isInitialized = false;
+
+ decorated.call(this, $element, options);
+ }
+
+ InitSelection.prototype.current = function (decorated, callback) {
+ var self = this;
+
+ if (this._isInitialized) {
+ decorated.call(this, callback);
+
+ return;
+ }
+
+ this.initSelection.call(null, this.$element, function (data) {
+ self._isInitialized = true;
+
+ if (!$.isArray(data)) {
+ data = [data];
+ }
+
+ callback(data);
+ });
+ };
+
+ return InitSelection;
+});
+
+S2.define('select2/compat/inputData',[
+ 'jquery'
+], function ($) {
+ function InputData (decorated, $element, options) {
+ this._currentData = [];
+ this._valueSeparator = options.get('valueSeparator') || ',';
+
+ if ($element.prop('type') === 'hidden') {
+ if (options.get('debug') && console && console.warn) {
+ console.warn(
+ 'Select2: Using a hidden input with Select2 is no longer ' +
+ 'supported and may stop working in the future. It is recommended ' +
+ 'to use a `` element instead.'
+ );
+ }
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ InputData.prototype.current = function (_, callback) {
+ function getSelected (data, selectedIds) {
+ var selected = [];
+
+ if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
+ data.selected = true;
+ selected.push(data);
+ } else {
+ data.selected = false;
+ }
+
+ if (data.children) {
+ selected.push.apply(selected, getSelected(data.children, selectedIds));
+ }
+
+ return selected;
+ }
+
+ var selected = [];
+
+ for (var d = 0; d < this._currentData.length; d++) {
+ var data = this._currentData[d];
+
+ selected.push.apply(
+ selected,
+ getSelected(
+ data,
+ this.$element.val().split(
+ this._valueSeparator
+ )
+ )
+ );
+ }
+
+ callback(selected);
+ };
+
+ InputData.prototype.select = function (_, data) {
+ if (!this.options.get('multiple')) {
+ this.current(function (allData) {
+ $.map(allData, function (data) {
+ data.selected = false;
+ });
+ });
+
+ this.$element.val(data.id);
+ this.$element.trigger('change');
+ } else {
+ var value = this.$element.val();
+ value += this._valueSeparator + data.id;
+
+ this.$element.val(value);
+ this.$element.trigger('change');
+ }
+ };
+
+ InputData.prototype.unselect = function (_, data) {
+ var self = this;
+
+ data.selected = false;
+
+ this.current(function (allData) {
+ var values = [];
+
+ for (var d = 0; d < allData.length; d++) {
+ var item = allData[d];
+
+ if (data.id == item.id) {
+ continue;
+ }
+
+ values.push(item.id);
+ }
+
+ self.$element.val(values.join(self._valueSeparator));
+ self.$element.trigger('change');
+ });
+ };
+
+ InputData.prototype.query = function (_, params, callback) {
+ var results = [];
+
+ for (var d = 0; d < this._currentData.length; d++) {
+ var data = this._currentData[d];
+
+ var matches = this.matches(params, data);
+
+ if (matches !== null) {
+ results.push(matches);
+ }
+ }
+
+ callback({
+ results: results
+ });
+ };
+
+ InputData.prototype.addOptions = function (_, $options) {
+ var options = $.map($options, function ($option) {
+ return $.data($option[0], 'data');
+ });
+
+ this._currentData.push.apply(this._currentData, options);
+ };
+
+ return InputData;
+});
+
+S2.define('select2/compat/matcher',[
+ 'jquery'
+], function ($) {
+ function oldMatcher (matcher) {
+ function wrappedMatcher (params, data) {
+ var match = $.extend(true, {}, data);
+
+ if (params.term == null || $.trim(params.term) === '') {
+ return match;
+ }
+
+ if (data.children) {
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ // Check if the child object matches
+ // The old matcher returned a boolean true or false
+ var doesMatch = matcher(params.term, child.text, child);
+
+ // If the child didn't match, pop it off
+ if (!doesMatch) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ if (match.children.length > 0) {
+ return match;
+ }
+ }
+
+ if (matcher(params.term, data.text, data)) {
+ return match;
+ }
+
+ return null;
+ }
+
+ return wrappedMatcher;
+ }
+
+ return oldMatcher;
+});
+
+S2.define('select2/compat/query',[
+
+], function () {
+ function Query (decorated, $element, options) {
+ if (options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `query` option has been deprecated in favor of a ' +
+ 'custom data adapter that overrides the `query` method. Support ' +
+ 'will be removed for the `query` option in future versions of ' +
+ 'Select2.'
+ );
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Query.prototype.query = function (_, params, callback) {
+ params.callback = callback;
+
+ var query = this.options.get('query');
+
+ query.call(null, params);
+ };
+
+ return Query;
+});
+
+S2.define('select2/dropdown/attachContainer',[
+
+], function () {
+ function AttachContainer (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ AttachContainer.prototype.position =
+ function (decorated, $dropdown, $container) {
+ var $dropdownContainer = $container.find('.dropdown-wrapper');
+ $dropdownContainer.append($dropdown);
+
+ $dropdown.addClass('select2-dropdown--below');
+ $container.addClass('select2-container--below');
+ };
+
+ return AttachContainer;
+});
+
+S2.define('select2/dropdown/stopPropagation',[
+
+], function () {
+ function StopPropagation () { }
+
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ var stoppedEvents = [
+ 'blur',
+ 'change',
+ 'click',
+ 'dblclick',
+ 'focus',
+ 'focusin',
+ 'focusout',
+ 'input',
+ 'keydown',
+ 'keyup',
+ 'keypress',
+ 'mousedown',
+ 'mouseenter',
+ 'mouseleave',
+ 'mousemove',
+ 'mouseover',
+ 'mouseup',
+ 'search',
+ 'touchend',
+ 'touchstart'
+ ];
+
+ this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ return StopPropagation;
+});
+
+S2.define('select2/selection/stopPropagation',[
+
+], function () {
+ function StopPropagation () { }
+
+ StopPropagation.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ var stoppedEvents = [
+ 'blur',
+ 'change',
+ 'click',
+ 'dblclick',
+ 'focus',
+ 'focusin',
+ 'focusout',
+ 'input',
+ 'keydown',
+ 'keyup',
+ 'keypress',
+ 'mousedown',
+ 'mouseenter',
+ 'mouseleave',
+ 'mousemove',
+ 'mouseover',
+ 'mouseup',
+ 'search',
+ 'touchend',
+ 'touchstart'
+ ];
+
+ this.$selection.on(stoppedEvents.join(' '), function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ return StopPropagation;
+});
+
+/*!
+ * jQuery Mousewheel 3.1.13
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ */
+
+(function (factory) {
+ if ( typeof S2.define === 'function' && S2.define.amd ) {
+ // AMD. Register as an anonymous module.
+ S2.define('jquery-mousewheel',['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS style for Browserify
+ module.exports = factory;
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
+ slice = Array.prototype.slice,
+ nullLowestDeltaTimeout, lowestDelta;
+
+ if ( $.event.fixHooks ) {
+ for ( var i = toFix.length; i; ) {
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
+ }
+ }
+
+ var special = $.event.special.mousewheel = {
+ version: '3.1.12',
+
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.addEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ // Store the line height and page height for this particular element
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.removeEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ // Clean up the data we added to the element
+ $.removeData(this, 'mousewheel-line-height');
+ $.removeData(this, 'mousewheel-page-height');
+ },
+
+ getLineHeight: function(elem) {
+ var $elem = $(elem),
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
+ if (!$parent.length) {
+ $parent = $('body');
+ }
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
+ },
+
+ getPageHeight: function(elem) {
+ return $(elem).height();
+ },
+
+ settings: {
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
+ normalizeOffset: true // calls getBoundingClientRect for each event
+ }
+ };
+
+ $.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind('mousewheel', fn);
+ }
+ });
+
+
+ function handler(event) {
+ var orgEvent = event || window.event,
+ args = slice.call(arguments, 1),
+ delta = 0,
+ deltaX = 0,
+ deltaY = 0,
+ absDelta = 0,
+ offsetX = 0,
+ offsetY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = 'mousewheel';
+
+ // Old school scrollwheel delta
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
+
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaX = deltaY * -1;
+ deltaY = 0;
+ }
+
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
+ delta = deltaY === 0 ? deltaX : deltaY;
+
+ // New school wheel delta (wheel event)
+ if ( 'deltaY' in orgEvent ) {
+ deltaY = orgEvent.deltaY * -1;
+ delta = deltaY;
+ }
+ if ( 'deltaX' in orgEvent ) {
+ deltaX = orgEvent.deltaX;
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
+ }
+
+ // No change actually happened, no reason to go any further
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
+
+ // Need to convert lines and pages to pixels if we aren't already in pixels
+ // There are three delta modes:
+ // * deltaMode 0 is by pixels, nothing to do
+ // * deltaMode 1 is by lines
+ // * deltaMode 2 is by pages
+ if ( orgEvent.deltaMode === 1 ) {
+ var lineHeight = $.data(this, 'mousewheel-line-height');
+ delta *= lineHeight;
+ deltaY *= lineHeight;
+ deltaX *= lineHeight;
+ } else if ( orgEvent.deltaMode === 2 ) {
+ var pageHeight = $.data(this, 'mousewheel-page-height');
+ delta *= pageHeight;
+ deltaY *= pageHeight;
+ deltaX *= pageHeight;
+ }
+
+ // Store lowest absolute delta to normalize the delta values
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
+
+ if ( !lowestDelta || absDelta < lowestDelta ) {
+ lowestDelta = absDelta;
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ lowestDelta /= 40;
+ }
+ }
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ // Divide all the things by 40!
+ delta /= 40;
+ deltaX /= 40;
+ deltaY /= 40;
+ }
+
+ // Get a whole, normalized value for the deltas
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
+
+ // Normalise offsetX and offsetY properties
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
+ var boundingRect = this.getBoundingClientRect();
+ offsetX = event.clientX - boundingRect.left;
+ offsetY = event.clientY - boundingRect.top;
+ }
+
+ // Add information to the event object
+ event.deltaX = deltaX;
+ event.deltaY = deltaY;
+ event.deltaFactor = lowestDelta;
+ event.offsetX = offsetX;
+ event.offsetY = offsetY;
+ // Go ahead and set deltaMode to 0 since we converted to pixels
+ // Although this is a little odd since we overwrite the deltaX/Y
+ // properties with normalized deltas.
+ event.deltaMode = 0;
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ // Clearout lowestDelta after sometime to better
+ // handle multiple device types that give different
+ // a different lowestDelta
+ // Ex: trackpad = 3 and mouse wheel = 120
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
+
+ return ($.event.dispatch || $.event.handle).apply(this, args);
+ }
+
+ function nullLowestDelta() {
+ lowestDelta = null;
+ }
+
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
+ // If this is an older event and the delta is divisable by 120,
+ // then we are assuming that the browser is treating this as an
+ // older mouse wheel event and that we should divide the deltas
+ // by 40 to try and get a more usable deltaFactor.
+ // Side note, this actually impacts the reported scroll distance
+ // in older browsers and can cause scrolling to be slower than native.
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
+ }
+
+}));
+
+S2.define('jquery.select2',[
+ 'jquery',
+ 'jquery-mousewheel',
+
+ './select2/core',
+ './select2/defaults'
+], function ($, _, Select2, Defaults) {
+ if ($.fn.selectWoo == null) {
+ // All methods that should return the element
+ var thisMethods = ['open', 'close', 'destroy'];
+
+ $.fn.selectWoo = function (options) {
+ options = options || {};
+
+ if (typeof options === 'object') {
+ this.each(function () {
+ var instanceOptions = $.extend(true, {}, options);
+
+ var instance = new Select2($(this), instanceOptions);
+ });
+
+ return this;
+ } else if (typeof options === 'string') {
+ var ret;
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var instance = $(this).data('select2');
+
+ if (instance == null && window.console && console.error) {
+ console.error(
+ 'The select2(\'' + options + '\') method was called on an ' +
+ 'element that is not using Select2.'
+ );
+ }
+
+ ret = instance[options].apply(instance, args);
+ });
+
+ // Check if we should be returning `this`
+ if ($.inArray(options, thisMethods) > -1) {
+ return this;
+ }
+
+ return ret;
+ } else {
+ throw new Error('Invalid arguments for Select2: ' + options);
+ }
+ };
+ }
+
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
+ }
+
+ if ($.fn.selectWoo.defaults == null) {
+ $.fn.selectWoo.defaults = Defaults;
+ }
+
+ // Also register selectWoo under select2 if select2 is not already present.
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
+
+ return Select2;
+});
+
+ // Return the AMD loader configuration so it can be used outside of this file
+ return {
+ define: S2.define,
+ require: S2.require
+ };
+}());
+
+ // Autoload the jQuery bindings
+ // We know that all of the modules exist above this, so we're safe
+ var select2 = S2.require('jquery.select2');
+
+ // Hold the AMD module references on the jQuery function that was just loaded
+ // This allows Select2 to use the internal loader outside of this file, such
+ // as in the language files.
+ jQuery.fn.select2.amd = S2;
+ jQuery.fn.selectWoo.amd = S2;
+
+ // Return the Select2 instance for anyone who is importing it.
+ return select2;
+}));
diff --git a/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.min.js b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.min.js
new file mode 100644
index 0000000..9c7c386
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.full.min.js
@@ -0,0 +1 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a(' '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[data-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("data-selected","true"):b.attr("data-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a(' ');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.options.get("minimumResultsForSearch");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),window.setTimeout(function(){d.$selection.focus()},1),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(' '),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a(" ")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html(''),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('× ')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('× ');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a(' ');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f),e.container.focusOnActiveElement()},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a(' ');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a(' '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(" "),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;if(this._isInitialized)return void b.call(this,c);this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f=0;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||n=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null!=a.fn.select2&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/js/selectWoo.js b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.js
new file mode 100644
index 0000000..22a7207
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.js
@@ -0,0 +1,5842 @@
+/*!
+ * SelectWoo 1.0.1
+ * https://github.com/woocommerce/selectWoo
+ *
+ * Released under the MIT license
+ * https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = function (root, jQuery) {
+ if (jQuery === undefined) {
+ // require('jQuery') returns a factory that requires window to
+ // build a jQuery instance, we normalize how we use modules
+ // that require this pattern but the window provided is a noop
+ // if it's defined (how jquery works)
+ if (typeof window !== 'undefined') {
+ jQuery = require('jquery');
+ }
+ else {
+ jQuery = require('jquery')(root);
+ }
+ }
+ factory(jQuery);
+ return jQuery;
+ };
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+} (function (jQuery) {
+ // This is needed so we can catch the AMD loader configuration and use it
+ // The inner file should be wrapped (by `banner.start.js`) in a function that
+ // returns the AMD loader references.
+ var S2 =(function () {
+ // Restore the Select2 AMD loader so it can be used
+ // Needed mostly in the language files, where the loader is not inserted
+ if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
+ var S2 = jQuery.fn.select2.amd;
+ }
+var S2;(function () { if (!S2 || !S2.requirejs) {
+if (!S2) { S2 = {}; } else { require = S2; }
+/**
+ * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
+ * Released under MIT license, http://github.com/requirejs/almond/LICENSE
+ */
+//Going sloppy to avoid 'use strict' string cost, but strict practices should
+//be followed.
+/*global setTimeout: false */
+
+var requirejs, require, define;
+(function (undef) {
+ var main, req, makeMap, handlers,
+ defined = {},
+ waiting = {},
+ config = {},
+ defining = {},
+ hasOwn = Object.prototype.hasOwnProperty,
+ aps = [].slice,
+ jsSuffixRegExp = /\.js$/;
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName) {
+ var nameParts, nameSegment, mapValue, foundMap, lastIndex,
+ foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
+ baseParts = baseName && baseName.split("/"),
+ map = config.map,
+ starMap = (map && map['*']) || {};
+
+ //Adjust any relative paths.
+ if (name) {
+ name = name.split('/');
+ lastIndex = name.length - 1;
+
+ // If wanting node ID compatibility, strip .js from end
+ // of IDs. Have to do this here, and not in nameToUrl
+ // because node allows either .js or non .js to map
+ // to same file.
+ if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
+ name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
+ }
+
+ // Starts with a '.' so need the baseName
+ if (name[0].charAt(0) === '.' && baseParts) {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ name = normalizedBaseParts.concat(name);
+ }
+
+ //start trimDots
+ for (i = 0; i < name.length; i++) {
+ part = name[i];
+ if (part === '.') {
+ name.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ // If at the start, or previous value is still ..,
+ // keep them so that when converted to a path it may
+ // still work when converted to a path, even though
+ // as an ID it is less than ideal. In larger point
+ // releases, may be better to just kick out an error.
+ if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
+ continue;
+ } else if (i > 0) {
+ name.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ //end trimDots
+
+ name = name.join('/');
+ }
+
+ //Apply map config if available.
+ if ((baseParts || starMap) && map) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join("/");
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = map[baseParts.slice(0, j).join('/')];
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = mapValue[nameSegment];
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
+ foundStarMap = starMap[nameSegment];
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function makeRequire(relName, forceSync) {
+ return function () {
+ //A version of a require function that passes a moduleName
+ //value for items that may need to
+ //look up paths relative to the moduleName
+ var args = aps.call(arguments, 0);
+
+ //If first arg is not require('string'), and there is only
+ //one arg, it is the array form without a callback. Insert
+ //a null so that the following concat is correct.
+ if (typeof args[0] !== 'string' && args.length === 1) {
+ args.push(null);
+ }
+ return req.apply(undef, args.concat([relName, forceSync]));
+ };
+ }
+
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(depName) {
+ return function (value) {
+ defined[depName] = value;
+ };
+ }
+
+ function callDep(name) {
+ if (hasProp(waiting, name)) {
+ var args = waiting[name];
+ delete waiting[name];
+ defining[name] = true;
+ main.apply(undef, args);
+ }
+
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
+ throw new Error('No ' + name);
+ }
+ return defined[name];
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ //Creates a parts array for a relName where first part is plugin ID,
+ //second part is resource ID. Assumes relName has already been normalized.
+ function makeRelParts(relName) {
+ return relName ? splitPrefix(relName) : [];
+ }
+
+ /**
+ * Makes a name map, normalizing the name, and using a plugin
+ * for normalization if necessary. Grabs a ref to plugin
+ * too, as an optimization.
+ */
+ makeMap = function (name, relParts) {
+ var plugin,
+ parts = splitPrefix(name),
+ prefix = parts[0],
+ relResourceName = relParts[1];
+
+ name = parts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, relResourceName);
+ plugin = callDep(prefix);
+ }
+
+ //Normalize according
+ if (prefix) {
+ if (plugin && plugin.normalize) {
+ name = plugin.normalize(name, makeNormalize(relResourceName));
+ } else {
+ name = normalize(name, relResourceName);
+ }
+ } else {
+ name = normalize(name, relResourceName);
+ parts = splitPrefix(name);
+ prefix = parts[0];
+ name = parts[1];
+ if (prefix) {
+ plugin = callDep(prefix);
+ }
+ }
+
+ //Using ridiculous property names for space reasons
+ return {
+ f: prefix ? prefix + '!' + name : name, //fullName
+ n: name,
+ pr: prefix,
+ p: plugin
+ };
+ };
+
+ function makeConfig(name) {
+ return function () {
+ return (config && config.config && config.config[name]) || {};
+ };
+ }
+
+ handlers = {
+ require: function (name) {
+ return makeRequire(name);
+ },
+ exports: function (name) {
+ var e = defined[name];
+ if (typeof e !== 'undefined') {
+ return e;
+ } else {
+ return (defined[name] = {});
+ }
+ },
+ module: function (name) {
+ return {
+ id: name,
+ uri: '',
+ exports: defined[name],
+ config: makeConfig(name)
+ };
+ }
+ };
+
+ main = function (name, deps, callback, relName) {
+ var cjsModule, depName, ret, map, i, relParts,
+ args = [],
+ callbackType = typeof callback,
+ usingExports;
+
+ //Use name if no relName
+ relName = relName || name;
+ relParts = makeRelParts(relName);
+
+ //Call the callback to define the module, if necessary.
+ if (callbackType === 'undefined' || callbackType === 'function') {
+ //Pull out the defined dependencies and pass the ordered
+ //values to the callback.
+ //Default to [require, exports, module] if no deps
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
+ for (i = 0; i < deps.length; i += 1) {
+ map = makeMap(deps[i], relParts);
+ depName = map.f;
+
+ //Fast path CommonJS standard dependencies.
+ if (depName === "require") {
+ args[i] = handlers.require(name);
+ } else if (depName === "exports") {
+ //CommonJS module spec 1.1
+ args[i] = handlers.exports(name);
+ usingExports = true;
+ } else if (depName === "module") {
+ //CommonJS module spec 1.1
+ cjsModule = args[i] = handlers.module(name);
+ } else if (hasProp(defined, depName) ||
+ hasProp(waiting, depName) ||
+ hasProp(defining, depName)) {
+ args[i] = callDep(depName);
+ } else if (map.p) {
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
+ args[i] = defined[depName];
+ } else {
+ throw new Error(name + ' missing ' + depName);
+ }
+ }
+
+ ret = callback ? callback.apply(defined[name], args) : undefined;
+
+ if (name) {
+ //If setting exports via "module" is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ if (cjsModule && cjsModule.exports !== undef &&
+ cjsModule.exports !== defined[name]) {
+ defined[name] = cjsModule.exports;
+ } else if (ret !== undef || !usingExports) {
+ //Use the return value from the function.
+ defined[name] = ret;
+ }
+ }
+ } else if (name) {
+ //May just be an object definition for the module. Only
+ //worry about defining if have a module name.
+ defined[name] = callback;
+ }
+ };
+
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
+ if (typeof deps === "string") {
+ if (handlers[deps]) {
+ //callback in this case is really relName
+ return handlers[deps](callback);
+ }
+ //Just return the module wanted. In this scenario, the
+ //deps arg is the module name, and second arg (if passed)
+ //is just the relName.
+ //Normalize module name, if it contains . or ..
+ return callDep(makeMap(deps, makeRelParts(callback)).f);
+ } else if (!deps.splice) {
+ //deps is a config object, not an array.
+ config = deps;
+ if (config.deps) {
+ req(config.deps, config.callback);
+ }
+ if (!callback) {
+ return;
+ }
+
+ if (callback.splice) {
+ //callback is an array, which means it is a dependency list.
+ //Adjust args if there are dependencies
+ deps = callback;
+ callback = relName;
+ relName = null;
+ } else {
+ deps = undef;
+ }
+ }
+
+ //Support require(['a'])
+ callback = callback || function () {};
+
+ //If relName is a function, it is an errback handler,
+ //so remove it.
+ if (typeof relName === 'function') {
+ relName = forceSync;
+ forceSync = alt;
+ }
+
+ //Simulate async callback;
+ if (forceSync) {
+ main(undef, deps, callback, relName);
+ } else {
+ //Using a non-zero value because of concern for what old browsers
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
+ //If want a value immediately, use require('id') instead -- something
+ //that works in almond on the global level, but not guaranteed and
+ //unlikely to work in other AMD implementations.
+ setTimeout(function () {
+ main(undef, deps, callback, relName);
+ }, 4);
+ }
+
+ return req;
+ };
+
+ /**
+ * Just drops the config on the floor, but returns req in case
+ * the config return value is used.
+ */
+ req.config = function (cfg) {
+ return req(cfg);
+ };
+
+ /**
+ * Expose module registry for debugging and tooling
+ */
+ requirejs._defined = defined;
+
+ define = function (name, deps, callback) {
+ if (typeof name !== 'string') {
+ throw new Error('See almond README: incorrect module build, no module name');
+ }
+
+ //This module may not have dependencies
+ if (!deps.splice) {
+ //deps is not an array, so probably means
+ //an object literal or factory function for
+ //the value. Adjust args.
+ callback = deps;
+ deps = [];
+ }
+
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
+ waiting[name] = [name, deps, callback];
+ }
+ };
+
+ define.amd = {
+ jQuery: true
+ };
+}());
+
+S2.requirejs = requirejs;S2.require = require;S2.define = define;
+}
+}());
+S2.define("almond", function(){});
+
+/* global jQuery:false, $:false */
+S2.define('jquery',[],function () {
+ var _$ = jQuery || $;
+
+ if (_$ == null && console && console.error) {
+ console.error(
+ 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
+ 'found. Make sure that you are including jQuery before Select2 on your ' +
+ 'web page.'
+ );
+ }
+
+ return _$;
+});
+
+S2.define('select2/utils',[
+ 'jquery'
+], function ($) {
+ var Utils = {};
+
+ Utils.Extend = function (ChildClass, SuperClass) {
+ var __hasProp = {}.hasOwnProperty;
+
+ function BaseConstructor () {
+ this.constructor = ChildClass;
+ }
+
+ for (var key in SuperClass) {
+ if (__hasProp.call(SuperClass, key)) {
+ ChildClass[key] = SuperClass[key];
+ }
+ }
+
+ BaseConstructor.prototype = SuperClass.prototype;
+ ChildClass.prototype = new BaseConstructor();
+ ChildClass.__super__ = SuperClass.prototype;
+
+ return ChildClass;
+ };
+
+ function getMethods (theClass) {
+ var proto = theClass.prototype;
+
+ var methods = [];
+
+ for (var methodName in proto) {
+ var m = proto[methodName];
+
+ if (typeof m !== 'function') {
+ continue;
+ }
+
+ if (methodName === 'constructor') {
+ continue;
+ }
+
+ methods.push(methodName);
+ }
+
+ return methods;
+ }
+
+ Utils.Decorate = function (SuperClass, DecoratorClass) {
+ var decoratedMethods = getMethods(DecoratorClass);
+ var superMethods = getMethods(SuperClass);
+
+ function DecoratedClass () {
+ var unshift = Array.prototype.unshift;
+
+ var argCount = DecoratorClass.prototype.constructor.length;
+
+ var calledConstructor = SuperClass.prototype.constructor;
+
+ if (argCount > 0) {
+ unshift.call(arguments, SuperClass.prototype.constructor);
+
+ calledConstructor = DecoratorClass.prototype.constructor;
+ }
+
+ calledConstructor.apply(this, arguments);
+ }
+
+ DecoratorClass.displayName = SuperClass.displayName;
+
+ function ctr () {
+ this.constructor = DecoratedClass;
+ }
+
+ DecoratedClass.prototype = new ctr();
+
+ for (var m = 0; m < superMethods.length; m++) {
+ var superMethod = superMethods[m];
+
+ DecoratedClass.prototype[superMethod] =
+ SuperClass.prototype[superMethod];
+ }
+
+ var calledMethod = function (methodName) {
+ // Stub out the original method if it's not decorating an actual method
+ var originalMethod = function () {};
+
+ if (methodName in DecoratedClass.prototype) {
+ originalMethod = DecoratedClass.prototype[methodName];
+ }
+
+ var decoratedMethod = DecoratorClass.prototype[methodName];
+
+ return function () {
+ var unshift = Array.prototype.unshift;
+
+ unshift.call(arguments, originalMethod);
+
+ return decoratedMethod.apply(this, arguments);
+ };
+ };
+
+ for (var d = 0; d < decoratedMethods.length; d++) {
+ var decoratedMethod = decoratedMethods[d];
+
+ DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
+ }
+
+ return DecoratedClass;
+ };
+
+ var Observable = function () {
+ this.listeners = {};
+ };
+
+ Observable.prototype.on = function (event, callback) {
+ this.listeners = this.listeners || {};
+
+ if (event in this.listeners) {
+ this.listeners[event].push(callback);
+ } else {
+ this.listeners[event] = [callback];
+ }
+ };
+
+ Observable.prototype.trigger = function (event) {
+ var slice = Array.prototype.slice;
+ var params = slice.call(arguments, 1);
+
+ this.listeners = this.listeners || {};
+
+ // Params should always come in as an array
+ if (params == null) {
+ params = [];
+ }
+
+ // If there are no arguments to the event, use a temporary object
+ if (params.length === 0) {
+ params.push({});
+ }
+
+ // Set the `_type` of the first object to the event
+ params[0]._type = event;
+
+ if (event in this.listeners) {
+ this.invoke(this.listeners[event], slice.call(arguments, 1));
+ }
+
+ if ('*' in this.listeners) {
+ this.invoke(this.listeners['*'], arguments);
+ }
+ };
+
+ Observable.prototype.invoke = function (listeners, params) {
+ for (var i = 0, len = listeners.length; i < len; i++) {
+ listeners[i].apply(this, params);
+ }
+ };
+
+ Utils.Observable = Observable;
+
+ Utils.generateChars = function (length) {
+ var chars = '';
+
+ for (var i = 0; i < length; i++) {
+ var randomChar = Math.floor(Math.random() * 36);
+ chars += randomChar.toString(36);
+ }
+
+ return chars;
+ };
+
+ Utils.bind = function (func, context) {
+ return function () {
+ func.apply(context, arguments);
+ };
+ };
+
+ Utils._convertData = function (data) {
+ for (var originalKey in data) {
+ var keys = originalKey.split('-');
+
+ var dataLevel = data;
+
+ if (keys.length === 1) {
+ continue;
+ }
+
+ for (var k = 0; k < keys.length; k++) {
+ var key = keys[k];
+
+ // Lowercase the first letter
+ // By default, dash-separated becomes camelCase
+ key = key.substring(0, 1).toLowerCase() + key.substring(1);
+
+ if (!(key in dataLevel)) {
+ dataLevel[key] = {};
+ }
+
+ if (k == keys.length - 1) {
+ dataLevel[key] = data[originalKey];
+ }
+
+ dataLevel = dataLevel[key];
+ }
+
+ delete data[originalKey];
+ }
+
+ return data;
+ };
+
+ Utils.hasScroll = function (index, el) {
+ // Adapted from the function created by @ShadowScripter
+ // and adapted by @BillBarry on the Stack Exchange Code Review website.
+ // The original code can be found at
+ // http://codereview.stackexchange.com/q/13338
+ // and was designed to be used with the Sizzle selector engine.
+
+ var $el = $(el);
+ var overflowX = el.style.overflowX;
+ var overflowY = el.style.overflowY;
+
+ //Check both x and y declarations
+ if (overflowX === overflowY &&
+ (overflowY === 'hidden' || overflowY === 'visible')) {
+ return false;
+ }
+
+ if (overflowX === 'scroll' || overflowY === 'scroll') {
+ return true;
+ }
+
+ return ($el.innerHeight() < el.scrollHeight ||
+ $el.innerWidth() < el.scrollWidth);
+ };
+
+ Utils.escapeMarkup = function (markup) {
+ var replaceMap = {
+ '\\': '\',
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '\'': ''',
+ '/': '/'
+ };
+
+ // Do not try to escape the markup if it's not a string
+ if (typeof markup !== 'string') {
+ return markup;
+ }
+
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
+ return replaceMap[match];
+ });
+ };
+
+ // Append an array of jQuery nodes to a given element.
+ Utils.appendMany = function ($element, $nodes) {
+ // jQuery 1.7.x does not support $.fn.append() with an array
+ // Fall back to a jQuery object collection using $.fn.add()
+ if ($.fn.jquery.substr(0, 3) === '1.7') {
+ var $jqNodes = $();
+
+ $.map($nodes, function (node) {
+ $jqNodes = $jqNodes.add(node);
+ });
+
+ $nodes = $jqNodes;
+ }
+
+ $element.append($nodes);
+ };
+
+ // Determine whether the browser is on a touchscreen device.
+ Utils.isTouchscreen = function() {
+ if ('undefined' === typeof Utils._isTouchscreenCache) {
+ Utils._isTouchscreenCache = 'ontouchstart' in document.documentElement;
+ }
+ return Utils._isTouchscreenCache;
+ }
+
+ return Utils;
+});
+
+S2.define('select2/results',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Results ($element, options, dataAdapter) {
+ this.$element = $element;
+ this.data = dataAdapter;
+ this.options = options;
+
+ Results.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Results, Utils.Observable);
+
+ Results.prototype.render = function () {
+ var $results = $(
+ ''
+ );
+
+ if (this.options.get('multiple')) {
+ $results.attr('aria-multiselectable', 'true');
+ }
+
+ this.$results = $results;
+
+ return $results;
+ };
+
+ Results.prototype.clear = function () {
+ this.$results.empty();
+ };
+
+ Results.prototype.displayMessage = function (params) {
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ this.clear();
+ this.hideLoading();
+
+ var $message = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get(params.message);
+
+ $message.append(
+ escapeMarkup(
+ message(params.args)
+ )
+ );
+
+ $message[0].className += ' select2-results__message';
+
+ this.$results.append($message);
+ };
+
+ Results.prototype.hideMessages = function () {
+ this.$results.find('.select2-results__message').remove();
+ };
+
+ Results.prototype.append = function (data) {
+ this.hideLoading();
+
+ var $options = [];
+
+ if (data.results == null || data.results.length === 0) {
+ if (this.$results.children().length === 0) {
+ this.trigger('results:message', {
+ message: 'noResults'
+ });
+ }
+
+ return;
+ }
+
+ data.results = this.sort(data.results);
+
+ for (var d = 0; d < data.results.length; d++) {
+ var item = data.results[d];
+
+ var $option = this.option(item);
+
+ $options.push($option);
+ }
+
+ this.$results.append($options);
+ };
+
+ Results.prototype.position = function ($results, $dropdown) {
+ var $resultsContainer = $dropdown.find('.select2-results');
+ $resultsContainer.append($results);
+ };
+
+ Results.prototype.sort = function (data) {
+ var sorter = this.options.get('sorter');
+
+ return sorter(data);
+ };
+
+ Results.prototype.highlightFirstItem = function () {
+ var $options = this.$results
+ .find('.select2-results__option[data-selected]');
+
+ var $selected = $options.filter('[data-selected=true]');
+
+ // Check if there are any selected options
+ if ($selected.length > 0) {
+ // If there are selected options, highlight the first
+ $selected.first().trigger('mouseenter');
+ } else {
+ // If there are no selected options, highlight the first option
+ // in the dropdown
+ $options.first().trigger('mouseenter');
+ }
+
+ this.ensureHighlightVisible();
+ };
+
+ Results.prototype.setClasses = function () {
+ var self = this;
+
+ this.data.current(function (selected) {
+ var selectedIds = $.map(selected, function (s) {
+ return s.id.toString();
+ });
+
+ var $options = self.$results
+ .find('.select2-results__option[data-selected]');
+
+ $options.each(function () {
+ var $option = $(this);
+
+ var item = $.data(this, 'data');
+
+ // id needs to be converted to a string when comparing
+ var id = '' + item.id;
+
+ if ((item.element != null && item.element.selected) ||
+ (item.element == null && $.inArray(id, selectedIds) > -1)) {
+ $option.attr('data-selected', 'true');
+ } else {
+ $option.attr('data-selected', 'false');
+ }
+ });
+
+ });
+ };
+
+ Results.prototype.showLoading = function (params) {
+ this.hideLoading();
+
+ var loadingMore = this.options.get('translations').get('searching');
+
+ var loading = {
+ disabled: true,
+ loading: true,
+ text: loadingMore(params)
+ };
+ var $loading = this.option(loading);
+ $loading.className += ' loading-results';
+
+ this.$results.prepend($loading);
+ };
+
+ Results.prototype.hideLoading = function () {
+ this.$results.find('.loading-results').remove();
+ };
+
+ Results.prototype.option = function (data) {
+ var option = document.createElement('li');
+ option.className = 'select2-results__option';
+
+ var attrs = {
+ 'role': 'option',
+ 'data-selected': 'false',
+ 'tabindex': -1
+ };
+
+ if (data.disabled) {
+ delete attrs['data-selected'];
+ attrs['aria-disabled'] = 'true';
+ }
+
+ if (data.id == null) {
+ delete attrs['data-selected'];
+ }
+
+ if (data._resultId != null) {
+ option.id = data._resultId;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ if (data.children) {
+ attrs['aria-label'] = data.text;
+ delete attrs['data-selected'];
+ }
+
+ for (var attr in attrs) {
+ var val = attrs[attr];
+
+ option.setAttribute(attr, val);
+ }
+
+ if (data.children) {
+ var $option = $(option);
+
+ var label = document.createElement('strong');
+ label.className = 'select2-results__group';
+
+ var $label = $(label);
+ this.template(data, label);
+ $label.attr('role', 'presentation');
+
+ var $children = [];
+
+ for (var c = 0; c < data.children.length; c++) {
+ var child = data.children[c];
+
+ var $child = this.option(child);
+
+ $children.push($child);
+ }
+
+ var $childrenContainer = $('', {
+ 'class': 'select2-results__options select2-results__options--nested',
+ 'role': 'listbox'
+ });
+ $childrenContainer.append($children);
+ $option.attr('role', 'list');
+
+ $option.append(label);
+ $option.append($childrenContainer);
+ } else {
+ this.template(data, option);
+ }
+
+ $.data(option, 'data', data);
+
+ return option;
+ };
+
+ Results.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-results';
+
+ this.$results.attr('id', id);
+
+ container.on('results:all', function (params) {
+ self.clear();
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ self.highlightFirstItem();
+ }
+ });
+
+ container.on('results:append', function (params) {
+ self.append(params.data);
+
+ if (container.isOpen()) {
+ self.setClasses();
+ }
+ });
+
+ container.on('query', function (params) {
+ self.hideMessages();
+ self.showLoading(params);
+ });
+
+ container.on('select', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('unselect', function () {
+ if (!container.isOpen()) {
+ return;
+ }
+
+ self.setClasses();
+ self.highlightFirstItem();
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expended="true"
+ self.$results.attr('aria-expanded', 'true');
+ self.$results.attr('aria-hidden', 'false');
+
+ self.setClasses();
+ self.ensureHighlightVisible();
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expended="false"
+ self.$results.attr('aria-expanded', 'false');
+ self.$results.attr('aria-hidden', 'true');
+ self.$results.removeAttr('aria-activedescendant');
+ });
+
+ container.on('results:toggle', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ $highlighted.trigger('mouseup');
+ });
+
+ container.on('results:select', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var data = $highlighted.data('data');
+
+ if ($highlighted.attr('data-selected') == 'true') {
+ self.trigger('close', {});
+ } else {
+ self.trigger('select', {
+ data: data
+ });
+ }
+ });
+
+ container.on('results:previous', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ // If we are already at te top, don't move further
+ if (currentIndex === 0) {
+ return;
+ }
+
+ var nextIndex = currentIndex - 1;
+
+ // If none are highlighted, highlight the first
+ if ($highlighted.length === 0) {
+ nextIndex = 0;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top;
+ var nextTop = $next.offset().top;
+ var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextTop - currentOffset < 0) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:next', function () {
+ var $highlighted = self.getHighlightedResults();
+
+ var $options = self.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var nextIndex = currentIndex + 1;
+
+ // If we are at the last option, stay there
+ if (nextIndex >= $options.length) {
+ return;
+ }
+
+ var $next = $options.eq(nextIndex);
+
+ $next.trigger('mouseenter');
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var nextBottom = $next.offset().top + $next.outerHeight(false);
+ var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
+
+ if (nextIndex === 0) {
+ self.$results.scrollTop(0);
+ } else if (nextBottom > currentOffset) {
+ self.$results.scrollTop(nextOffset);
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ params.element.addClass('select2-results__option--highlighted').attr('aria-selected', 'true');
+ self.$results.attr('aria-activedescendant', params.element.attr('id'));
+ });
+
+ container.on('results:message', function (params) {
+ self.displayMessage(params);
+ });
+
+ if ($.fn.mousewheel) {
+ this.$results.on('mousewheel', function (e) {
+ var top = self.$results.scrollTop();
+
+ var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
+
+ var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
+ var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
+
+ if (isAtTop) {
+ self.$results.scrollTop(0);
+
+ e.preventDefault();
+ e.stopPropagation();
+ } else if (isAtBottom) {
+ self.$results.scrollTop(
+ self.$results.get(0).scrollHeight - self.$results.height()
+ );
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ }
+
+ this.$results.on('mouseup', '.select2-results__option[data-selected]',
+ function (evt) {
+ var $this = $(this);
+
+ var data = $this.data('data');
+
+ if ($this.attr('data-selected') === 'true') {
+ if (self.options.get('multiple')) {
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ } else {
+ self.trigger('close', {});
+ }
+
+ return;
+ }
+
+ self.trigger('select', {
+ originalEvent: evt,
+ data: data
+ });
+ });
+
+ this.$results.on('mouseenter', '.select2-results__option[data-selected]',
+ function (evt) {
+ var data = $(this).data('data');
+
+ self.getHighlightedResults()
+ .removeClass('select2-results__option--highlighted')
+ .attr('aria-selected', 'false');
+
+ self.trigger('results:focus', {
+ data: data,
+ element: $(this)
+ });
+ });
+ };
+
+ Results.prototype.getHighlightedResults = function () {
+ var $highlighted = this.$results
+ .find('.select2-results__option--highlighted');
+
+ return $highlighted;
+ };
+
+ Results.prototype.destroy = function () {
+ this.$results.remove();
+ };
+
+ Results.prototype.ensureHighlightVisible = function () {
+ var $highlighted = this.getHighlightedResults();
+
+ if ($highlighted.length === 0) {
+ return;
+ }
+
+ var $options = this.$results.find('[data-selected]');
+
+ var currentIndex = $options.index($highlighted);
+
+ var currentOffset = this.$results.offset().top;
+ var nextTop = $highlighted.offset().top;
+ var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
+
+ var offsetDelta = nextTop - currentOffset;
+ nextOffset -= $highlighted.outerHeight(false) * 2;
+
+ if (currentIndex <= 2) {
+ this.$results.scrollTop(0);
+ } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
+ this.$results.scrollTop(nextOffset);
+ }
+ };
+
+ Results.prototype.template = function (result, container) {
+ var template = this.options.get('templateResult');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ var content = template(result, container);
+
+ if (content == null) {
+ container.style.display = 'none';
+ } else if (typeof content === 'string') {
+ container.innerHTML = escapeMarkup(content);
+ } else {
+ $(container).append(content);
+ }
+ };
+
+ return Results;
+});
+
+S2.define('select2/keys',[
+
+], function () {
+ var KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ ENTER: 13,
+ SHIFT: 16,
+ CTRL: 17,
+ ALT: 18,
+ ESC: 27,
+ SPACE: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DELETE: 46
+ };
+
+ return KEYS;
+});
+
+S2.define('select2/selection/base',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function BaseSelection ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ BaseSelection.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseSelection, Utils.Observable);
+
+ BaseSelection.prototype.render = function () {
+ var $selection = $(
+ '' +
+ ' '
+ );
+
+ this._tabindex = 0;
+
+ if (this.$element.data('old-tabindex') != null) {
+ this._tabindex = this.$element.data('old-tabindex');
+ } else if (this.$element.attr('tabindex') != null) {
+ this._tabindex = this.$element.attr('tabindex');
+ }
+
+ $selection.attr('title', this.$element.attr('title'));
+ $selection.attr('tabindex', this._tabindex);
+
+ this.$selection = $selection;
+
+ return $selection;
+ };
+
+ BaseSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ var id = container.id + '-container';
+ var resultsId = container.id + '-results';
+ var searchHidden = this.options.get('minimumResultsForSearch') === Infinity;
+
+ this.container = container;
+
+ this.$selection.on('focus', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('blur', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ if (evt.which === KEYS.SPACE) {
+ evt.preventDefault();
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$selection.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+
+ container.on('open', function () {
+ // When the dropdown is open, aria-expanded="true"
+ self.$selection.attr('aria-expanded', 'true');
+ self.$selection.attr('aria-owns', resultsId);
+
+ self._attachCloseHandler(container);
+ });
+
+ container.on('close', function () {
+ // When the dropdown is closed, aria-expanded="false"
+ self.$selection.attr('aria-expanded', 'false');
+ self.$selection.removeAttr('aria-activedescendant');
+ self.$selection.removeAttr('aria-owns');
+
+ // This needs to be delayed as the active element is the body when the
+ // key is pressed.
+ window.setTimeout(function () {
+ self.$selection.focus();
+ }, 1);
+
+ self._detachCloseHandler(container);
+ });
+
+ container.on('enable', function () {
+ self.$selection.attr('tabindex', self._tabindex);
+ });
+
+ container.on('disable', function () {
+ self.$selection.attr('tabindex', '-1');
+ });
+ };
+
+ BaseSelection.prototype._handleBlur = function (evt) {
+ var self = this;
+
+ // This needs to be delayed as the active element is the body when the tab
+ // key is pressed, possibly along with others.
+ window.setTimeout(function () {
+ // Don't trigger `blur` if the focus is still in the selection
+ if (
+ (document.activeElement == self.$selection[0]) ||
+ ($.contains(self.$selection[0], document.activeElement))
+ ) {
+ return;
+ }
+
+ self.trigger('blur', evt);
+ }, 1);
+ };
+
+ BaseSelection.prototype._attachCloseHandler = function (container) {
+ var self = this;
+
+ $(document.body).on('mousedown.select2.' + container.id, function (e) {
+ var $target = $(e.target);
+
+ var $select = $target.closest('.select2');
+
+ var $all = $('.select2.select2-container--open');
+
+ $all.each(function () {
+ var $this = $(this);
+
+ if (this == $select[0]) {
+ return;
+ }
+
+ var $element = $this.data('element');
+
+ $element.select2('close');
+ });
+ });
+ };
+
+ BaseSelection.prototype._detachCloseHandler = function (container) {
+ $(document.body).off('mousedown.select2.' + container.id);
+ };
+
+ BaseSelection.prototype.position = function ($selection, $container) {
+ var $selectionContainer = $container.find('.selection');
+ $selectionContainer.append($selection);
+ };
+
+ BaseSelection.prototype.destroy = function () {
+ this._detachCloseHandler(this.container);
+ };
+
+ BaseSelection.prototype.update = function (data) {
+ throw new Error('The `update` method must be defined in child classes.');
+ };
+
+ return BaseSelection;
+});
+
+S2.define('select2/selection/single',[
+ 'jquery',
+ './base',
+ '../utils',
+ '../keys'
+], function ($, BaseSelection, Utils, KEYS) {
+ function SingleSelection () {
+ SingleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(SingleSelection, BaseSelection);
+
+ SingleSelection.prototype.render = function () {
+ var $selection = SingleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--single');
+
+ $selection.html(
+ ' ' +
+ '' +
+ ' ' +
+ ' '
+ );
+
+ return $selection;
+ };
+
+ SingleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ SingleSelection.__super__.bind.apply(this, arguments);
+
+ var id = container.id + '-container';
+
+ this.$selection.find('.select2-selection__rendered')
+ .attr('id', id)
+ .attr('role', 'textbox')
+ .attr('aria-readonly', 'true');
+ this.$selection.attr('aria-labelledby', id);
+
+ // This makes single non-search selects work in screen readers. If it causes problems elsewhere, remove.
+ this.$selection.attr('role', 'combobox');
+
+ this.$selection.on('mousedown', function (evt) {
+ // Only respond to left clicks
+ if (evt.which !== 1) {
+ return;
+ }
+
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on('focus', function (evt) {
+ // User focuses on the container
+ });
+
+ this.$selection.on('keydown', function (evt) {
+ // If user starts typing an alphanumeric key on the keyboard, open if not opened.
+ if (!container.isOpen() && evt.which >= 48 && evt.which <= 90) {
+ container.open();
+ }
+ });
+
+ this.$selection.on('blur', function (evt) {
+ // User exits the container
+ });
+
+ container.on('focus', function (evt) {
+ if (!container.isOpen()) {
+ self.$selection.focus();
+ }
+ });
+
+ container.on('selection:update', function (params) {
+ self.update(params.data);
+ });
+ };
+
+ SingleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ SingleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ SingleSelection.prototype.selectionContainer = function () {
+ return $(' ');
+ };
+
+ SingleSelection.prototype.update = function (data) {
+ if (data.length === 0) {
+ this.clear();
+ return;
+ }
+
+ var selection = data[0];
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+ var formatted = this.display(selection, $rendered);
+
+ $rendered.empty().append(formatted);
+ $rendered.prop('title', selection.title || selection.text);
+ };
+
+ return SingleSelection;
+});
+
+S2.define('select2/selection/multiple',[
+ 'jquery',
+ './base',
+ '../utils'
+], function ($, BaseSelection, Utils) {
+ function MultipleSelection ($element, options) {
+ MultipleSelection.__super__.constructor.apply(this, arguments);
+ }
+
+ Utils.Extend(MultipleSelection, BaseSelection);
+
+ MultipleSelection.prototype.render = function () {
+ var $selection = MultipleSelection.__super__.render.call(this);
+
+ $selection.addClass('select2-selection--multiple');
+
+ $selection.html(
+ ''
+ );
+
+ return $selection;
+ };
+
+ MultipleSelection.prototype.bind = function (container, $container) {
+ var self = this;
+
+ MultipleSelection.__super__.bind.apply(this, arguments);
+
+ this.$selection.on('click', function (evt) {
+ self.trigger('toggle', {
+ originalEvent: evt
+ });
+ });
+
+ this.$selection.on(
+ 'click',
+ '.select2-selection__choice__remove',
+ function (evt) {
+ // Ignore the event if it is disabled
+ if (self.options.get('disabled')) {
+ return;
+ }
+
+ var $remove = $(this);
+ var $selection = $remove.parent();
+
+ var data = $selection.data('data');
+
+ self.trigger('unselect', {
+ originalEvent: evt,
+ data: data
+ });
+ }
+ );
+ };
+
+ MultipleSelection.prototype.clear = function () {
+ this.$selection.find('.select2-selection__rendered').empty();
+ };
+
+ MultipleSelection.prototype.display = function (data, container) {
+ var template = this.options.get('templateSelection');
+ var escapeMarkup = this.options.get('escapeMarkup');
+
+ return escapeMarkup(template(data, container));
+ };
+
+ MultipleSelection.prototype.selectionContainer = function () {
+ var $container = $(
+ '' +
+ '' +
+ '×' +
+ ' ' +
+ ' '
+ );
+
+ return $container;
+ };
+
+ MultipleSelection.prototype.update = function (data) {
+ var self = this;
+ this.clear();
+
+ if (data.length === 0) {
+ return;
+ }
+
+ var $selections = [];
+
+ for (var d = 0; d < data.length; d++) {
+ var selection = data[d];
+
+ var $selection = this.selectionContainer();
+ var formatted = this.display(selection, $selection).trim();
+
+ $selection.append(formatted);
+ $selection.prop('title', selection.title || selection.text);
+
+ $selection.data('data', selection);
+
+ $selections.push($selection);
+ }
+
+ var $rendered = this.$selection.find('.select2-selection__rendered');
+
+ Utils.appendMany($rendered, $selections);
+
+ // Return cursor to search field after updating.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ if ('undefined' !== typeof this.$search) {
+ setTimeout(function(){
+ self.$search.focus();
+ }, 1);
+ }
+ };
+
+ return MultipleSelection;
+});
+
+S2.define('select2/selection/placeholder',[
+ '../utils'
+], function (Utils) {
+ function Placeholder (decorated, $element, options) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options);
+ }
+
+ Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
+ var $placeholder = this.selectionContainer();
+
+ $placeholder.html(this.display(placeholder));
+ $placeholder.addClass('select2-selection__placeholder')
+ .removeClass('select2-selection__choice');
+
+ return $placeholder;
+ };
+
+ Placeholder.prototype.update = function (decorated, data) {
+ var singlePlaceholder = (
+ data.length == 1 && data[0].id != this.placeholder.id
+ );
+ var multipleSelections = data.length > 1;
+
+ if (multipleSelections || singlePlaceholder) {
+ return decorated.call(this, data);
+ }
+
+ this.clear();
+
+ var $placeholder = this.createPlaceholder(this.placeholder);
+
+ this.$selection.find('.select2-selection__rendered').append($placeholder);
+ };
+
+ return Placeholder;
+});
+
+S2.define('select2/selection/allowClear',[
+ 'jquery',
+ '../keys'
+], function ($, KEYS) {
+ function AllowClear () { }
+
+ AllowClear.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ if (this.placeholder == null) {
+ if (this.options.get('debug') && window.console && console.error) {
+ console.error(
+ 'Select2: The `allowClear` option should be used in combination ' +
+ 'with the `placeholder` option.'
+ );
+ }
+ }
+
+ this.$selection.on('mousedown', '.select2-selection__clear',
+ function (evt) {
+ self._handleClear(evt);
+ });
+
+ container.on('keypress', function (evt) {
+ self._handleKeyboardClear(evt, container);
+ });
+ };
+
+ AllowClear.prototype._handleClear = function (_, evt) {
+ // Ignore the event if it is disabled
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ var $clear = this.$selection.find('.select2-selection__clear');
+
+ // Ignore the event if nothing has been selected
+ if ($clear.length === 0) {
+ return;
+ }
+
+ evt.stopPropagation();
+
+ var data = $clear.data('data');
+
+ for (var d = 0; d < data.length; d++) {
+ var unselectData = {
+ data: data[d]
+ };
+
+ // Trigger the `unselect` event, so people can prevent it from being
+ // cleared.
+ this.trigger('unselect', unselectData);
+
+ // If the event was prevented, don't clear it out.
+ if (unselectData.prevented) {
+ return;
+ }
+ }
+
+ this.$element.val(this.placeholder.id).trigger('change');
+
+ this.trigger('toggle', {});
+ };
+
+ AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
+ if (container.isOpen()) {
+ return;
+ }
+
+ if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
+ this._handleClear(evt);
+ }
+ };
+
+ AllowClear.prototype.update = function (decorated, data) {
+ decorated.call(this, data);
+
+ if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
+ data.length === 0) {
+ return;
+ }
+
+ var $remove = $(
+ '' +
+ '×' +
+ ' '
+ );
+ $remove.data('data', data);
+
+ this.$selection.find('.select2-selection__rendered').prepend($remove);
+ };
+
+ return AllowClear;
+});
+
+S2.define('select2/selection/search',[
+ 'jquery',
+ '../utils',
+ '../keys'
+], function ($, Utils, KEYS) {
+ function Search (decorated, $element, options) {
+ decorated.call(this, $element, options);
+ }
+
+ Search.prototype.render = function (decorated) {
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ var $rendered = decorated.call(this);
+
+ this._transferTabIndex();
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.trigger('focus');
+ });
+
+ container.on('close', function () {
+ self.$search.val('');
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.trigger('focus');
+ });
+
+ container.on('enable', function () {
+ self.$search.prop('disabled', false);
+
+ self._transferTabIndex();
+ });
+
+ container.on('disable', function () {
+ self.$search.prop('disabled', true);
+ });
+
+ container.on('focus', function (evt) {
+ self.$search.trigger('focus');
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+
+ this.$selection.on('focusin', '.select2-search--inline', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this.$selection.on('focusout', '.select2-search--inline', function (evt) {
+ self._handleBlur(evt);
+ });
+
+ this.$selection.on('keydown', '.select2-search--inline', function (evt) {
+ evt.stopPropagation();
+
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+
+ var key = evt.which;
+
+ if (key === KEYS.BACKSPACE && self.$search.val() === '') {
+ var $previousChoice = self.$searchContainer
+ .prev('.select2-selection__choice');
+
+ if ($previousChoice.length > 0) {
+ var item = $previousChoice.data('data');
+
+ self.searchRemoveChoice(item);
+
+ evt.preventDefault();
+ }
+ }
+ });
+
+ // Try to detect the IE version should the `documentMode` property that
+ // is stored on the document. This is only implemented in IE and is
+ // slightly cleaner than doing a user agent check.
+ // This property is not available in Edge, but Edge also doesn't have
+ // this bug.
+ var msie = document.documentMode;
+ var disableInputEvents = msie && msie <= 11;
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$selection.on(
+ 'input.searchcheck',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents) {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ // Unbind the duplicated `keyup` event
+ self.$selection.off('keyup.search');
+ }
+ );
+
+ this.$selection.on(
+ 'keyup.search input.search',
+ '.select2-search--inline',
+ function (evt) {
+ // IE will trigger the `input` event when a placeholder is used on a
+ // search box. To get around this issue, we are forced to ignore all
+ // `input` events in IE and keep using `keyup`.
+ if (disableInputEvents && evt.type === 'input') {
+ self.$selection.off('input.search input.searchcheck');
+ return;
+ }
+
+ var key = evt.which;
+
+ // We can freely ignore events from modifier keys
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
+ return;
+ }
+
+ // Tabbing will be handled during the `keydown` phase
+ if (key == KEYS.TAB) {
+ return;
+ }
+
+ self.handleSearch(evt);
+ }
+ );
+ };
+
+ /**
+ * This method will transfer the tabindex attribute from the rendered
+ * selection to the search box. This allows for the search box to be used as
+ * the primary focus instead of the selection container.
+ *
+ * @private
+ */
+ Search.prototype._transferTabIndex = function (decorated) {
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
+ this.$selection.attr('tabindex', '-1');
+ };
+
+ Search.prototype.createPlaceholder = function (decorated, placeholder) {
+ this.$search.attr('placeholder', placeholder.text);
+ };
+
+ Search.prototype.update = function (decorated, data) {
+ var searchHadFocus = this.$search[0] == document.activeElement;
+
+ this.$search.attr('placeholder', '');
+
+ decorated.call(this, data);
+
+ this.$selection.find('.select2-selection__rendered')
+ .append(this.$searchContainer);
+
+ this.resizeSearch();
+ if (searchHadFocus) {
+ this.$search.focus();
+ }
+ };
+
+ Search.prototype.handleSearch = function () {
+ this.resizeSearch();
+
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.searchRemoveChoice = function (decorated, item) {
+ this.trigger('unselect', {
+ data: item
+ });
+
+ this.$search.val(item.text);
+ this.handleSearch();
+ };
+
+ Search.prototype.resizeSearch = function () {
+ this.$search.css('width', '25px');
+
+ var width = '';
+
+ if (this.$search.attr('placeholder') !== '') {
+ width = this.$selection.find('.select2-selection__rendered').innerWidth();
+ } else {
+ var minimumWidth = this.$search.val().length + 1;
+
+ width = (minimumWidth * 0.75) + 'em';
+ }
+
+ this.$search.css('width', width);
+ };
+
+ return Search;
+});
+
+S2.define('select2/selection/eventRelay',[
+ 'jquery'
+], function ($) {
+ function EventRelay () { }
+
+ EventRelay.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var relayEvents = [
+ 'open', 'opening',
+ 'close', 'closing',
+ 'select', 'selecting',
+ 'unselect', 'unselecting'
+ ];
+
+ var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
+
+ decorated.call(this, container, $container);
+
+ container.on('*', function (name, params) {
+ // Ignore events that should not be relayed
+ if ($.inArray(name, relayEvents) === -1) {
+ return;
+ }
+
+ // The parameters should always be an object
+ params = params || {};
+
+ // Generate the jQuery event for the Select2 event
+ var evt = $.Event('select2:' + name, {
+ params: params
+ });
+
+ self.$element.trigger(evt);
+
+ // Only handle preventable events if it was one
+ if ($.inArray(name, preventableEvents) === -1) {
+ return;
+ }
+
+ params.prevented = evt.isDefaultPrevented();
+ });
+ };
+
+ return EventRelay;
+});
+
+S2.define('select2/translation',[
+ 'jquery',
+ 'require'
+], function ($, require) {
+ function Translation (dict) {
+ this.dict = dict || {};
+ }
+
+ Translation.prototype.all = function () {
+ return this.dict;
+ };
+
+ Translation.prototype.get = function (key) {
+ return this.dict[key];
+ };
+
+ Translation.prototype.extend = function (translation) {
+ this.dict = $.extend({}, translation.all(), this.dict);
+ };
+
+ // Static functions
+
+ Translation._cache = {};
+
+ Translation.loadPath = function (path) {
+ if (!(path in Translation._cache)) {
+ var translations = require(path);
+
+ Translation._cache[path] = translations;
+ }
+
+ return new Translation(Translation._cache[path]);
+ };
+
+ return Translation;
+});
+
+S2.define('select2/diacritics',[
+
+], function () {
+ var diacritics = {
+ '\u24B6': 'A',
+ '\uFF21': 'A',
+ '\u00C0': 'A',
+ '\u00C1': 'A',
+ '\u00C2': 'A',
+ '\u1EA6': 'A',
+ '\u1EA4': 'A',
+ '\u1EAA': 'A',
+ '\u1EA8': 'A',
+ '\u00C3': 'A',
+ '\u0100': 'A',
+ '\u0102': 'A',
+ '\u1EB0': 'A',
+ '\u1EAE': 'A',
+ '\u1EB4': 'A',
+ '\u1EB2': 'A',
+ '\u0226': 'A',
+ '\u01E0': 'A',
+ '\u00C4': 'A',
+ '\u01DE': 'A',
+ '\u1EA2': 'A',
+ '\u00C5': 'A',
+ '\u01FA': 'A',
+ '\u01CD': 'A',
+ '\u0200': 'A',
+ '\u0202': 'A',
+ '\u1EA0': 'A',
+ '\u1EAC': 'A',
+ '\u1EB6': 'A',
+ '\u1E00': 'A',
+ '\u0104': 'A',
+ '\u023A': 'A',
+ '\u2C6F': 'A',
+ '\uA732': 'AA',
+ '\u00C6': 'AE',
+ '\u01FC': 'AE',
+ '\u01E2': 'AE',
+ '\uA734': 'AO',
+ '\uA736': 'AU',
+ '\uA738': 'AV',
+ '\uA73A': 'AV',
+ '\uA73C': 'AY',
+ '\u24B7': 'B',
+ '\uFF22': 'B',
+ '\u1E02': 'B',
+ '\u1E04': 'B',
+ '\u1E06': 'B',
+ '\u0243': 'B',
+ '\u0182': 'B',
+ '\u0181': 'B',
+ '\u24B8': 'C',
+ '\uFF23': 'C',
+ '\u0106': 'C',
+ '\u0108': 'C',
+ '\u010A': 'C',
+ '\u010C': 'C',
+ '\u00C7': 'C',
+ '\u1E08': 'C',
+ '\u0187': 'C',
+ '\u023B': 'C',
+ '\uA73E': 'C',
+ '\u24B9': 'D',
+ '\uFF24': 'D',
+ '\u1E0A': 'D',
+ '\u010E': 'D',
+ '\u1E0C': 'D',
+ '\u1E10': 'D',
+ '\u1E12': 'D',
+ '\u1E0E': 'D',
+ '\u0110': 'D',
+ '\u018B': 'D',
+ '\u018A': 'D',
+ '\u0189': 'D',
+ '\uA779': 'D',
+ '\u01F1': 'DZ',
+ '\u01C4': 'DZ',
+ '\u01F2': 'Dz',
+ '\u01C5': 'Dz',
+ '\u24BA': 'E',
+ '\uFF25': 'E',
+ '\u00C8': 'E',
+ '\u00C9': 'E',
+ '\u00CA': 'E',
+ '\u1EC0': 'E',
+ '\u1EBE': 'E',
+ '\u1EC4': 'E',
+ '\u1EC2': 'E',
+ '\u1EBC': 'E',
+ '\u0112': 'E',
+ '\u1E14': 'E',
+ '\u1E16': 'E',
+ '\u0114': 'E',
+ '\u0116': 'E',
+ '\u00CB': 'E',
+ '\u1EBA': 'E',
+ '\u011A': 'E',
+ '\u0204': 'E',
+ '\u0206': 'E',
+ '\u1EB8': 'E',
+ '\u1EC6': 'E',
+ '\u0228': 'E',
+ '\u1E1C': 'E',
+ '\u0118': 'E',
+ '\u1E18': 'E',
+ '\u1E1A': 'E',
+ '\u0190': 'E',
+ '\u018E': 'E',
+ '\u24BB': 'F',
+ '\uFF26': 'F',
+ '\u1E1E': 'F',
+ '\u0191': 'F',
+ '\uA77B': 'F',
+ '\u24BC': 'G',
+ '\uFF27': 'G',
+ '\u01F4': 'G',
+ '\u011C': 'G',
+ '\u1E20': 'G',
+ '\u011E': 'G',
+ '\u0120': 'G',
+ '\u01E6': 'G',
+ '\u0122': 'G',
+ '\u01E4': 'G',
+ '\u0193': 'G',
+ '\uA7A0': 'G',
+ '\uA77D': 'G',
+ '\uA77E': 'G',
+ '\u24BD': 'H',
+ '\uFF28': 'H',
+ '\u0124': 'H',
+ '\u1E22': 'H',
+ '\u1E26': 'H',
+ '\u021E': 'H',
+ '\u1E24': 'H',
+ '\u1E28': 'H',
+ '\u1E2A': 'H',
+ '\u0126': 'H',
+ '\u2C67': 'H',
+ '\u2C75': 'H',
+ '\uA78D': 'H',
+ '\u24BE': 'I',
+ '\uFF29': 'I',
+ '\u00CC': 'I',
+ '\u00CD': 'I',
+ '\u00CE': 'I',
+ '\u0128': 'I',
+ '\u012A': 'I',
+ '\u012C': 'I',
+ '\u0130': 'I',
+ '\u00CF': 'I',
+ '\u1E2E': 'I',
+ '\u1EC8': 'I',
+ '\u01CF': 'I',
+ '\u0208': 'I',
+ '\u020A': 'I',
+ '\u1ECA': 'I',
+ '\u012E': 'I',
+ '\u1E2C': 'I',
+ '\u0197': 'I',
+ '\u24BF': 'J',
+ '\uFF2A': 'J',
+ '\u0134': 'J',
+ '\u0248': 'J',
+ '\u24C0': 'K',
+ '\uFF2B': 'K',
+ '\u1E30': 'K',
+ '\u01E8': 'K',
+ '\u1E32': 'K',
+ '\u0136': 'K',
+ '\u1E34': 'K',
+ '\u0198': 'K',
+ '\u2C69': 'K',
+ '\uA740': 'K',
+ '\uA742': 'K',
+ '\uA744': 'K',
+ '\uA7A2': 'K',
+ '\u24C1': 'L',
+ '\uFF2C': 'L',
+ '\u013F': 'L',
+ '\u0139': 'L',
+ '\u013D': 'L',
+ '\u1E36': 'L',
+ '\u1E38': 'L',
+ '\u013B': 'L',
+ '\u1E3C': 'L',
+ '\u1E3A': 'L',
+ '\u0141': 'L',
+ '\u023D': 'L',
+ '\u2C62': 'L',
+ '\u2C60': 'L',
+ '\uA748': 'L',
+ '\uA746': 'L',
+ '\uA780': 'L',
+ '\u01C7': 'LJ',
+ '\u01C8': 'Lj',
+ '\u24C2': 'M',
+ '\uFF2D': 'M',
+ '\u1E3E': 'M',
+ '\u1E40': 'M',
+ '\u1E42': 'M',
+ '\u2C6E': 'M',
+ '\u019C': 'M',
+ '\u24C3': 'N',
+ '\uFF2E': 'N',
+ '\u01F8': 'N',
+ '\u0143': 'N',
+ '\u00D1': 'N',
+ '\u1E44': 'N',
+ '\u0147': 'N',
+ '\u1E46': 'N',
+ '\u0145': 'N',
+ '\u1E4A': 'N',
+ '\u1E48': 'N',
+ '\u0220': 'N',
+ '\u019D': 'N',
+ '\uA790': 'N',
+ '\uA7A4': 'N',
+ '\u01CA': 'NJ',
+ '\u01CB': 'Nj',
+ '\u24C4': 'O',
+ '\uFF2F': 'O',
+ '\u00D2': 'O',
+ '\u00D3': 'O',
+ '\u00D4': 'O',
+ '\u1ED2': 'O',
+ '\u1ED0': 'O',
+ '\u1ED6': 'O',
+ '\u1ED4': 'O',
+ '\u00D5': 'O',
+ '\u1E4C': 'O',
+ '\u022C': 'O',
+ '\u1E4E': 'O',
+ '\u014C': 'O',
+ '\u1E50': 'O',
+ '\u1E52': 'O',
+ '\u014E': 'O',
+ '\u022E': 'O',
+ '\u0230': 'O',
+ '\u00D6': 'O',
+ '\u022A': 'O',
+ '\u1ECE': 'O',
+ '\u0150': 'O',
+ '\u01D1': 'O',
+ '\u020C': 'O',
+ '\u020E': 'O',
+ '\u01A0': 'O',
+ '\u1EDC': 'O',
+ '\u1EDA': 'O',
+ '\u1EE0': 'O',
+ '\u1EDE': 'O',
+ '\u1EE2': 'O',
+ '\u1ECC': 'O',
+ '\u1ED8': 'O',
+ '\u01EA': 'O',
+ '\u01EC': 'O',
+ '\u00D8': 'O',
+ '\u01FE': 'O',
+ '\u0186': 'O',
+ '\u019F': 'O',
+ '\uA74A': 'O',
+ '\uA74C': 'O',
+ '\u01A2': 'OI',
+ '\uA74E': 'OO',
+ '\u0222': 'OU',
+ '\u24C5': 'P',
+ '\uFF30': 'P',
+ '\u1E54': 'P',
+ '\u1E56': 'P',
+ '\u01A4': 'P',
+ '\u2C63': 'P',
+ '\uA750': 'P',
+ '\uA752': 'P',
+ '\uA754': 'P',
+ '\u24C6': 'Q',
+ '\uFF31': 'Q',
+ '\uA756': 'Q',
+ '\uA758': 'Q',
+ '\u024A': 'Q',
+ '\u24C7': 'R',
+ '\uFF32': 'R',
+ '\u0154': 'R',
+ '\u1E58': 'R',
+ '\u0158': 'R',
+ '\u0210': 'R',
+ '\u0212': 'R',
+ '\u1E5A': 'R',
+ '\u1E5C': 'R',
+ '\u0156': 'R',
+ '\u1E5E': 'R',
+ '\u024C': 'R',
+ '\u2C64': 'R',
+ '\uA75A': 'R',
+ '\uA7A6': 'R',
+ '\uA782': 'R',
+ '\u24C8': 'S',
+ '\uFF33': 'S',
+ '\u1E9E': 'S',
+ '\u015A': 'S',
+ '\u1E64': 'S',
+ '\u015C': 'S',
+ '\u1E60': 'S',
+ '\u0160': 'S',
+ '\u1E66': 'S',
+ '\u1E62': 'S',
+ '\u1E68': 'S',
+ '\u0218': 'S',
+ '\u015E': 'S',
+ '\u2C7E': 'S',
+ '\uA7A8': 'S',
+ '\uA784': 'S',
+ '\u24C9': 'T',
+ '\uFF34': 'T',
+ '\u1E6A': 'T',
+ '\u0164': 'T',
+ '\u1E6C': 'T',
+ '\u021A': 'T',
+ '\u0162': 'T',
+ '\u1E70': 'T',
+ '\u1E6E': 'T',
+ '\u0166': 'T',
+ '\u01AC': 'T',
+ '\u01AE': 'T',
+ '\u023E': 'T',
+ '\uA786': 'T',
+ '\uA728': 'TZ',
+ '\u24CA': 'U',
+ '\uFF35': 'U',
+ '\u00D9': 'U',
+ '\u00DA': 'U',
+ '\u00DB': 'U',
+ '\u0168': 'U',
+ '\u1E78': 'U',
+ '\u016A': 'U',
+ '\u1E7A': 'U',
+ '\u016C': 'U',
+ '\u00DC': 'U',
+ '\u01DB': 'U',
+ '\u01D7': 'U',
+ '\u01D5': 'U',
+ '\u01D9': 'U',
+ '\u1EE6': 'U',
+ '\u016E': 'U',
+ '\u0170': 'U',
+ '\u01D3': 'U',
+ '\u0214': 'U',
+ '\u0216': 'U',
+ '\u01AF': 'U',
+ '\u1EEA': 'U',
+ '\u1EE8': 'U',
+ '\u1EEE': 'U',
+ '\u1EEC': 'U',
+ '\u1EF0': 'U',
+ '\u1EE4': 'U',
+ '\u1E72': 'U',
+ '\u0172': 'U',
+ '\u1E76': 'U',
+ '\u1E74': 'U',
+ '\u0244': 'U',
+ '\u24CB': 'V',
+ '\uFF36': 'V',
+ '\u1E7C': 'V',
+ '\u1E7E': 'V',
+ '\u01B2': 'V',
+ '\uA75E': 'V',
+ '\u0245': 'V',
+ '\uA760': 'VY',
+ '\u24CC': 'W',
+ '\uFF37': 'W',
+ '\u1E80': 'W',
+ '\u1E82': 'W',
+ '\u0174': 'W',
+ '\u1E86': 'W',
+ '\u1E84': 'W',
+ '\u1E88': 'W',
+ '\u2C72': 'W',
+ '\u24CD': 'X',
+ '\uFF38': 'X',
+ '\u1E8A': 'X',
+ '\u1E8C': 'X',
+ '\u24CE': 'Y',
+ '\uFF39': 'Y',
+ '\u1EF2': 'Y',
+ '\u00DD': 'Y',
+ '\u0176': 'Y',
+ '\u1EF8': 'Y',
+ '\u0232': 'Y',
+ '\u1E8E': 'Y',
+ '\u0178': 'Y',
+ '\u1EF6': 'Y',
+ '\u1EF4': 'Y',
+ '\u01B3': 'Y',
+ '\u024E': 'Y',
+ '\u1EFE': 'Y',
+ '\u24CF': 'Z',
+ '\uFF3A': 'Z',
+ '\u0179': 'Z',
+ '\u1E90': 'Z',
+ '\u017B': 'Z',
+ '\u017D': 'Z',
+ '\u1E92': 'Z',
+ '\u1E94': 'Z',
+ '\u01B5': 'Z',
+ '\u0224': 'Z',
+ '\u2C7F': 'Z',
+ '\u2C6B': 'Z',
+ '\uA762': 'Z',
+ '\u24D0': 'a',
+ '\uFF41': 'a',
+ '\u1E9A': 'a',
+ '\u00E0': 'a',
+ '\u00E1': 'a',
+ '\u00E2': 'a',
+ '\u1EA7': 'a',
+ '\u1EA5': 'a',
+ '\u1EAB': 'a',
+ '\u1EA9': 'a',
+ '\u00E3': 'a',
+ '\u0101': 'a',
+ '\u0103': 'a',
+ '\u1EB1': 'a',
+ '\u1EAF': 'a',
+ '\u1EB5': 'a',
+ '\u1EB3': 'a',
+ '\u0227': 'a',
+ '\u01E1': 'a',
+ '\u00E4': 'a',
+ '\u01DF': 'a',
+ '\u1EA3': 'a',
+ '\u00E5': 'a',
+ '\u01FB': 'a',
+ '\u01CE': 'a',
+ '\u0201': 'a',
+ '\u0203': 'a',
+ '\u1EA1': 'a',
+ '\u1EAD': 'a',
+ '\u1EB7': 'a',
+ '\u1E01': 'a',
+ '\u0105': 'a',
+ '\u2C65': 'a',
+ '\u0250': 'a',
+ '\uA733': 'aa',
+ '\u00E6': 'ae',
+ '\u01FD': 'ae',
+ '\u01E3': 'ae',
+ '\uA735': 'ao',
+ '\uA737': 'au',
+ '\uA739': 'av',
+ '\uA73B': 'av',
+ '\uA73D': 'ay',
+ '\u24D1': 'b',
+ '\uFF42': 'b',
+ '\u1E03': 'b',
+ '\u1E05': 'b',
+ '\u1E07': 'b',
+ '\u0180': 'b',
+ '\u0183': 'b',
+ '\u0253': 'b',
+ '\u24D2': 'c',
+ '\uFF43': 'c',
+ '\u0107': 'c',
+ '\u0109': 'c',
+ '\u010B': 'c',
+ '\u010D': 'c',
+ '\u00E7': 'c',
+ '\u1E09': 'c',
+ '\u0188': 'c',
+ '\u023C': 'c',
+ '\uA73F': 'c',
+ '\u2184': 'c',
+ '\u24D3': 'd',
+ '\uFF44': 'd',
+ '\u1E0B': 'd',
+ '\u010F': 'd',
+ '\u1E0D': 'd',
+ '\u1E11': 'd',
+ '\u1E13': 'd',
+ '\u1E0F': 'd',
+ '\u0111': 'd',
+ '\u018C': 'd',
+ '\u0256': 'd',
+ '\u0257': 'd',
+ '\uA77A': 'd',
+ '\u01F3': 'dz',
+ '\u01C6': 'dz',
+ '\u24D4': 'e',
+ '\uFF45': 'e',
+ '\u00E8': 'e',
+ '\u00E9': 'e',
+ '\u00EA': 'e',
+ '\u1EC1': 'e',
+ '\u1EBF': 'e',
+ '\u1EC5': 'e',
+ '\u1EC3': 'e',
+ '\u1EBD': 'e',
+ '\u0113': 'e',
+ '\u1E15': 'e',
+ '\u1E17': 'e',
+ '\u0115': 'e',
+ '\u0117': 'e',
+ '\u00EB': 'e',
+ '\u1EBB': 'e',
+ '\u011B': 'e',
+ '\u0205': 'e',
+ '\u0207': 'e',
+ '\u1EB9': 'e',
+ '\u1EC7': 'e',
+ '\u0229': 'e',
+ '\u1E1D': 'e',
+ '\u0119': 'e',
+ '\u1E19': 'e',
+ '\u1E1B': 'e',
+ '\u0247': 'e',
+ '\u025B': 'e',
+ '\u01DD': 'e',
+ '\u24D5': 'f',
+ '\uFF46': 'f',
+ '\u1E1F': 'f',
+ '\u0192': 'f',
+ '\uA77C': 'f',
+ '\u24D6': 'g',
+ '\uFF47': 'g',
+ '\u01F5': 'g',
+ '\u011D': 'g',
+ '\u1E21': 'g',
+ '\u011F': 'g',
+ '\u0121': 'g',
+ '\u01E7': 'g',
+ '\u0123': 'g',
+ '\u01E5': 'g',
+ '\u0260': 'g',
+ '\uA7A1': 'g',
+ '\u1D79': 'g',
+ '\uA77F': 'g',
+ '\u24D7': 'h',
+ '\uFF48': 'h',
+ '\u0125': 'h',
+ '\u1E23': 'h',
+ '\u1E27': 'h',
+ '\u021F': 'h',
+ '\u1E25': 'h',
+ '\u1E29': 'h',
+ '\u1E2B': 'h',
+ '\u1E96': 'h',
+ '\u0127': 'h',
+ '\u2C68': 'h',
+ '\u2C76': 'h',
+ '\u0265': 'h',
+ '\u0195': 'hv',
+ '\u24D8': 'i',
+ '\uFF49': 'i',
+ '\u00EC': 'i',
+ '\u00ED': 'i',
+ '\u00EE': 'i',
+ '\u0129': 'i',
+ '\u012B': 'i',
+ '\u012D': 'i',
+ '\u00EF': 'i',
+ '\u1E2F': 'i',
+ '\u1EC9': 'i',
+ '\u01D0': 'i',
+ '\u0209': 'i',
+ '\u020B': 'i',
+ '\u1ECB': 'i',
+ '\u012F': 'i',
+ '\u1E2D': 'i',
+ '\u0268': 'i',
+ '\u0131': 'i',
+ '\u24D9': 'j',
+ '\uFF4A': 'j',
+ '\u0135': 'j',
+ '\u01F0': 'j',
+ '\u0249': 'j',
+ '\u24DA': 'k',
+ '\uFF4B': 'k',
+ '\u1E31': 'k',
+ '\u01E9': 'k',
+ '\u1E33': 'k',
+ '\u0137': 'k',
+ '\u1E35': 'k',
+ '\u0199': 'k',
+ '\u2C6A': 'k',
+ '\uA741': 'k',
+ '\uA743': 'k',
+ '\uA745': 'k',
+ '\uA7A3': 'k',
+ '\u24DB': 'l',
+ '\uFF4C': 'l',
+ '\u0140': 'l',
+ '\u013A': 'l',
+ '\u013E': 'l',
+ '\u1E37': 'l',
+ '\u1E39': 'l',
+ '\u013C': 'l',
+ '\u1E3D': 'l',
+ '\u1E3B': 'l',
+ '\u017F': 'l',
+ '\u0142': 'l',
+ '\u019A': 'l',
+ '\u026B': 'l',
+ '\u2C61': 'l',
+ '\uA749': 'l',
+ '\uA781': 'l',
+ '\uA747': 'l',
+ '\u01C9': 'lj',
+ '\u24DC': 'm',
+ '\uFF4D': 'm',
+ '\u1E3F': 'm',
+ '\u1E41': 'm',
+ '\u1E43': 'm',
+ '\u0271': 'm',
+ '\u026F': 'm',
+ '\u24DD': 'n',
+ '\uFF4E': 'n',
+ '\u01F9': 'n',
+ '\u0144': 'n',
+ '\u00F1': 'n',
+ '\u1E45': 'n',
+ '\u0148': 'n',
+ '\u1E47': 'n',
+ '\u0146': 'n',
+ '\u1E4B': 'n',
+ '\u1E49': 'n',
+ '\u019E': 'n',
+ '\u0272': 'n',
+ '\u0149': 'n',
+ '\uA791': 'n',
+ '\uA7A5': 'n',
+ '\u01CC': 'nj',
+ '\u24DE': 'o',
+ '\uFF4F': 'o',
+ '\u00F2': 'o',
+ '\u00F3': 'o',
+ '\u00F4': 'o',
+ '\u1ED3': 'o',
+ '\u1ED1': 'o',
+ '\u1ED7': 'o',
+ '\u1ED5': 'o',
+ '\u00F5': 'o',
+ '\u1E4D': 'o',
+ '\u022D': 'o',
+ '\u1E4F': 'o',
+ '\u014D': 'o',
+ '\u1E51': 'o',
+ '\u1E53': 'o',
+ '\u014F': 'o',
+ '\u022F': 'o',
+ '\u0231': 'o',
+ '\u00F6': 'o',
+ '\u022B': 'o',
+ '\u1ECF': 'o',
+ '\u0151': 'o',
+ '\u01D2': 'o',
+ '\u020D': 'o',
+ '\u020F': 'o',
+ '\u01A1': 'o',
+ '\u1EDD': 'o',
+ '\u1EDB': 'o',
+ '\u1EE1': 'o',
+ '\u1EDF': 'o',
+ '\u1EE3': 'o',
+ '\u1ECD': 'o',
+ '\u1ED9': 'o',
+ '\u01EB': 'o',
+ '\u01ED': 'o',
+ '\u00F8': 'o',
+ '\u01FF': 'o',
+ '\u0254': 'o',
+ '\uA74B': 'o',
+ '\uA74D': 'o',
+ '\u0275': 'o',
+ '\u01A3': 'oi',
+ '\u0223': 'ou',
+ '\uA74F': 'oo',
+ '\u24DF': 'p',
+ '\uFF50': 'p',
+ '\u1E55': 'p',
+ '\u1E57': 'p',
+ '\u01A5': 'p',
+ '\u1D7D': 'p',
+ '\uA751': 'p',
+ '\uA753': 'p',
+ '\uA755': 'p',
+ '\u24E0': 'q',
+ '\uFF51': 'q',
+ '\u024B': 'q',
+ '\uA757': 'q',
+ '\uA759': 'q',
+ '\u24E1': 'r',
+ '\uFF52': 'r',
+ '\u0155': 'r',
+ '\u1E59': 'r',
+ '\u0159': 'r',
+ '\u0211': 'r',
+ '\u0213': 'r',
+ '\u1E5B': 'r',
+ '\u1E5D': 'r',
+ '\u0157': 'r',
+ '\u1E5F': 'r',
+ '\u024D': 'r',
+ '\u027D': 'r',
+ '\uA75B': 'r',
+ '\uA7A7': 'r',
+ '\uA783': 'r',
+ '\u24E2': 's',
+ '\uFF53': 's',
+ '\u00DF': 's',
+ '\u015B': 's',
+ '\u1E65': 's',
+ '\u015D': 's',
+ '\u1E61': 's',
+ '\u0161': 's',
+ '\u1E67': 's',
+ '\u1E63': 's',
+ '\u1E69': 's',
+ '\u0219': 's',
+ '\u015F': 's',
+ '\u023F': 's',
+ '\uA7A9': 's',
+ '\uA785': 's',
+ '\u1E9B': 's',
+ '\u24E3': 't',
+ '\uFF54': 't',
+ '\u1E6B': 't',
+ '\u1E97': 't',
+ '\u0165': 't',
+ '\u1E6D': 't',
+ '\u021B': 't',
+ '\u0163': 't',
+ '\u1E71': 't',
+ '\u1E6F': 't',
+ '\u0167': 't',
+ '\u01AD': 't',
+ '\u0288': 't',
+ '\u2C66': 't',
+ '\uA787': 't',
+ '\uA729': 'tz',
+ '\u24E4': 'u',
+ '\uFF55': 'u',
+ '\u00F9': 'u',
+ '\u00FA': 'u',
+ '\u00FB': 'u',
+ '\u0169': 'u',
+ '\u1E79': 'u',
+ '\u016B': 'u',
+ '\u1E7B': 'u',
+ '\u016D': 'u',
+ '\u00FC': 'u',
+ '\u01DC': 'u',
+ '\u01D8': 'u',
+ '\u01D6': 'u',
+ '\u01DA': 'u',
+ '\u1EE7': 'u',
+ '\u016F': 'u',
+ '\u0171': 'u',
+ '\u01D4': 'u',
+ '\u0215': 'u',
+ '\u0217': 'u',
+ '\u01B0': 'u',
+ '\u1EEB': 'u',
+ '\u1EE9': 'u',
+ '\u1EEF': 'u',
+ '\u1EED': 'u',
+ '\u1EF1': 'u',
+ '\u1EE5': 'u',
+ '\u1E73': 'u',
+ '\u0173': 'u',
+ '\u1E77': 'u',
+ '\u1E75': 'u',
+ '\u0289': 'u',
+ '\u24E5': 'v',
+ '\uFF56': 'v',
+ '\u1E7D': 'v',
+ '\u1E7F': 'v',
+ '\u028B': 'v',
+ '\uA75F': 'v',
+ '\u028C': 'v',
+ '\uA761': 'vy',
+ '\u24E6': 'w',
+ '\uFF57': 'w',
+ '\u1E81': 'w',
+ '\u1E83': 'w',
+ '\u0175': 'w',
+ '\u1E87': 'w',
+ '\u1E85': 'w',
+ '\u1E98': 'w',
+ '\u1E89': 'w',
+ '\u2C73': 'w',
+ '\u24E7': 'x',
+ '\uFF58': 'x',
+ '\u1E8B': 'x',
+ '\u1E8D': 'x',
+ '\u24E8': 'y',
+ '\uFF59': 'y',
+ '\u1EF3': 'y',
+ '\u00FD': 'y',
+ '\u0177': 'y',
+ '\u1EF9': 'y',
+ '\u0233': 'y',
+ '\u1E8F': 'y',
+ '\u00FF': 'y',
+ '\u1EF7': 'y',
+ '\u1E99': 'y',
+ '\u1EF5': 'y',
+ '\u01B4': 'y',
+ '\u024F': 'y',
+ '\u1EFF': 'y',
+ '\u24E9': 'z',
+ '\uFF5A': 'z',
+ '\u017A': 'z',
+ '\u1E91': 'z',
+ '\u017C': 'z',
+ '\u017E': 'z',
+ '\u1E93': 'z',
+ '\u1E95': 'z',
+ '\u01B6': 'z',
+ '\u0225': 'z',
+ '\u0240': 'z',
+ '\u2C6C': 'z',
+ '\uA763': 'z',
+ '\u0386': '\u0391',
+ '\u0388': '\u0395',
+ '\u0389': '\u0397',
+ '\u038A': '\u0399',
+ '\u03AA': '\u0399',
+ '\u038C': '\u039F',
+ '\u038E': '\u03A5',
+ '\u03AB': '\u03A5',
+ '\u038F': '\u03A9',
+ '\u03AC': '\u03B1',
+ '\u03AD': '\u03B5',
+ '\u03AE': '\u03B7',
+ '\u03AF': '\u03B9',
+ '\u03CA': '\u03B9',
+ '\u0390': '\u03B9',
+ '\u03CC': '\u03BF',
+ '\u03CD': '\u03C5',
+ '\u03CB': '\u03C5',
+ '\u03B0': '\u03C5',
+ '\u03C9': '\u03C9',
+ '\u03C2': '\u03C3'
+ };
+
+ return diacritics;
+});
+
+S2.define('select2/data/base',[
+ '../utils'
+], function (Utils) {
+ function BaseAdapter ($element, options) {
+ BaseAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(BaseAdapter, Utils.Observable);
+
+ BaseAdapter.prototype.current = function (callback) {
+ throw new Error('The `current` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.query = function (params, callback) {
+ throw new Error('The `query` method must be defined in child classes.');
+ };
+
+ BaseAdapter.prototype.bind = function (container, $container) {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.destroy = function () {
+ // Can be implemented in subclasses
+ };
+
+ BaseAdapter.prototype.generateResultId = function (container, data) {
+ var id = '';
+
+ if (container != null) {
+ id += container.id
+ } else {
+ id += Utils.generateChars(4);
+ }
+
+ id += '-result-';
+ id += Utils.generateChars(4);
+
+ if (data.id != null) {
+ id += '-' + data.id.toString();
+ } else {
+ id += '-' + Utils.generateChars(4);
+ }
+ return id;
+ };
+
+ return BaseAdapter;
+});
+
+S2.define('select2/data/select',[
+ './base',
+ '../utils',
+ 'jquery'
+], function (BaseAdapter, Utils, $) {
+ function SelectAdapter ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ SelectAdapter.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(SelectAdapter, BaseAdapter);
+
+ SelectAdapter.prototype.current = function (callback) {
+ var data = [];
+ var self = this;
+
+ this.$element.find(':selected').each(function () {
+ var $option = $(this);
+
+ var option = self.item($option);
+
+ data.push(option);
+ });
+
+ callback(data);
+ };
+
+ SelectAdapter.prototype.select = function (data) {
+ var self = this;
+
+ data.selected = true;
+
+ // If data.element is a DOM node, use it instead
+ if ($(data.element).is('option')) {
+ data.element.selected = true;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ if (this.$element.prop('multiple')) {
+ this.current(function (currentData) {
+ var val = [];
+
+ data = [data];
+ data.push.apply(data, currentData);
+
+ for (var d = 0; d < data.length; d++) {
+ var id = data[d].id;
+
+ if ($.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+ self.$element.trigger('change');
+ });
+ } else {
+ var val = data.id;
+
+ this.$element.val(val);
+ this.$element.trigger('change');
+ }
+ };
+
+ SelectAdapter.prototype.unselect = function (data) {
+ var self = this;
+
+ if (!this.$element.prop('multiple')) {
+ return;
+ }
+
+ data.selected = false;
+
+ if ($(data.element).is('option')) {
+ data.element.selected = false;
+
+ this.$element.trigger('change');
+
+ return;
+ }
+
+ this.current(function (currentData) {
+ var val = [];
+
+ for (var d = 0; d < currentData.length; d++) {
+ var id = currentData[d].id;
+
+ if (id !== data.id && $.inArray(id, val) === -1) {
+ val.push(id);
+ }
+ }
+
+ self.$element.val(val);
+
+ self.$element.trigger('change');
+ });
+ };
+
+ SelectAdapter.prototype.bind = function (container, $container) {
+ var self = this;
+
+ this.container = container;
+
+ container.on('select', function (params) {
+ self.select(params.data);
+ });
+
+ container.on('unselect', function (params) {
+ self.unselect(params.data);
+ });
+ };
+
+ SelectAdapter.prototype.destroy = function () {
+ // Remove anything added to child elements
+ this.$element.find('*').each(function () {
+ // Remove any custom data set by Select2
+ $.removeData(this, 'data');
+ });
+ };
+
+ SelectAdapter.prototype.query = function (params, callback) {
+ var data = [];
+ var self = this;
+
+ var $options = this.$element.children();
+
+ $options.each(function () {
+ var $option = $(this);
+
+ if (!$option.is('option') && !$option.is('optgroup')) {
+ return;
+ }
+
+ var option = self.item($option);
+
+ var matches = self.matches(params, option);
+
+ if (matches !== null) {
+ data.push(matches);
+ }
+ });
+
+ callback({
+ results: data
+ });
+ };
+
+ SelectAdapter.prototype.addOptions = function ($options) {
+ Utils.appendMany(this.$element, $options);
+ };
+
+ SelectAdapter.prototype.option = function (data) {
+ var option;
+
+ if (data.children) {
+ option = document.createElement('optgroup');
+ option.label = data.text;
+ } else {
+ option = document.createElement('option');
+
+ if (option.textContent !== undefined) {
+ option.textContent = data.text;
+ } else {
+ option.innerText = data.text;
+ }
+ }
+
+ if (data.id !== undefined) {
+ option.value = data.id;
+ }
+
+ if (data.disabled) {
+ option.disabled = true;
+ }
+
+ if (data.selected) {
+ option.selected = true;
+ }
+
+ if (data.title) {
+ option.title = data.title;
+ }
+
+ var $option = $(option);
+
+ var normalizedData = this._normalizeItem(data);
+ normalizedData.element = option;
+
+ // Override the option's data with the combined data
+ $.data(option, 'data', normalizedData);
+
+ return $option;
+ };
+
+ SelectAdapter.prototype.item = function ($option) {
+ var data = {};
+
+ data = $.data($option[0], 'data');
+
+ if (data != null) {
+ return data;
+ }
+
+ if ($option.is('option')) {
+ data = {
+ id: $option.val(),
+ text: $option.text(),
+ disabled: $option.prop('disabled'),
+ selected: $option.prop('selected'),
+ title: $option.prop('title')
+ };
+ } else if ($option.is('optgroup')) {
+ data = {
+ text: $option.prop('label'),
+ children: [],
+ title: $option.prop('title')
+ };
+
+ var $children = $option.children('option');
+ var children = [];
+
+ for (var c = 0; c < $children.length; c++) {
+ var $child = $($children[c]);
+
+ var child = this.item($child);
+
+ children.push(child);
+ }
+
+ data.children = children;
+ }
+
+ data = this._normalizeItem(data);
+ data.element = $option[0];
+
+ $.data($option[0], 'data', data);
+
+ return data;
+ };
+
+ SelectAdapter.prototype._normalizeItem = function (item) {
+ if (!$.isPlainObject(item)) {
+ item = {
+ id: item,
+ text: item
+ };
+ }
+
+ item = $.extend({}, {
+ text: ''
+ }, item);
+
+ var defaults = {
+ selected: false,
+ disabled: false
+ };
+
+ if (item.id != null) {
+ item.id = item.id.toString();
+ }
+
+ if (item.text != null) {
+ item.text = item.text.toString();
+ }
+
+ if (item._resultId == null && item.id) {
+ item._resultId = this.generateResultId(this.container, item);
+ }
+
+ return $.extend({}, defaults, item);
+ };
+
+ SelectAdapter.prototype.matches = function (params, data) {
+ var matcher = this.options.get('matcher');
+
+ return matcher(params, data);
+ };
+
+ return SelectAdapter;
+});
+
+S2.define('select2/data/array',[
+ './select',
+ '../utils',
+ 'jquery'
+], function (SelectAdapter, Utils, $) {
+ function ArrayAdapter ($element, options) {
+ var data = options.get('data') || [];
+
+ ArrayAdapter.__super__.constructor.call(this, $element, options);
+
+ this.addOptions(this.convertToOptions(data));
+ }
+
+ Utils.Extend(ArrayAdapter, SelectAdapter);
+
+ ArrayAdapter.prototype.select = function (data) {
+ var $option = this.$element.find('option').filter(function (i, elm) {
+ return elm.value == data.id.toString();
+ });
+
+ if ($option.length === 0) {
+ $option = this.option(data);
+
+ this.addOptions($option);
+ }
+
+ ArrayAdapter.__super__.select.call(this, data);
+ };
+
+ ArrayAdapter.prototype.convertToOptions = function (data) {
+ var self = this;
+
+ var $existing = this.$element.find('option');
+ var existingIds = $existing.map(function () {
+ return self.item($(this)).id;
+ }).get();
+
+ var $options = [];
+
+ // Filter out all items except for the one passed in the argument
+ function onlyItem (item) {
+ return function () {
+ return $(this).val() == item.id;
+ };
+ }
+
+ for (var d = 0; d < data.length; d++) {
+ var item = this._normalizeItem(data[d]);
+
+ // Skip items which were pre-loaded, only merge the data
+ if ($.inArray(item.id, existingIds) >= 0) {
+ var $existingOption = $existing.filter(onlyItem(item));
+
+ var existingData = this.item($existingOption);
+ var newData = $.extend(true, {}, item, existingData);
+
+ var $newOption = this.option(newData);
+
+ $existingOption.replaceWith($newOption);
+
+ continue;
+ }
+
+ var $option = this.option(item);
+
+ if (item.children) {
+ var $children = this.convertToOptions(item.children);
+
+ Utils.appendMany($option, $children);
+ }
+
+ $options.push($option);
+ }
+
+ return $options;
+ };
+
+ return ArrayAdapter;
+});
+
+S2.define('select2/data/ajax',[
+ './array',
+ '../utils',
+ 'jquery'
+], function (ArrayAdapter, Utils, $) {
+ function AjaxAdapter ($element, options) {
+ this.ajaxOptions = this._applyDefaults(options.get('ajax'));
+
+ if (this.ajaxOptions.processResults != null) {
+ this.processResults = this.ajaxOptions.processResults;
+ }
+
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
+ }
+
+ Utils.Extend(AjaxAdapter, ArrayAdapter);
+
+ AjaxAdapter.prototype._applyDefaults = function (options) {
+ var defaults = {
+ data: function (params) {
+ return $.extend({}, params, {
+ q: params.term
+ });
+ },
+ transport: function (params, success, failure) {
+ var $request = $.ajax(params);
+
+ $request.then(success);
+ $request.fail(failure);
+
+ return $request;
+ }
+ };
+
+ return $.extend({}, defaults, options, true);
+ };
+
+ AjaxAdapter.prototype.processResults = function (results) {
+ return results;
+ };
+
+ AjaxAdapter.prototype.query = function (params, callback) {
+ var matches = [];
+ var self = this;
+
+ if (this._request != null) {
+ // JSONP requests cannot always be aborted
+ if ($.isFunction(this._request.abort)) {
+ this._request.abort();
+ }
+
+ this._request = null;
+ }
+
+ var options = $.extend({
+ type: 'GET'
+ }, this.ajaxOptions);
+
+ if (typeof options.url === 'function') {
+ options.url = options.url.call(this.$element, params);
+ }
+
+ if (typeof options.data === 'function') {
+ options.data = options.data.call(this.$element, params);
+ }
+
+ function request () {
+ var $request = options.transport(options, function (data) {
+ var results = self.processResults(data, params);
+
+ if (self.options.get('debug') && window.console && console.error) {
+ // Check to make sure that the response included a `results` key.
+ if (!results || !results.results || !$.isArray(results.results)) {
+ console.error(
+ 'Select2: The AJAX results did not return an array in the ' +
+ '`results` key of the response.'
+ );
+ }
+ }
+
+ callback(results);
+ self.container.focusOnActiveElement();
+ }, function () {
+ // Attempt to detect if a request was aborted
+ // Only works if the transport exposes a status property
+ if ($request.status && $request.status === '0') {
+ return;
+ }
+
+ self.trigger('results:message', {
+ message: 'errorLoading'
+ });
+ });
+
+ self._request = $request;
+ }
+
+ if (this.ajaxOptions.delay && params.term != null) {
+ if (this._queryTimeout) {
+ window.clearTimeout(this._queryTimeout);
+ }
+
+ this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
+ } else {
+ request();
+ }
+ };
+
+ return AjaxAdapter;
+});
+
+S2.define('select2/data/tags',[
+ 'jquery'
+], function ($) {
+ function Tags (decorated, $element, options) {
+ var tags = options.get('tags');
+
+ var createTag = options.get('createTag');
+
+ if (createTag !== undefined) {
+ this.createTag = createTag;
+ }
+
+ var insertTag = options.get('insertTag');
+
+ if (insertTag !== undefined) {
+ this.insertTag = insertTag;
+ }
+
+ decorated.call(this, $element, options);
+
+ if ($.isArray(tags)) {
+ for (var t = 0; t < tags.length; t++) {
+ var tag = tags[t];
+ var item = this._normalizeItem(tag);
+
+ var $option = this.option(item);
+
+ this.$element.append($option);
+ }
+ }
+ }
+
+ Tags.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ this._removeOldTags();
+
+ if (params.term == null || params.page != null) {
+ decorated.call(this, params, callback);
+ return;
+ }
+
+ function wrapper (obj, child) {
+ var data = obj.results;
+
+ for (var i = 0; i < data.length; i++) {
+ var option = data[i];
+
+ var checkChildren = (
+ option.children != null &&
+ !wrapper({
+ results: option.children
+ }, true)
+ );
+
+ var optionText = (option.text || '').toUpperCase();
+ var paramsTerm = (params.term || '').toUpperCase();
+
+ var checkText = optionText === paramsTerm;
+
+ if (checkText || checkChildren) {
+ if (child) {
+ return false;
+ }
+
+ obj.data = data;
+ callback(obj);
+
+ return;
+ }
+ }
+
+ if (child) {
+ return true;
+ }
+
+ var tag = self.createTag(params);
+
+ if (tag != null) {
+ var $option = self.option(tag);
+ $option.attr('data-select2-tag', true);
+
+ self.addOptions([$option]);
+
+ self.insertTag(data, tag);
+ }
+
+ obj.results = data;
+
+ callback(obj);
+ }
+
+ decorated.call(this, params, wrapper);
+ };
+
+ Tags.prototype.createTag = function (decorated, params) {
+ var term = $.trim(params.term);
+
+ if (term === '') {
+ return null;
+ }
+
+ return {
+ id: term,
+ text: term
+ };
+ };
+
+ Tags.prototype.insertTag = function (_, data, tag) {
+ data.unshift(tag);
+ };
+
+ Tags.prototype._removeOldTags = function (_) {
+ var tag = this._lastTag;
+
+ var $options = this.$element.find('option[data-select2-tag]');
+
+ $options.each(function () {
+ if (this.selected) {
+ return;
+ }
+
+ $(this).remove();
+ });
+ };
+
+ return Tags;
+});
+
+S2.define('select2/data/tokenizer',[
+ 'jquery'
+], function ($) {
+ function Tokenizer (decorated, $element, options) {
+ var tokenizer = options.get('tokenizer');
+
+ if (tokenizer !== undefined) {
+ this.tokenizer = tokenizer;
+ }
+
+ decorated.call(this, $element, options);
+ }
+
+ Tokenizer.prototype.bind = function (decorated, container, $container) {
+ decorated.call(this, container, $container);
+
+ this.$search = container.dropdown.$search || container.selection.$search ||
+ $container.find('.select2-search__field');
+ };
+
+ Tokenizer.prototype.query = function (decorated, params, callback) {
+ var self = this;
+
+ function createAndSelect (data) {
+ // Normalize the data object so we can use it for checks
+ var item = self._normalizeItem(data);
+
+ // Check if the data object already exists as a tag
+ // Select it if it doesn't
+ var $existingOptions = self.$element.find('option').filter(function () {
+ return $(this).val() === item.id;
+ });
+
+ // If an existing option wasn't found for it, create the option
+ if (!$existingOptions.length) {
+ var $option = self.option(item);
+ $option.attr('data-select2-tag', true);
+
+ self._removeOldTags();
+ self.addOptions([$option]);
+ }
+
+ // Select the item, now that we know there is an option for it
+ select(item);
+ }
+
+ function select (data) {
+ self.trigger('select', {
+ data: data
+ });
+ }
+
+ params.term = params.term || '';
+
+ var tokenData = this.tokenizer(params, this.options, createAndSelect);
+
+ if (tokenData.term !== params.term) {
+ // Replace the search term if we have the search box
+ if (this.$search.length) {
+ this.$search.val(tokenData.term);
+ this.$search.focus();
+ }
+
+ params.term = tokenData.term;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
+ var separators = options.get('tokenSeparators') || [];
+ var term = params.term;
+ var i = 0;
+
+ var createTag = this.createTag || function (params) {
+ return {
+ id: params.term,
+ text: params.term
+ };
+ };
+
+ while (i < term.length) {
+ var termChar = term[i];
+
+ if ($.inArray(termChar, separators) === -1) {
+ i++;
+
+ continue;
+ }
+
+ var part = term.substr(0, i);
+ var partParams = $.extend({}, params, {
+ term: part
+ });
+
+ var data = createTag(partParams);
+
+ if (data == null) {
+ i++;
+ continue;
+ }
+
+ callback(data);
+
+ // Reset the term to not include the tokenized portion
+ term = term.substr(i + 1) || '';
+ i = 0;
+ }
+
+ return {
+ term: term
+ };
+ };
+
+ return Tokenizer;
+});
+
+S2.define('select2/data/minimumInputLength',[
+
+], function () {
+ function MinimumInputLength (decorated, $e, options) {
+ this.minimumInputLength = options.get('minimumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MinimumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (params.term.length < this.minimumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooShort',
+ args: {
+ minimum: this.minimumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MinimumInputLength;
+});
+
+S2.define('select2/data/maximumInputLength',[
+
+], function () {
+ function MaximumInputLength (decorated, $e, options) {
+ this.maximumInputLength = options.get('maximumInputLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumInputLength.prototype.query = function (decorated, params, callback) {
+ params.term = params.term || '';
+
+ if (this.maximumInputLength > 0 &&
+ params.term.length > this.maximumInputLength) {
+ this.trigger('results:message', {
+ message: 'inputTooLong',
+ args: {
+ maximum: this.maximumInputLength,
+ input: params.term,
+ params: params
+ }
+ });
+
+ return;
+ }
+
+ decorated.call(this, params, callback);
+ };
+
+ return MaximumInputLength;
+});
+
+S2.define('select2/data/maximumSelectionLength',[
+
+], function (){
+ function MaximumSelectionLength (decorated, $e, options) {
+ this.maximumSelectionLength = options.get('maximumSelectionLength');
+
+ decorated.call(this, $e, options);
+ }
+
+ MaximumSelectionLength.prototype.query =
+ function (decorated, params, callback) {
+ var self = this;
+
+ this.current(function (currentData) {
+ var count = currentData != null ? currentData.length : 0;
+ if (self.maximumSelectionLength > 0 &&
+ count >= self.maximumSelectionLength) {
+ self.trigger('results:message', {
+ message: 'maximumSelected',
+ args: {
+ maximum: self.maximumSelectionLength
+ }
+ });
+ return;
+ }
+ decorated.call(self, params, callback);
+ });
+ };
+
+ return MaximumSelectionLength;
+});
+
+S2.define('select2/dropdown',[
+ 'jquery',
+ './utils'
+], function ($, Utils) {
+ function Dropdown ($element, options) {
+ this.$element = $element;
+ this.options = options;
+
+ Dropdown.__super__.constructor.call(this);
+ }
+
+ Utils.Extend(Dropdown, Utils.Observable);
+
+ Dropdown.prototype.render = function () {
+ var $dropdown = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ $dropdown.attr('dir', this.options.get('dir'));
+
+ this.$dropdown = $dropdown;
+
+ return $dropdown;
+ };
+
+ Dropdown.prototype.bind = function () {
+ // Should be implemented in subclasses
+ };
+
+ Dropdown.prototype.position = function ($dropdown, $container) {
+ // Should be implmented in subclasses
+ };
+
+ Dropdown.prototype.destroy = function () {
+ // Remove the dropdown from the DOM
+ this.$dropdown.remove();
+ };
+
+ return Dropdown;
+});
+
+S2.define('select2/dropdown/search',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function Search () { }
+
+ Search.prototype.render = function (decorated) {
+ var $rendered = decorated.call(this);
+
+ var $search = $(
+ '' +
+ ' ' +
+ ' '
+ );
+
+ this.$searchContainer = $search;
+ this.$search = $search.find('input');
+
+ $rendered.prepend($search);
+
+ return $rendered;
+ };
+
+ Search.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+ var resultsId = container.id + '-results';
+
+ decorated.call(this, container, $container);
+
+ this.$search.on('keydown', function (evt) {
+ self.trigger('keypress', evt);
+
+ self._keyUpPrevented = evt.isDefaultPrevented();
+ });
+
+ // Workaround for browsers which do not support the `input` event
+ // This will prevent double-triggering of events for browsers which support
+ // both the `keyup` and `input` events.
+ this.$search.on('input', function (evt) {
+ // Unbind the duplicated `keyup` event
+ $(this).off('keyup');
+ });
+
+ this.$search.on('keyup input', function (evt) {
+ self.handleSearch(evt);
+ });
+
+ container.on('open', function () {
+ self.$search.attr('tabindex', 0);
+ self.$search.attr('aria-owns', resultsId);
+ self.$search.focus();
+
+ window.setTimeout(function () {
+ self.$search.focus();
+ }, 0);
+ });
+
+ container.on('close', function () {
+ self.$search.attr('tabindex', -1);
+ self.$search.removeAttr('aria-activedescendant');
+ self.$search.removeAttr('aria-owns');
+ self.$search.val('');
+ });
+
+ container.on('focus', function () {
+ if (container.isOpen()) {
+ self.$search.focus();
+ }
+ });
+
+ container.on('results:all', function (params) {
+ if (params.query.term == null || params.query.term === '') {
+ var showSearch = self.showSearch(params);
+
+ if (showSearch) {
+ self.$searchContainer.removeClass('select2-search--hide');
+ } else {
+ self.$searchContainer.addClass('select2-search--hide');
+ }
+ }
+ });
+
+ container.on('results:focus', function (params) {
+ self.$search.attr('aria-activedescendant', params.data._resultId);
+ });
+ };
+
+ Search.prototype.handleSearch = function (evt) {
+ if (!this._keyUpPrevented) {
+ var input = this.$search.val();
+
+ this.trigger('query', {
+ term: input
+ });
+ }
+
+ this._keyUpPrevented = false;
+ };
+
+ Search.prototype.showSearch = function (_, params) {
+ return true;
+ };
+
+ return Search;
+});
+
+S2.define('select2/dropdown/hidePlaceholder',[
+
+], function () {
+ function HidePlaceholder (decorated, $element, options, dataAdapter) {
+ this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ HidePlaceholder.prototype.append = function (decorated, data) {
+ data.results = this.removePlaceholder(data.results);
+
+ decorated.call(this, data);
+ };
+
+ HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
+ if (typeof placeholder === 'string') {
+ placeholder = {
+ id: '',
+ text: placeholder
+ };
+ }
+
+ return placeholder;
+ };
+
+ HidePlaceholder.prototype.removePlaceholder = function (_, data) {
+ var modifiedData = data.slice(0);
+
+ for (var d = data.length - 1; d >= 0; d--) {
+ var item = data[d];
+
+ if (this.placeholder.id === item.id) {
+ modifiedData.splice(d, 1);
+ }
+ }
+
+ return modifiedData;
+ };
+
+ return HidePlaceholder;
+});
+
+S2.define('select2/dropdown/infiniteScroll',[
+ 'jquery'
+], function ($) {
+ function InfiniteScroll (decorated, $element, options, dataAdapter) {
+ this.lastParams = {};
+
+ decorated.call(this, $element, options, dataAdapter);
+
+ this.$loadingMore = this.createLoadingMore();
+ this.loading = false;
+ }
+
+ InfiniteScroll.prototype.append = function (decorated, data) {
+ this.$loadingMore.remove();
+ this.loading = false;
+
+ decorated.call(this, data);
+
+ if (this.showLoadingMore(data)) {
+ this.$results.append(this.$loadingMore);
+ }
+ };
+
+ InfiniteScroll.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('query', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ container.on('query:append', function (params) {
+ self.lastParams = params;
+ self.loading = true;
+ });
+
+ this.$results.on('scroll', function () {
+ var isLoadMoreVisible = $.contains(
+ document.documentElement,
+ self.$loadingMore[0]
+ );
+
+ if (self.loading || !isLoadMoreVisible) {
+ return;
+ }
+
+ var currentOffset = self.$results.offset().top +
+ self.$results.outerHeight(false);
+ var loadingMoreOffset = self.$loadingMore.offset().top +
+ self.$loadingMore.outerHeight(false);
+
+ if (currentOffset + 50 >= loadingMoreOffset) {
+ self.loadMore();
+ }
+ });
+ };
+
+ InfiniteScroll.prototype.loadMore = function () {
+ this.loading = true;
+
+ var params = $.extend({}, {page: 1}, this.lastParams);
+
+ params.page++;
+
+ this.trigger('query:append', params);
+ };
+
+ InfiniteScroll.prototype.showLoadingMore = function (_, data) {
+ return data.pagination && data.pagination.more;
+ };
+
+ InfiniteScroll.prototype.createLoadingMore = function () {
+ var $option = $(
+ ' '
+ );
+
+ var message = this.options.get('translations').get('loadingMore');
+
+ $option.html(message(this.lastParams));
+
+ return $option;
+ };
+
+ return InfiniteScroll;
+});
+
+S2.define('select2/dropdown/attachBody',[
+ 'jquery',
+ '../utils'
+], function ($, Utils) {
+ function AttachBody (decorated, $element, options) {
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
+
+ decorated.call(this, $element, options);
+ }
+
+ AttachBody.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ var setupResultsEvents = false;
+
+ decorated.call(this, container, $container);
+
+ container.on('open', function () {
+ self._showDropdown();
+ self._attachPositioningHandler(container);
+
+ if (!setupResultsEvents) {
+ setupResultsEvents = true;
+
+ container.on('results:all', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+
+ container.on('results:append', function () {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ }
+ });
+
+ container.on('close', function () {
+ self._hideDropdown();
+ self._detachPositioningHandler(container);
+ });
+
+ this.$dropdownContainer.on('mousedown', function (evt) {
+ evt.stopPropagation();
+ });
+ };
+
+ AttachBody.prototype.destroy = function (decorated) {
+ decorated.call(this);
+
+ this.$dropdownContainer.remove();
+ };
+
+ AttachBody.prototype.position = function (decorated, $dropdown, $container) {
+ // Clone all of the container classes
+ $dropdown.attr('class', $container.attr('class'));
+
+ $dropdown.removeClass('select2');
+ $dropdown.addClass('select2-container--open');
+
+ $dropdown.css({
+ position: 'absolute',
+ top: -999999
+ });
+
+ this.$container = $container;
+ };
+
+ AttachBody.prototype.render = function (decorated) {
+ var $container = $(' ');
+
+ var $dropdown = decorated.call(this);
+ $container.append($dropdown);
+
+ this.$dropdownContainer = $container;
+
+ return $container;
+ };
+
+ AttachBody.prototype._hideDropdown = function (decorated) {
+ this.$dropdownContainer.detach();
+ };
+
+ AttachBody.prototype._attachPositioningHandler =
+ function (decorated, container) {
+ var self = this;
+
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.each(function () {
+ $(this).data('select2-scroll-position', {
+ x: $(this).scrollLeft(),
+ y: $(this).scrollTop()
+ });
+ });
+
+ $watchers.on(scrollEvent, function (ev) {
+ var position = $(this).data('select2-scroll-position');
+ $(this).scrollTop(position.y);
+ });
+
+ $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
+ function (e) {
+ self._positionDropdown();
+ self._resizeDropdown();
+ });
+ };
+
+ AttachBody.prototype._detachPositioningHandler =
+ function (decorated, container) {
+ var scrollEvent = 'scroll.select2.' + container.id;
+ var resizeEvent = 'resize.select2.' + container.id;
+ var orientationEvent = 'orientationchange.select2.' + container.id;
+
+ var $watchers = this.$container.parents().filter(Utils.hasScroll);
+ $watchers.off(scrollEvent);
+
+ $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
+ };
+
+ AttachBody.prototype._positionDropdown = function () {
+ var $window = $(window);
+
+ var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
+ var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
+
+ var newDirection = null;
+
+ var offset = this.$container.offset();
+
+ offset.bottom = offset.top + this.$container.outerHeight(false);
+
+ var container = {
+ height: this.$container.outerHeight(false)
+ };
+
+ container.top = offset.top;
+ container.bottom = offset.top + container.height;
+
+ var dropdown = {
+ height: this.$dropdown.outerHeight(false)
+ };
+
+ var viewport = {
+ top: $window.scrollTop(),
+ bottom: $window.scrollTop() + $window.height()
+ };
+
+ var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
+ var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
+
+ var css = {
+ left: offset.left,
+ top: container.bottom
+ };
+
+ // Determine what the parent element is to use for calciulating the offset
+ var $offsetParent = this.$dropdownParent;
+
+ // For statically positoned elements, we need to get the element
+ // that is determining the offset
+ if ($offsetParent.css('position') === 'static') {
+ $offsetParent = $offsetParent.offsetParent();
+ }
+
+ var parentOffset = $offsetParent.offset();
+
+ css.top -= parentOffset.top;
+ css.left -= parentOffset.left;
+
+ if (!isCurrentlyAbove && !isCurrentlyBelow) {
+ newDirection = 'below';
+ }
+
+ if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
+ newDirection = 'above';
+ } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
+ newDirection = 'below';
+ }
+
+ if (newDirection == 'above' ||
+ (isCurrentlyAbove && newDirection !== 'below')) {
+ css.top = container.top - parentOffset.top - dropdown.height;
+ }
+
+ if (newDirection != null) {
+ this.$dropdown
+ .removeClass('select2-dropdown--below select2-dropdown--above')
+ .addClass('select2-dropdown--' + newDirection);
+ this.$container
+ .removeClass('select2-container--below select2-container--above')
+ .addClass('select2-container--' + newDirection);
+ }
+
+ this.$dropdownContainer.css(css);
+ };
+
+ AttachBody.prototype._resizeDropdown = function () {
+ var css = {
+ width: this.$container.outerWidth(false) + 'px'
+ };
+
+ if (this.options.get('dropdownAutoWidth')) {
+ css.minWidth = css.width;
+ css.position = 'relative';
+ css.width = 'auto';
+ }
+
+ this.$dropdown.css(css);
+ };
+
+ AttachBody.prototype._showDropdown = function (decorated) {
+ this.$dropdownContainer.appendTo(this.$dropdownParent);
+
+ this._positionDropdown();
+ this._resizeDropdown();
+ };
+
+ return AttachBody;
+});
+
+S2.define('select2/dropdown/minimumResultsForSearch',[
+
+], function () {
+ function countResults (data) {
+ var count = 0;
+
+ for (var d = 0; d < data.length; d++) {
+ var item = data[d];
+
+ if (item.children) {
+ count += countResults(item.children);
+ } else {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
+ this.minimumResultsForSearch = options.get('minimumResultsForSearch');
+
+ if (this.minimumResultsForSearch < 0) {
+ this.minimumResultsForSearch = Infinity;
+ }
+
+ decorated.call(this, $element, options, dataAdapter);
+ }
+
+ MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
+ if (countResults(params.data.results) < this.minimumResultsForSearch) {
+ return false;
+ }
+
+ return decorated.call(this, params);
+ };
+
+ return MinimumResultsForSearch;
+});
+
+S2.define('select2/dropdown/selectOnClose',[
+
+], function () {
+ function SelectOnClose () { }
+
+ SelectOnClose.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('close', function (params) {
+ self._handleSelectOnClose(params);
+ });
+ };
+
+ SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
+ if (params && params.originalSelect2Event != null) {
+ var event = params.originalSelect2Event;
+
+ // Don't select an item if the close event was triggered from a select or
+ // unselect event
+ if (event._type === 'select' || event._type === 'unselect') {
+ return;
+ }
+ }
+
+ var $highlightedResults = this.getHighlightedResults();
+
+ // Only select highlighted results
+ if ($highlightedResults.length < 1) {
+ return;
+ }
+
+ var data = $highlightedResults.data('data');
+
+ // Don't re-select already selected resulte
+ if (
+ (data.element != null && data.element.selected) ||
+ (data.element == null && data.selected)
+ ) {
+ return;
+ }
+
+ this.trigger('select', {
+ data: data
+ });
+ };
+
+ return SelectOnClose;
+});
+
+S2.define('select2/dropdown/closeOnSelect',[
+
+], function () {
+ function CloseOnSelect () { }
+
+ CloseOnSelect.prototype.bind = function (decorated, container, $container) {
+ var self = this;
+
+ decorated.call(this, container, $container);
+
+ container.on('select', function (evt) {
+ self._selectTriggered(evt);
+ });
+
+ container.on('unselect', function (evt) {
+ self._selectTriggered(evt);
+ });
+ };
+
+ CloseOnSelect.prototype._selectTriggered = function (_, evt) {
+ var originalEvent = evt.originalEvent;
+
+ // Don't close if the control key is being held
+ if (originalEvent && originalEvent.ctrlKey) {
+ return;
+ }
+
+ this.trigger('close', {
+ originalEvent: originalEvent,
+ originalSelect2Event: evt
+ });
+ };
+
+ return CloseOnSelect;
+});
+
+S2.define('select2/i18n/en',[],function () {
+ // English
+ return {
+ errorLoading: function () {
+ return 'The results could not be loaded.';
+ },
+ inputTooLong: function (args) {
+ var overChars = args.input.length - args.maximum;
+
+ var message = 'Please delete ' + overChars + ' character';
+
+ if (overChars != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ inputTooShort: function (args) {
+ var remainingChars = args.minimum - args.input.length;
+
+ var message = 'Please enter ' + remainingChars + ' or more characters';
+
+ return message;
+ },
+ loadingMore: function () {
+ return 'Loading more results…';
+ },
+ maximumSelected: function (args) {
+ var message = 'You can only select ' + args.maximum + ' item';
+
+ if (args.maximum != 1) {
+ message += 's';
+ }
+
+ return message;
+ },
+ noResults: function () {
+ return 'No results found';
+ },
+ searching: function () {
+ return 'Searching…';
+ }
+ };
+});
+
+S2.define('select2/defaults',[
+ 'jquery',
+ 'require',
+
+ './results',
+
+ './selection/single',
+ './selection/multiple',
+ './selection/placeholder',
+ './selection/allowClear',
+ './selection/search',
+ './selection/eventRelay',
+
+ './utils',
+ './translation',
+ './diacritics',
+
+ './data/select',
+ './data/array',
+ './data/ajax',
+ './data/tags',
+ './data/tokenizer',
+ './data/minimumInputLength',
+ './data/maximumInputLength',
+ './data/maximumSelectionLength',
+
+ './dropdown',
+ './dropdown/search',
+ './dropdown/hidePlaceholder',
+ './dropdown/infiniteScroll',
+ './dropdown/attachBody',
+ './dropdown/minimumResultsForSearch',
+ './dropdown/selectOnClose',
+ './dropdown/closeOnSelect',
+
+ './i18n/en'
+], function ($, require,
+
+ ResultsList,
+
+ SingleSelection, MultipleSelection, Placeholder, AllowClear,
+ SelectionSearch, EventRelay,
+
+ Utils, Translation, DIACRITICS,
+
+ SelectData, ArrayData, AjaxData, Tags, Tokenizer,
+ MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
+
+ Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
+ AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
+
+ EnglishTranslation) {
+ function Defaults () {
+ this.reset();
+ }
+
+ Defaults.prototype.apply = function (options) {
+ options = $.extend(true, {}, this.defaults, options);
+
+ if (options.dataAdapter == null) {
+ if (options.ajax != null) {
+ options.dataAdapter = AjaxData;
+ } else if (options.data != null) {
+ options.dataAdapter = ArrayData;
+ } else {
+ options.dataAdapter = SelectData;
+ }
+
+ if (options.minimumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MinimumInputLength
+ );
+ }
+
+ if (options.maximumInputLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumInputLength
+ );
+ }
+
+ if (options.maximumSelectionLength > 0) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ MaximumSelectionLength
+ );
+ }
+
+ if (options.tags) {
+ options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
+ }
+
+ if (options.tokenSeparators != null || options.tokenizer != null) {
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Tokenizer
+ );
+ }
+
+ if (options.query != null) {
+ var Query = require(options.amdBase + 'compat/query');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ Query
+ );
+ }
+
+ if (options.initSelection != null) {
+ var InitSelection = require(options.amdBase + 'compat/initSelection');
+
+ options.dataAdapter = Utils.Decorate(
+ options.dataAdapter,
+ InitSelection
+ );
+ }
+ }
+
+ if (options.resultsAdapter == null) {
+ options.resultsAdapter = ResultsList;
+
+ if (options.ajax != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ InfiniteScroll
+ );
+ }
+
+ if (options.placeholder != null) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ HidePlaceholder
+ );
+ }
+
+ if (options.selectOnClose) {
+ options.resultsAdapter = Utils.Decorate(
+ options.resultsAdapter,
+ SelectOnClose
+ );
+ }
+ }
+
+ if (options.dropdownAdapter == null) {
+ if (options.multiple) {
+ options.dropdownAdapter = Dropdown;
+ } else {
+ var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
+
+ options.dropdownAdapter = SearchableDropdown;
+ }
+
+ if (options.minimumResultsForSearch !== 0) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ MinimumResultsForSearch
+ );
+ }
+
+ if (options.closeOnSelect) {
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ CloseOnSelect
+ );
+ }
+
+ if (
+ options.dropdownCssClass != null ||
+ options.dropdownCss != null ||
+ options.adaptDropdownCssClass != null
+ ) {
+ var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ DropdownCSS
+ );
+ }
+
+ options.dropdownAdapter = Utils.Decorate(
+ options.dropdownAdapter,
+ AttachBody
+ );
+ }
+
+ if (options.selectionAdapter == null) {
+ if (options.multiple) {
+ options.selectionAdapter = MultipleSelection;
+ } else {
+ options.selectionAdapter = SingleSelection;
+ }
+
+ // Add the placeholder mixin if a placeholder was specified
+ if (options.placeholder != null) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ Placeholder
+ );
+ }
+
+ if (options.allowClear) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ AllowClear
+ );
+ }
+
+ if (options.multiple) {
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ SelectionSearch
+ );
+ }
+
+ if (
+ options.containerCssClass != null ||
+ options.containerCss != null ||
+ options.adaptContainerCssClass != null
+ ) {
+ var ContainerCSS = require(options.amdBase + 'compat/containerCss');
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ ContainerCSS
+ );
+ }
+
+ options.selectionAdapter = Utils.Decorate(
+ options.selectionAdapter,
+ EventRelay
+ );
+ }
+
+ if (typeof options.language === 'string') {
+ // Check if the language is specified with a region
+ if (options.language.indexOf('-') > 0) {
+ // Extract the region information if it is included
+ var languageParts = options.language.split('-');
+ var baseLanguage = languageParts[0];
+
+ options.language = [options.language, baseLanguage];
+ } else {
+ options.language = [options.language];
+ }
+ }
+
+ if ($.isArray(options.language)) {
+ var languages = new Translation();
+ options.language.push('en');
+
+ var languageNames = options.language;
+
+ for (var l = 0; l < languageNames.length; l++) {
+ var name = languageNames[l];
+ var language = {};
+
+ try {
+ // Try to load it with the original name
+ language = Translation.loadPath(name);
+ } catch (e) {
+ try {
+ // If we couldn't load it, check if it wasn't the full path
+ name = this.defaults.amdLanguageBase + name;
+ language = Translation.loadPath(name);
+ } catch (ex) {
+ // The translation could not be loaded at all. Sometimes this is
+ // because of a configuration problem, other times this can be
+ // because of how Select2 helps load all possible translation files.
+ if (options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The language file for "' + name + '" could not be ' +
+ 'automatically loaded. A fallback will be used instead.'
+ );
+ }
+
+ continue;
+ }
+ }
+
+ languages.extend(language);
+ }
+
+ options.translations = languages;
+ } else {
+ var baseTranslation = Translation.loadPath(
+ this.defaults.amdLanguageBase + 'en'
+ );
+ var customTranslation = new Translation(options.language);
+
+ customTranslation.extend(baseTranslation);
+
+ options.translations = customTranslation;
+ }
+
+ return options;
+ };
+
+ Defaults.prototype.reset = function () {
+ function stripDiacritics (text) {
+ // Used 'uni range + named function' from http://jsperf.com/diacritics/18
+ function match(a) {
+ return DIACRITICS[a] || a;
+ }
+
+ return text.replace(/[^\u0000-\u007E]/g, match);
+ }
+
+ function matcher (params, data) {
+ // Always return the object if there is nothing to compare
+ if ($.trim(params.term) === '') {
+ return data;
+ }
+
+ // Do a recursive check for options with children
+ if (data.children && data.children.length > 0) {
+ // Clone the data object if there are children
+ // This is required as we modify the object to remove any non-matches
+ var match = $.extend(true, {}, data);
+
+ // Check each child of the option
+ for (var c = data.children.length - 1; c >= 0; c--) {
+ var child = data.children[c];
+
+ var matches = matcher(params, child);
+
+ // If there wasn't a match, remove the object in the array
+ if (matches == null) {
+ match.children.splice(c, 1);
+ }
+ }
+
+ // If any children matched, return the new object
+ if (match.children.length > 0) {
+ return match;
+ }
+
+ // If there were no matching children, check just the plain object
+ return matcher(params, match);
+ }
+
+ var original = stripDiacritics(data.text).toUpperCase();
+ var term = stripDiacritics(params.term).toUpperCase();
+
+ // Check if the text contains the term
+ if (original.indexOf(term) > -1) {
+ return data;
+ }
+
+ // If it doesn't contain the term, don't return anything
+ return null;
+ }
+
+ this.defaults = {
+ amdBase: './',
+ amdLanguageBase: './i18n/',
+ closeOnSelect: true,
+ debug: false,
+ dropdownAutoWidth: false,
+ escapeMarkup: Utils.escapeMarkup,
+ language: EnglishTranslation,
+ matcher: matcher,
+ minimumInputLength: 0,
+ maximumInputLength: 0,
+ maximumSelectionLength: 0,
+ minimumResultsForSearch: 0,
+ selectOnClose: false,
+ sorter: function (data) {
+ return data;
+ },
+ templateResult: function (result) {
+ return result.text;
+ },
+ templateSelection: function (selection) {
+ return selection.text;
+ },
+ theme: 'default',
+ width: 'resolve'
+ };
+ };
+
+ Defaults.prototype.set = function (key, value) {
+ var camelKey = $.camelCase(key);
+
+ var data = {};
+ data[camelKey] = value;
+
+ var convertedData = Utils._convertData(data);
+
+ $.extend(this.defaults, convertedData);
+ };
+
+ var defaults = new Defaults();
+
+ return defaults;
+});
+
+S2.define('select2/options',[
+ 'require',
+ 'jquery',
+ './defaults',
+ './utils'
+], function (require, $, Defaults, Utils) {
+ function Options (options, $element) {
+ this.options = options;
+
+ if ($element != null) {
+ this.fromElement($element);
+ }
+
+ this.options = Defaults.apply(this.options);
+
+ if ($element && $element.is('input')) {
+ var InputCompat = require(this.get('amdBase') + 'compat/inputData');
+
+ this.options.dataAdapter = Utils.Decorate(
+ this.options.dataAdapter,
+ InputCompat
+ );
+ }
+ }
+
+ Options.prototype.fromElement = function ($e) {
+ var excludedData = ['select2'];
+
+ if (this.options.multiple == null) {
+ this.options.multiple = $e.prop('multiple');
+ }
+
+ if (this.options.disabled == null) {
+ this.options.disabled = $e.prop('disabled');
+ }
+
+ if (this.options.language == null) {
+ if ($e.prop('lang')) {
+ this.options.language = $e.prop('lang').toLowerCase();
+ } else if ($e.closest('[lang]').prop('lang')) {
+ this.options.language = $e.closest('[lang]').prop('lang');
+ }
+ }
+
+ if (this.options.dir == null) {
+ if ($e.prop('dir')) {
+ this.options.dir = $e.prop('dir');
+ } else if ($e.closest('[dir]').prop('dir')) {
+ this.options.dir = $e.closest('[dir]').prop('dir');
+ } else {
+ this.options.dir = 'ltr';
+ }
+ }
+
+ $e.prop('disabled', this.options.disabled);
+ $e.prop('multiple', this.options.multiple);
+
+ if ($e.data('select2Tags')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-select2-tags` attribute has been changed to ' +
+ 'use the `data-data` and `data-tags="true"` attributes and will be ' +
+ 'removed in future versions of Select2.'
+ );
+ }
+
+ $e.data('data', $e.data('select2Tags'));
+ $e.data('tags', true);
+ }
+
+ if ($e.data('ajaxUrl')) {
+ if (this.options.debug && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `data-ajax-url` attribute has been changed to ' +
+ '`data-ajax--url` and support for the old attribute will be removed' +
+ ' in future versions of Select2.'
+ );
+ }
+
+ $e.attr('ajax--url', $e.data('ajaxUrl'));
+ $e.data('ajax--url', $e.data('ajaxUrl'));
+ }
+
+ var dataset = {};
+
+ // Prefer the element's `dataset` attribute if it exists
+ // jQuery 1.x does not correctly handle data attributes with multiple dashes
+ if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
+ dataset = $.extend(true, {}, $e[0].dataset, $e.data());
+ } else {
+ dataset = $e.data();
+ }
+
+ var data = $.extend(true, {}, dataset);
+
+ data = Utils._convertData(data);
+
+ for (var key in data) {
+ if ($.inArray(key, excludedData) > -1) {
+ continue;
+ }
+
+ if ($.isPlainObject(this.options[key])) {
+ $.extend(this.options[key], data[key]);
+ } else {
+ this.options[key] = data[key];
+ }
+ }
+
+ return this;
+ };
+
+ Options.prototype.get = function (key) {
+ return this.options[key];
+ };
+
+ Options.prototype.set = function (key, val) {
+ this.options[key] = val;
+ };
+
+ return Options;
+});
+
+S2.define('select2/core',[
+ 'jquery',
+ './options',
+ './utils',
+ './keys'
+], function ($, Options, Utils, KEYS) {
+ var Select2 = function ($element, options) {
+ if ($element.data('select2') != null) {
+ $element.data('select2').destroy();
+ }
+
+ this.$element = $element;
+
+ this.id = this._generateId($element);
+
+ options = options || {};
+
+ this.options = new Options(options, $element);
+
+ Select2.__super__.constructor.call(this);
+
+ // Set up the tabindex
+
+ var tabindex = $element.attr('tabindex') || 0;
+ $element.data('old-tabindex', tabindex);
+ $element.attr('tabindex', '-1');
+
+ // Set up containers and adapters
+
+ var DataAdapter = this.options.get('dataAdapter');
+ this.dataAdapter = new DataAdapter($element, this.options);
+
+ var $container = this.render();
+
+ this._placeContainer($container);
+
+ var SelectionAdapter = this.options.get('selectionAdapter');
+ this.selection = new SelectionAdapter($element, this.options);
+ this.$selection = this.selection.render();
+
+ this.selection.position(this.$selection, $container);
+
+ var DropdownAdapter = this.options.get('dropdownAdapter');
+ this.dropdown = new DropdownAdapter($element, this.options);
+ this.$dropdown = this.dropdown.render();
+
+ this.dropdown.position(this.$dropdown, $container);
+
+ var ResultsAdapter = this.options.get('resultsAdapter');
+ this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
+ this.$results = this.results.render();
+
+ this.results.position(this.$results, this.$dropdown);
+
+ // Bind events
+
+ var self = this;
+
+ // Bind the container to all of the adapters
+ this._bindAdapters();
+
+ // Register any DOM event handlers
+ this._registerDomEvents();
+
+ // Register any internal event handlers
+ this._registerDataEvents();
+ this._registerSelectionEvents();
+ this._registerDropdownEvents();
+ this._registerResultsEvents();
+ this._registerEvents();
+
+ // Set the initial state
+ this.dataAdapter.current(function (initialData) {
+ self.trigger('selection:update', {
+ data: initialData
+ });
+ });
+
+ // Hide the original select
+ $element.addClass('select2-hidden-accessible');
+ $element.attr('aria-hidden', 'true');
+
+ // Synchronize any monitored attributes
+ this._syncAttributes();
+
+ $element.data('select2', this);
+ };
+
+ Utils.Extend(Select2, Utils.Observable);
+
+ Select2.prototype._generateId = function ($element) {
+ var id = '';
+
+ if ($element.attr('id') != null) {
+ id = $element.attr('id');
+ } else if ($element.attr('name') != null) {
+ id = $element.attr('name') + '-' + Utils.generateChars(2);
+ } else {
+ id = Utils.generateChars(4);
+ }
+
+ id = id.replace(/(:|\.|\[|\]|,)/g, '');
+ id = 'select2-' + id;
+
+ return id;
+ };
+
+ Select2.prototype._placeContainer = function ($container) {
+ $container.insertAfter(this.$element);
+
+ var width = this._resolveWidth(this.$element, this.options.get('width'));
+
+ if (width != null) {
+ $container.css('width', width);
+ }
+ };
+
+ Select2.prototype._resolveWidth = function ($element, method) {
+ var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
+
+ if (method == 'resolve') {
+ var styleWidth = this._resolveWidth($element, 'style');
+
+ if (styleWidth != null) {
+ return styleWidth;
+ }
+
+ return this._resolveWidth($element, 'element');
+ }
+
+ if (method == 'element') {
+ var elementWidth = $element.outerWidth(false);
+
+ if (elementWidth <= 0) {
+ return 'auto';
+ }
+
+ return elementWidth + 'px';
+ }
+
+ if (method == 'style') {
+ var style = $element.attr('style');
+
+ if (typeof(style) !== 'string') {
+ return null;
+ }
+
+ var attrs = style.split(';');
+
+ for (var i = 0, l = attrs.length; i < l; i = i + 1) {
+ var attr = attrs[i].replace(/\s/g, '');
+ var matches = attr.match(WIDTH);
+
+ if (matches !== null && matches.length >= 1) {
+ return matches[1];
+ }
+ }
+
+ return null;
+ }
+
+ return method;
+ };
+
+ Select2.prototype._bindAdapters = function () {
+ this.dataAdapter.bind(this, this.$container);
+ this.selection.bind(this, this.$container);
+
+ this.dropdown.bind(this, this.$container);
+ this.results.bind(this, this.$container);
+ };
+
+ Select2.prototype._registerDomEvents = function () {
+ var self = this;
+
+ this.$element.on('change.select2', function () {
+ self.dataAdapter.current(function (data) {
+ self.trigger('selection:update', {
+ data: data
+ });
+ });
+ });
+
+ this.$element.on('focus.select2', function (evt) {
+ self.trigger('focus', evt);
+ });
+
+ this._syncA = Utils.bind(this._syncAttributes, this);
+ this._syncS = Utils.bind(this._syncSubtree, this);
+
+ if (this.$element[0].attachEvent) {
+ this.$element[0].attachEvent('onpropertychange', this._syncA);
+ }
+
+ var observer = window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver
+ ;
+
+ if (observer != null) {
+ this._observer = new observer(function (mutations) {
+ $.each(mutations, self._syncA);
+ $.each(mutations, self._syncS);
+ });
+ this._observer.observe(this.$element[0], {
+ attributes: true,
+ childList: true,
+ subtree: false
+ });
+ } else if (this.$element[0].addEventListener) {
+ this.$element[0].addEventListener(
+ 'DOMAttrModified',
+ self._syncA,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeInserted',
+ self._syncS,
+ false
+ );
+ this.$element[0].addEventListener(
+ 'DOMNodeRemoved',
+ self._syncS,
+ false
+ );
+ }
+ };
+
+ Select2.prototype._registerDataEvents = function () {
+ var self = this;
+
+ this.dataAdapter.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerSelectionEvents = function () {
+ var self = this;
+ var nonRelayEvents = ['toggle', 'focus'];
+
+ this.selection.on('toggle', function () {
+ self.toggleDropdown();
+ });
+
+ this.selection.on('focus', function (params) {
+ self.focus(params);
+ });
+
+ this.selection.on('*', function (name, params) {
+ if ($.inArray(name, nonRelayEvents) !== -1) {
+ return;
+ }
+
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerDropdownEvents = function () {
+ var self = this;
+
+ this.dropdown.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerResultsEvents = function () {
+ var self = this;
+
+ this.results.on('*', function (name, params) {
+ self.trigger(name, params);
+ });
+ };
+
+ Select2.prototype._registerEvents = function () {
+ var self = this;
+
+ this.on('open', function () {
+ self.$container.addClass('select2-container--open');
+ });
+
+ this.on('close', function () {
+ self.$container.removeClass('select2-container--open');
+ });
+
+ this.on('enable', function () {
+ self.$container.removeClass('select2-container--disabled');
+ });
+
+ this.on('disable', function () {
+ self.$container.addClass('select2-container--disabled');
+ });
+
+ this.on('blur', function () {
+ self.$container.removeClass('select2-container--focus');
+ });
+
+ this.on('query', function (params) {
+ if (!self.isOpen()) {
+ self.trigger('open', {});
+ }
+
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:all', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('query:append', function (params) {
+ this.dataAdapter.query(params, function (data) {
+ self.trigger('results:append', {
+ data: data,
+ query: params
+ });
+ });
+ });
+
+ this.on('open', function(){
+ // Focus on the active element when opening dropdown.
+ // Needs 1 ms delay because of other 1 ms setTimeouts when rendering.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1);
+ });
+
+ $(document).on('keydown', function (evt) {
+ var key = evt.which;
+ if (self.isOpen()) {
+ if (key === KEYS.ESC || key === KEYS.TAB ||
+ (key === KEYS.UP && evt.altKey)) {
+ self.close();
+
+ evt.preventDefault();
+ } else if (key === KEYS.ENTER) {
+ self.trigger('results:select', {});
+
+ evt.preventDefault();
+ } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
+ self.trigger('results:toggle', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.UP) {
+ self.trigger('results:previous', {});
+
+ evt.preventDefault();
+ } else if (key === KEYS.DOWN) {
+ self.trigger('results:next', {});
+
+ evt.preventDefault();
+ }
+
+ // Move the focus to the selected element on keyboard navigation.
+ // Required for screen readers to work properly.
+ if (key === KEYS.DOWN || key === KEYS.UP) {
+ self.focusOnActiveElement();
+ } else {
+ // Focus on the search if user starts typing.
+ var $searchField = self.$dropdown.find('.select2-search__field');
+ if (! $searchField.length) {
+ $searchField = self.$container.find('.select2-search__field');
+ }
+ $searchField.focus();
+ // Focus back to active selection when finished typing.
+ // Small delay so typed character can be read by screen reader.
+ setTimeout(function(){
+ self.focusOnActiveElement();
+ }, 1000);
+ }
+
+ } else if (self.hasFocus()) {
+ if (key === KEYS.ENTER || key === KEYS.SPACE ||
+ (key === KEYS.DOWN && evt.altKey)) {
+ self.open();
+ evt.preventDefault();
+ }
+ }
+ });
+ };
+
+ Select2.prototype.focusOnActiveElement = function () {
+ // Don't mess with the focus on touchscreens because it causes havoc with on-screen keyboards.
+ if (! Utils.isTouchscreen()) {
+ this.$results.find('li.select2-results__option--highlighted').focus();
+ }
+ };
+
+ Select2.prototype._syncAttributes = function () {
+ this.options.set('disabled', this.$element.prop('disabled'));
+
+ if (this.options.get('disabled')) {
+ if (this.isOpen()) {
+ this.close();
+ }
+
+ this.trigger('disable', {});
+ } else {
+ this.trigger('enable', {});
+ }
+ };
+
+ Select2.prototype._syncSubtree = function (evt, mutations) {
+ var changed = false;
+ var self = this;
+
+ // Ignore any mutation events raised for elements that aren't options or
+ // optgroups. This handles the case when the select element is destroyed
+ if (
+ evt && evt.target && (
+ evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
+ )
+ ) {
+ return;
+ }
+
+ if (!mutations) {
+ // If mutation events aren't supported, then we can only assume that the
+ // change affected the selections
+ changed = true;
+ } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
+ for (var n = 0; n < mutations.addedNodes.length; n++) {
+ var node = mutations.addedNodes[n];
+
+ if (node.selected) {
+ changed = true;
+ }
+ }
+ } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
+ changed = true;
+ }
+
+ // Only re-pull the data if we think there is a change
+ if (changed) {
+ this.dataAdapter.current(function (currentData) {
+ self.trigger('selection:update', {
+ data: currentData
+ });
+ });
+ }
+ };
+
+ /**
+ * Override the trigger method to automatically trigger pre-events when
+ * there are events that can be prevented.
+ */
+ Select2.prototype.trigger = function (name, args) {
+ var actualTrigger = Select2.__super__.trigger;
+ var preTriggerMap = {
+ 'open': 'opening',
+ 'close': 'closing',
+ 'select': 'selecting',
+ 'unselect': 'unselecting'
+ };
+
+ if (args === undefined) {
+ args = {};
+ }
+
+ if (name in preTriggerMap) {
+ var preTriggerName = preTriggerMap[name];
+ var preTriggerArgs = {
+ prevented: false,
+ name: name,
+ args: args
+ };
+
+ actualTrigger.call(this, preTriggerName, preTriggerArgs);
+
+ if (preTriggerArgs.prevented) {
+ args.prevented = true;
+
+ return;
+ }
+ }
+
+ actualTrigger.call(this, name, args);
+ };
+
+ Select2.prototype.toggleDropdown = function () {
+ if (this.options.get('disabled')) {
+ return;
+ }
+
+ if (this.isOpen()) {
+ this.close();
+ } else {
+ this.open();
+ }
+ };
+
+ Select2.prototype.open = function () {
+ if (this.isOpen()) {
+ return;
+ }
+
+ this.trigger('query', {});
+ };
+
+ Select2.prototype.close = function () {
+ if (!this.isOpen()) {
+ return;
+ }
+
+ this.trigger('close', {});
+ };
+
+ Select2.prototype.isOpen = function () {
+ return this.$container.hasClass('select2-container--open');
+ };
+
+ Select2.prototype.hasFocus = function () {
+ return this.$container.hasClass('select2-container--focus');
+ };
+
+ Select2.prototype.focus = function (data) {
+ // No need to re-trigger focus events if we are already focused
+ if (this.hasFocus()) {
+ return;
+ }
+
+ this.$container.addClass('select2-container--focus');
+ this.trigger('focus', {});
+ };
+
+ Select2.prototype.enable = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("enable")` method has been deprecated and will' +
+ ' be removed in later Select2 versions. Use $element.prop("disabled")' +
+ ' instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ args = [true];
+ }
+
+ var disabled = !args[0];
+
+ this.$element.prop('disabled', disabled);
+ };
+
+ Select2.prototype.data = function () {
+ if (this.options.get('debug') &&
+ arguments.length > 0 && window.console && console.warn) {
+ console.warn(
+ 'Select2: Data can no longer be set using `select2("data")`. You ' +
+ 'should consider setting the value instead using `$element.val()`.'
+ );
+ }
+
+ var data = [];
+
+ this.dataAdapter.current(function (currentData) {
+ data = currentData;
+ });
+
+ return data;
+ };
+
+ Select2.prototype.val = function (args) {
+ if (this.options.get('debug') && window.console && console.warn) {
+ console.warn(
+ 'Select2: The `select2("val")` method has been deprecated and will be' +
+ ' removed in later Select2 versions. Use $element.val() instead.'
+ );
+ }
+
+ if (args == null || args.length === 0) {
+ return this.$element.val();
+ }
+
+ var newVal = args[0];
+
+ if ($.isArray(newVal)) {
+ newVal = $.map(newVal, function (obj) {
+ return obj.toString();
+ });
+ }
+
+ this.$element.val(newVal).trigger('change');
+ };
+
+ Select2.prototype.destroy = function () {
+ this.$container.remove();
+
+ if (this.$element[0].detachEvent) {
+ this.$element[0].detachEvent('onpropertychange', this._syncA);
+ }
+
+ if (this._observer != null) {
+ this._observer.disconnect();
+ this._observer = null;
+ } else if (this.$element[0].removeEventListener) {
+ this.$element[0]
+ .removeEventListener('DOMAttrModified', this._syncA, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeInserted', this._syncS, false);
+ this.$element[0]
+ .removeEventListener('DOMNodeRemoved', this._syncS, false);
+ }
+
+ this._syncA = null;
+ this._syncS = null;
+
+ this.$element.off('.select2');
+ this.$element.attr('tabindex', this.$element.data('old-tabindex'));
+
+ this.$element.removeClass('select2-hidden-accessible');
+ this.$element.attr('aria-hidden', 'false');
+ this.$element.removeData('select2');
+
+ this.dataAdapter.destroy();
+ this.selection.destroy();
+ this.dropdown.destroy();
+ this.results.destroy();
+
+ this.dataAdapter = null;
+ this.selection = null;
+ this.dropdown = null;
+ this.results = null;
+ };
+
+ Select2.prototype.render = function () {
+ var $container = $(
+ '' +
+ ' ' +
+ ' ' +
+ ' '
+ );
+
+ $container.attr('dir', this.options.get('dir'));
+
+ this.$container = $container;
+
+ this.$container.addClass('select2-container--' + this.options.get('theme'));
+
+ $container.data('element', this.$element);
+
+ return $container;
+ };
+
+ return Select2;
+});
+
+S2.define('jquery-mousewheel',[
+ 'jquery'
+], function ($) {
+ // Used to shim jQuery.mousewheel for non-full builds.
+ return $;
+});
+
+S2.define('jquery.select2',[
+ 'jquery',
+ 'jquery-mousewheel',
+
+ './select2/core',
+ './select2/defaults'
+], function ($, _, Select2, Defaults) {
+ if ($.fn.selectWoo == null) {
+ // All methods that should return the element
+ var thisMethods = ['open', 'close', 'destroy'];
+
+ $.fn.selectWoo = function (options) {
+ options = options || {};
+
+ if (typeof options === 'object') {
+ this.each(function () {
+ var instanceOptions = $.extend(true, {}, options);
+
+ var instance = new Select2($(this), instanceOptions);
+ });
+
+ return this;
+ } else if (typeof options === 'string') {
+ var ret;
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var instance = $(this).data('select2');
+
+ if (instance == null && window.console && console.error) {
+ console.error(
+ 'The select2(\'' + options + '\') method was called on an ' +
+ 'element that is not using Select2.'
+ );
+ }
+
+ ret = instance[options].apply(instance, args);
+ });
+
+ // Check if we should be returning `this`
+ if ($.inArray(options, thisMethods) > -1) {
+ return this;
+ }
+
+ return ret;
+ } else {
+ throw new Error('Invalid arguments for Select2: ' + options);
+ }
+ };
+ }
+
+ if ($.fn.select2 != null && $.fn.select2.defaults != null) {
+ $.fn.selectWoo.defaults = $.fn.select2.defaults;
+ }
+
+ if ($.fn.selectWoo.defaults == null) {
+ $.fn.selectWoo.defaults = Defaults;
+ }
+
+ // Also register selectWoo under select2 if select2 is not already present.
+ $.fn.select2 = $.fn.select2 || $.fn.selectWoo;
+
+ return Select2;
+});
+
+ // Return the AMD loader configuration so it can be used outside of this file
+ return {
+ define: S2.define,
+ require: S2.require
+ };
+}());
+
+ // Autoload the jQuery bindings
+ // We know that all of the modules exist above this, so we're safe
+ var select2 = S2.require('jquery.select2');
+
+ // Hold the AMD module references on the jQuery function that was just loaded
+ // This allows Select2 to use the internal loader outside of this file, such
+ // as in the language files.
+ jQuery.fn.select2.amd = S2;
+ jQuery.fn.selectWoo.amd = S2;
+
+ // Return the Select2 instance for anyone who is importing it.
+ return select2;
+}));
diff --git a/functions/kirki/assets/vendor/selectWoo/js/selectWoo.min.js b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.min.js
new file mode 100644
index 0000000..bf9600c
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/js/selectWoo.min.js
@@ -0,0 +1 @@
+/*! Select2 1.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a(' '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[data-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("data-selected","true"):b.attr("data-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a(' ');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.options.get("minimumResultsForSearch");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),window.setTimeout(function(){d.$selection.focus()},1),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(' '),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a(" ")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html(''),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('× ')},d.prototype.update=function(a){var b=this;if(this.clear(),0!==a.length){for(var d=[],e=0;e1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('× ');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a(' ');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f),e.container.focusOnActiveElement()},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a(' ');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a(' '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(" "),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen())if(c===d.ESC||c===d.TAB||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault()),c===d.DOWN||c===d.UP)b.focusOnActiveElement();else{var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3)}else b.hasFocus()&&(c===d.ENTER||c===d.SPACE||c===d.DOWN&&a.altKey)&&(b.open(),a.preventDefault())})},e.prototype.focusOnActiveElement=function(){c.isTouchscreen()||this.$results.find("li.select2-results__option--highlighted").focus()},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(' ');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null!=a.fn.select2&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c});
\ No newline at end of file
diff --git a/functions/kirki/assets/vendor/selectWoo/kirki.css b/functions/kirki/assets/vendor/selectWoo/kirki.css
new file mode 100644
index 0000000..94090fd
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/kirki.css
@@ -0,0 +1,28 @@
+.select2-dropdown {
+ border-color: rgba(0, 0, 0, 0.1);
+ border-radius: 0; }
+
+.select2-container {
+ min-width: 100px;
+ width: 100% !important; }
+ .select2-container--open .select2-dropdown--above,
+ .select2-container--open .select2-dropdown--below {
+ z-index: 9999999;
+ min-width: 100px; }
+ .select2-container--default .select2-search--dropdown .select2-search__field {
+ border-color: rgba(0, 0, 0, 0.1); }
+ .select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--single {
+ border-color: rgba(0, 0, 0, 0.1);
+ border-radius: 0; }
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
+ background-color: rgba(255, 255, 255, 0);
+ background-color: transparent;
+ border: none;
+ border-radius: 0; }
+
+.wp-customizer .select2-container {
+ z-index: 8 !important; }
+ .wp-customizer .select2-container.select2-container--open {
+ z-index: 999999 !important; }
+
+/*# sourceMappingURL=kirki.css.map */
diff --git a/functions/kirki/assets/vendor/selectWoo/kirki.css.map b/functions/kirki/assets/vendor/selectWoo/kirki.css.map
new file mode 100644
index 0000000..4d384aa
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/kirki.css.map
@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AAAA,iBAAkB;EAChB,YAAY,EAAE,kBAAc;EAC5B,aAAa,EAAE,CAAC;;AAGlB,kBAAmB;EACjB,SAAS,EAAE,KAAK;EAChB,KAAK,EAAE,eAAe;EAGpB;mDACyB;IACvB,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,KAAK;EAMhB,4EAAuB;IACrB,YAAY,EAAE,kBAAc;EAK9B,gHACU;IACR,YAAY,EAAE,kBAAc;IAC5B,aAAa,EAAE,CAAC;EAIhB,mFAA2B;IACzB,gBAAgB,EAAE,sBAAmB;IACrC,gBAAgB,EAAE,WAAW;IAC7B,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,CAAC;;AAO1B,iCAAkC;EAChC,OAAO,EAAE,YAAY;EAGnB,yDAAQ;IAEN,OAAO,EAAE,iBAAiB",
+"sources": ["kirki.scss"],
+"names": [],
+"file": "kirki.css"
+}
diff --git a/functions/kirki/assets/vendor/selectWoo/kirki.scss b/functions/kirki/assets/vendor/selectWoo/kirki.scss
new file mode 100644
index 0000000..39ee9ae
--- /dev/null
+++ b/functions/kirki/assets/vendor/selectWoo/kirki.scss
@@ -0,0 +1,53 @@
+.select2-dropdown {
+ border-color: rgba(0,0,0,.1);
+ border-radius: 0;
+}
+
+.select2-container {
+ min-width: 100px;
+ width: 100% !important;
+
+ &--open {
+ .select2-dropdown--above,
+ .select2-dropdown--below {
+ z-index: 9999999;
+ min-width: 100px;
+ }
+ }
+
+ &--default {
+ .select2-search--dropdown {
+ .select2-search__field {
+ border-color: rgba(0,0,0,.1);
+ }
+ }
+
+ .select2-selection {
+ &--multiple,
+ &--single {
+ border-color: rgba(0,0,0,.1);
+ border-radius: 0;
+ }
+
+ &--multiple {
+ .select2-selection__choice {
+ background-color: rgba(255,255,255,0);
+ background-color: transparent;
+ border: none;
+ border-radius: 0;
+ }
+ }
+ }
+ }
+}
+
+.wp-customizer .select2-container {
+ z-index: 8 !important;
+
+ &.select2-container {
+ &--open {
+ // @See https://github.com/aristath/kirki/issues/1418
+ z-index: 999999 !important;
+ }
+ }
+}
diff --git a/functions/kirki/assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js b/functions/kirki/assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js
new file mode 100644
index 0000000..7764f5b
--- /dev/null
+++ b/functions/kirki/assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js
@@ -0,0 +1,477 @@
+/**!
+ * wp-color-picker-alpha
+ *
+ * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
+ * Only run in input and is defined data alpha in true
+ *
+ * Version: 2.0
+ * https://github.com/kallookoo/wp-color-picker-alpha
+ * Licensed under the GPLv2 license.
+ */
+( function( $ ) {
+ // Variable for some backgrounds ( grid )
+ var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',
+ // Html stuff for wpColorPicker copy of the original color-picker.js
+ _before = ' ',
+ _after = '
',
+ _wrap = '
',
+ _button = ' ',
+ _wrappingLabel = ' ',
+ _wrappingLabelText = ' ';
+
+ /**
+ * Overwrite Color
+ * for enable support rbga
+ */
+ Color.fn.toString = function() {
+ if ( this._alpha < 1 )
+ return this.toCSS( 'rgba', this._alpha ).replace( /\s+/g, '' );
+
+ var hex = parseInt( this._color, 10 ).toString( 16 );
+
+ if ( this.error )
+ return '';
+
+ if ( hex.length < 6 )
+ hex = ( '00000' + hex ).substr( -6 );
+
+ return '#' + hex;
+ };
+
+ /**
+ * Overwrite wpColorPicker
+ */
+ $.widget( 'wp.wpColorPicker', $.wp.wpColorPicker, {
+ /**
+ * @summary Creates the color picker.
+ *
+ * Creates the color picker, sets default values, css classes and wraps it all in HTML.
+ *
+ * @since 3.5.0
+ *
+ * @access private
+ *
+ * @returns {void}
+ */
+ _create: function() {
+ // Return early if Iris support is missing.
+ if ( ! $.support.iris ) {
+ return;
+ }
+
+ var self = this,
+ el = self.element;
+
+ // Override default options with options bound to the element.
+ $.extend( self.options, el.data() );
+
+ // Create a color picker which only allows adjustments to the hue.
+ if ( self.options.type === 'hue' ) {
+ return self._createHueOnly();
+ }
+
+ // Bind the close event.
+ self.close = $.proxy( self.close, self );
+
+ self.initialValue = el.val();
+
+ // Add a CSS class to the input field.
+ el.addClass( 'wp-color-picker' );
+
+ /*
+ * Check if there's already a wrapping label, e.g. in the Customizer.
+ * If there's no label, add a default one to match the Customizer template.
+ */
+ if ( ! el.parent( 'label' ).length ) {
+ // Wrap the input field in the default label.
+ el.wrap( _wrappingLabel );
+ // Insert the default label text.
+ self.wrappingLabelText = $( _wrappingLabelText )
+ .insertBefore( el )
+ .text( wpColorPickerL10n.defaultLabel );
+ }
+
+ /*
+ * At this point, either it's the standalone version or the Customizer
+ * one, we have a wrapping label to use as hook in the DOM, let's store it.
+ */
+ self.wrappingLabel = el.parent();
+
+ // Wrap the label in the main wrapper.
+ self.wrappingLabel.wrap( _wrap );
+ // Store a reference to the main wrapper.
+ self.wrap = self.wrappingLabel.parent();
+ // Set up the toggle button and insert it before the wrapping label.
+ self.toggler = $( _before )
+ .insertBefore( self.wrappingLabel )
+ .css( { backgroundColor: self.initialValue } );
+ // Set the toggle button span element text.
+ if ( el.data( 'label' ) ) {
+ self.toggler.find( '.wp-color-result-text' ).text( el.data( 'label' ) );
+ } else {
+ self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick );
+ }
+ // Set up the Iris container and insert it after the wrapping label.
+ self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel );
+ // Store a reference to the Clear/Default button.
+ self.button = $( _button );
+
+ // Set up the Clear/Default button.
+ if ( self.options.defaultColor ) {
+ self.button
+ .addClass( 'wp-picker-default' )
+ .val( wpColorPickerL10n.defaultString )
+ .attr( 'aria-label', wpColorPickerL10n.defaultAriaLabel );
+ } else {
+ self.button
+ .addClass( 'wp-picker-clear' )
+ .val( wpColorPickerL10n.clear )
+ .attr( 'aria-label', wpColorPickerL10n.clearAriaLabel );
+ }
+
+ // Wrap the wrapping label in its wrapper and append the Clear/Default button.
+ self.wrappingLabel
+ .wrap( ' ' )
+ .after( self.button );
+
+ /*
+ * The input wrapper now contains the label+input+Clear/Default button.
+ * Store a reference to the input wrapper: we'll use this to toggle
+ * the controls visibility.
+ */
+ self.inputWrapper = el.closest( '.wp-picker-input-wrap' );
+
+ /*
+ * CSS for support < 4.9
+ */
+ self.toggler.css({
+ 'height': '24px',
+ 'margin': '0 6px 6px 0',
+ 'padding': '0 0 0 30px',
+ 'font-size': '11px'
+ });
+
+ self.toggler.find( '.wp-color-result-text' ).css({
+ 'background': '#f7f7f7',
+ 'border-radius': '0 2px 2px 0',
+ 'border-left': '1px solid #ccc',
+ 'color': '#555',
+ 'display': 'block',
+ 'line-height': '22px',
+ 'padding': '0 6px',
+ 'text-align': 'center'
+ });
+
+ el.iris( {
+ target: self.pickerContainer,
+ hide: self.options.hide,
+ width: self.options.width,
+ mode: self.options.mode,
+ palettes: self.options.palettes,
+ /**
+ * @summary Handles the onChange event if one has been defined in the options.
+ *
+ * Handles the onChange event if one has been defined in the options and additionally
+ * sets the background color for the toggler element.
+ *
+ * @since 3.5.0
+ *
+ * @param {Event} event The event that's being called.
+ * @param {HTMLElement} ui The HTMLElement containing the color picker.
+ *
+ * @returns {void}
+ */
+ change: function( event, ui ) {
+ if ( self.options.alpha ) {
+ self.toggler.css( {
+ 'background-image': 'url(' + image + ')',
+ 'position': 'relative'
+ } );
+ if ( self.toggler.find( 'span.color-alpha' ).length == 0 ) {
+ self.toggler.append( ' ' );
+ }
+ self.toggler.find( 'span.color-alpha' ).css( {
+ 'width': '30px',
+ 'height': '24px',
+ 'position': 'absolute',
+ 'top': 0,
+ 'left': 0,
+ 'border-top-left-radius': '2px',
+ 'border-bottom-left-radius': '2px',
+ 'background': ui.color.toString()
+ } );
+ } else {
+ self.toggler.css( { backgroundColor: ui.color.toString() } );
+ }
+
+ if ( $.isFunction( self.options.change ) ) {
+ self.options.change.call( this, event, ui );
+ }
+ }
+ } );
+
+ el.val( self.initialValue );
+ self._addListeners();
+
+ // Force the color picker to always be closed on initial load.
+ if ( ! self.options.hide ) {
+ self.toggler.click();
+ }
+ },
+ /**
+ * @summary Binds event listeners to the color picker.
+ *
+ * @since 3.5.0
+ *
+ * @access private
+ *
+ * @returns {void}
+ */
+ _addListeners: function() {
+ var self = this;
+
+ /**
+ * @summary Prevent any clicks inside this widget from leaking to the top and closing it.
+ *
+ * @since 3.5.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @returs {void}
+ */
+ self.wrap.on( 'click.wpcolorpicker', function( event ) {
+ event.stopPropagation();
+ });
+
+ /**
+ * @summary Open or close the color picker depending on the class.
+ *
+ * @since 3.5
+ */
+ self.toggler.click( function() {
+ if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
+ self.close();
+ } else {
+ self.open();
+ }
+ });
+
+ /**
+ * @summary Checks if value is empty when changing the color in the color picker.
+ *
+ * Checks if value is empty when changing the color in the color picker.
+ * If so, the background color is cleared.
+ *
+ * @since 3.5.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @returns {void}
+ */
+ self.element.on( 'change', function( event ) {
+ // Empty or Error = clear
+ if ( $( this ).val() === '' || self.element.hasClass( 'iris-error' ) ) {
+ if ( self.options.alpha ) {
+ self.toggler.find( 'span.color-alpha' ).css( 'backgroundColor', '' );
+ } else {
+ self.toggler.css( 'backgroundColor', '' );
+ }
+
+ // Fire clear callback if we have one
+ if ( $.isFunction( self.options.clear ) )
+ self.options.clear.call( this, event );
+ }
+ } );
+
+ /**
+ * @summary Enables the user to clear or revert the color in the color picker.
+ *
+ * Enables the user to either clear the color in the color picker or revert back to the default color.
+ *
+ * @since 3.5.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @returns {void}
+ */
+ self.button.on( 'click', function( event ) {
+ if ( $( this ).hasClass( 'wp-picker-clear' ) ) {
+ self.element.val( '' );
+ if ( self.options.alpha ) {
+ self.toggler.find( 'span.color-alpha' ).css( 'backgroundColor', '' );
+ } else {
+ self.toggler.css( 'backgroundColor', '' );
+ }
+
+ if ( $.isFunction( self.options.clear ) )
+ self.options.clear.call( this, event );
+
+ } else if ( $( this ).hasClass( 'wp-picker-default' ) ) {
+ self.element.val( self.options.defaultColor ).change();
+ }
+ });
+ }
+ });
+
+ /**
+ * Overwrite iris
+ */
+ $.widget( 'a8c.iris', $.a8c.iris, {
+ _create: function() {
+ this._super();
+
+ // Global option for check is mode rbga is enabled
+ this.options.alpha = this.element.data( 'alpha' ) || false;
+
+ // Is not input disabled
+ if ( ! this.element.is( ':input' ) )
+ this.options.alpha = false;
+
+ if ( typeof this.options.alpha !== 'undefined' && this.options.alpha ) {
+ var self = this,
+ el = self.element,
+ _html = '',
+ aContainer = $( _html ).appendTo( self.picker.find( '.iris-picker-inner' ) ),
+ aSlider = aContainer.find( '.iris-slider-offset-alpha' ),
+ controls = {
+ aContainer: aContainer,
+ aSlider: aSlider
+ };
+
+ if ( typeof el.data( 'custom-width' ) !== 'undefined' ) {
+ self.options.customWidth = parseInt( el.data( 'custom-width' ) ) || 0;
+ } else {
+ self.options.customWidth = 100;
+ }
+
+ // Set default width for input reset
+ self.options.defaultWidth = el.width();
+
+ // Update width for input
+ if ( self._color._alpha < 1 || self._color.toString().indexOf( 'rgb' ) != -1 )
+ el.width( parseInt( self.options.defaultWidth + self.options.customWidth ) );
+
+ // Push new controls
+ $.each( controls, function( k, v ) {
+ self.controls[k] = v;
+ } );
+
+ // Change size strip and add margin for sliders
+ self.controls.square.css( { 'margin-right': '0' } );
+ var emptyWidth = ( self.picker.width() - self.controls.square.width() - 20 ),
+ stripsMargin = ( emptyWidth / 6 ),
+ stripsWidth = ( ( emptyWidth / 2 ) - stripsMargin );
+
+ $.each( [ 'aContainer', 'strip' ], function( k, v ) {
+ self.controls[v].width( stripsWidth ).css( { 'margin-left': stripsMargin + 'px' } );
+ } );
+
+ // Add new slider
+ self._initControls();
+
+ // For updated widget
+ self._change();
+ }
+ },
+ _initControls: function() {
+ this._super();
+
+ if ( this.options.alpha ) {
+ var self = this,
+ controls = self.controls;
+
+ controls.aSlider.slider({
+ orientation: 'vertical',
+ min: 0,
+ max: 100,
+ step: 1,
+ value: parseInt( self._color._alpha * 100 ),
+ slide: function( event, ui ) {
+ // Update alpha value
+ self._color._alpha = parseFloat( ui.value / 100 );
+ self._change.apply( self, arguments );
+ }
+ });
+ }
+ },
+ _change: function() {
+ this._super();
+
+ var self = this,
+ el = self.element;
+
+ if ( this.options.alpha ) {
+ var controls = self.controls,
+ alpha = parseInt( self._color._alpha * 100 ),
+ color = self._color.toRgb(),
+ gradient = [
+ 'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
+ 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
+ ],
+ defaultWidth = self.options.defaultWidth,
+ customWidth = self.options.customWidth,
+ target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' );
+
+ // Generate background slider alpha, only for CSS3 old browser fuck!! :)
+ controls.aContainer.css( { 'background': 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + image + ')' } );
+
+ if ( target.hasClass( 'wp-picker-open' ) ) {
+ // Update alpha value
+ controls.aSlider.slider( 'value', alpha );
+
+ /**
+ * Disabled change opacity in default slider Saturation ( only is alpha enabled )
+ * and change input width for view all value
+ */
+ if ( self._color._alpha < 1 ) {
+ controls.strip.attr( 'style', controls.strip.attr( 'style' ).replace( /rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g, 'rgb($1$3$5)' ) );
+ el.width( parseInt( defaultWidth + customWidth ) );
+ } else {
+ el.width( defaultWidth );
+ }
+ }
+ }
+
+ var reset = el.data( 'reset-alpha' ) || false;
+
+ if ( reset ) {
+ self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() {
+ self._color._alpha = 1;
+ self.active = 'external';
+ self._change();
+ } );
+ }
+ },
+ _addInputListeners: function( input ) {
+ var self = this,
+ debounceTimeout = 100,
+ callback = function( event ) {
+ var color = new Color( input.val() ),
+ val = input.val();
+
+ input.removeClass( 'iris-error' );
+ // We gave a bad color
+ if ( color.error ) {
+ // Don't error on an empty input
+ if ( val !== '' )
+ input.addClass( 'iris-error' );
+ } else {
+ if ( color.toString() !== self._color.toString() ) {
+ // Let's not do this on keyup for hex shortcodes
+ if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) )
+ self._setOption( 'color', color.toString() );
+ }
+ }
+ };
+
+ input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
+
+ // If we initialized hidden, show on first focus. The rest is up to you.
+ if ( self.options.hide ) {
+ input.on( 'focus', function() {
+ self.show();
+ } );
+ }
+ }
+ } );
+}( jQuery ) );
diff --git a/functions/kirki/class-kirki-autoload.php b/functions/kirki/class-kirki-autoload.php
new file mode 100644
index 0000000..6086fcc
--- /dev/null
+++ b/functions/kirki/class-kirki-autoload.php
@@ -0,0 +1,121 @@
+cached_paths[ $class_name ] ) && file_exists( $this->cached_paths[ $class_name ] ) ) {
+ include_once $this->cached_paths[ $class_name ];
+ return;
+ }
+
+ $paths = $this->get_paths( $class_name );
+
+ foreach ( $paths as $path ) {
+ $path = wp_normalize_path( $path );
+ if ( file_exists( $path ) ) {
+ $this->cached_paths[ $class_name ] = $path;
+ include_once $path;
+ return;
+ }
+ }
+ }
+
+ /**
+ * Get an array of possible paths for the file.
+ *
+ * @access protected
+ * @since 3.0.10
+ * @param string $class_name The name of the class we're trying to load.
+ * @return array
+ */
+ protected function get_paths( $class_name ) {
+
+ $paths = array();
+ // Build the filename.
+ $filename = 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php';
+
+ // Break class-name is parts.
+ $name_parts = explode( '_', str_replace( 'Kirki_', '', $class_name ) );
+
+ // Handle modules loading.
+ if ( isset( $name_parts[0] ) && 'Modules' === $name_parts[0] ) {
+ $path = dirname( __FILE__ ) . '/modules/';
+ $path .= strtolower( str_replace( '_', '-', str_replace( 'Kirki_Modules_', '', $class_name ) ) ) . '/';
+ $paths[] = $path . $filename;
+ }
+
+ if ( isset( $name_parts[0] ) ) {
+
+ // Handle controls loading.
+ if ( 'Control' === $name_parts[0] || 'Settings' === $name_parts[0] ) {
+ $path = dirname( __FILE__ ) . '/controls/php/';
+ $paths[] = $path . $filename;
+ }
+ }
+
+ $paths[] = dirname( __FILE__ ) . '/core/' . $filename;
+ $paths[] = dirname( __FILE__ ) . '/lib/' . $filename;
+
+ $substr = str_replace( 'Kirki_', '', $class_name );
+ $exploded = explode( '_', $substr );
+ $levels = count( $exploded );
+
+ $previous_path = '';
+ for ( $i = 0; $i < $levels; $i++ ) {
+ $paths[] = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
+ $previous_path .= strtolower( $exploded[ $i ] ) . '/';
+ }
+ return $paths;
+ }
+}
diff --git a/functions/kirki/controls/class-kirki-controls.php b/functions/kirki/controls/class-kirki-controls.php
new file mode 100644
index 0000000..350d34f
--- /dev/null
+++ b/functions/kirki/controls/class-kirki-controls.php
@@ -0,0 +1,71 @@
+views_path ) {
+ $this->views_path = wp_normalize_path( dirname( KIRKI_PLUGIN_FILE ) . '/controls/views/' );
+ }
+ add_action( 'customize_controls_print_footer_scripts', array( $this, 'underscore_templates' ) );
+ }
+
+ /**
+ * Adds underscore.js templates to the footer.
+ *
+ * @access public
+ * @since 3.0.17
+ */
+ public function underscore_templates() {
+ foreach ( $this->templates as $template ) {
+ if ( file_exists( $this->views_path . $template . '.php' ) ) {
+ echo '';
+ }
+ }
+ }
+}
diff --git a/functions/kirki/controls/css/styles-legacy.css b/functions/kirki/controls/css/styles-legacy.css
new file mode 100644
index 0000000..25c3004
--- /dev/null
+++ b/functions/kirki/controls/css/styles-legacy.css
@@ -0,0 +1,672 @@
+@charset "UTF-8";
+.customize-control-kirki-background {
+ position: relative; }
+ .customize-control-kirki-background .background-attachment h4,
+ .customize-control-kirki-background .background-color h4,
+ .customize-control-kirki-background .background-position h4,
+ .customize-control-kirki-background .background-repeat h4,
+ .customize-control-kirki-background .background-size h4 {
+ margin-bottom: 5px; }
+ .customize-control-kirki-background .background-attachment .buttonset,
+ .customize-control-kirki-background .background-size .buttonset {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-background .background-attachment .buttonset .switch-label,
+ .customize-control-kirki-background .background-size .buttonset .switch-label {
+ background: rgba(0, 0, 0, 0.05);
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ color: #555;
+ padding: 0.5em 1em;
+ margin: 0;
+ text-align: center;
+ flex-grow: 1; }
+ .customize-control-kirki-background .background-attachment .buttonset .switch-input:checked + .switch-label,
+ .customize-control-kirki-background .background-size .buttonset .switch-input:checked + .switch-label {
+ background-color: #3498DB;
+ color: #fff; }
+
+.customize-control-kirki-code textarea {
+ width: 100%;
+ min-height: 200px; }
+
+.customize-control-kirki-color-palette {
+ position: relative; }
+ .customize-control-kirki-color-palette label {
+ position: relative;
+ display: inline-block;
+ padding: 0;
+ margin: 0; }
+ .customize-control-kirki-color-palette .colors-wrapper {
+ max-height: 300px;
+ overflow-y: auto;
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-color-palette .colors-wrapper .color-palette-color {
+ color: transparent;
+ display: block;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ border: 1px solid rgba(0, 0, 0, 0.2); }
+ .customize-control-kirki-color-palette .colors-wrapper.round label {
+ padding: 3px; }
+ .customize-control-kirki-color-palette .colors-wrapper.round .color-palette-color {
+ border-radius: 50%; }
+ .customize-control-kirki-color-palette .colors-wrapper.box-shadow .color-palette-color {
+ box-shadow: inset 3px 3px 13px 2px rgba(0, 0, 0, 0.22); }
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
+ border: 0;
+ width: 150%;
+ height: 150%;
+ position: relative;
+ left: -25%;
+ top: -25%;
+ z-index: 99; }
+ .customize-control-kirki-color-palette .colors-wrapper.with-margin label {
+ margin: 3px; }
+ .customize-control-kirki-color-palette .colors-wrapper input {
+ display: none; }
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
+ box-shadow: 1px 1px 10px 1px #333333;
+ border: 1px solid rgba(0, 0, 0, 0.3); }
+
+.customize-control-kirki-color input[data-type="hue"] + .iris-strip-horiz .iris-slider {
+ background-image: -webkit-linear-gradient(left, red, #ff7f00, yellow, #80ff00, lime, #00ff80, cyan, #007fff, blue, #7f00ff, magenta, #ff0080, red) !important; }
+
+.customize-control-kirki-dashicons {
+ position: relative; }
+ .customize-control-kirki-dashicons label {
+ position: relative;
+ display: inline-block; }
+ .customize-control-kirki-dashicons .icons-wrapper {
+ max-height: 300px;
+ overflow-y: scroll; }
+ .customize-control-kirki-dashicons .icons-wrapper h4 {
+ font-weight: 300;
+ margin: 0.7em 0; }
+ .customize-control-kirki-dashicons .icons-wrapper .dashicons {
+ padding: 3px;
+ font-size: 25px;
+ width: 25px;
+ height: 25px;
+ border: 1px solid transparent; }
+ .customize-control-kirki-dashicons .icons-wrapper input {
+ display: none; }
+ .customize-control-kirki-dashicons .icons-wrapper input:checked + label .dashicons {
+ border: 1px solid #3498DB;
+ color: #000; }
+
+.wp-customizer div.ui-datepicker {
+ z-index: 500001 !important;
+ width: 255px;
+ background: #fff;
+ border: 1px solid #dedede; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header {
+ padding: 10px;
+ background: #e5e5e5;
+ border-bottom: 1px solid #fff; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
+ display: block;
+ position: absolute;
+ width: 1em;
+ overflow: hidden; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
+ font-family: dashicons; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after:hover, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before:hover,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after:hover,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before:hover {
+ cursor: pointer; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon {
+ display: none; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
+ left: 10px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
+ content: "\f341"; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next {
+ right: 10px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after {
+ content: "\f345"; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-title {
+ text-align: center; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar {
+ border-collapse: collapse;
+ width: 100%; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar thead {
+ background: #e5e5e5;
+ padding: 5px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td {
+ text-align: center; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a {
+ display: block;
+ padding: 5px;
+ color: #333;
+ text-decoration: none; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a.ui-state-active, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a:hover {
+ color: #fff;
+ background-color: #0073aa; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled a, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled .ui-state-default a {
+ color: #999; }
+
+.customize-control-kirki-dimensions {
+ position: relative; }
+ .customize-control-kirki-dimensions .wrapper {
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ padding: 10px; }
+ .customize-control-kirki-dimensions .wrapper .control {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between; }
+ .customize-control-kirki-dimensions .wrapper .control > div {
+ width: 48%; }
+ .customize-control-kirki-dimensions .wrapper .control > div h5 {
+ margin: 10px 0 7px; }
+ .customize-control-kirki-dimensions .wrapper .control > div .inner {
+ display: flex; }
+
+.customize-control-kirki-editor textarea {
+ width: 100%; }
+
+.customize-control-kirki-generic input {
+ width: 100%; }
+.customize-control-kirki-generic textarea {
+ width: 100%;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: none;
+ box-shadow: none; }
+
+.customize-control-kirki-multicolor {
+ position: relative; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper {
+ display: flex; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper {
+ width: 100%; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper label {
+ display: block;
+ text-align: center;
+ padding: 3px; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container {
+ width: 100%; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result {
+ width: 100%;
+ height: 30px;
+ padding-left: 0;
+ border-radius: 0;
+ border: none;
+ margin-right: 0; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result > span {
+ border-top-left-radius: 0 !important;
+ border-bottom-left-radius: 0 !important;
+ border-top-right-radius: 0 !important;
+ border-bottom-right-radius: 0 !important; }
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result .wp-color-result-text {
+ display: none !important; }
+
+.customize-control-kirki-number .customize-control-content {
+ display: flex;
+ align-items: stretch; }
+ .customize-control-kirki-number .customize-control-content input {
+ width: 100%;
+ -moz-appearance: textfield; }
+ .customize-control-kirki-number .customize-control-content input::-webkit-inner-spin-button, .customize-control-kirki-number .customize-control-content input::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0; }
+ .customize-control-kirki-number .customize-control-content .quantity {
+ min-width: 2rem;
+ max-width: 2rem;
+ text-align: center;
+ line-height: 24px; }
+
+.customize-control-kirki-palette {
+ position: relative; }
+ .customize-control-kirki-palette input[type="radio"] {
+ display: none; }
+ .customize-control-kirki-palette input[type="radio"]:checked + label {
+ border: 3px solid rgba(0, 0, 0, 0.4); }
+ .customize-control-kirki-palette label {
+ background: none;
+ padding: 0;
+ border-top: 3px solid transparent;
+ border-bottom: 3px solid transparent;
+ margin-bottom: 5px;
+ display: flex; }
+ .customize-control-kirki-palette label span {
+ padding: 10px 0;
+ flex-grow: 1;
+ font-size: 0;
+ line-height: 10px;
+ color: rgba(0, 0, 0, 0);
+ -webkit-transition: all 200ms ease-in-out;
+ -moz-transition: all 200ms ease-in-out;
+ -ms-transition: all 200ms ease-in-out;
+ -o-transition: all 200ms ease-in-out;
+ transition: all 200ms ease-in-out;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:first-child {
+ border-left: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:last-child {
+ border-right: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:hover {
+ padding: 10px;
+ flex-grow: 3;
+ min-width: 60px;
+ font-size: 10px;
+ line-height: 10px;
+ color: #000; }
+
+.customize-control-kirki-radio-buttonset .buttonset {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-radio-buttonset .buttonset .switch-label {
+ background: rgba(0, 0, 0, 0.1);
+ border: 1px rgba(0, 0, 0, 0.1);
+ color: rgba(50, 55, 60, 0.5);
+ margin: 0;
+ text-align: center;
+ padding: 0.5em 1em;
+ flex-grow: 1; }
+ .customize-control-kirki-radio-buttonset .buttonset .switch-input:checked + .switch-label {
+ background-color: #00a0d2;
+ color: rgba(255, 255, 255, 0.8); }
+
+.customize-control-kirki-radio-image > .image {
+ display: flex;
+ flex-wrap: wrap; }
+.customize-control-kirki-radio-image label {
+ position: relative;
+ display: inline-block; }
+ .customize-control-kirki-radio-image label .image-label {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(255, 255, 255, 0.7);
+ font-weight: bold; }
+ .customize-control-kirki-radio-image label .image-label .inner {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ padding: 0.5em;
+ vertical-align: middle; }
+ .customize-control-kirki-radio-image label:hover .image-label {
+ display: block; }
+.customize-control-kirki-radio-image input {
+ display: none; }
+ .customize-control-kirki-radio-image input img {
+ border: 1px solid transparent; }
+ .customize-control-kirki-radio-image input:checked + label img {
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ border: 1px solid #3498DB; }
+ .customize-control-kirki-radio-image input + label .image-clickable {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+ height: 100%; }
+
+.customize-control-kirki-radio {
+ position: relative; }
+ .customize-control-kirki-radio input[type=radio] {
+ width: 18px;
+ height: 18px; }
+ .customize-control-kirki-radio input[type=radio]:checked:before {
+ width: 10px;
+ height: 10px;
+ margin: 3px; }
+ .customize-control-kirki-radio label {
+ display: list-item;
+ margin-bottom: 7px; }
+ .customize-control-kirki-radio label .option-description {
+ display: block;
+ color: rgba(0, 0, 0, 0.35);
+ font-size: 0.9em;
+ padding-left: 25px; }
+
+.customize-control-repeater {
+ position: relative; }
+ .customize-control-repeater .repeater-fields .repeater-row {
+ border: 1px solid #e5e5e5;
+ margin-top: 0.5rem;
+ background: #eee;
+ position: relative; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized {
+ border: 1px solid #dfdfdf;
+ padding: 0; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized:hover {
+ border: 1px solid #e5e5e5; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized .repeater-row-content {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row label {
+ margin-bottom: 12px;
+ clear: both; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field- {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img {
+ border: 1px solid transparent; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked + label img {
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ border: 1px solid #3498DB; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field:last-child {
+ border-bottom: none;
+ padding-bottom: 0; }
+ .customize-control-repeater button.repeater-add {
+ margin-top: 1rem; }
+ .customize-control-repeater .repeater-row-content {
+ padding: 10px 15px;
+ background: #fff; }
+ .customize-control-repeater .repeater-field {
+ margin-bottom: 12px;
+ width: 100%;
+ clear: both;
+ padding-bottom: 12px;
+ border-bottom: 1px dotted #CCC; }
+ .customize-control-repeater .repeater-field .customize-control-title {
+ font-size: 13px;
+ line-height: initial; }
+ .customize-control-repeater .repeater-field .customize-control-description {
+ font-size: 13px;
+ line-height: initial; }
+ .customize-control-repeater .repeater-field.repeater-field-hidden {
+ margin: 0;
+ padding: 0;
+ border: 0; }
+ .customize-control-repeater .repeater-field-select select {
+ margin-left: 0; }
+ .customize-control-repeater .repeater-field-checkbox label {
+ line-height: 28px; }
+ .customize-control-repeater .repeater-field-checkbox input {
+ line-height: 28px;
+ margin-right: 5px; }
+ .customize-control-repeater .repeater-field-textarea textarea {
+ width: 100%;
+ resize: vertical; }
+ .customize-control-repeater .repeater-row-header {
+ background: white;
+ border-bottom: 1px solid #dfdfdf;
+ position: relative;
+ padding: 10px 15px;
+ height: auto;
+ min-height: 20px;
+ line-height: 30px;
+ overflow: hidden;
+ word-wrap: break-word; }
+ .customize-control-repeater .repeater-row-header:hover {
+ cursor: move; }
+ .customize-control-repeater .repeater-row-header .dashicons {
+ font-size: 18px;
+ position: absolute;
+ right: 12px;
+ top: 2px;
+ color: #a0a5aa; }
+ .customize-control-repeater .repeater-row-label {
+ font-size: 13px;
+ font-weight: 600;
+ line-height: 20px;
+ display: block;
+ width: 90%;
+ overflow: hidden;
+ height: 18px; }
+ .customize-control-repeater .repeater-row-remove {
+ color: #a00; }
+ .customize-control-repeater .repeater-row-remove:hover {
+ color: #f00; }
+ .customize-control-repeater .repeater-minimize {
+ line-height: 36px; }
+ .customize-control-repeater .remove-button,
+ .customize-control-repeater .upload-button {
+ width: 48%; }
+
+.kirki-image-attachment {
+ margin: 0;
+ text-align: center;
+ margin-bottom: 10px; }
+ .kirki-image-attachment img {
+ display: inline-block; }
+
+.kirki-file-attachment {
+ margin: 0;
+ text-align: center;
+ margin-bottom: 10px; }
+ .kirki-file-attachment .file {
+ display: block;
+ padding: 10px 5px;
+ border: 1px dotted #c3c3c3;
+ background: #f9f9f9; }
+
+.limit {
+ padding: 3px;
+ border-radius: 3px; }
+ .limit.highlight {
+ background: #D32F2F;
+ color: #fff; }
+
+.customize-control-kirki-slider .wrapper {
+ display: flex;
+ align-items: center;
+ padding: 15px 0 7px;
+ position: relative; }
+ .customize-control-kirki-slider .wrapper .slider-reset {
+ position: absolute;
+ top: 0;
+ right: 0;
+ font-size: 12px;
+ transition: 0.3s ease-in-out;
+ color: rgba(0, 0, 0, 0.3); }
+ .customize-control-kirki-slider .wrapper .slider-reset:hover {
+ transform: scale(1.3);
+ color: #DC3232; }
+ .customize-control-kirki-slider .wrapper input[type="range"] {
+ display: block;
+ -webkit-appearance: none;
+ background-color: #bdc3c7;
+ width: 100%;
+ height: 5px;
+ border-radius: 5px;
+ margin: 0 auto;
+ outline: 0; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ background-color: #0085ba;
+ width: 17px;
+ height: 17px;
+ border-radius: 50%;
+ border: 1px solid #006799;
+ cursor: pointer;
+ transition: 0.3s ease-in-out; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:hover {
+ background-color: #006799;
+ border: 2px solid #0085ba; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:active {
+ transform: scale(1.2); }
+ .customize-control-kirki-slider .wrapper input[type="text"] {
+ font-size: 13px;
+ background: transparent;
+ border: none;
+ box-shadow: none;
+ text-align: right;
+ padding: 0;
+ width: 40px; }
+ .customize-control-kirki-slider .wrapper .value {
+ display: flex;
+ align-items: baseline; }
+
+.customize-control-kirki-sortable ul.ui-sortable li {
+ padding: 5px 10px;
+ border: 1px solid #333;
+ background: #fff; }
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.dashicons-menu {
+ float: right; }
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.visibility {
+ margin-right: 10px; }
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible {
+ color: #aaa;
+ border: 1px dashed #aaa; }
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible .dashicons.visibility {
+ color: #aaa; }
+
+.customize-control-kirki-switch {
+ position: relative; }
+ .customize-control-kirki-switch .switch-off,
+ .customize-control-kirki-switch .switch-on {
+ opacity: 1;
+ padding: 8px;
+ font-size: 14px;
+ line-height: 18px; }
+ .customize-control-kirki-switch .switch-on {
+ color: #fff;
+ opacity: 0; }
+ .customize-control-kirki-switch .switch-off {
+ color: #777; }
+ .customize-control-kirki-switch .switch {
+ border: none;
+ margin-bottom: 1.5rem;
+ outline: 0;
+ padding: 0;
+ user-select: none;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch label {
+ background: #b4b9be;
+ float: left;
+ cursor: pointer;
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 1rem;
+ position: relative;
+ transition: left 0.15s ease-out;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch label:after {
+ background: #FFFFFF;
+ content: "";
+ display: block;
+ position: absolute;
+ left: 5px;
+ top: 5px;
+ width: calc(.85rem + 10px);
+ height: calc(.85rem + 10px);
+ transition: all 0.25s ease-in-out;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch input + label {
+ margin-left: 0;
+ margin-right: 0; }
+ .customize-control-kirki-switch input:checked + label {
+ background: #0073aa; }
+ .customize-control-kirki-switch input:checked + label:after {
+ left: auto;
+ right: 5px;
+ background: #ffffff; }
+ .customize-control-kirki-switch input:checked + label .switch-on {
+ opacity: 1; }
+ .customize-control-kirki-switch input:checked + label .switch-off {
+ opacity: 0; }
+
+.customize-control-kirki-toggle {
+ position: relative; }
+ .customize-control-kirki-toggle label {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-toggle label .customize-control-title {
+ width: calc(100% - 55px); }
+ .customize-control-kirki-toggle label .description {
+ order: 99; }
+ .customize-control-kirki-toggle .switch {
+ border: 1px solid #b4b9be;
+ display: inline-block;
+ width: 35px;
+ height: 12px;
+ border-radius: 8px;
+ background: #b4b9be;
+ vertical-align: middle;
+ position: relative;
+ top: 4px;
+ cursor: pointer;
+ user-select: none;
+ transition: background 350ms ease; }
+ .customize-control-kirki-toggle .switch:after, .customize-control-kirki-toggle .switch:before {
+ content: "";
+ display: block;
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ left: -3px;
+ transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease; }
+ .customize-control-kirki-toggle .switch:before {
+ background: rgba(0, 0, 0, 0.2);
+ transform: translate3d(0, -50%, 0) scale(0); }
+ .customize-control-kirki-toggle .switch:after {
+ background: #999;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ transform: translate3d(0, -50%, 0); }
+ .customize-control-kirki-toggle .switch:active:before {
+ transform: translate3d(0, -50%, 0) scale(3); }
+ .customize-control-kirki-toggle input:checked + .switch:before {
+ background: rgba(0, 115, 170, 0.075);
+ transform: translate3d(100%, -50%, 0) scale(1); }
+ .customize-control-kirki-toggle input:checked + .switch:after {
+ background: #0073aa;
+ transform: translate3d(100%, -50%, 0); }
+ .customize-control-kirki-toggle input:checked + .switch:active:before {
+ background: rgba(0, 115, 170, 0.075);
+ transform: translate3d(100%, -50%, 0) scale(3); }
+
+.customize-control-kirki-typography {
+ position: relative; }
+ .customize-control-kirki-typography .wrapper {
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ border: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-typography .wrapper h5 {
+ margin: 0.67em 0 0; }
+ .customize-control-kirki-typography .wrapper .color,
+ .customize-control-kirki-typography .wrapper .font-backup,
+ .customize-control-kirki-typography .wrapper .font-family,
+ .customize-control-kirki-typography .wrapper .font-size,
+ .customize-control-kirki-typography .wrapper .letter-spacing,
+ .customize-control-kirki-typography .wrapper .line-height,
+ .customize-control-kirki-typography .wrapper .margin-bottom,
+ .customize-control-kirki-typography .wrapper .margin-top,
+ .customize-control-kirki-typography .wrapper .subsets,
+ .customize-control-kirki-typography .wrapper .text-align,
+ .customize-control-kirki-typography .wrapper .text-transform,
+ .customize-control-kirki-typography .wrapper .variant {
+ width: 100%;
+ float: none;
+ clear: both; }
+ .customize-control-kirki-typography .wrapper .font-size,
+ .customize-control-kirki-typography .wrapper .letter-spacing,
+ .customize-control-kirki-typography .wrapper .line-height,
+ .customize-control-kirki-typography .wrapper .margin-bottom,
+ .customize-control-kirki-typography .wrapper .margin-top,
+ .customize-control-kirki-typography .wrapper .text-transform {
+ width: 48%; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices {
+ display: flex; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices label {
+ width: 100%;
+ padding: 5px;
+ text-align: center;
+ border: 1px solid rgba(255, 255, 255, 0); }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input {
+ display: none; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input:checked + label {
+ border-color: #0085ba; }
+ .customize-control-kirki-typography .wrapper .color {
+ width: auto; }
+
+/*# sourceMappingURL=styles-legacy.css.map */
diff --git a/functions/kirki/controls/css/styles.css b/functions/kirki/controls/css/styles.css
new file mode 100644
index 0000000..c49d78f
--- /dev/null
+++ b/functions/kirki/controls/css/styles.css
@@ -0,0 +1,657 @@
+@charset "UTF-8";
+.customize-control-kirki-background {
+ position: relative; }
+ .customize-control-kirki-background .background-attachment h4,
+ .customize-control-kirki-background .background-color h4,
+ .customize-control-kirki-background .background-position h4,
+ .customize-control-kirki-background .background-repeat h4,
+ .customize-control-kirki-background .background-size h4 {
+ margin-bottom: 5px; }
+ .customize-control-kirki-background .background-attachment .buttonset,
+ .customize-control-kirki-background .background-size .buttonset {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-background .background-attachment .buttonset .switch-label,
+ .customize-control-kirki-background .background-size .buttonset .switch-label {
+ background: rgba(0, 0, 0, 0.05);
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ color: #555;
+ padding: 0.5em 1em;
+ margin: 0;
+ text-align: center;
+ flex-grow: 1; }
+ .customize-control-kirki-background .background-attachment .buttonset .switch-input:checked + .switch-label,
+ .customize-control-kirki-background .background-size .buttonset .switch-input:checked + .switch-label {
+ background-color: #3498DB;
+ color: #fff; }
+
+.customize-control-kirki-code textarea {
+ width: 100%;
+ min-height: 200px; }
+
+.customize-control-kirki-color-palette {
+ position: relative; }
+ .customize-control-kirki-color-palette label {
+ position: relative;
+ display: inline-block;
+ padding: 0;
+ margin: 0; }
+ .customize-control-kirki-color-palette .colors-wrapper {
+ max-height: 300px;
+ overflow-y: auto;
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-color-palette .colors-wrapper .color-palette-color {
+ color: transparent;
+ display: block;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ border: 1px solid rgba(0, 0, 0, 0.2); }
+ .customize-control-kirki-color-palette .colors-wrapper.round label {
+ padding: 3px; }
+ .customize-control-kirki-color-palette .colors-wrapper.round .color-palette-color {
+ border-radius: 50%; }
+ .customize-control-kirki-color-palette .colors-wrapper.box-shadow .color-palette-color {
+ box-shadow: inset 3px 3px 13px 2px rgba(0, 0, 0, 0.22); }
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
+ border: 0;
+ width: 150%;
+ height: 150%;
+ position: relative;
+ left: -25%;
+ top: -25%;
+ z-index: 99; }
+ .customize-control-kirki-color-palette .colors-wrapper.with-margin label {
+ margin: 3px; }
+ .customize-control-kirki-color-palette .colors-wrapper input {
+ display: none; }
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
+ box-shadow: 1px 1px 10px 1px #333333;
+ border: 1px solid rgba(0, 0, 0, 0.3); }
+
+.customize-control-kirki-color input[data-type="hue"] + .iris-strip-horiz .iris-slider {
+ background-image: -webkit-linear-gradient(left, red, #ff7f00, yellow, #80ff00, lime, #00ff80, cyan, #007fff, blue, #7f00ff, magenta, #ff0080, red) !important; }
+
+.customize-control-kirki-dashicons {
+ position: relative; }
+ .customize-control-kirki-dashicons label {
+ position: relative;
+ display: inline-block; }
+ .customize-control-kirki-dashicons .icons-wrapper {
+ max-height: 300px;
+ overflow-y: scroll; }
+ .customize-control-kirki-dashicons .icons-wrapper h4 {
+ font-weight: 300;
+ margin: 0.7em 0; }
+ .customize-control-kirki-dashicons .icons-wrapper .dashicons {
+ padding: 3px;
+ font-size: 25px;
+ width: 25px;
+ height: 25px;
+ border: 1px solid transparent; }
+ .customize-control-kirki-dashicons .icons-wrapper input {
+ display: none; }
+ .customize-control-kirki-dashicons .icons-wrapper input:checked + label .dashicons {
+ border: 1px solid #3498DB;
+ color: #000; }
+
+.wp-customizer div.ui-datepicker {
+ z-index: 500001 !important;
+ width: 255px;
+ background: #fff;
+ border: 1px solid #dedede; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header {
+ padding: 10px;
+ background: #e5e5e5;
+ border-bottom: 1px solid #fff; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
+ display: block;
+ position: absolute;
+ width: 1em;
+ overflow: hidden; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
+ font-family: dashicons; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after:hover, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before:hover,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after:hover,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before:hover {
+ cursor: pointer; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon,
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon {
+ display: none; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
+ left: 10px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
+ content: "\f341"; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next {
+ right: 10px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after {
+ content: "\f345"; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-title {
+ text-align: center; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar {
+ border-collapse: collapse;
+ width: 100%; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar thead {
+ background: #e5e5e5;
+ padding: 5px; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td {
+ text-align: center; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a {
+ display: block;
+ padding: 5px;
+ color: #333;
+ text-decoration: none; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a.ui-state-active, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a:hover {
+ color: #fff;
+ background-color: #0073aa; }
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled a, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled .ui-state-default a {
+ color: #999; }
+
+.customize-control-kirki-dimensions {
+ position: relative; }
+ .customize-control-kirki-dimensions .wrapper {
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ padding: 10px; }
+ .customize-control-kirki-dimensions .wrapper .control {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between; }
+ .customize-control-kirki-dimensions .wrapper .control > div {
+ width: 48%; }
+ .customize-control-kirki-dimensions .wrapper .control > div h5 {
+ margin: 10px 0 7px; }
+ .customize-control-kirki-dimensions .wrapper .control > div .inner {
+ display: flex; }
+
+.customize-control-kirki-editor textarea {
+ width: 100%; }
+
+.customize-control-kirki-generic input {
+ width: 100%; }
+.customize-control-kirki-generic textarea {
+ width: 100%;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: none;
+ box-shadow: none; }
+
+.customize-control-kirki-multicolor .multicolor-single-color-wrapper {
+ display: flex;
+ justify-content: space-between; }
+.customize-control-kirki-multicolor .multicolor-single-label {
+ order: 2; }
+.customize-control-kirki-multicolor .wp-picker-container {
+ width: 100%; }
+ .customize-control-kirki-multicolor .wp-picker-container > .wp-color-result {
+ width: 100%; }
+ .customize-control-kirki-multicolor .wp-picker-container.wp-picker-active + .multicolor-single-label {
+ display: none; }
+
+.customize-control-kirki-number .customize-control-content {
+ display: flex;
+ align-items: stretch; }
+ .customize-control-kirki-number .customize-control-content input {
+ width: 100%;
+ -moz-appearance: textfield; }
+ .customize-control-kirki-number .customize-control-content input::-webkit-inner-spin-button, .customize-control-kirki-number .customize-control-content input::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0; }
+ .customize-control-kirki-number .customize-control-content .quantity {
+ min-width: 2rem;
+ max-width: 2rem;
+ text-align: center;
+ line-height: 24px; }
+
+.customize-control-kirki-palette {
+ position: relative; }
+ .customize-control-kirki-palette input[type="radio"] {
+ display: none; }
+ .customize-control-kirki-palette input[type="radio"]:checked + label {
+ border: 3px solid rgba(0, 0, 0, 0.4); }
+ .customize-control-kirki-palette label {
+ background: none;
+ padding: 0;
+ border-top: 3px solid transparent;
+ border-bottom: 3px solid transparent;
+ margin-bottom: 5px;
+ display: flex; }
+ .customize-control-kirki-palette label span {
+ padding: 10px 0;
+ flex-grow: 1;
+ font-size: 0;
+ line-height: 10px;
+ color: rgba(0, 0, 0, 0);
+ -webkit-transition: all 200ms ease-in-out;
+ -moz-transition: all 200ms ease-in-out;
+ -ms-transition: all 200ms ease-in-out;
+ -o-transition: all 200ms ease-in-out;
+ transition: all 200ms ease-in-out;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:first-child {
+ border-left: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:last-child {
+ border-right: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-palette label span:hover {
+ padding: 10px;
+ flex-grow: 3;
+ min-width: 60px;
+ font-size: 10px;
+ line-height: 10px;
+ color: #000; }
+
+.customize-control-kirki-radio-buttonset .buttonset {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-radio-buttonset .buttonset .switch-label {
+ background: rgba(0, 0, 0, 0.1);
+ border: 1px rgba(0, 0, 0, 0.1);
+ color: rgba(50, 55, 60, 0.5);
+ margin: 0;
+ text-align: center;
+ padding: 0.5em 1em;
+ flex-grow: 1; }
+ .customize-control-kirki-radio-buttonset .buttonset .switch-input:checked + .switch-label {
+ background-color: #00a0d2;
+ color: rgba(255, 255, 255, 0.8); }
+
+.customize-control-kirki-radio-image > .image {
+ display: flex;
+ flex-wrap: wrap; }
+.customize-control-kirki-radio-image label {
+ position: relative;
+ display: inline-block; }
+ .customize-control-kirki-radio-image label .image-label {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(255, 255, 255, 0.7);
+ font-weight: bold; }
+ .customize-control-kirki-radio-image label .image-label .inner {
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ padding: 0.5em;
+ vertical-align: middle; }
+ .customize-control-kirki-radio-image label:hover .image-label {
+ display: block; }
+.customize-control-kirki-radio-image input {
+ display: none; }
+ .customize-control-kirki-radio-image input img {
+ border: 1px solid transparent; }
+ .customize-control-kirki-radio-image input:checked + label img {
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ border: 1px solid #3498DB; }
+ .customize-control-kirki-radio-image input + label .image-clickable {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+ height: 100%; }
+
+.customize-control-kirki-radio {
+ position: relative; }
+ .customize-control-kirki-radio input[type=radio] {
+ width: 18px;
+ height: 18px; }
+ .customize-control-kirki-radio input[type=radio]:checked:before {
+ width: 10px;
+ height: 10px;
+ margin: 3px; }
+ .customize-control-kirki-radio label {
+ display: list-item;
+ margin-bottom: 7px; }
+ .customize-control-kirki-radio label .option-description {
+ display: block;
+ color: rgba(0, 0, 0, 0.35);
+ font-size: 0.9em;
+ padding-left: 25px; }
+
+.customize-control-repeater {
+ position: relative; }
+ .customize-control-repeater .repeater-fields .repeater-row {
+ border: 1px solid #e5e5e5;
+ margin-top: 0.5rem;
+ background: #eee;
+ position: relative; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized {
+ border: 1px solid #dfdfdf;
+ padding: 0; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized:hover {
+ border: 1px solid #e5e5e5; }
+ .customize-control-repeater .repeater-fields .repeater-row.minimized .repeater-row-content {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row label {
+ margin-bottom: 12px;
+ clear: both; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field- {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input {
+ display: none; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img {
+ border: 1px solid transparent; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked + label img {
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
+ border: 1px solid #3498DB; }
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field:last-child {
+ border-bottom: none;
+ padding-bottom: 0; }
+ .customize-control-repeater button.repeater-add {
+ margin-top: 1rem; }
+ .customize-control-repeater .repeater-row-content {
+ padding: 10px 15px;
+ background: #fff; }
+ .customize-control-repeater .repeater-field {
+ margin-bottom: 12px;
+ width: 100%;
+ clear: both;
+ padding-bottom: 12px;
+ border-bottom: 1px dotted #CCC; }
+ .customize-control-repeater .repeater-field .customize-control-title {
+ font-size: 13px;
+ line-height: initial; }
+ .customize-control-repeater .repeater-field .customize-control-description {
+ font-size: 13px;
+ line-height: initial; }
+ .customize-control-repeater .repeater-field.repeater-field-hidden {
+ margin: 0;
+ padding: 0;
+ border: 0; }
+ .customize-control-repeater .repeater-field-select select {
+ margin-left: 0; }
+ .customize-control-repeater .repeater-field-checkbox label {
+ line-height: 28px; }
+ .customize-control-repeater .repeater-field-checkbox input {
+ line-height: 28px;
+ margin-right: 5px; }
+ .customize-control-repeater .repeater-field-textarea textarea {
+ width: 100%;
+ resize: vertical; }
+ .customize-control-repeater .repeater-row-header {
+ background: white;
+ border-bottom: 1px solid #dfdfdf;
+ position: relative;
+ padding: 10px 15px;
+ height: auto;
+ min-height: 20px;
+ line-height: 30px;
+ overflow: hidden;
+ word-wrap: break-word; }
+ .customize-control-repeater .repeater-row-header:hover {
+ cursor: move; }
+ .customize-control-repeater .repeater-row-header .dashicons {
+ font-size: 18px;
+ position: absolute;
+ right: 12px;
+ top: 2px;
+ color: #a0a5aa; }
+ .customize-control-repeater .repeater-row-label {
+ font-size: 13px;
+ font-weight: 600;
+ line-height: 20px;
+ display: block;
+ width: 90%;
+ overflow: hidden;
+ height: 18px; }
+ .customize-control-repeater .repeater-row-remove {
+ color: #a00; }
+ .customize-control-repeater .repeater-row-remove:hover {
+ color: #f00; }
+ .customize-control-repeater .repeater-minimize {
+ line-height: 36px; }
+ .customize-control-repeater .remove-button,
+ .customize-control-repeater .upload-button {
+ width: 48%; }
+
+.kirki-image-attachment {
+ margin: 0;
+ text-align: center;
+ margin-bottom: 10px; }
+ .kirki-image-attachment img {
+ display: inline-block; }
+
+.kirki-file-attachment {
+ margin: 0;
+ text-align: center;
+ margin-bottom: 10px; }
+ .kirki-file-attachment .file {
+ display: block;
+ padding: 10px 5px;
+ border: 1px dotted #c3c3c3;
+ background: #f9f9f9; }
+
+.limit {
+ padding: 3px;
+ border-radius: 3px; }
+ .limit.highlight {
+ background: #D32F2F;
+ color: #fff; }
+
+.customize-control-kirki-slider .wrapper {
+ display: flex;
+ align-items: center;
+ padding: 15px 0 7px;
+ position: relative; }
+ .customize-control-kirki-slider .wrapper .slider-reset {
+ position: absolute;
+ top: 0;
+ right: 0;
+ font-size: 12px;
+ transition: 0.3s ease-in-out;
+ color: rgba(0, 0, 0, 0.3); }
+ .customize-control-kirki-slider .wrapper .slider-reset:hover {
+ transform: scale(1.3);
+ color: #DC3232; }
+ .customize-control-kirki-slider .wrapper input[type="range"] {
+ display: block;
+ -webkit-appearance: none;
+ background-color: #bdc3c7;
+ width: 100%;
+ height: 5px;
+ border-radius: 5px;
+ margin: 0 auto;
+ outline: 0; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ background-color: #0085ba;
+ width: 17px;
+ height: 17px;
+ border-radius: 50%;
+ border: 1px solid #006799;
+ cursor: pointer;
+ transition: 0.3s ease-in-out; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:hover {
+ background-color: #006799;
+ border: 2px solid #0085ba; }
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:active {
+ transform: scale(1.2); }
+ .customize-control-kirki-slider .wrapper input[type="text"] {
+ font-size: 13px;
+ background: transparent;
+ border: none;
+ box-shadow: none;
+ text-align: right;
+ padding: 0;
+ width: 40px; }
+ .customize-control-kirki-slider .wrapper .value {
+ display: flex;
+ align-items: baseline; }
+
+.customize-control-kirki-sortable ul.ui-sortable li {
+ padding: 5px 10px;
+ border: 1px solid #333;
+ background: #fff; }
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.dashicons-menu {
+ float: right; }
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.visibility {
+ margin-right: 10px; }
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible {
+ color: #aaa;
+ border: 1px dashed #aaa; }
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible .dashicons.visibility {
+ color: #aaa; }
+
+.customize-control-kirki-switch {
+ position: relative; }
+ .customize-control-kirki-switch .switch-off,
+ .customize-control-kirki-switch .switch-on {
+ opacity: 1;
+ padding: 8px;
+ font-size: 14px;
+ line-height: 18px; }
+ .customize-control-kirki-switch .switch-on {
+ color: #fff;
+ opacity: 0; }
+ .customize-control-kirki-switch .switch-off {
+ color: #777; }
+ .customize-control-kirki-switch .switch {
+ border: none;
+ margin-bottom: 1.5rem;
+ outline: 0;
+ padding: 0;
+ user-select: none;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch label {
+ background: #b4b9be;
+ float: left;
+ cursor: pointer;
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 1rem;
+ position: relative;
+ transition: left 0.15s ease-out;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch label:after {
+ background: #FFFFFF;
+ content: "";
+ display: block;
+ position: absolute;
+ left: 5px;
+ top: 5px;
+ width: calc(.85rem + 10px);
+ height: calc(.85rem + 10px);
+ transition: all 0.25s ease-in-out;
+ border-radius: 3rem; }
+ .customize-control-kirki-switch input + label {
+ margin-left: 0;
+ margin-right: 0; }
+ .customize-control-kirki-switch input:checked + label {
+ background: #0073aa; }
+ .customize-control-kirki-switch input:checked + label:after {
+ left: auto;
+ right: 5px;
+ background: #ffffff; }
+ .customize-control-kirki-switch input:checked + label .switch-on {
+ opacity: 1; }
+ .customize-control-kirki-switch input:checked + label .switch-off {
+ opacity: 0; }
+
+.customize-control-kirki-toggle {
+ position: relative; }
+ .customize-control-kirki-toggle label {
+ display: flex;
+ flex-wrap: wrap; }
+ .customize-control-kirki-toggle label .customize-control-title {
+ width: calc(100% - 55px); }
+ .customize-control-kirki-toggle label .description {
+ order: 99; }
+ .customize-control-kirki-toggle .switch {
+ border: 1px solid #b4b9be;
+ display: inline-block;
+ width: 35px;
+ height: 12px;
+ border-radius: 8px;
+ background: #b4b9be;
+ vertical-align: middle;
+ position: relative;
+ top: 4px;
+ cursor: pointer;
+ user-select: none;
+ transition: background 350ms ease; }
+ .customize-control-kirki-toggle .switch:after, .customize-control-kirki-toggle .switch:before {
+ content: "";
+ display: block;
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ left: -3px;
+ transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease; }
+ .customize-control-kirki-toggle .switch:before {
+ background: rgba(0, 0, 0, 0.2);
+ transform: translate3d(0, -50%, 0) scale(0); }
+ .customize-control-kirki-toggle .switch:after {
+ background: #999;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ transform: translate3d(0, -50%, 0); }
+ .customize-control-kirki-toggle .switch:active:before {
+ transform: translate3d(0, -50%, 0) scale(3); }
+ .customize-control-kirki-toggle input:checked + .switch:before {
+ background: rgba(0, 115, 170, 0.075);
+ transform: translate3d(100%, -50%, 0) scale(1); }
+ .customize-control-kirki-toggle input:checked + .switch:after {
+ background: #0073aa;
+ transform: translate3d(100%, -50%, 0); }
+ .customize-control-kirki-toggle input:checked + .switch:active:before {
+ background: rgba(0, 115, 170, 0.075);
+ transform: translate3d(100%, -50%, 0) scale(3); }
+
+.customize-control-kirki-typography {
+ position: relative; }
+ .customize-control-kirki-typography .wrapper {
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ border: 1px solid rgba(0, 0, 0, 0.1); }
+ .customize-control-kirki-typography .wrapper h5 {
+ margin: 0.67em 0 0; }
+ .customize-control-kirki-typography .wrapper .color,
+ .customize-control-kirki-typography .wrapper .font-backup,
+ .customize-control-kirki-typography .wrapper .font-family,
+ .customize-control-kirki-typography .wrapper .font-size,
+ .customize-control-kirki-typography .wrapper .letter-spacing,
+ .customize-control-kirki-typography .wrapper .line-height,
+ .customize-control-kirki-typography .wrapper .margin-bottom,
+ .customize-control-kirki-typography .wrapper .margin-top,
+ .customize-control-kirki-typography .wrapper .subsets,
+ .customize-control-kirki-typography .wrapper .text-align,
+ .customize-control-kirki-typography .wrapper .text-transform,
+ .customize-control-kirki-typography .wrapper .variant {
+ width: 100%;
+ float: none;
+ clear: both; }
+ .customize-control-kirki-typography .wrapper .font-size,
+ .customize-control-kirki-typography .wrapper .letter-spacing,
+ .customize-control-kirki-typography .wrapper .line-height,
+ .customize-control-kirki-typography .wrapper .margin-bottom,
+ .customize-control-kirki-typography .wrapper .margin-top,
+ .customize-control-kirki-typography .wrapper .text-transform {
+ width: 48%; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices {
+ display: flex; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices label {
+ width: 100%;
+ padding: 5px;
+ text-align: center;
+ border: 1px solid rgba(255, 255, 255, 0); }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input {
+ display: none; }
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input:checked + label {
+ border-color: #0085ba; }
+ .customize-control-kirki-typography .wrapper .color {
+ width: auto; }
+
+/*# sourceMappingURL=styles.css.map */
diff --git a/functions/kirki/controls/js/dist/script-legacy.js b/functions/kirki/controls/js/dist/script-legacy.js
new file mode 100644
index 0000000..f253b0f
--- /dev/null
+++ b/functions/kirki/controls/js/dist/script-legacy.js
@@ -0,0 +1,3696 @@
+/* jshint -W079 */
+/* jshint unused:false */
+if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
+ var kirkiSetSettingValue = { // jscs:ignore requireVarDeclFirst
+
+ /**
+ * Set the value of the control.
+ *
+ * @since 3.0.0
+ * @param string setting The setting-ID.
+ * @param mixed value The value.
+ */
+ set: function( setting, value ) {
+
+ /**
+ * Get the control of the sub-setting.
+ * This will be used to get properties we need from that control,
+ * and determine if we need to do any further work based on those.
+ */
+ var $this = this,
+ subControl = wp.customize.settings.controls[ setting ],
+ valueJSON;
+
+ // If the control doesn't exist then return.
+ if ( _.isUndefined( subControl ) ) {
+ return true;
+ }
+
+ // First set the value in the wp object. The control type doesn't matter here.
+ $this.setValue( setting, value );
+
+ // Process visually changing the value based on the control type.
+ switch ( subControl.type ) {
+
+ case 'kirki-background':
+ if ( ! _.isUndefined( value['background-color'] ) ) {
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value['background-color'] );
+ }
+ $this.findElement( setting, '.placeholder, .thumbnail' ).removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ _.each( ['background-repeat', 'background-position'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ $this.setSelectWoo( $this.findElement( setting, '.' + subVal + ' select' ), value[ subVal ] );
+ }
+ });
+ _.each( ['background-size', 'background-attachment'], function( subVal ) {
+ jQuery( $this.findElement( setting, '.' + subVal + ' input[value="' + value + '"]' ) ).prop( 'checked', true );
+ });
+ valueJSON = JSON.stringify( value ).replace( /'/g, ''' );
+ jQuery( $this.findElement( setting, '.background-hidden-value' ).attr( 'value', valueJSON ) ).trigger( 'change' );
+ break;
+
+ case 'kirki-code':
+ jQuery( $this.findElement( setting, '.CodeMirror' ) )[0].CodeMirror.setValue( value );
+ break;
+
+ case 'checkbox':
+ case 'kirki-switch':
+ case 'kirki-toggle':
+ value = ( 1 === value || '1' === value || true === value ) ? true : false;
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'checked', value );
+ wp.customize.instance( setting ).set( value );
+ break;
+
+ case 'kirki-select':
+ case 'kirki-preset':
+ case 'kirki-fontawesome':
+ $this.setSelectWoo( $this.findElement( setting, 'select' ), value );
+ break;
+
+ case 'kirki-slider':
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'value', value );
+ jQuery( $this.findElement( setting, '.kirki_range_value .value' ) ).html( value );
+ break;
+
+ case 'kirki-generic':
+ if ( _.isUndefined( subControl.choices ) || _.isUndefined( subControl.choices.element ) ) {
+ subControl.choices.element = 'input';
+ }
+ jQuery( $this.findElement( setting, subControl.choices.element ) ).prop( 'value', value );
+ break;
+
+ case 'kirki-color':
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value );
+ break;
+
+ case 'kirki-multicheck':
+ $this.findElement( setting, 'input' ).each( function() {
+ jQuery( this ).prop( 'checked', false );
+ });
+ _.each( value, function( subValue, i ) {
+ jQuery( $this.findElement( setting, 'input[value="' + value[ i ] + '"]' ) ).prop( 'checked', true );
+ });
+ break;
+
+ case 'kirki-multicolor':
+ _.each( value, function( subVal, index ) {
+ $this.setColorPicker( $this.findElement( setting, '.multicolor-index-' + index ), subVal );
+ });
+ break;
+
+ case 'kirki-radio-buttonset':
+ case 'kirki-radio-image':
+ case 'kirki-radio':
+ case 'kirki-dashicons':
+ case 'kirki-color-palette':
+ case 'kirki-palette':
+ jQuery( $this.findElement( setting, 'input[value="' + value + '"]' ) ).prop( 'checked', true );
+ break;
+
+ case 'kirki-typography':
+ _.each( ['font-family', 'variant', 'subsets'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ $this.setSelectWoo( $this.findElement( setting, '.' + subVal + ' select' ), value[ subVal ] );
+ }
+ });
+ _.each( ['font-size', 'line-height', 'letter-spacing', 'word-spacing'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ jQuery( $this.findElement( setting, '.' + subVal + ' input' ) ).prop( 'value', value[ subVal ] );
+ }
+ });
+
+ if ( ! _.isUndefined( value.color ) ) {
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value.color );
+ }
+ valueJSON = JSON.stringify( value ).replace( /'/g, ''' );
+ jQuery( $this.findElement( setting, '.typography-hidden-value' ).attr( 'value', valueJSON ) ).trigger( 'change' );
+ break;
+
+ case 'kirki-dimensions':
+ _.each( value, function( subValue, id ) {
+ jQuery( $this.findElement( setting, '.' + id + ' input' ) ).prop( 'value', subValue );
+ });
+ break;
+
+ case 'kirki-repeater':
+
+ // Not yet implemented.
+ break;
+
+ case 'kirki-custom':
+
+ // Do nothing.
+ break;
+ default:
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'value', value );
+ }
+ },
+
+ /**
+ * Set the value for colorpickers.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param object selector jQuery object for this element.
+ * @param string value The value we want to set.
+ */
+ setColorPicker: function( selector, value ) {
+ selector.attr( 'data-default-color', value ).data( 'default-color', value ).wpColorPicker( 'color', value );
+ },
+
+ /**
+ * Sets the value in a selectWoo element.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param string selector The CSS identifier for this selectWoo.
+ * @param string value The value we want to set.
+ */
+ setSelectWoo: function( selector, value ) {
+ jQuery( selector ).selectWoo().val( value ).trigger( 'change' );
+ },
+
+ /**
+ * Sets the value in textarea elements.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param string selector The CSS identifier for this textarea.
+ * @param string value The value we want to set.
+ */
+ setTextarea: function( selector, value ) {
+ jQuery( selector ).prop( 'value', value );
+ },
+
+ /**
+ * Finds an element inside this control.
+ *
+ * @since 3.0.0
+ * @param string setting The setting ID.
+ * @param string element The CSS identifier.
+ */
+ findElement: function( setting, element ) {
+ return wp.customize.control( setting ).container.find( element );
+ },
+
+ /**
+ * Updates the value in the wp.customize object.
+ *
+ * @since 3.0.0
+ * @param string setting The setting-ID.
+ * @param mixed value The value.
+ */
+ setValue: function( setting, value, timeout ) {
+ timeout = ( _.isUndefined( timeout ) ) ? 100 : parseInt( timeout, 10 );
+ wp.customize.instance( setting ).set({});
+ setTimeout( function() {
+ wp.customize.instance( setting ).set( value );
+ }, timeout );
+ }
+ };
+}
+var kirki = {
+
+ initialized: false,
+
+ /**
+ * Initialize the object.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ // We only need to initialize once.
+ if ( self.initialized ) {
+ return;
+ }
+
+ setTimeout( function() {
+ kirki.util.webfonts.standard.initialize();
+ kirki.util.webfonts.google.initialize();
+ }, 150 );
+
+ // Mark as initialized.
+ self.initialized = true;
+ }
+};
+
+// Initialize the kirki object.
+kirki.initialize();
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+
+ /**
+ * An object containing definitions for controls.
+ *
+ * @since 3.0.16
+ */
+ control: {
+
+ /**
+ * The code control.
+ *
+ * @since 3.0.18
+ */
+ 'kirki-code': {
+
+ },
+
+ /**
+ * The radio control.
+ *
+ * @since 3.0.17
+ */
+ 'kirki-radio': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.radio.init( control );
+
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-radio' );
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ 'default': control.params['default'],
+ value: kirki.setting.get( control.id ),
+ choices: control.params.choices
+ } ) );
+ }
+ },
+
+ /**
+ * The color control.
+ *
+ * @since 3.0.16
+ */
+ 'kirki-color': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.color.init( control );
+
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.mode - The colorpicker mode. Can be 'full' or 'hue'.
+ * @param {bool|array} control.params.palette - false if we don't want a palette,
+ * true to use the default palette,
+ * array of custom hex colors if we want a custom palette.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-color' );
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ mode: control.params.mode,
+ inputAttrs: control.params.inputAttrs,
+ 'data-palette': control.params.palette,
+ 'data-default-color': control.params['default'],
+ 'data-alpha': control.params.choices.alpha,
+ value: kirki.setting.get( control.id )
+ } ) );
+ }
+ },
+
+ /**
+ * The generic control.
+ *
+ * @since 3.0.16
+ */
+ 'kirki-generic': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - Control parameters.
+ * @param {Object} control.params.choices - Define the specifics for this input.
+ * @param {string} control.params.choices.element - The HTML element we want to use ('input', 'div', 'span' etc).
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
+ kirki.input.textarea.init( control );
+ return;
+ }
+ kirki.input.genericInput.init( control );
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var args = {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ choices: control.params.choices,
+ value: kirki.setting.get( control.id )
+ },
+ template;
+
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
+ template = wp.template( 'kirki-input-textarea' );
+ control.container.html( template( args ) );
+ return;
+ }
+ template = wp.template( 'kirki-input-generic' );
+ control.container.html( template( args ) );
+ }
+ },
+
+ 'kirki-select': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.select.init( control );
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {Object} control.params.default - The default value.
+ * @param {Object} control.params.choices - The choices for the select dropdown.
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-select' );
+
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ choices: control.params.choices,
+ value: kirki.setting.get( control.id ),
+ multiple: control.params.multiple || 1
+ } ) );
+ }
+ }
+ }
+} );
+/* global kirkiL10n */
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * An object containing definitions for input fields.
+ *
+ * @since 3.0.16
+ */
+ input: {
+
+ /**
+ * Radio input fields.
+ *
+ * @since 3.0.17
+ */
+ radio: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
+
+ // Save the value
+ input.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ /**
+ * Color input fields.
+ *
+ * @since 3.0.16
+ */
+ color: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @param {Object} control.choices - Additional options for the colorpickers.
+ * @param {Object} control.params - Control parameters.
+ * @param {Object} control.params.choices - alias for control.choices.
+
+ * @returns {null}
+ */
+ init: function( control ) {
+ var picker = jQuery( '.kirki-color-control[data-id="' + control.id + '"]' ),
+ clear;
+
+ control.choices = control.choices || {};
+ if ( _.isEmpty( control.choices ) && control.params.choices ) {
+ control.choices = control.params.choices;
+ }
+
+ // If we have defined any extra choices, make sure they are passed-on to Iris.
+ if ( ! _.isEmpty( control.choices ) ) {
+ picker.wpColorPicker( control.choices );
+ }
+
+ // Tweaks to make the "clear" buttons work.
+ setTimeout( function() {
+ clear = jQuery( '.kirki-input-container[data-id="' + control.id + '"] .wp-picker-clear' );
+ if ( clear.length ) {
+ clear.click( function() {
+ kirki.setting.set( control.id, '' );
+ });
+ }
+ }, 200 );
+
+ // Saves our settings to the WP API
+ picker.wpColorPicker({
+ change: function() {
+
+ // Small hack: the picker needs a small delay
+ setTimeout( function() {
+ kirki.setting.set( control.id, picker.val() );
+ }, 20 );
+ }
+ });
+ }
+ },
+
+ /**
+ * Generic input fields.
+ *
+ * @since 3.0.17
+ */
+ genericInput: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
+
+ // Save the value
+ input.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ /**
+ * Generic input fields.
+ *
+ * @since 3.0.17
+ */
+ textarea: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var textarea = jQuery( 'textarea[data-id="' + control.id + '"]' );
+
+ // Save the value
+ textarea.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ select: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var element = jQuery( 'select[data-id="' + control.id + '"]' ),
+ multiple = parseInt( element.data( 'multiple' ), 10 ),
+ selectValue,
+ selectWooOptions = {
+ escapeMarkup: function( markup ) {
+ return markup;
+ }
+ };
+
+ if ( 1 < multiple ) {
+ selectWooOptions.maximumSelectionLength = multiple;
+ }
+ jQuery( element ).selectWoo( selectWooOptions ).on( 'change', function() {
+ selectValue = jQuery( this ).val();
+ selectValue = ( null === selectValue && 1 < multiple ) ? [] : selectValue;
+ kirki.setting.set( control.id, selectValue );
+ });
+ }
+ },
+
+ image: {
+
+ /**
+ * Get the HTML for image inputs.
+ *
+ * @since 3.0.17
+ * @param {Object} data - The arguments.
+ * @returns {string}
+ */
+ getTemplate: function( data ) {
+ var html = '',
+ saveAs = 'url',
+ url;
+
+ data = _.defaults( data, {
+ label: '',
+ description: '',
+ inputAttrs: '',
+ 'data-id': '',
+ choices: {},
+ value: ''
+ } );
+
+ if ( ! _.isUndefined( data.choices ) && ! _.isUndefined( data.choices.save_as ) ) {
+ saveAs = data.choices.save_as;
+ }
+ url = data.value;
+ if ( _.isObject( data.value ) && ! _.isUndefined( data.value.url ) ) {
+ url = data.value.url;
+ }
+
+ html += '';
+ if ( data.label ) {
+ html += '' + data.label + ' ';
+ }
+ if ( data.description ) {
+ html += '' + data.description + ' ';
+ }
+ html += ' ';
+ html += '';
+
+ return '' + html + '
';
+ },
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @returns {null}
+ */
+ init: function( control ) { // jshint ignore:line
+ }
+ }
+ }
+} );
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * An object containing definitions for settings.
+ *
+ * @since 3.0.16
+ */
+ setting: {
+
+ /**
+ * Gets the value of a setting.
+ *
+ * This is a helper function that allows us to get the value of
+ * control[key1][key2] for example, when the setting used in the
+ * customizer API is "control".
+ *
+ * @since 3.0.16
+ * @param {string} setting - The setting for which we're getting the value.
+ * @returns {mixed} Depends on the value.
+ */
+ get: function( setting ) {
+ var parts = setting.split( '[' ),
+ foundSetting = '',
+ foundInStep = 0,
+ currentVal = '';
+
+ _.each( parts, function( part, i ) {
+ part = part.replace( ']', '' );
+
+ if ( 0 === i ) {
+ foundSetting = part;
+ } else {
+ foundSetting += '[' + part + ']';
+ }
+
+ if ( ! _.isUndefined( wp.customize.instance( foundSetting ) ) ) {
+ currentVal = wp.customize.instance( foundSetting ).get();
+ foundInStep = i;
+ }
+
+ if ( foundInStep < i ) {
+ if ( _.isObject( currentVal ) && ! _.isUndefined( currentVal[ part ] ) ) {
+ currentVal = currentVal[ part ];
+ }
+ }
+ });
+
+ return currentVal;
+ },
+
+ /**
+ * Sets the value of a setting.
+ *
+ * This function is a bit complicated because there any many scenarios to consider.
+ * Example: We want to save the value for my_setting[something][3][something-else].
+ * The control's setting is my_setting[something].
+ * So we need to find that first, then figure out the remaining parts,
+ * merge the values recursively to avoid destroying my_setting[something][2]
+ * and also take into account any defined "key" arguments which take this even deeper.
+ *
+ * @since 3.0.16
+ * @param {object|string} element - The DOM element whose value has changed,
+ * or an ID.
+ * @param {mixed} value - Depends on the control-type.
+ * @param {string} key - If we only want to save an item in an object
+ * we can define the key here.
+ * @returns {null}
+ */
+ set: function( element, value, key ) {
+ var setting,
+ parts,
+ currentNode = '',
+ foundNode = '',
+ subSettingObj = {},
+ currentVal,
+ subSetting,
+ subSettingParts;
+
+ // Get the setting from the element.
+ setting = element;
+ if ( _.isObject( element ) ) {
+ if ( jQuery( element ).attr( 'data-id' ) ) {
+ setting = element.attr( 'data-id' );
+ } else {
+ setting = element.parents( '[data-id]' ).attr( 'data-id' );
+ }
+ }
+
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
+ wp.customize.control( setting ).setting.set( value );
+ return;
+ }
+
+ parts = setting.split( '[' ),
+
+ // Find the setting we're using in the control using the customizer API.
+ _.each( parts, function( part, i ) {
+ part = part.replace( ']', '' );
+
+ // The current part of the setting.
+ currentNode = ( 0 === i ) ? part : '[' + part + ']';
+
+ // When we find the node, get the value from it.
+ // In case of an object we'll need to merge with current values.
+ if ( ! _.isUndefined( wp.customize.instance( currentNode ) ) ) {
+ foundNode = currentNode;
+ currentVal = wp.customize.instance( foundNode ).get();
+ }
+ } );
+
+ // Get the remaining part of the setting that was unused.
+ subSetting = setting.replace( foundNode, '' );
+
+ // If subSetting is not empty, then we're dealing with an object
+ // and we need to dig deeper and recursively merge the values.
+ if ( '' !== subSetting ) {
+ if ( ! _.isObject( currentVal ) ) {
+ currentVal = {};
+ }
+ if ( '[' === subSetting.charAt( 0 ) ) {
+ subSetting = subSetting.replace( '[', '' );
+ }
+ subSettingParts = subSetting.split( '[' );
+ _.each( subSettingParts, function( subSettingPart, i ) {
+ subSettingParts[ i ] = subSettingPart.replace( ']', '' );
+ } );
+
+ // If using a key, we need to go 1 level deeper.
+ if ( key ) {
+ subSettingParts.push( key );
+ }
+
+ // Converting to a JSON string and then parsing that to an object
+ // may seem a bit hacky and crude but it's efficient and works.
+ subSettingObj = '{"' + subSettingParts.join( '":{"' ) + '":"' + value + '"' + '}'.repeat( subSettingParts.length );
+ subSettingObj = JSON.parse( subSettingObj );
+
+ // Recursively merge with current value.
+ jQuery.extend( true, currentVal, subSettingObj );
+ value = currentVal;
+
+ } else {
+ if ( key ) {
+ currentVal = ( ! _.isObject( currentVal ) ) ? {} : currentVal;
+ currentVal[ key ] = value;
+ value = currentVal;
+ }
+ }
+ wp.customize.control( foundNode ).setting.set( value );
+ }
+ }
+} );
+/* global ajaxurl */
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * A collection of utility methods.
+ *
+ * @since 3.0.17
+ */
+ util: {
+
+ /**
+ * A collection of utility methods for webfonts.
+ *
+ * @since 3.0.17
+ */
+ webfonts: {
+
+ /**
+ * Google-fonts related methods.
+ *
+ * @since 3.0.17
+ */
+ google: {
+
+ /**
+ * An object containing all Google fonts.
+ *
+ * to set this call this.setFonts();
+ *
+ * @since 3.0.17
+ */
+ fonts: {},
+
+ /**
+ * Init for google-fonts.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ self.setFonts();
+ },
+
+ /**
+ * Set fonts in this.fonts
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ setFonts: function() {
+ var self = this;
+
+ // No need to run if we already have the fonts.
+ if ( ! _.isEmpty( self.fonts ) ) {
+ return;
+ }
+
+ // Make an AJAX call to set the fonts object (alpha).
+ jQuery.post( ajaxurl, { 'action': 'kirki_fonts_google_all_get' }, function( response ) {
+
+ // Get fonts from the JSON array.
+ self.fonts = JSON.parse( response );
+ } );
+ },
+
+ /**
+ * Gets all properties of a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Object}
+ */
+ getFont: function( family ) {
+ var self = this,
+ fonts = self.getFonts();
+
+ if ( 'undefined' === typeof fonts[ family ] ) {
+ return false;
+ }
+ return fonts[ family ];
+ },
+
+ /**
+ * Gets all properties of a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} order - How to order the fonts (alpha|popularity|trending).
+ * @param {int} number - How many to get. 0 for all.
+ * @returns {Object}
+ */
+ getFonts: function( order, number ) {
+ var self = this,
+ ordered = {},
+ partial = [];
+
+ // Make sure order is correct.
+ order = order || 'alpha';
+ order = ( 'alpha' !== order && 'popularity' !== order && 'trending' !== order ) ? 'alpha' : order;
+
+ // Make sure number is correct.
+ number = number || 0;
+ number = parseInt( number, 10 );
+
+ if ( 'alpha' === order || 0 === number ) {
+ ordered = self.fonts.items;
+ } else {
+ partial = _.first( self.fonts.order[ order ], number );
+ _.each( partial, function( family ) {
+ ordered[ family ] = self.fonts.items[ family ];
+ } );
+ }
+
+ return ordered;
+ },
+
+ /**
+ * Gets the variants for a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Array}
+ */
+ getVariants: function( family ) {
+ var self = this,
+ font = self.getFont( family );
+
+ // Early exit if font was not found.
+ if ( ! font ) {
+ return false;
+ }
+
+ // Early exit if font doesn't have variants.
+ if ( _.isUndefined( font.variants ) ) {
+ return false;
+ }
+
+ // Return the variants.
+ return font.variants;
+ },
+
+ /**
+ * Get the subsets for a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Object}
+ */
+ getSubsets: function( family ) {
+ var self = this,
+ font = self.getFont( family );
+
+ // Early exit if font was not found.
+ if ( ! font ) {
+ return false;
+ }
+
+ // Early exit if font doesn't have subsets.
+ if ( _.isUndefined( font.subsets ) ) {
+ return false;
+ }
+
+ // Return the variants.
+ return font.subsets;
+ }
+ },
+
+ /**
+ * Standard fonts related methods.
+ *
+ * @since 3.0.17
+ */
+ standard: {
+
+ /**
+ * An object containing all Standard fonts.
+ *
+ * to set this call this.setFonts();
+ *
+ * @since 3.0.17
+ */
+ fonts: {},
+
+ /**
+ * Init for google-fonts.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ self.setFonts();
+ },
+
+ /**
+ * Set fonts in this.fonts
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ setFonts: function() {
+ var self = this;
+
+ // No need to run if we already have the fonts.
+ if ( ! _.isEmpty( self.fonts ) ) {
+ return;
+ }
+
+ // Make an AJAX call to set the fonts object.
+ jQuery.post( ajaxurl, { 'action': 'kirki_fonts_standard_all_get' }, function( response ) {
+
+ // Get fonts from the JSON array.
+ self.fonts = JSON.parse( response );
+ } );
+ },
+
+ /**
+ * Gets the variants for a font-family.
+ *
+ * @since 3.0.17
+ * @returns {Array}
+ */
+ getVariants: function( family ) { // jshint ignore: line
+ return ['regular', 'italic', '700', '700italic'];
+ }
+ },
+
+ /**
+ * Figure out what this font-family is (google/standard)
+ *
+ * @since 3.0.20
+ * @param {string} family - The font-family.
+ * @returns {string|false} - Returns string if found (google|standard)
+ * and false in case the font-family is an arbitrary value
+ * not found anywhere in our font definitions.
+ */
+ getFontType: function( family ) {
+ var self = this;
+
+ // Check for standard fonts first.
+ if (
+ 'undefined' !== typeof self.standard.fonts[ family ] || (
+ 'undefined' !== typeof self.standard.fonts.stack &&
+ 'undefined' !== typeof self.standard.fonts.stack[ family ]
+ )
+ ) {
+ return 'standard';
+ }
+
+ // Check in googlefonts.
+ if ( 'undefined' !== typeof self.google.fonts.items[ family ] ) {
+ return 'google';
+ }
+ return false;
+ }
+ }
+ }
+} );
+/* global kirki */
+/**
+ * The majority of the code in this file
+ * is derived from the wp-customize-posts plugin
+ * and the work of @westonruter to whom I am very grateful.
+ *
+ * @see https://github.com/xwp/wp-customize-posts
+ */
+
+( function() {
+ 'use strict';
+
+ /**
+ * A dynamic color-alpha control.
+ *
+ * @class
+ * @augments wp.customize.Control
+ * @augments wp.customize.Class
+ */
+ wp.customize.kirkiDynamicControl = wp.customize.Control.extend({
+
+ initialize: function( id, options ) {
+ var control = this,
+ args = options || {};
+
+ args.params = args.params || {};
+ if ( ! args.params.type ) {
+ args.params.type = 'kirki-generic';
+ }
+ if ( ! args.params.content ) {
+ args.params.content = jQuery( ' ' );
+ args.params.content.attr( 'id', 'customize-control-' + id.replace( /]/g, '' ).replace( /\[/g, '-' ) );
+ args.params.content.attr( 'class', 'customize-control customize-control-' + args.params.type );
+ }
+
+ control.propertyElements = [];
+ wp.customize.Control.prototype.initialize.call( control, id, args );
+ },
+
+ /**
+ * Add bidirectional data binding links between inputs and the setting(s).
+ *
+ * This is copied from wp.customize.Control.prototype.initialize(). It
+ * should be changed in Core to be applied once the control is embedded.
+ *
+ * @private
+ * @returns {null}
+ */
+ _setUpSettingRootLinks: function() {
+ var control = this,
+ nodes = control.container.find( '[data-customize-setting-link]' );
+
+ nodes.each( function() {
+ var node = jQuery( this );
+
+ wp.customize( node.data( 'customizeSettingLink' ), function( setting ) {
+ var element = new wp.customize.Element( node );
+ control.elements.push( element );
+ element.sync( setting );
+ element.set( setting() );
+ });
+ });
+ },
+
+ /**
+ * Add bidirectional data binding links between inputs and the setting properties.
+ *
+ * @private
+ * @returns {null}
+ */
+ _setUpSettingPropertyLinks: function() {
+ var control = this,
+ nodes;
+
+ if ( ! control.setting ) {
+ return;
+ }
+
+ nodes = control.container.find( '[data-customize-setting-property-link]' );
+
+ nodes.each( function() {
+ var node = jQuery( this ),
+ element,
+ propertyName = node.data( 'customizeSettingPropertyLink' );
+
+ element = new wp.customize.Element( node );
+ control.propertyElements.push( element );
+ element.set( control.setting()[ propertyName ] );
+
+ element.bind( function( newPropertyValue ) {
+ var newSetting = control.setting();
+ if ( newPropertyValue === newSetting[ propertyName ] ) {
+ return;
+ }
+ newSetting = _.clone( newSetting );
+ newSetting[ propertyName ] = newPropertyValue;
+ control.setting.set( newSetting );
+ } );
+ control.setting.bind( function( newValue ) {
+ if ( newValue[ propertyName ] !== element.get() ) {
+ element.set( newValue[ propertyName ] );
+ }
+ } );
+ });
+ },
+
+ /**
+ * @inheritdoc
+ */
+ ready: function() {
+ var control = this;
+
+ control._setUpSettingRootLinks();
+ control._setUpSettingPropertyLinks();
+
+ wp.customize.Control.prototype.ready.call( control );
+
+ control.deferred.embedded.done( function() {
+ control.initKirkiControl( control );
+ });
+ },
+
+ /**
+ * Embed the control in the document.
+ *
+ * Override the embed() method to do nothing,
+ * so that the control isn't embedded on load,
+ * unless the containing section is already expanded.
+ *
+ * @returns {null}
+ */
+ embed: function() {
+ var control = this,
+ sectionId = control.section();
+
+ if ( ! sectionId ) {
+ return;
+ }
+
+ wp.customize.section( sectionId, function( section ) {
+ if ( 'kirki-expanded' === section.params.type || section.expanded() || wp.customize.settings.autofocus.control === control.id ) {
+ control.actuallyEmbed();
+ } else {
+ section.expanded.bind( function( expanded ) {
+ if ( expanded ) {
+ control.actuallyEmbed();
+ }
+ } );
+ }
+ } );
+ },
+
+ /**
+ * Deferred embedding of control when actually
+ *
+ * This function is called in Section.onChangeExpanded() so the control
+ * will only get embedded when the Section is first expanded.
+ *
+ * @returns {null}
+ */
+ actuallyEmbed: function() {
+ var control = this;
+ if ( 'resolved' === control.deferred.embedded.state() ) {
+ return;
+ }
+ control.renderContent();
+ control.deferred.embedded.resolve(); // This triggers control.ready().
+ },
+
+ /**
+ * This is not working with autofocus.
+ *
+ * @param {object} [args] Args.
+ * @returns {null}
+ */
+ focus: function( args ) {
+ var control = this;
+ control.actuallyEmbed();
+ wp.customize.Control.prototype.focus.call( control, args );
+ },
+
+ /**
+ * Additional actions that run on ready.
+ *
+ * @param {object} [args] Args.
+ * @returns {null}
+ */
+ initKirkiControl: function( control ) {
+ if ( 'undefined' !== typeof kirki.control[ control.params.type ] ) {
+ kirki.control[ control.params.type ].init( control );
+ return;
+ }
+
+ // Save the value
+ this.container.on( 'change keyup paste click', 'input', function() {
+ control.setting.set( jQuery( this ).val() );
+ });
+ },
+
+ kirkiValidateCSSValue: function( value ) {
+
+ var validUnits = ['rem', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vh', 'vw', 'vmin', 'vmax'],
+ numericValue,
+ unit;
+
+ // 0 is always a valid value, and we can't check calc() values effectively.
+ if ( '0' === value || ( 0 <= value.indexOf( 'calc(' ) && 0 <= value.indexOf( ')' ) ) ) {
+ return true;
+ }
+
+ if ( 'auto' === value || 'inherit' === value || 'initial' === value ) {
+ return true;
+ }
+
+ // Get the numeric value.
+ numericValue = parseFloat( value );
+
+ // Get the unit
+ unit = value.replace( numericValue, '' );
+
+ // Check the validity of the numeric value and units.
+ if ( isNaN( numericValue ) || -1 === jQuery.inArray( unit, validUnits ) ) {
+ return false;
+ }
+ return true;
+ }
+ });
+})();
+
+_.each( kirki.control, function( obj, type ) {
+ wp.customize.controlConstructor[ type ] = wp.customize.kirkiDynamicControl.extend({});
+} );
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.getValue(),
+ picker = control.container.find( '.kirki-color-control' );
+
+ // Hide unnecessary controls if the value doesn't have an image.
+ if ( _.isUndefined( value['background-image'] ) || '' === value['background-image'] ) {
+ control.container.find( '.background-wrapper > .background-repeat' ).hide();
+ control.container.find( '.background-wrapper > .background-position' ).hide();
+ control.container.find( '.background-wrapper > .background-size' ).hide();
+ control.container.find( '.background-wrapper > .background-attachment' ).hide();
+ }
+
+ // Color.
+ picker.wpColorPicker({
+ change: function() {
+ setTimeout( function() {
+ control.saveValue( 'background-color', picker.val() );
+ }, 100 );
+ }
+ });
+
+ // Background-Repeat.
+ control.container.on( 'change', '.background-repeat select', function() {
+ control.saveValue( 'background-repeat', jQuery( this ).val() );
+ });
+
+ // Background-Size.
+ control.container.on( 'change click', '.background-size input', function() {
+ control.saveValue( 'background-size', jQuery( this ).val() );
+ });
+
+ // Background-Position.
+ control.container.on( 'change', '.background-position select', function() {
+ control.saveValue( 'background-position', jQuery( this ).val() );
+ });
+
+ // Background-Attachment.
+ control.container.on( 'change click', '.background-attachment input', function() {
+ control.saveValue( 'background-attachment', jQuery( this ).val() );
+ });
+
+ // Background-Image.
+ control.container.on( 'click', '.background-image-upload-button', function( e ) {
+ var image = wp.media({ multiple: false }).open().on( 'select', function() {
+
+ // This will return the selected image from the Media Uploader, the result is an object.
+ var uploadedImage = image.state().get( 'selection' ).first(),
+ previewImage = uploadedImage.toJSON().sizes.full.url,
+ imageUrl,
+ imageID,
+ imageWidth,
+ imageHeight,
+ preview,
+ removeButton;
+
+ if ( ! _.isUndefined( uploadedImage.toJSON().sizes.medium ) ) {
+ previewImage = uploadedImage.toJSON().sizes.medium.url;
+ } else if ( ! _.isUndefined( uploadedImage.toJSON().sizes.thumbnail ) ) {
+ previewImage = uploadedImage.toJSON().sizes.thumbnail.url;
+ }
+
+ imageUrl = uploadedImage.toJSON().sizes.full.url;
+ imageID = uploadedImage.toJSON().id;
+ imageWidth = uploadedImage.toJSON().width;
+ imageHeight = uploadedImage.toJSON().height;
+
+ // Show extra controls if the value has an image.
+ if ( '' !== imageUrl ) {
+ control.container.find( '.background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment' ).show();
+ }
+
+ control.saveValue( 'background-image', imageUrl );
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.background-image-upload-remove-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ }
+ });
+
+ e.preventDefault();
+ });
+
+ control.container.on( 'click', '.background-image-upload-remove-button', function( e ) {
+
+ var preview,
+ removeButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'background-image', '' );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.background-image-upload-remove-button' );
+
+ // Hide unnecessary controls.
+ control.container.find( '.background-wrapper > .background-repeat' ).hide();
+ control.container.find( '.background-wrapper > .background-position' ).hide();
+ control.container.find( '.background-wrapper > .background-size' ).hide();
+ control.container.find( '.background-wrapper > .background-attachment' ).hide();
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ }
+ if ( removeButton.length ) {
+ removeButton.hide();
+ }
+ });
+ },
+
+ /**
+ * Gets the value.
+ */
+ getValue: function() {
+
+ var control = this,
+ value = {};
+
+ // Make sure everything we're going to need exists.
+ _.each( control.params['default'], function( defaultParamValue, param ) {
+ if ( false !== defaultParamValue ) {
+ value[ param ] = defaultParamValue;
+ if ( ! _.isUndefined( control.setting._value[ param ] ) ) {
+ value[ param ] = control.setting._value[ param ];
+ }
+ }
+ });
+ _.each( control.setting._value, function( subValue, param ) {
+ if ( _.isUndefined( value[ param ] ) ) {
+ value[ param ] = subValue;
+ }
+ });
+ return value;
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ 'use strict';
+
+ var control = this,
+ input = jQuery( '#customize-control-' + control.id.replace( '[', '-' ).replace( ']', '' ) + ' .background-hidden-value' ),
+ valueJSON = jQuery( input ).val(),
+ valueObj = JSON.parse( valueJSON );
+
+ valueObj[ property ] = value;
+ control.setting.set( valueObj );
+ jQuery( input ).attr( 'value', JSON.stringify( valueObj ) ).trigger( 'change' );
+ }
+});
+wp.customize.controlConstructor['kirki-code'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Early exit if wp.customize.CodeEditorControl is not available.
+ if ( _.isUndefined( wp.customize.CodeEditorControl ) ) {
+ return;
+ }
+
+ // Hide the textarea.
+ jQuery( control.container.find( 'textarea.kirki-codemirror-editor' ) ).hide();
+
+ // Add the control.
+ wp.customize.control.add( new wp.customize.CodeEditorControl( control.id, {
+ section: control.params.section,
+ priority: control.params.priority,
+ label: control.params.label,
+ editor_settings: {
+ codemirror: {
+ mode: control.params.choices.language
+ }
+ },
+ settings: { 'default': control.id }
+ } ) );
+ }
+});
+wp.customize.controlConstructor['kirki-color-palette'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-dashicons'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-date'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Only add in WP 4.9+.
+ if ( _.isUndefined( wp.customize.DateTimeControl ) ) {
+ return;
+ }
+
+ // New method for the DateTime control.
+ wp.customize.control.add( new wp.customize.DateTimeControl( control.id, {
+ section: control.params.section,
+ priority: control.params.priority,
+ label: control.params.label,
+ description: control.params.description,
+ settings: { 'default': control.id },
+ 'default': control.params['default']
+ } ) );
+ }
+});
+/* global dimensionkirkiL10n */
+wp.customize.controlConstructor['kirki-dimension'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value;
+
+ // Notifications.
+ control.kirkiNotifications();
+
+ // Save the value
+ this.container.on( 'change keyup paste', 'input', function() {
+
+ value = jQuery( this ).val();
+ control.setting.set( value );
+ });
+ },
+
+ /**
+ * Handles notifications.
+ */
+ kirkiNotifications: function() {
+
+ var control = this;
+
+ wp.customize( control.id, function( setting ) {
+ setting.bind( function( value ) {
+ var code = 'long_title';
+
+ if ( false === control.kirkiValidateCSSValue( value ) ) {
+ setting.notifications.add( code, new wp.customize.Notification(
+ code,
+ {
+ type: 'warning',
+ message: dimensionkirkiL10n['invalid-value']
+ }
+ ) );
+ } else {
+ setting.notifications.remove( code );
+ }
+ } );
+ } );
+ }
+});
+/* global dimensionskirkiL10n */
+wp.customize.controlConstructor['kirki-dimensions'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ subControls = control.params.choices.controls,
+ value = {},
+ subsArray = [],
+ i;
+
+ _.each( subControls, function( v, i ) {
+ if ( true === v ) {
+ subsArray.push( i );
+ }
+ } );
+
+ for ( i = 0; i < subsArray.length; i++ ) {
+ value[ subsArray[ i ] ] = control.setting._value[ subsArray[ i ] ];
+ control.updateDimensionsValue( subsArray[ i ], value );
+ }
+ },
+
+ /**
+ * Updates the value.
+ */
+ updateDimensionsValue: function( context, value ) {
+
+ var control = this;
+
+ control.container.on( 'change keyup paste', '.' + context + ' input', function() {
+ value[ context ] = jQuery( this ).val();
+
+ // Notifications.
+ control.kirkiNotifications();
+
+ // Save the value
+ control.saveValue( value );
+ });
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( value ) {
+
+ var control = this,
+ newValue = {};
+
+ _.each( value, function( newSubValue, i ) {
+ newValue[ i ] = newSubValue;
+ });
+
+ control.setting.set( newValue );
+ },
+
+ /**
+ * Handles notifications.
+ */
+ kirkiNotifications: function() {
+
+ var control = this;
+
+ wp.customize( control.id, function( setting ) {
+ setting.bind( function( value ) {
+ var code = 'long_title',
+ subs = {},
+ message;
+
+ setting.notifications.remove( code );
+
+ _.each( value, function( val, direction ) {
+ if ( false === control.kirkiValidateCSSValue( val ) ) {
+ subs[ direction ] = val;
+ } else {
+ delete subs[ direction ];
+ }
+ } );
+
+ if ( ! _.isEmpty( subs ) ) {
+ message = dimensionskirkiL10n['invalid-value'] + ' (' + _.values( subs ).toString() + ') ';
+ setting.notifications.add( code, new wp.customize.Notification( code, {
+ type: 'warning',
+ message: message
+ } ) );
+ return;
+ }
+ setting.notifications.remove( code );
+ } );
+ } );
+ }
+});
+/* global tinyMCE */
+wp.customize.controlConstructor['kirki-editor'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ element = control.container.find( 'textarea' ),
+ id = 'kirki-editor-' + control.id.replace( '[', '' ).replace( ']', '' ),
+ editor;
+
+ wp.editor.initialize( id, {
+ tinymce: {
+ wpautop: true
+ },
+ quicktags: true,
+ mediaButtons: true
+ });
+
+ editor = tinyMCE.get( id );
+
+ if ( editor ) {
+ editor.onChange.add( function( ed ) {
+ var content;
+
+ ed.save();
+ content = editor.getContent();
+ element.val( content ).trigger( 'change' );
+ wp.customize.instance( control.id ).set( content );
+ });
+ }
+ }
+});
+/* global fontAwesomeJSON */
+wp.customize.controlConstructor['kirki-fontawesome'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ element = this.container.find( 'select' ),
+ icons = jQuery.parseJSON( fontAwesomeJSON ),
+ selectValue,
+ selectWooOptions = {
+ data: [],
+ escapeMarkup: function( markup ) {
+ return markup;
+ },
+ templateResult: function( val ) {
+ return ' ' + ' ' + val.text;
+ },
+ templateSelection: function( val ) {
+ return ' ' + ' ' + val.text;
+ }
+ },
+ select;
+
+ _.each( icons.icons, function( icon ) {
+ selectWooOptions.data.push({
+ id: icon.id,
+ text: icon.name
+ });
+ });
+
+ select = jQuery( element ).selectWoo( selectWooOptions );
+
+ select.on( 'change', function() {
+ selectValue = jQuery( this ).val();
+ control.setting.set( selectValue );
+ });
+ select.val( control.setting._value ).trigger( 'change' );
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.getValue(),
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url',
+ preview = control.container.find( '.placeholder, .thumbnail' ),
+ previewImage = ( 'array' === saveAs ) ? value.url : value,
+ removeButton = control.container.find( '.image-upload-remove-button' ),
+ defaultButton = control.container.find( '.image-default-button' );
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // Tweaks for save_as = id.
+ if ( ( 'id' === saveAs || 'ID' === saveAs ) && '' !== value ) {
+ wp.media.attachment( value ).fetch().then( function() {
+ setTimeout( function() {
+ var url = wp.media.attachment( value ).get( 'url' );
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }, 700 );
+ } );
+ }
+
+ // If value is not empty, hide the "default" button.
+ if ( ( 'url' === saveAs && '' !== value ) || ( 'array' === saveAs && ! _.isUndefined( value.url ) && '' !== value.url ) ) {
+ control.container.find( 'image-default-button' ).hide();
+ }
+
+ // If value is empty, hide the "remove" button.
+ if ( ( 'url' === saveAs && '' === value ) || ( 'array' === saveAs && ( _.isUndefined( value.url ) || '' === value.url ) ) ) {
+ removeButton.hide();
+ }
+
+ // If value is default, hide the default button.
+ if ( value === control.params['default'] ) {
+ control.container.find( 'image-default-button' ).hide();
+ }
+
+ if ( '' !== previewImage ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+
+ control.container.on( 'click', '.image-upload-button', function( e ) {
+ var image = wp.media({ multiple: false }).open().on( 'select', function() {
+
+ // This will return the selected image from the Media Uploader, the result is an object.
+ var uploadedImage = image.state().get( 'selection' ).first(),
+ previewImage = uploadedImage.toJSON().sizes.full.url;
+
+ if ( ! _.isUndefined( uploadedImage.toJSON().sizes.medium ) ) {
+ previewImage = uploadedImage.toJSON().sizes.medium.url;
+ } else if ( ! _.isUndefined( uploadedImage.toJSON().sizes.thumbnail ) ) {
+ previewImage = uploadedImage.toJSON().sizes.thumbnail.url;
+ }
+
+ if ( 'array' === saveAs ) {
+ control.saveValue( 'id', uploadedImage.toJSON().id );
+ control.saveValue( 'url', uploadedImage.toJSON().sizes.full.url );
+ control.saveValue( 'width', uploadedImage.toJSON().width );
+ control.saveValue( 'height', uploadedImage.toJSON().height );
+ } else if ( 'id' === saveAs ) {
+ control.saveValue( 'id', uploadedImage.toJSON().id );
+ } else {
+ control.saveValue( 'url', uploadedImage.toJSON().sizes.full.url );
+ }
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ defaultButton.hide();
+ }
+ });
+
+ e.preventDefault();
+ });
+
+ control.container.on( 'click', '.image-upload-remove-button', function( e ) {
+
+ var preview,
+ removeButton,
+ defaultButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'id', '' );
+ control.saveValue( 'url', '' );
+ control.saveValue( 'width', '' );
+ control.saveValue( 'height', '' );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.image-upload-remove-button' );
+ defaultButton = control.container.find( '.image-default-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ }
+ if ( removeButton.length ) {
+ removeButton.hide();
+ if ( jQuery( defaultButton ).hasClass( 'button' ) ) {
+ defaultButton.show();
+ }
+ }
+ });
+
+ control.container.on( 'click', '.image-default-button', function( e ) {
+
+ var preview,
+ removeButton,
+ defaultButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'url', control.params['default'] );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.image-upload-remove-button' );
+ defaultButton = control.container.find( '.image-default-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ defaultButton.hide();
+ }
+ });
+ },
+
+ /**
+ * Gets the value.
+ */
+ getValue: function() {
+ var control = this,
+ value = control.setting._value,
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url';
+
+ if ( 'array' === saveAs && _.isString( value ) ) {
+ value = {
+ url: value
+ };
+ }
+ return value;
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+ var control = this,
+ valueOld = control.setting._value,
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url';
+
+ if ( 'array' === saveAs ) {
+ if ( _.isString( valueOld ) ) {
+ valueOld = {};
+ }
+ valueOld[ property ] = value;
+ control.setting.set( valueOld );
+ control.container.find( 'button' ).trigger( 'change' );
+ return;
+ }
+ control.setting.set( value );
+ control.container.find( 'button' ).trigger( 'change' );
+ }
+});
+wp.customize.controlConstructor['kirki-multicheck'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Save the value
+ control.container.on( 'change', 'input', function() {
+ var value = [],
+ i = 0;
+
+ // Build the value as an object using the sub-values from individual checkboxes.
+ jQuery.each( control.params.choices, function( key ) {
+ if ( control.container.find( 'input[value="' + key + '"]' ).is( ':checked' ) ) {
+ value[ i ] = key;
+ i++;
+ }
+ });
+
+ // Update the value in the customizer.
+ control.setting.set( value );
+ });
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-multicolor'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ colors = control.params.choices,
+ keys = Object.keys( colors ),
+ value = this.params.value,
+ target = control.container.find( '.iris-target' ),
+ i = 0,
+ irisInput,
+ irisPicker;
+
+ // Proxy function that handles changing the individual colors
+ function kirkiMulticolorChangeHandler( control, value, subSetting ) {
+
+ var picker = control.container.find( '.multicolor-index-' + subSetting ),
+ args = {
+ target: target[0],
+ change: function() {
+
+ // Color controls require a small delay.
+ setTimeout( function() {
+
+ // Set the value.
+ control.saveValue( subSetting, picker.val() );
+
+ // Trigger the change.
+ control.container.find( '.multicolor-index-' + subSetting ).trigger( 'change' );
+ }, 100 );
+ }
+ };
+
+ if ( _.isObject( colors.irisArgs ) ) {
+ _.each( colors.irisArgs, function( irisValue, irisKey ) {
+ args[ irisKey ] = irisValue;
+ });
+ }
+
+ // Did we change the value?
+ picker.wpColorPicker( args );
+ }
+
+ // Colors loop
+ while ( i < Object.keys( colors ).length ) {
+
+ kirkiMulticolorChangeHandler( this, value, keys[ i ] );
+
+ // Move colorpicker to the 'iris-target' container div
+ irisInput = control.container.find( '.wp-picker-container .wp-picker-input-wrap' ),
+ irisPicker = control.container.find( '.wp-picker-container .wp-picker-holder' );
+ jQuery( irisInput[0] ).detach().appendTo( target[0] );
+ jQuery( irisPicker[0] ).detach().appendTo( target[0] );
+
+ i++;
+ }
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ 'use strict';
+
+ var control = this,
+ input = control.container.find( '.multicolor-hidden-value' ),
+ valueJSON = jQuery( input ).val(),
+ valueObj = JSON.parse( valueJSON );
+
+ valueObj[ property ] = value;
+ jQuery( input ).attr( 'value', JSON.stringify( valueObj ) ).trigger( 'change' );
+ control.setting.set( valueObj );
+ }
+});
+wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.setting._value,
+ html = '',
+ input,
+ up,
+ down;
+
+ // Make sure we use default values if none are define for some arguments.
+ control.params.choices = _.defaults( control.params.choices, {
+ min: 0,
+ max: 100,
+ step: 1
+ } );
+
+ // Make sure we have a valid value.
+ if ( isNaN( value ) || '' === value ) {
+ value = ( 0 > control.params.choices.min && 0 < control.params.choices.max ) ? 0 : control.params.choices.min;
+ }
+ value = parseFloat( value );
+
+ // If step is 'any', set to 0.001.
+ control.params.choices.step = ( 'any' === control.params.choices.step ) ? 0.001 : control.params.choices.step;
+
+ // Make sure choices are properly formtted as numbers.
+ control.params.choices.min = parseFloat( control.params.choices.min );
+ control.params.choices.max = parseFloat( control.params.choices.max );
+ control.params.choices.step = parseFloat( control.params.choices.step );
+
+ // Build the HTML for the control.
+ html += '';
+ if ( control.params.label ) {
+ html += '' + control.params.label + ' ';
+ }
+ if ( control.params.description ) {
+ html += '' + control.params.description + ' ';
+ }
+ html += '';
+ html += '
';
+ html += '
-
';
+ html += '
+
';
+ html += '
';
+ html += ' ';
+
+ control.container.html( html );
+
+ input = control.container.find( 'input' );
+ up = control.container.find( '.plus' );
+ down = control.container.find( '.minus' );
+
+ up.click( function() {
+ var oldVal = parseFloat( input.val() ),
+ newVal;
+
+ newVal = ( oldVal >= control.params.choices.max ) ? oldVal : oldVal + control.params.choices.step;
+
+ input.val( newVal );
+ input.trigger( 'change' );
+ } );
+
+ down.click( function() {
+ var oldVal = parseFloat( input.val() ),
+ newVal;
+
+ newVal = ( oldVal <= control.params.choices.min ) ? oldVal : oldVal - control.params.choices.step;
+
+ input.val( newVal );
+ input.trigger( 'change' );
+ } );
+
+ this.container.on( 'change keyup paste click', 'input', function() {
+ control.setting.set( jQuery( this ).val() );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-palette'] = wp.customize.kirkiDynamicControl.extend({});
+/* global kirkiSetSettingValue */
+wp.customize.controlConstructor['kirki-preset'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ selectValue;
+
+ // Trigger a change
+ this.container.on( 'change', 'select', function() {
+
+ // Get the control's value
+ selectValue = jQuery( this ).val();
+
+ // Update the value using the customizer API and trigger the "save" button
+ control.setting.set( selectValue );
+
+ // We have to get the choices of this control
+ // and then start parsing them to see what we have to do for each of the choices.
+ jQuery.each( control.params.choices, function( key, value ) {
+
+ // If the current value of the control is the key of the choice,
+ // then we can continue processing, Otherwise there's no reason to do anything.
+ if ( selectValue === key ) {
+
+ // Each choice has an array of settings defined in it.
+ // We'll have to loop through them all and apply the changes needed to them.
+ jQuery.each( value.settings, function( presetSetting, presetSettingValue ) {
+ kirkiSetSettingValue.set( presetSetting, presetSettingValue );
+ });
+ }
+ });
+ wp.customize.previewer.refresh();
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-radio-buttonset'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-radio-image'] = wp.customize.kirkiDynamicControl.extend({});
+/* global kirkiControlLoader */
+var RepeaterRow = function( rowIndex, container, label, control ) {
+
+ 'use strict';
+
+ var self = this;
+ this.rowIndex = rowIndex;
+ this.container = container;
+ this.label = label;
+ this.header = this.container.find( '.repeater-row-header' ),
+
+ this.header.on( 'click', function() {
+ self.toggleMinimize();
+ });
+
+ this.container.on( 'click', '.repeater-row-remove', function() {
+ self.remove();
+ });
+
+ this.header.on( 'mousedown', function() {
+ self.container.trigger( 'row:start-dragging' );
+ });
+
+ this.container.on( 'keyup change', 'input, select, textarea', function( e ) {
+ self.container.trigger( 'row:update', [ self.rowIndex, jQuery( e.target ).data( 'field' ), e.target ] );
+ });
+
+ this.setRowIndex = function( rowIndex ) {
+ this.rowIndex = rowIndex;
+ this.container.attr( 'data-row', rowIndex );
+ this.container.data( 'row', rowIndex );
+ this.updateLabel();
+ };
+
+ this.toggleMinimize = function() {
+
+ // Store the previous state.
+ this.container.toggleClass( 'minimized' );
+ this.header.find( '.dashicons' ).toggleClass( 'dashicons-arrow-up' ).toggleClass( 'dashicons-arrow-down' );
+ };
+
+ this.remove = function() {
+ this.container.slideUp( 300, function() {
+ jQuery( this ).detach();
+ });
+ this.container.trigger( 'row:remove', [ this.rowIndex ] );
+ };
+
+ this.updateLabel = function() {
+ var rowLabelField,
+ rowLabel,
+ rowLabelSelector;
+
+ if ( 'field' === this.label.type ) {
+ rowLabelField = this.container.find( '.repeater-field [data-field="' + this.label.field + '"]' );
+ if ( _.isFunction( rowLabelField.val ) ) {
+ rowLabel = rowLabelField.val();
+ if ( '' !== rowLabel ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ] ) ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ].type ) ) {
+ if ( 'select' === control.params.fields[ this.label.field ].type ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ].choices ) && ! _.isUndefined( control.params.fields[ this.label.field ].choices[ rowLabelField.val() ] ) ) {
+ rowLabel = control.params.fields[ this.label.field ].choices[ rowLabelField.val() ];
+ }
+ } else if ( 'radio' === control.params.fields[ this.label.field ].type || 'radio-image' === control.params.fields[ this.label.field ].type ) {
+ rowLabelSelector = control.selector + ' [data-row="' + this.rowIndex + '"] .repeater-field [data-field="' + this.label.field + '"]:checked';
+ rowLabel = jQuery( rowLabelSelector ).val();
+ }
+ }
+ }
+ this.header.find( '.repeater-row-label' ).text( rowLabel );
+ return;
+ }
+ }
+ }
+ this.header.find( '.repeater-row-label' ).text( this.label.value + ' ' + ( this.rowIndex + 1 ) );
+ };
+ this.updateLabel();
+};
+
+wp.customize.controlConstructor.repeater = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ limit,
+ theNewRow;
+
+ // The current value set in Control Class (set in Kirki_Customize_Repeater_Control::to_json() function)
+ var settingValue = this.params.value;
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // The hidden field that keeps the data saved (though we never update it)
+ this.settingField = this.container.find( '[data-customize-setting-link]' ).first();
+
+ // Set the field value for the first time, we'll fill it up later
+ this.setValue( [], false );
+
+ // The DIV that holds all the rows
+ this.repeaterFieldsContainer = this.container.find( '.repeater-fields' ).first();
+
+ // Set number of rows to 0
+ this.currentIndex = 0;
+
+ // Save the rows objects
+ this.rows = [];
+
+ // Default limit choice
+ limit = false;
+ if ( ! _.isUndefined( this.params.choices.limit ) ) {
+ limit = ( 0 >= this.params.choices.limit ) ? false : parseInt( this.params.choices.limit, 10 );
+ }
+
+ this.container.on( 'click', 'button.repeater-add', function( e ) {
+ e.preventDefault();
+ if ( ! limit || control.currentIndex < limit ) {
+ theNewRow = control.addRow();
+ theNewRow.toggleMinimize();
+ control.initColorPicker();
+ control.initSelect( theNewRow );
+ } else {
+ jQuery( control.selector + ' .limit' ).addClass( 'highlight' );
+ }
+ });
+
+ this.container.on( 'click', '.repeater-row-remove', function() {
+ control.currentIndex--;
+ if ( ! limit || control.currentIndex < limit ) {
+ jQuery( control.selector + ' .limit' ).removeClass( 'highlight' );
+ }
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-image .upload-button,.repeater-field-cropped_image .upload-button,.repeater-field-upload .upload-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.openFrame( e );
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-image .remove-button,.repeater-field-cropped_image .remove-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.removeImage( e );
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-upload .remove-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.removeFile( e );
+ });
+
+ /**
+ * Function that loads the Mustache template
+ */
+ this.repeaterTemplate = _.memoize( function() {
+ var compiled,
+ /*
+ * Underscore's default ERB-style templates are incompatible with PHP
+ * when asp_tags is enabled, so WordPress uses Mustache-inspired templating syntax.
+ *
+ * @see trac ticket #22344.
+ */
+ options = {
+ evaluate: /<#([\s\S]+?)#>/g,
+ interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
+ escape: /\{\{([^\}]+?)\}\}(?!\})/g,
+ variable: 'data'
+ };
+
+ return function( data ) {
+ compiled = _.template( control.container.find( '.customize-control-repeater-content' ).first().html(), null, options );
+ return compiled( data );
+ };
+ });
+
+ // When we load the control, the fields have not been filled up
+ // This is the first time that we create all the rows
+ if ( settingValue.length ) {
+ _.each( settingValue, function( subValue ) {
+ theNewRow = control.addRow( subValue );
+ control.initColorPicker();
+ control.initSelect( theNewRow, subValue );
+ });
+ }
+
+ // Once we have displayed the rows, we cleanup the values
+ this.setValue( settingValue, true, true );
+
+ this.repeaterFieldsContainer.sortable({
+ handle: '.repeater-row-header',
+ update: function() {
+ control.sort();
+ }
+ });
+
+ },
+
+ /**
+ * Open the media modal.
+ */
+ openFrame: function( event ) {
+
+ 'use strict';
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ if ( this.$thisButton.closest( '.repeater-field' ).hasClass( 'repeater-field-cropped_image' ) ) {
+ this.initCropperFrame();
+ } else {
+ this.initFrame();
+ }
+
+ this.frame.open();
+ },
+
+ initFrame: function() {
+
+ 'use strict';
+
+ var libMediaType = this.getMimeType();
+
+ this.frame = wp.media({
+ states: [
+ new wp.media.controller.Library({
+ library: wp.media.query({ type: libMediaType }),
+ multiple: false,
+ date: false
+ })
+ ]
+ });
+
+ // When a file is selected, run a callback.
+ this.frame.on( 'select', this.onSelect, this );
+ },
+ /**
+ * Create a media modal select frame, and store it so the instance can be reused when needed.
+ * This is mostly a copy/paste of Core api.CroppedImageControl in /wp-admin/js/customize-control.js
+ */
+ initCropperFrame: function() {
+
+ 'use strict';
+
+ // We get the field id from which this was called
+ var currentFieldId = this.$thisButton.siblings( 'input.hidden-field' ).attr( 'data-field' ),
+ attrs = [ 'width', 'height', 'flex_width', 'flex_height' ], // A list of attributes to look for
+ libMediaType = this.getMimeType();
+
+ // Make sure we got it
+ if ( _.isString( currentFieldId ) && '' !== currentFieldId ) {
+
+ // Make fields is defined and only do the hack for cropped_image
+ if ( _.isObject( this.params.fields[ currentFieldId ] ) && 'cropped_image' === this.params.fields[ currentFieldId ].type ) {
+
+ //Iterate over the list of attributes
+ attrs.forEach( function( el ) {
+
+ // If the attribute exists in the field
+ if ( ! _.isUndefined( this.params.fields[ currentFieldId ][ el ] ) ) {
+
+ // Set the attribute in the main object
+ this.params[ el ] = this.params.fields[ currentFieldId ][ el ];
+ }
+ }.bind( this ) );
+ }
+ }
+
+ this.frame = wp.media({
+ button: {
+ text: 'Select and Crop',
+ close: false
+ },
+ states: [
+ new wp.media.controller.Library({
+ library: wp.media.query({ type: libMediaType }),
+ multiple: false,
+ date: false,
+ suggestedWidth: this.params.width,
+ suggestedHeight: this.params.height
+ }),
+ new wp.media.controller.CustomizeImageCropper({
+ imgSelectOptions: this.calculateImageSelectOptions,
+ control: this
+ })
+ ]
+ });
+
+ this.frame.on( 'select', this.onSelectForCrop, this );
+ this.frame.on( 'cropped', this.onCropped, this );
+ this.frame.on( 'skippedcrop', this.onSkippedCrop, this );
+
+ },
+
+ onSelect: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+
+ if ( this.$thisButton.closest( '.repeater-field' ).hasClass( 'repeater-field-upload' ) ) {
+ this.setFileInRepeaterField( attachment );
+ } else {
+ this.setImageInRepeaterField( attachment );
+ }
+ },
+
+ /**
+ * After an image is selected in the media modal, switch to the cropper
+ * state if the image isn't the right size.
+ */
+
+ onSelectForCrop: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+
+ if ( this.params.width === attachment.width && this.params.height === attachment.height && ! this.params.flex_width && ! this.params.flex_height ) {
+ this.setImageInRepeaterField( attachment );
+ } else {
+ this.frame.setState( 'cropper' );
+ }
+ },
+
+ /**
+ * After the image has been cropped, apply the cropped image data to the setting.
+ *
+ * @param {object} croppedImage Cropped attachment data.
+ */
+ onCropped: function( croppedImage ) {
+
+ 'use strict';
+
+ this.setImageInRepeaterField( croppedImage );
+
+ },
+
+ /**
+ * Returns a set of options, computed from the attached image data and
+ * control-specific data, to be fed to the imgAreaSelect plugin in
+ * wp.media.view.Cropper.
+ *
+ * @param {wp.media.model.Attachment} attachment
+ * @param {wp.media.controller.Cropper} controller
+ * @returns {Object} Options
+ */
+ calculateImageSelectOptions: function( attachment, controller ) {
+
+ 'use strict';
+
+ var control = controller.get( 'control' ),
+ flexWidth = !! parseInt( control.params.flex_width, 10 ),
+ flexHeight = !! parseInt( control.params.flex_height, 10 ),
+ realWidth = attachment.get( 'width' ),
+ realHeight = attachment.get( 'height' ),
+ xInit = parseInt( control.params.width, 10 ),
+ yInit = parseInt( control.params.height, 10 ),
+ ratio = xInit / yInit,
+ xImg = realWidth,
+ yImg = realHeight,
+ x1,
+ y1,
+ imgSelectOptions;
+
+ controller.set( 'canSkipCrop', ! control.mustBeCropped( flexWidth, flexHeight, xInit, yInit, realWidth, realHeight ) );
+
+ if ( xImg / yImg > ratio ) {
+ yInit = yImg;
+ xInit = yInit * ratio;
+ } else {
+ xInit = xImg;
+ yInit = xInit / ratio;
+ }
+
+ x1 = ( xImg - xInit ) / 2;
+ y1 = ( yImg - yInit ) / 2;
+
+ imgSelectOptions = {
+ handles: true,
+ keys: true,
+ instance: true,
+ persistent: true,
+ imageWidth: realWidth,
+ imageHeight: realHeight,
+ x1: x1,
+ y1: y1,
+ x2: xInit + x1,
+ y2: yInit + y1
+ };
+
+ if ( false === flexHeight && false === flexWidth ) {
+ imgSelectOptions.aspectRatio = xInit + ':' + yInit;
+ }
+ if ( false === flexHeight ) {
+ imgSelectOptions.maxHeight = yInit;
+ }
+ if ( false === flexWidth ) {
+ imgSelectOptions.maxWidth = xInit;
+ }
+
+ return imgSelectOptions;
+ },
+
+ /**
+ * Return whether the image must be cropped, based on required dimensions.
+ *
+ * @param {bool} flexW
+ * @param {bool} flexH
+ * @param {int} dstW
+ * @param {int} dstH
+ * @param {int} imgW
+ * @param {int} imgH
+ * @return {bool}
+ */
+ mustBeCropped: function( flexW, flexH, dstW, dstH, imgW, imgH ) {
+
+ 'use strict';
+
+ if ( ( true === flexW && true === flexH ) || ( true === flexW && dstH === imgH ) || ( true === flexH && dstW === imgW ) || ( dstW === imgW && dstH === imgH ) || ( imgW <= dstW ) ) {
+ return false;
+ }
+
+ return true;
+ },
+
+ /**
+ * If cropping was skipped, apply the image data directly to the setting.
+ */
+ onSkippedCrop: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+ this.setImageInRepeaterField( attachment );
+
+ },
+
+ /**
+ * Updates the setting and re-renders the control UI.
+ *
+ * @param {object} attachment
+ */
+ setImageInRepeaterField: function( attachment ) {
+
+ 'use strict';
+
+ var $targetDiv = this.$thisButton.closest( '.repeater-field-image,.repeater-field-cropped_image' );
+
+ $targetDiv.find( '.kirki-image-attachment' ).html( ' ' ).hide().slideDown( 'slow' );
+
+ $targetDiv.find( '.hidden-field' ).val( attachment.id );
+ this.$thisButton.text( this.$thisButton.data( 'alt-label' ) );
+ $targetDiv.find( '.remove-button' ).show();
+
+ //This will activate the save button
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+ this.frame.close();
+
+ },
+
+ /**
+ * Updates the setting and re-renders the control UI.
+ *
+ * @param {object} attachment
+ */
+ setFileInRepeaterField: function( attachment ) {
+
+ 'use strict';
+
+ var $targetDiv = this.$thisButton.closest( '.repeater-field-upload' );
+
+ $targetDiv.find( '.kirki-file-attachment' ).html( ' ' + attachment.filename + ' ' ).hide().slideDown( 'slow' );
+
+ $targetDiv.find( '.hidden-field' ).val( attachment.id );
+ this.$thisButton.text( this.$thisButton.data( 'alt-label' ) );
+ $targetDiv.find( '.upload-button' ).show();
+ $targetDiv.find( '.remove-button' ).show();
+
+ //This will activate the save button
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+ this.frame.close();
+
+ },
+
+ getMimeType: function() {
+
+ 'use strict';
+
+ // We get the field id from which this was called
+ var currentFieldId = this.$thisButton.siblings( 'input.hidden-field' ).attr( 'data-field' );
+
+ // Make sure we got it
+ if ( _.isString( currentFieldId ) && '' !== currentFieldId ) {
+
+ // Make fields is defined and only do the hack for cropped_image
+ if ( _.isObject( this.params.fields[ currentFieldId ] ) && 'upload' === this.params.fields[ currentFieldId ].type ) {
+
+ // If the attribute exists in the field
+ if ( ! _.isUndefined( this.params.fields[ currentFieldId ].mime_type ) ) {
+
+ // Set the attribute in the main object
+ return this.params.fields[ currentFieldId ].mime_type;
+ }
+ }
+ }
+ return 'image';
+
+ },
+
+ removeImage: function( event ) {
+
+ 'use strict';
+
+ var $targetDiv,
+ $uploadButton;
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ $targetDiv = this.$thisButton.closest( '.repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload' );
+ $uploadButton = $targetDiv.find( '.upload-button' );
+
+ $targetDiv.find( '.kirki-image-attachment' ).slideUp( 'fast', function() {
+ jQuery( this ).show().html( jQuery( this ).data( 'placeholder' ) );
+ });
+ $targetDiv.find( '.hidden-field' ).val( '' );
+ $uploadButton.text( $uploadButton.data( 'label' ) );
+ this.$thisButton.hide();
+
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+
+ },
+
+ removeFile: function( event ) {
+
+ 'use strict';
+
+ var $targetDiv,
+ $uploadButton;
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ $targetDiv = this.$thisButton.closest( '.repeater-field-upload' );
+ $uploadButton = $targetDiv.find( '.upload-button' );
+
+ $targetDiv.find( '.kirki-file-attachment' ).slideUp( 'fast', function() {
+ jQuery( this ).show().html( jQuery( this ).data( 'placeholder' ) );
+ });
+ $targetDiv.find( '.hidden-field' ).val( '' );
+ $uploadButton.text( $uploadButton.data( 'label' ) );
+ this.$thisButton.hide();
+
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+
+ },
+
+ /**
+ * Get the current value of the setting
+ *
+ * @return Object
+ */
+ getValue: function() {
+
+ 'use strict';
+
+ // The setting is saved in JSON
+ return JSON.parse( decodeURI( this.setting.get() ) );
+
+ },
+
+ /**
+ * Set a new value for the setting
+ *
+ * @param newValue Object
+ * @param refresh If we want to refresh the previewer or not
+ */
+ setValue: function( newValue, refresh, filtering ) {
+
+ 'use strict';
+
+ // We need to filter the values after the first load to remove data requrired for diplay but that we don't want to save in DB
+ var filteredValue = newValue,
+ filter = [];
+
+ if ( filtering ) {
+ jQuery.each( this.params.fields, function( index, value ) {
+ if ( 'image' === value.type || 'cropped_image' === value.type || 'upload' === value.type ) {
+ filter.push( index );
+ }
+ });
+ jQuery.each( newValue, function( index, value ) {
+ jQuery.each( filter, function( ind, field ) {
+ if ( ! _.isUndefined( value[ field ] ) && ! _.isUndefined( value[ field ].id ) ) {
+ filteredValue[index][ field ] = value[ field ].id;
+ }
+ });
+ });
+ }
+
+ this.setting.set( encodeURI( JSON.stringify( filteredValue ) ) );
+
+ if ( refresh ) {
+
+ // Trigger the change event on the hidden field so
+ // previewer refresh the website on Customizer
+ this.settingField.trigger( 'change' );
+ }
+ },
+
+ /**
+ * Add a new row to repeater settings based on the structure.
+ *
+ * @param data (Optional) Object of field => value pairs (undefined if you want to get the default values)
+ */
+ addRow: function( data ) {
+
+ 'use strict';
+
+ var control = this,
+ template = control.repeaterTemplate(), // The template for the new row (defined on Kirki_Customize_Repeater_Control::render_content() ).
+ settingValue = this.getValue(), // Get the current setting value.
+ newRowSetting = {}, // Saves the new setting data.
+ templateData, // Data to pass to the template
+ newRow,
+ i;
+
+ if ( template ) {
+
+ // The control structure is going to define the new fields
+ // We need to clone control.params.fields. Assigning it
+ // ould result in a reference assignment.
+ templateData = jQuery.extend( true, {}, control.params.fields );
+
+ // But if we have passed data, we'll use the data values instead
+ if ( data ) {
+ for ( i in data ) {
+ if ( data.hasOwnProperty( i ) && templateData.hasOwnProperty( i ) ) {
+ templateData[ i ]['default'] = data[ i ];
+ }
+ }
+ }
+
+ templateData.index = this.currentIndex;
+
+ // Append the template content
+ template = template( templateData );
+
+ // Create a new row object and append the element
+ newRow = new RepeaterRow(
+ control.currentIndex,
+ jQuery( template ).appendTo( control.repeaterFieldsContainer ),
+ control.params.row_label,
+ control
+ );
+
+ newRow.container.on( 'row:remove', function( e, rowIndex ) {
+ control.deleteRow( rowIndex );
+ });
+
+ newRow.container.on( 'row:update', function( e, rowIndex, fieldName, element ) {
+ control.updateField.call( control, e, rowIndex, fieldName, element );
+ newRow.updateLabel();
+ });
+
+ // Add the row to rows collection
+ this.rows[ this.currentIndex ] = newRow;
+
+ for ( i in templateData ) {
+ if ( templateData.hasOwnProperty( i ) ) {
+ newRowSetting[ i ] = templateData[ i ]['default'];
+ }
+ }
+
+ settingValue[ this.currentIndex ] = newRowSetting;
+ this.setValue( settingValue, true );
+
+ this.currentIndex++;
+
+ return newRow;
+ }
+ },
+
+ sort: function() {
+
+ 'use strict';
+
+ var control = this,
+ $rows = this.repeaterFieldsContainer.find( '.repeater-row' ),
+ newOrder = [],
+ settings = control.getValue(),
+ newRows = [],
+ newSettings = [];
+
+ $rows.each( function( i, element ) {
+ newOrder.push( jQuery( element ).data( 'row' ) );
+ });
+
+ jQuery.each( newOrder, function( newPosition, oldPosition ) {
+ newRows[ newPosition ] = control.rows[ oldPosition ];
+ newRows[ newPosition ].setRowIndex( newPosition );
+
+ newSettings[ newPosition ] = settings[ oldPosition ];
+ });
+
+ control.rows = newRows;
+ control.setValue( newSettings );
+
+ },
+
+ /**
+ * Delete a row in the repeater setting
+ *
+ * @param index Position of the row in the complete Setting Array
+ */
+ deleteRow: function( index ) {
+
+ 'use strict';
+
+ var currentSettings = this.getValue(),
+ row,
+ i,
+ prop;
+
+ if ( currentSettings[ index ] ) {
+
+ // Find the row
+ row = this.rows[ index ];
+ if ( row ) {
+
+ // Remove the row settings
+ delete currentSettings[ index ];
+
+ // Remove the row from the rows collection
+ delete this.rows[ index ];
+
+ // Update the new setting values
+ this.setValue( currentSettings, true );
+
+ }
+
+ }
+
+ // Remap the row numbers
+ i = 1;
+ for ( prop in this.rows ) {
+ if ( this.rows.hasOwnProperty( prop ) && this.rows[ prop ] ) {
+ this.rows[ prop ].updateLabel();
+ i++;
+ }
+ }
+ },
+
+ /**
+ * Update a single field inside a row.
+ * Triggered when a field has changed
+ *
+ * @param e Event Object
+ */
+ updateField: function( e, rowIndex, fieldId, element ) {
+
+ 'use strict';
+
+ var type,
+ row,
+ currentSettings;
+
+ if ( ! this.rows[ rowIndex ] ) {
+ return;
+ }
+
+ if ( ! this.params.fields[ fieldId ] ) {
+ return;
+ }
+
+ type = this.params.fields[ fieldId].type;
+ row = this.rows[ rowIndex ];
+ currentSettings = this.getValue();
+
+ element = jQuery( element );
+
+ if ( _.isUndefined( currentSettings[ row.rowIndex ][ fieldId ] ) ) {
+ return;
+ }
+
+ if ( 'checkbox' === type ) {
+ currentSettings[ row.rowIndex ][ fieldId ] = element.is( ':checked' );
+ } else {
+
+ // Update the settings
+ currentSettings[ row.rowIndex ][ fieldId ] = element.val();
+ }
+ this.setValue( currentSettings, true );
+ },
+
+ /**
+ * Init the color picker on color fields
+ * Called after AddRow
+ *
+ */
+ initColorPicker: function() {
+
+ 'use strict';
+
+ var control = this,
+ colorPicker = control.container.find( '.color-picker-hex' ),
+ options = {},
+ fieldId = colorPicker.data( 'field' );
+
+ // We check if the color palette parameter is defined.
+ if ( ! _.isUndefined( fieldId ) && ! _.isUndefined( control.params.fields[ fieldId ] ) && ! _.isUndefined( control.params.fields[ fieldId ].palettes ) && _.isObject( control.params.fields[ fieldId ].palettes ) ) {
+ options.palettes = control.params.fields[ fieldId ].palettes;
+ }
+
+ // When the color picker value is changed we update the value of the field
+ options.change = function( event, ui ) {
+
+ var currentPicker = jQuery( event.target ),
+ row = currentPicker.closest( '.repeater-row' ),
+ rowIndex = row.data( 'row' ),
+ currentSettings = control.getValue();
+
+ currentSettings[ rowIndex ][ currentPicker.data( 'field' ) ] = ui.color.toString();
+ control.setValue( currentSettings, true );
+
+ };
+
+ // Init the color picker
+ if ( 0 !== colorPicker.length ) {
+ colorPicker.wpColorPicker( options );
+ }
+ },
+
+ /**
+ * Init the dropdown-pages field with selectWoo
+ * Called after AddRow
+ *
+ * @param {object} theNewRow the row that was added to the repeater
+ * @param {object} data the data for the row if we're initializing a pre-existing row
+ *
+ */
+ initSelect: function( theNewRow, data ) {
+
+ 'use strict';
+
+ var control = this,
+ dropdown = theNewRow.container.find( '.repeater-field select' ),
+ $select,
+ dataField,
+ multiple,
+ selectWooOptions = {};
+
+ if ( 0 === dropdown.length ) {
+ return;
+ }
+
+ dataField = dropdown.data( 'field' );
+ multiple = jQuery( dropdown ).data( 'multiple' );
+ if ( 'undefed' !== multiple && jQuery.isNumeric( multiple ) ) {
+ multiple = parseInt( multiple, 10 );
+ if ( 1 < multiple ) {
+ selectWooOptions.maximumSelectionLength = multiple;
+ }
+ }
+
+ data = data || {};
+ data[ dataField ] = data[ dataField ] || '';
+
+ $select = jQuery( dropdown ).selectWoo( selectWooOptions ).val( data[ dataField ] );
+
+ this.container.on( 'change', '.repeater-field select', function( event ) {
+
+ var currentDropdown = jQuery( event.target ),
+ row = currentDropdown.closest( '.repeater-row' ),
+ rowIndex = row.data( 'row' ),
+ currentSettings = control.getValue();
+
+ currentSettings[ rowIndex ][ currentDropdown.data( 'field' ) ] = jQuery( this ).val();
+ control.setValue( currentSettings );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-slider'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+ var control = this,
+ changeAction = ( 'postMessage' === control.setting.transport ) ? 'mousemove change' : 'change',
+ rangeInput = control.container.find( 'input[type="range"]' ),
+ textInput = control.container.find( 'input[type="text"]' ),
+ value = control.setting._value;
+
+ // Set the initial value in the text input.
+ textInput.attr( 'value', value );
+
+ // If the range input value changes copy the value to the text input.
+ rangeInput.on( 'mousemove change', function() {
+ textInput.attr( 'value', rangeInput.val() );
+ } );
+
+ // Save the value when the range input value changes.
+ // This is separate from the above because of the postMessage differences.
+ // If the control refreshes the preview pane,
+ // we don't want a refresh for every change
+ // but 1 final refresh when the value is changed.
+ rangeInput.on( changeAction, function() {
+ control.setting.set( rangeInput.val() );
+ } );
+
+ // If the text input value changes,
+ // copy the value to the range input
+ // and then save.
+ textInput.on( 'input paste change', function() {
+ rangeInput.attr( 'value', textInput.val() );
+ control.setting.set( textInput.val() );
+ } );
+
+ // If the reset button is clicked,
+ // set slider and text input values to default
+ // and hen save.
+ control.container.find( '.slider-reset' ).on( 'click', function() {
+ textInput.attr( 'value', control.params['default'] );
+ rangeInput.attr( 'value', control.params['default'] );
+ control.setting.set( textInput.val() );
+ } );
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // Set the sortable container.
+ control.sortableContainer = control.container.find( 'ul.sortable' ).first();
+
+ // Init sortable.
+ control.sortableContainer.sortable({
+
+ // Update value when we stop sorting.
+ stop: function() {
+ control.updateValue();
+ }
+ }).disableSelection().find( 'li' ).each( function() {
+
+ // Enable/disable options when we click on the eye of Thundera.
+ jQuery( this ).find( 'i.visibility' ).click( function() {
+ jQuery( this ).toggleClass( 'dashicons-visibility-faint' ).parents( 'li:eq(0)' ).toggleClass( 'invisible' );
+ });
+ }).click( function() {
+
+ // Update value on click.
+ control.updateValue();
+ });
+ },
+
+ /**
+ * Updates the sorting list
+ */
+ updateValue: function() {
+
+ 'use strict';
+
+ var control = this,
+ newValue = [];
+
+ this.sortableContainer.find( 'li' ).each( function() {
+ if ( ! jQuery( this ).is( '.invisible' ) ) {
+ newValue.push( jQuery( this ).data( 'value' ) );
+ }
+ });
+ control.setting.set( newValue );
+ }
+});
+wp.customize.controlConstructor['kirki-switch'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ checkboxValue = control.setting._value;
+
+ // Save the value
+ this.container.on( 'change', 'input', function() {
+ checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false;
+ control.setting.set( checkboxValue );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-toggle'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ checkboxValue = control.setting._value;
+
+ // Save the value
+ this.container.on( 'change', 'input', function() {
+ checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false;
+ control.setting.set( checkboxValue );
+ });
+ }
+});
+/* global kirkiControlLoader, kirkiAllFonts */
+wp.customize.controlConstructor['kirki-typography'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ value = control.getValue(),
+ picker;
+
+ control.renderFontSelector();
+ control.renderBackupFontSelector();
+ control.renderVariantSelector();
+ control.renderSubsetSelector();
+
+ // Font-size.
+ if ( control.params['default']['font-size'] ) {
+ this.container.on( 'change keyup paste', '.font-size input', function() {
+ control.saveValue( 'font-size', jQuery( this ).val() );
+ });
+ }
+
+ // Line-height.
+ if ( control.params['default']['line-height'] ) {
+ this.container.on( 'change keyup paste', '.line-height input', function() {
+ control.saveValue( 'line-height', jQuery( this ).val() );
+ });
+ }
+
+ // Margin-top.
+ if ( control.params['default']['margin-top'] ) {
+ this.container.on( 'change keyup paste', '.margin-top input', function() {
+ control.saveValue( 'margin-top', jQuery( this ).val() );
+ });
+ }
+
+ // Margin-bottom.
+ if ( control.params['default']['margin-bottom'] ) {
+ this.container.on( 'change keyup paste', '.margin-bottom input', function() {
+ control.saveValue( 'margin-bottom', jQuery( this ).val() );
+ });
+ }
+
+ // Letter-spacing.
+ if ( control.params['default']['letter-spacing'] ) {
+ value['letter-spacing'] = ( jQuery.isNumeric( value['letter-spacing'] ) ) ? value['letter-spacing'] + 'px' : value['letter-spacing'];
+ this.container.on( 'change keyup paste', '.letter-spacing input', function() {
+ value['letter-spacing'] = ( jQuery.isNumeric( jQuery( this ).val() ) ) ? jQuery( this ).val() + 'px' : jQuery( this ).val();
+ control.saveValue( 'letter-spacing', value['letter-spacing'] );
+ });
+ }
+
+ // Word-spacing.
+ if ( control.params['default']['word-spacing'] ) {
+ this.container.on( 'change keyup paste', '.word-spacing input', function() {
+ control.saveValue( 'word-spacing', jQuery( this ).val() );
+ });
+ }
+
+ // Text-align.
+ if ( control.params['default']['text-align'] ) {
+ this.container.on( 'change', '.text-align input', function() {
+ control.saveValue( 'text-align', jQuery( this ).val() );
+ });
+ }
+
+ // Text-transform.
+ if ( control.params['default']['text-transform'] ) {
+ jQuery( control.selector + ' .text-transform select' ).selectWoo().on( 'change', function() {
+ control.saveValue( 'text-transform', jQuery( this ).val() );
+ });
+ }
+
+ // Color.
+ if ( control.params['default'].color ) {
+ picker = this.container.find( '.kirki-color-control' );
+ picker.wpColorPicker({
+ change: function() {
+ setTimeout( function() {
+ control.saveValue( 'color', picker.val() );
+ }, 100 );
+ }
+ });
+ }
+ },
+
+ /**
+ * Adds the font-families to the font-family dropdown
+ * and instantiates selectWoo.
+ */
+ renderFontSelector: function() {
+
+ var control = this,
+ selector = control.selector + ' .font-family select',
+ data = [],
+ standardFonts = [],
+ googleFonts = [],
+ value = control.getValue(),
+ fonts = control.getFonts(),
+ fontSelect;
+
+ // Format standard fonts as an array.
+ if ( ! _.isUndefined( fonts.standard ) ) {
+ _.each( fonts.standard, function( font ) {
+ standardFonts.push({
+ id: font.family.replace( /"/g, ''' ),
+ text: font.label
+ });
+ });
+ }
+
+ // Format google fonts as an array.
+ if ( ! _.isUndefined( fonts.standard ) ) {
+ _.each( fonts.google, function( font ) {
+ googleFonts.push({
+ id: font.family,
+ text: font.label
+ });
+ });
+ }
+
+ // Combine forces and build the final data.
+ data = [
+ { text: 'Standard Fonts', children: standardFonts },
+ { text: 'Google Fonts', children: googleFonts }
+ ];
+
+ // Instantiate selectWoo with the data.
+ fontSelect = jQuery( selector ).selectWoo({
+ data: data
+ });
+
+ // Set the initial value.
+ if ( value['font-family'] ) {
+ fontSelect.val( value['font-family'].replace( /'/g, '"' ) ).trigger( 'change' );
+ }
+
+ // When the value changes
+ fontSelect.on( 'change', function() {
+
+ // Set the value.
+ control.saveValue( 'font-family', jQuery( this ).val() );
+
+ // Re-init the font-backup selector.
+ control.renderBackupFontSelector();
+
+ // Re-init variants selector.
+ control.renderVariantSelector();
+
+ // Re-init subsets selector.
+ control.renderSubsetSelector();
+ });
+ },
+
+ /**
+ * Adds the font-families to the font-family dropdown
+ * and instantiates selectWoo.
+ */
+ renderBackupFontSelector: function() {
+
+ var control = this,
+ selector = control.selector + ' .font-backup select',
+ standardFonts = [],
+ value = control.getValue(),
+ fontFamily = value['font-family'],
+ variants = control.getVariants( fontFamily ),
+ fonts = control.getFonts(),
+ fontSelect;
+
+ if ( _.isUndefined( value['font-backup'] ) || null === value['font-backup'] ) {
+ value['font-backup'] = '';
+ }
+
+ // Hide if we're not on a google-font.
+ if ( false !== variants ) {
+ jQuery( control.selector + ' .font-backup' ).show();
+ } else {
+ jQuery( control.selector + ' .font-backup' ).hide();
+ }
+
+ // Format standard fonts as an array.
+ if ( ! _.isUndefined( fonts.standard ) ) {
+ _.each( fonts.standard, function( font ) {
+ standardFonts.push({
+ id: font.family.replace( /"/g, ''' ),
+ text: font.label
+ });
+ });
+ }
+
+ // Instantiate selectWoo with the data.
+ fontSelect = jQuery( selector ).selectWoo({
+ data: standardFonts
+ });
+
+ // Set the initial value.
+ if ( 'undefined' !== typeof value['font-backup'] ) {
+ fontSelect.val( value['font-backup'].replace( /'/g, '"' ) ).trigger( 'change' );
+ }
+
+ // When the value changes
+ fontSelect.on( 'change', function() {
+
+ // Set the value.
+ control.saveValue( 'font-backup', jQuery( this ).val() );
+ });
+ },
+
+ /**
+ * Renders the variants selector using selectWoo
+ * Displays font-variants for the currently selected font-family.
+ */
+ renderVariantSelector: function() {
+
+ var control = this,
+ value = control.getValue(),
+ fontFamily = value['font-family'],
+ variants = control.getVariants( fontFamily ),
+ selector = control.selector + ' .variant select',
+ data = [],
+ isValid = false,
+ fontWeight,
+ variantSelector,
+ fontStyle;
+
+ if ( false !== variants ) {
+ jQuery( control.selector + ' .variant' ).show();
+ _.each( variants, function( variant ) {
+ if ( value.variant === variant.id ) {
+ isValid = true;
+ }
+ data.push({
+ id: variant.id,
+ text: variant.label
+ });
+ });
+ if ( ! isValid ) {
+ value.variant = 'regular';
+ }
+
+ if ( jQuery( selector ).hasClass( 'select2-hidden-accessible' ) ) {
+ jQuery( selector ).selectWoo( 'destroy' );
+ jQuery( selector ).empty();
+ }
+
+ // Instantiate selectWoo with the data.
+ variantSelector = jQuery( selector ).selectWoo({
+ data: data
+ });
+ variantSelector.val( value.variant ).trigger( 'change' );
+ variantSelector.on( 'change', function() {
+ control.saveValue( 'variant', jQuery( this ).val() );
+
+ fontWeight = ( ! _.isString( value.variant ) ) ? '400' : value.variant.match( /\d/g );
+ fontWeight = ( ! _.isObject( fontWeight ) ) ? '400' : fontWeight.join( '' );
+ fontStyle = ( -1 !== value.variant.indexOf( 'italic' ) ) ? 'italic' : 'normal';
+
+ control.saveValue( 'font-weight', fontWeight );
+ control.saveValue( 'font-style', fontStyle );
+ });
+ } else {
+ jQuery( control.selector + ' .variant' ).hide();
+ }
+ },
+
+ /**
+ * Renders the subsets selector using selectWoo
+ * Displays font-subsets for the currently selected font-family.
+ */
+ renderSubsetSelector: function() {
+
+ var control = this,
+ value = control.getValue(),
+ fontFamily = value['font-family'],
+ subsets = control.getSubsets( fontFamily ),
+ selector = control.selector + ' .subsets select',
+ data = [],
+ validValue = value.subsets,
+ subsetSelector;
+
+ if ( false !== subsets ) {
+ jQuery( control.selector + ' .subsets' ).show();
+ _.each( subsets, function( subset ) {
+
+ if ( _.isObject( validValue ) ) {
+ if ( -1 === validValue.indexOf( subset.id ) ) {
+ validValue = _.reject( validValue, function( subValue ) {
+ return subValue === subset.id;
+ });
+ }
+ }
+
+ data.push({
+ id: subset.id,
+ text: subset.label
+ });
+ });
+
+ } else {
+ jQuery( control.selector + ' .subsets' ).hide();
+ }
+
+ if ( jQuery( selector ).hasClass( 'select2-hidden-accessible' ) ) {
+ jQuery( selector ).selectWoo( 'destroy' );
+ jQuery( selector ).empty();
+ }
+
+ // Instantiate selectWoo with the data.
+ subsetSelector = jQuery( selector ).selectWoo({
+ data: data
+ });
+ subsetSelector.val( validValue ).trigger( 'change' );
+ subsetSelector.on( 'change', function() {
+ control.saveValue( 'subsets', jQuery( this ).val() );
+ });
+ },
+
+ /**
+ * Get fonts.
+ */
+ getFonts: function() {
+ var control = this;
+
+ if ( ! _.isUndefined( window[ 'kirkiFonts' + control.id ] ) ) {
+ return window[ 'kirkiFonts' + control.id ];
+ }
+ if ( 'undefined' !== typeof kirkiAllFonts ) {
+ return kirkiAllFonts;
+ }
+ return {
+ google: [],
+ standard: []
+ };
+ },
+
+ /**
+ * Get variants for a font-family.
+ */
+ getVariants: function( fontFamily ) {
+ var control = this,
+ fonts = control.getFonts();
+
+ var variants = false;
+ _.each( fonts.standard, function( font ) {
+ if ( fontFamily && font.family === fontFamily.replace( /'/g, '"' ) ) {
+ variants = font.variants;
+ return font.variants;
+ }
+ });
+
+ _.each( fonts.google, function( font ) {
+ if ( font.family === fontFamily ) {
+ variants = font.variants;
+ return font.variants;
+ }
+ });
+ return variants;
+ },
+
+ /**
+ * Get subsets for a font-family.
+ */
+ getSubsets: function( fontFamily ) {
+
+ var control = this,
+ subsets = false,
+ fonts = control.getFonts();
+
+ _.each( fonts.google, function( font ) {
+ if ( font.family === fontFamily ) {
+ subsets = font.subsets;
+ }
+ });
+ return subsets;
+ },
+
+ /**
+ * Gets the value.
+ */
+ getValue: function() {
+
+ 'use strict';
+
+ var control = this,
+ input = control.container.find( '.typography-hidden-value' ),
+ valueJSON = jQuery( input ).val();
+
+ return JSON.parse( valueJSON );
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ 'use strict';
+
+ var control = this,
+ input = control.container.find( '.typography-hidden-value' ),
+ valueJSON = jQuery( input ).val(),
+ valueObj = JSON.parse( valueJSON );
+
+ valueObj[ property ] = value;
+ wp.customize.control( control.id ).setting.set( valueObj );
+ jQuery( input ).attr( 'value', JSON.stringify( valueObj ) ).trigger( 'change' );
+ }
+});
diff --git a/functions/kirki/controls/js/dist/script-legacy.min.js b/functions/kirki/controls/js/dist/script-legacy.min.js
new file mode 100644
index 0000000..92cc4f7
--- /dev/null
+++ b/functions/kirki/controls/js/dist/script-legacy.min.js
@@ -0,0 +1 @@
+if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};(kirki={initialized:!1,initialize:function(){this.initialized||(setTimeout(function(){kirki.util.webfonts.standard.initialize(),kirki.util.webfonts.google.initialize()},150),this.initialized=!0)}}).initialize();var kirki=kirki||{};kirki=(kirki=jQuery.extend(kirki,{control:{"kirki-code":{},"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){var t=wp.template("kirki-input-radio");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){var t=wp.template("kirki-input-color");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t,i={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};if(!_.isUndefined(e.params)&&!_.isUndefined(e.params.choices)&&!_.isUndefined(e.params.choices.element)&&"textarea"===e.params.choices.element)return t=wp.template("kirki-input-textarea"),void e.container.html(t(i));t=wp.template("kirki-input-generic"),e.container.html(t(i))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t=wp.template("kirki-input-select");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id),multiple:e.params.multiple||1}))}}}}))||{},kirki=(kirki=jQuery.extend(kirki,{input:{radio:{init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){kirki.setting.set(e.id,"")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"]'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+" "),e.description&&(i+=''+e.description+" "),i+="",i+='",''+i+"
"},init:function(e){}}}}))||{},kirki=(kirki=jQuery.extend(kirki,{setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),i.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),i.params.content.attr("class","customize-control customize-control-"+i.params.type)),this.propertyElements=[],wp.customize.Control.prototype.initialize.call(this,e,i)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},focus:function(e){this.actuallyEmbed(),wp.customize.Control.prototype.focus.call(this,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i;return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||("auto"===e||"inherit"===e||"initial"===e||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"])))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),s=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(s=r.toJSON().sizes.thumbnail.url):s=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},getValue:function(){var e=this,t={};return _.each(e.params.default,function(i,n){!1!==i&&(t[n]=i,_.isUndefined(e.setting._value[n])||(t[n]=e.setting._value[n]))}),_.each(e.setting._value,function(e,i){_.isUndefined(t[i])&&(t[i]=e)}),t},saveValue:function(e,t){"use strict";var i=jQuery("#customize-control-"+this.id.replace("[","-").replace("]","")+" .background-hidden-value"),n=jQuery(i).val(),a=JSON.parse(n);a[e]=t,this.setting.set(a),jQuery(i).attr("value",JSON.stringify(a)).trigger("change")}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(this.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(this.id,{section:this.params.section,priority:this.params.priority,label:this.params.label,editor_settings:{codemirror:{mode:this.params.choices.language}},settings:{default:this.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(this.id,{section:this.params.section,priority:this.params.priority,label:this.params.label,description:this.params.description,settings:{default:this.id},default:this.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this.params.choices.controls,i={},n=[];for(_.each(t,function(e,t){!0===e&&n.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),s=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html(' ')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),o=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(o=t.toJSON().sizes.thumbnail.url):o=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),r.length&&(r.show(),s.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(' '),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this.setting._value;return"array"===(_.isUndefined(this.params.choices)||_.isUndefined(this.params.choices.save_as)?"url":this.params.choices.save_as)&&_.isString(e)&&(e={url:e}),e},saveValue:function(e,t){var i=this.setting._value;if("array"===(_.isUndefined(this.params.choices)||_.isUndefined(this.params.choices.save_as)?"url":this.params.choices.save_as))return _.isString(i)&&(i={}),i[e]=t,this.setting.set(i),void this.container.find("button").trigger("change");this.setting.set(t),this.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";function e(e,t,i){var a=e.container.find(".multicolor-index-"+i),s={target:r[0],change:function(){setTimeout(function(){e.saveValue(i,a.val()),e.container.find(".multicolor-index-"+i).trigger("change")},100)}};_.isObject(n.irisArgs)&&_.each(n.irisArgs,function(e,t){s[t]=e}),a.wpColorPicker(s)}for(var t,i,n=this.params.choices,a=Object.keys(n),r=(this.params.value,this.container.find(".iris-target")),s=0;sn.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+" "),n.params.description&&(r+=''+n.params.description+" "),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){return _.template(i.container.find(".customize-control-repeater-content").first().html(),null,e)(t)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&["width","height","flex_width","flex_height"].forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:t}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),s=!!parseInt(r.params.flex_width,10),o=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(s,o,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===o&&!1===s&&(a.aspectRatio=u+":"+d),!1===o&&(a.maxHeight=d),!1===s&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html(' ').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+" ").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),s=this.getValue(),o={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n].default);return s[this.currentIndex]=o,this.setValue(s,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,s;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],s=this.getValue(),n=jQuery(n),_.isUndefined(s[r.rowIndex][i])||(s[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(s,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),s={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(s.maximumSelectionLength=n),(t=t||{})[i]=t[i]||"",jQuery(r).selectWoo(s).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||e.push(jQuery(this).data("value"))}),this.setting.set(e)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t=this,i=t.getValue();t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],s=t.getValue(),o=t.getFonts();_.isUndefined(o.standard)||_.each(o.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(o.standard)||_.each(o.google,function(e){r.push({id:e.family,text:e.label})}),n=[{text:"Standard Fonts",children:a},{text:"Google Fonts",children:r}],e=jQuery(i).selectWoo({data:n}),s["font-family"]&&e.val(s["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.getValue(),r=a["font-family"],s=t.getVariants(r),o=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),!1!==s?jQuery(t.selector+" .font-backup").show():jQuery(t.selector+" .font-backup").hide(),_.isUndefined(o.standard)||_.each(o.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})},renderVariantSelector:function(){var e,t,i,n=this,a=n.getValue(),r=a["font-family"],s=n.getVariants(r),o=n.selector+" .variant select",c=[],l=!1;!1!==s?(jQuery(n.selector+" .variant").show(),_.each(s,function(e){a.variant===e.id&&(l=!0),c.push({id:e.id,text:e.label})}),l||(a.variant="regular"),jQuery(o).hasClass("select2-hidden-accessible")&&(jQuery(o).selectWoo("destroy"),jQuery(o).empty()),(t=jQuery(o).selectWoo({data:c})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})):jQuery(n.selector+" .variant").hide()},renderSubsetSelector:function(){var e,t=this,i=t.getValue(),n=i["font-family"],a=t.getSubsets(n),r=t.selector+" .subsets select",s=[],o=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(o)&&-1===o.indexOf(e.id)&&(o=_.reject(o,function(t){return t===e.id})),s.push({id:e.id,text:e.label})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:s})).val(o).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){return _.isUndefined(window["kirkiFonts"+this.id])?"undefined"!=typeof kirkiAllFonts?kirkiAllFonts:{google:[],standard:[]}:window["kirkiFonts"+this.id]},getVariants:function(e){var t=this.getFonts(),i=!1;return _.each(t.standard,function(t){if(e&&t.family===e.replace(/'/g,'"'))return i=t.variants,t.variants}),_.each(t.google,function(t){if(t.family===e)return i=t.variants,t.variants}),i},getSubsets:function(e){var t=!1,i=this.getFonts();return _.each(i.google,function(i){i.family===e&&(t=i.subsets)}),t},getValue:function(){"use strict";var e=this.container.find(".typography-hidden-value"),t=jQuery(e).val();return JSON.parse(t)},saveValue:function(e,t){"use strict";var i=this.container.find(".typography-hidden-value"),n=jQuery(i).val(),a=JSON.parse(n);a[e]=t,wp.customize.control(this.id).setting.set(a),jQuery(i).attr("value",JSON.stringify(a)).trigger("change")}});
\ No newline at end of file
diff --git a/functions/kirki/controls/js/dist/script.js b/functions/kirki/controls/js/dist/script.js
new file mode 100644
index 0000000..847027a
--- /dev/null
+++ b/functions/kirki/controls/js/dist/script.js
@@ -0,0 +1,3639 @@
+/* jshint -W079 */
+/* jshint unused:false */
+if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
+ var kirkiSetSettingValue = { // jscs:ignore requireVarDeclFirst
+
+ /**
+ * Set the value of the control.
+ *
+ * @since 3.0.0
+ * @param string setting The setting-ID.
+ * @param mixed value The value.
+ */
+ set: function( setting, value ) {
+
+ /**
+ * Get the control of the sub-setting.
+ * This will be used to get properties we need from that control,
+ * and determine if we need to do any further work based on those.
+ */
+ var $this = this,
+ subControl = wp.customize.settings.controls[ setting ],
+ valueJSON;
+
+ // If the control doesn't exist then return.
+ if ( _.isUndefined( subControl ) ) {
+ return true;
+ }
+
+ // First set the value in the wp object. The control type doesn't matter here.
+ $this.setValue( setting, value );
+
+ // Process visually changing the value based on the control type.
+ switch ( subControl.type ) {
+
+ case 'kirki-background':
+ if ( ! _.isUndefined( value['background-color'] ) ) {
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value['background-color'] );
+ }
+ $this.findElement( setting, '.placeholder, .thumbnail' ).removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ _.each( ['background-repeat', 'background-position'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ $this.setSelectWoo( $this.findElement( setting, '.' + subVal + ' select' ), value[ subVal ] );
+ }
+ });
+ _.each( ['background-size', 'background-attachment'], function( subVal ) {
+ jQuery( $this.findElement( setting, '.' + subVal + ' input[value="' + value + '"]' ) ).prop( 'checked', true );
+ });
+ valueJSON = JSON.stringify( value ).replace( /'/g, ''' );
+ jQuery( $this.findElement( setting, '.background-hidden-value' ).attr( 'value', valueJSON ) ).trigger( 'change' );
+ break;
+
+ case 'kirki-code':
+ jQuery( $this.findElement( setting, '.CodeMirror' ) )[0].CodeMirror.setValue( value );
+ break;
+
+ case 'checkbox':
+ case 'kirki-switch':
+ case 'kirki-toggle':
+ value = ( 1 === value || '1' === value || true === value ) ? true : false;
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'checked', value );
+ wp.customize.instance( setting ).set( value );
+ break;
+
+ case 'kirki-select':
+ case 'kirki-preset':
+ case 'kirki-fontawesome':
+ $this.setSelectWoo( $this.findElement( setting, 'select' ), value );
+ break;
+
+ case 'kirki-slider':
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'value', value );
+ jQuery( $this.findElement( setting, '.kirki_range_value .value' ) ).html( value );
+ break;
+
+ case 'kirki-generic':
+ if ( _.isUndefined( subControl.choices ) || _.isUndefined( subControl.choices.element ) ) {
+ subControl.choices.element = 'input';
+ }
+ jQuery( $this.findElement( setting, subControl.choices.element ) ).prop( 'value', value );
+ break;
+
+ case 'kirki-color':
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value );
+ break;
+
+ case 'kirki-multicheck':
+ $this.findElement( setting, 'input' ).each( function() {
+ jQuery( this ).prop( 'checked', false );
+ });
+ _.each( value, function( subValue, i ) {
+ jQuery( $this.findElement( setting, 'input[value="' + value[ i ] + '"]' ) ).prop( 'checked', true );
+ });
+ break;
+
+ case 'kirki-multicolor':
+ _.each( value, function( subVal, index ) {
+ $this.setColorPicker( $this.findElement( setting, '.multicolor-index-' + index ), subVal );
+ });
+ break;
+
+ case 'kirki-radio-buttonset':
+ case 'kirki-radio-image':
+ case 'kirki-radio':
+ case 'kirki-dashicons':
+ case 'kirki-color-palette':
+ case 'kirki-palette':
+ jQuery( $this.findElement( setting, 'input[value="' + value + '"]' ) ).prop( 'checked', true );
+ break;
+
+ case 'kirki-typography':
+ _.each( ['font-family', 'variant', 'subsets'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ $this.setSelectWoo( $this.findElement( setting, '.' + subVal + ' select' ), value[ subVal ] );
+ }
+ });
+ _.each( ['font-size', 'line-height', 'letter-spacing', 'word-spacing'], function( subVal ) {
+ if ( ! _.isUndefined( value[ subVal ] ) ) {
+ jQuery( $this.findElement( setting, '.' + subVal + ' input' ) ).prop( 'value', value[ subVal ] );
+ }
+ });
+
+ if ( ! _.isUndefined( value.color ) ) {
+ $this.setColorPicker( $this.findElement( setting, '.kirki-color-control' ), value.color );
+ }
+ valueJSON = JSON.stringify( value ).replace( /'/g, ''' );
+ jQuery( $this.findElement( setting, '.typography-hidden-value' ).attr( 'value', valueJSON ) ).trigger( 'change' );
+ break;
+
+ case 'kirki-dimensions':
+ _.each( value, function( subValue, id ) {
+ jQuery( $this.findElement( setting, '.' + id + ' input' ) ).prop( 'value', subValue );
+ });
+ break;
+
+ case 'kirki-repeater':
+
+ // Not yet implemented.
+ break;
+
+ case 'kirki-custom':
+
+ // Do nothing.
+ break;
+ default:
+ jQuery( $this.findElement( setting, 'input' ) ).prop( 'value', value );
+ }
+ },
+
+ /**
+ * Set the value for colorpickers.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param object selector jQuery object for this element.
+ * @param string value The value we want to set.
+ */
+ setColorPicker: function( selector, value ) {
+ selector.attr( 'data-default-color', value ).data( 'default-color', value ).wpColorPicker( 'color', value );
+ },
+
+ /**
+ * Sets the value in a selectWoo element.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param string selector The CSS identifier for this selectWoo.
+ * @param string value The value we want to set.
+ */
+ setSelectWoo: function( selector, value ) {
+ jQuery( selector ).selectWoo().val( value ).trigger( 'change' );
+ },
+
+ /**
+ * Sets the value in textarea elements.
+ * CAUTION: This only sets the value visually, it does not change it in th wp object.
+ *
+ * @since 3.0.0
+ * @param string selector The CSS identifier for this textarea.
+ * @param string value The value we want to set.
+ */
+ setTextarea: function( selector, value ) {
+ jQuery( selector ).prop( 'value', value );
+ },
+
+ /**
+ * Finds an element inside this control.
+ *
+ * @since 3.0.0
+ * @param string setting The setting ID.
+ * @param string element The CSS identifier.
+ */
+ findElement: function( setting, element ) {
+ return wp.customize.control( setting ).container.find( element );
+ },
+
+ /**
+ * Updates the value in the wp.customize object.
+ *
+ * @since 3.0.0
+ * @param string setting The setting-ID.
+ * @param mixed value The value.
+ */
+ setValue: function( setting, value, timeout ) {
+ timeout = ( _.isUndefined( timeout ) ) ? 100 : parseInt( timeout, 10 );
+ wp.customize.instance( setting ).set({});
+ setTimeout( function() {
+ wp.customize.instance( setting ).set( value );
+ }, timeout );
+ }
+ };
+}
+var kirki = {
+
+ initialized: false,
+
+ /**
+ * Initialize the object.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ // We only need to initialize once.
+ if ( self.initialized ) {
+ return;
+ }
+
+ setTimeout( function() {
+ kirki.util.webfonts.standard.initialize();
+ kirki.util.webfonts.google.initialize();
+ }, 150 );
+
+ // Mark as initialized.
+ self.initialized = true;
+ }
+};
+
+// Initialize the kirki object.
+kirki.initialize();
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+
+ /**
+ * An object containing definitions for controls.
+ *
+ * @since 3.0.16
+ */
+ control: {
+
+ /**
+ * The code control.
+ *
+ * @since 3.0.18
+ */
+ 'kirki-code': {
+
+ },
+
+ /**
+ * The radio control.
+ *
+ * @since 3.0.17
+ */
+ 'kirki-radio': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.radio.init( control );
+
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-radio' );
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ 'default': control.params['default'],
+ value: kirki.setting.get( control.id ),
+ choices: control.params.choices
+ } ) );
+ }
+ },
+
+ /**
+ * The color control.
+ *
+ * @since 3.0.16
+ */
+ 'kirki-color': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.color.init( control );
+
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.mode - The colorpicker mode. Can be 'full' or 'hue'.
+ * @param {bool|array} control.params.palette - false if we don't want a palette,
+ * true to use the default palette,
+ * array of custom hex colors if we want a custom palette.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-color' );
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ mode: control.params.mode,
+ inputAttrs: control.params.inputAttrs,
+ 'data-palette': control.params.palette,
+ 'data-default-color': control.params['default'],
+ 'data-alpha': control.params.choices.alpha,
+ value: kirki.setting.get( control.id )
+ } ) );
+ }
+ },
+
+ /**
+ * The generic control.
+ *
+ * @since 3.0.16
+ */
+ 'kirki-generic': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - Control parameters.
+ * @param {Object} control.params.choices - Define the specifics for this input.
+ * @param {string} control.params.choices.element - The HTML element we want to use ('input', 'div', 'span' etc).
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
+ kirki.input.textarea.init( control );
+ return;
+ }
+ kirki.input.genericInput.init( control );
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {string} control.params.default - The default value.
+ * @param {Object} control.params.choices - Any extra choices we may need.
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var args = {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ choices: control.params.choices,
+ value: kirki.setting.get( control.id )
+ },
+ template;
+
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
+ template = wp.template( 'kirki-input-textarea' );
+ control.container.html( template( args ) );
+ return;
+ }
+ template = wp.template( 'kirki-input-generic' );
+ control.container.html( template( args ) );
+ }
+ },
+
+ 'kirki-select': {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var self = this;
+
+ // Render the template.
+ self.template( control );
+
+ // Init the control.
+ kirki.input.select.init( control );
+ },
+
+ /**
+ * Render the template.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The customizer control object.
+ * @param {Object} control.params - The control parameters.
+ * @param {string} control.params.label - The control label.
+ * @param {string} control.params.description - The control description.
+ * @param {string} control.params.inputAttrs - extra input arguments.
+ * @param {Object} control.params.default - The default value.
+ * @param {Object} control.params.choices - The choices for the select dropdown.
+ * @param {string} control.id - The setting.
+ * @returns {null}
+ */
+ template: function( control ) {
+ var template = wp.template( 'kirki-input-select' );
+
+ control.container.html( template( {
+ label: control.params.label,
+ description: control.params.description,
+ 'data-id': control.id,
+ inputAttrs: control.params.inputAttrs,
+ choices: control.params.choices,
+ value: kirki.setting.get( control.id ),
+ multiple: control.params.multiple || 1
+ } ) );
+ }
+ }
+ }
+} );
+/* global kirkiL10n */
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * An object containing definitions for input fields.
+ *
+ * @since 3.0.16
+ */
+ input: {
+
+ /**
+ * Radio input fields.
+ *
+ * @since 3.0.17
+ */
+ radio: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
+
+ // Save the value
+ input.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ /**
+ * Color input fields.
+ *
+ * @since 3.0.16
+ */
+ color: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.16
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @param {Object} control.choices - Additional options for the colorpickers.
+ * @param {Object} control.params - Control parameters.
+ * @param {Object} control.params.choices - alias for control.choices.
+
+ * @returns {null}
+ */
+ init: function( control ) {
+ var picker = jQuery( '.kirki-color-control[data-id="' + control.id + '"]' ),
+ clear;
+
+ control.choices = control.choices || {};
+ if ( _.isEmpty( control.choices ) && control.params.choices ) {
+ control.choices = control.params.choices;
+ }
+
+ // If we have defined any extra choices, make sure they are passed-on to Iris.
+ if ( ! _.isEmpty( control.choices ) ) {
+ picker.wpColorPicker( control.choices );
+ }
+
+ // Tweaks to make the "clear" buttons work.
+ setTimeout( function() {
+ clear = jQuery( '.kirki-input-container[data-id="' + control.id + '"] .wp-picker-clear' );
+ if ( clear.length ) {
+ clear.click( function() {
+ kirki.setting.set( control.id, '' );
+ });
+ }
+ }, 200 );
+
+ // Saves our settings to the WP API
+ picker.wpColorPicker({
+ change: function() {
+
+ // Small hack: the picker needs a small delay
+ setTimeout( function() {
+ kirki.setting.set( control.id, picker.val() );
+ }, 20 );
+ }
+ });
+ }
+ },
+
+ /**
+ * Generic input fields.
+ *
+ * @since 3.0.17
+ */
+ genericInput: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
+
+ // Save the value
+ input.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ /**
+ * Generic input fields.
+ *
+ * @since 3.0.17
+ */
+ textarea: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var textarea = jQuery( 'textarea[data-id="' + control.id + '"]' );
+
+ // Save the value
+ textarea.on( 'change keyup paste click', function() {
+ kirki.setting.set( control.id, jQuery( this ).val() );
+ });
+ }
+ },
+
+ select: {
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @param {Object} control.id - The setting.
+ * @returns {null}
+ */
+ init: function( control ) {
+ var element = jQuery( 'select[data-id="' + control.id + '"]' ),
+ multiple = parseInt( element.data( 'multiple' ), 10 ),
+ selectValue,
+ selectWooOptions = {
+ escapeMarkup: function( markup ) {
+ return markup;
+ }
+ };
+
+ if ( 1 < multiple ) {
+ selectWooOptions.maximumSelectionLength = multiple;
+ }
+ jQuery( element ).selectWoo( selectWooOptions ).on( 'change', function() {
+ selectValue = jQuery( this ).val();
+ selectValue = ( null === selectValue && 1 < multiple ) ? [] : selectValue;
+ kirki.setting.set( control.id, selectValue );
+ });
+ }
+ },
+
+ image: {
+
+ /**
+ * Get the HTML for image inputs.
+ *
+ * @since 3.0.17
+ * @param {Object} data - The arguments.
+ * @returns {string}
+ */
+ getTemplate: function( data ) {
+ var html = '',
+ saveAs = 'url',
+ url;
+
+ data = _.defaults( data, {
+ label: '',
+ description: '',
+ inputAttrs: '',
+ 'data-id': '',
+ choices: {},
+ value: ''
+ } );
+
+ if ( ! _.isUndefined( data.choices ) && ! _.isUndefined( data.choices.save_as ) ) {
+ saveAs = data.choices.save_as;
+ }
+ url = data.value;
+ if ( _.isObject( data.value ) && ! _.isUndefined( data.value.url ) ) {
+ url = data.value.url;
+ }
+
+ html += '';
+ if ( data.label ) {
+ html += '' + data.label + ' ';
+ }
+ if ( data.description ) {
+ html += '' + data.description + ' ';
+ }
+ html += ' ';
+ html += '';
+
+ return '' + html + '
';
+ },
+
+ /**
+ * Init the control.
+ *
+ * @since 3.0.17
+ * @param {Object} control - The control object.
+ * @returns {null}
+ */
+ init: function( control ) { // jshint ignore:line
+ }
+ }
+ }
+} );
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * An object containing definitions for settings.
+ *
+ * @since 3.0.16
+ */
+ setting: {
+
+ /**
+ * Gets the value of a setting.
+ *
+ * This is a helper function that allows us to get the value of
+ * control[key1][key2] for example, when the setting used in the
+ * customizer API is "control".
+ *
+ * @since 3.0.16
+ * @param {string} setting - The setting for which we're getting the value.
+ * @returns {mixed} Depends on the value.
+ */
+ get: function( setting ) {
+ var parts = setting.split( '[' ),
+ foundSetting = '',
+ foundInStep = 0,
+ currentVal = '';
+
+ _.each( parts, function( part, i ) {
+ part = part.replace( ']', '' );
+
+ if ( 0 === i ) {
+ foundSetting = part;
+ } else {
+ foundSetting += '[' + part + ']';
+ }
+
+ if ( ! _.isUndefined( wp.customize.instance( foundSetting ) ) ) {
+ currentVal = wp.customize.instance( foundSetting ).get();
+ foundInStep = i;
+ }
+
+ if ( foundInStep < i ) {
+ if ( _.isObject( currentVal ) && ! _.isUndefined( currentVal[ part ] ) ) {
+ currentVal = currentVal[ part ];
+ }
+ }
+ });
+
+ return currentVal;
+ },
+
+ /**
+ * Sets the value of a setting.
+ *
+ * This function is a bit complicated because there any many scenarios to consider.
+ * Example: We want to save the value for my_setting[something][3][something-else].
+ * The control's setting is my_setting[something].
+ * So we need to find that first, then figure out the remaining parts,
+ * merge the values recursively to avoid destroying my_setting[something][2]
+ * and also take into account any defined "key" arguments which take this even deeper.
+ *
+ * @since 3.0.16
+ * @param {object|string} element - The DOM element whose value has changed,
+ * or an ID.
+ * @param {mixed} value - Depends on the control-type.
+ * @param {string} key - If we only want to save an item in an object
+ * we can define the key here.
+ * @returns {null}
+ */
+ set: function( element, value, key ) {
+ var setting,
+ parts,
+ currentNode = '',
+ foundNode = '',
+ subSettingObj = {},
+ currentVal,
+ subSetting,
+ subSettingParts;
+
+ // Get the setting from the element.
+ setting = element;
+ if ( _.isObject( element ) ) {
+ if ( jQuery( element ).attr( 'data-id' ) ) {
+ setting = element.attr( 'data-id' );
+ } else {
+ setting = element.parents( '[data-id]' ).attr( 'data-id' );
+ }
+ }
+
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
+ wp.customize.control( setting ).setting.set( value );
+ return;
+ }
+
+ parts = setting.split( '[' ),
+
+ // Find the setting we're using in the control using the customizer API.
+ _.each( parts, function( part, i ) {
+ part = part.replace( ']', '' );
+
+ // The current part of the setting.
+ currentNode = ( 0 === i ) ? part : '[' + part + ']';
+
+ // When we find the node, get the value from it.
+ // In case of an object we'll need to merge with current values.
+ if ( ! _.isUndefined( wp.customize.instance( currentNode ) ) ) {
+ foundNode = currentNode;
+ currentVal = wp.customize.instance( foundNode ).get();
+ }
+ } );
+
+ // Get the remaining part of the setting that was unused.
+ subSetting = setting.replace( foundNode, '' );
+
+ // If subSetting is not empty, then we're dealing with an object
+ // and we need to dig deeper and recursively merge the values.
+ if ( '' !== subSetting ) {
+ if ( ! _.isObject( currentVal ) ) {
+ currentVal = {};
+ }
+ if ( '[' === subSetting.charAt( 0 ) ) {
+ subSetting = subSetting.replace( '[', '' );
+ }
+ subSettingParts = subSetting.split( '[' );
+ _.each( subSettingParts, function( subSettingPart, i ) {
+ subSettingParts[ i ] = subSettingPart.replace( ']', '' );
+ } );
+
+ // If using a key, we need to go 1 level deeper.
+ if ( key ) {
+ subSettingParts.push( key );
+ }
+
+ // Converting to a JSON string and then parsing that to an object
+ // may seem a bit hacky and crude but it's efficient and works.
+ subSettingObj = '{"' + subSettingParts.join( '":{"' ) + '":"' + value + '"' + '}'.repeat( subSettingParts.length );
+ subSettingObj = JSON.parse( subSettingObj );
+
+ // Recursively merge with current value.
+ jQuery.extend( true, currentVal, subSettingObj );
+ value = currentVal;
+
+ } else {
+ if ( key ) {
+ currentVal = ( ! _.isObject( currentVal ) ) ? {} : currentVal;
+ currentVal[ key ] = value;
+ value = currentVal;
+ }
+ }
+ wp.customize.control( foundNode ).setting.set( value );
+ }
+ }
+} );
+/* global ajaxurl */
+var kirki = kirki || {};
+kirki = jQuery.extend( kirki, {
+ /**
+ * A collection of utility methods.
+ *
+ * @since 3.0.17
+ */
+ util: {
+
+ /**
+ * A collection of utility methods for webfonts.
+ *
+ * @since 3.0.17
+ */
+ webfonts: {
+
+ /**
+ * Google-fonts related methods.
+ *
+ * @since 3.0.17
+ */
+ google: {
+
+ /**
+ * An object containing all Google fonts.
+ *
+ * to set this call this.setFonts();
+ *
+ * @since 3.0.17
+ */
+ fonts: {},
+
+ /**
+ * Init for google-fonts.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ self.setFonts();
+ },
+
+ /**
+ * Set fonts in this.fonts
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ setFonts: function() {
+ var self = this;
+
+ // No need to run if we already have the fonts.
+ if ( ! _.isEmpty( self.fonts ) ) {
+ return;
+ }
+
+ // Make an AJAX call to set the fonts object (alpha).
+ jQuery.post( ajaxurl, { 'action': 'kirki_fonts_google_all_get' }, function( response ) {
+
+ // Get fonts from the JSON array.
+ self.fonts = JSON.parse( response );
+ } );
+ },
+
+ /**
+ * Gets all properties of a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Object}
+ */
+ getFont: function( family ) {
+ var self = this,
+ fonts = self.getFonts();
+
+ if ( 'undefined' === typeof fonts[ family ] ) {
+ return false;
+ }
+ return fonts[ family ];
+ },
+
+ /**
+ * Gets all properties of a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} order - How to order the fonts (alpha|popularity|trending).
+ * @param {int} number - How many to get. 0 for all.
+ * @returns {Object}
+ */
+ getFonts: function( order, number ) {
+ var self = this,
+ ordered = {},
+ partial = [];
+
+ // Make sure order is correct.
+ order = order || 'alpha';
+ order = ( 'alpha' !== order && 'popularity' !== order && 'trending' !== order ) ? 'alpha' : order;
+
+ // Make sure number is correct.
+ number = number || 0;
+ number = parseInt( number, 10 );
+
+ if ( 'alpha' === order || 0 === number ) {
+ ordered = self.fonts.items;
+ } else {
+ partial = _.first( self.fonts.order[ order ], number );
+ _.each( partial, function( family ) {
+ ordered[ family ] = self.fonts.items[ family ];
+ } );
+ }
+
+ return ordered;
+ },
+
+ /**
+ * Gets the variants for a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Array}
+ */
+ getVariants: function( family ) {
+ var self = this,
+ font = self.getFont( family );
+
+ // Early exit if font was not found.
+ if ( ! font ) {
+ return false;
+ }
+
+ // Early exit if font doesn't have variants.
+ if ( _.isUndefined( font.variants ) ) {
+ return false;
+ }
+
+ // Return the variants.
+ return font.variants;
+ },
+
+ /**
+ * Get the subsets for a font-family.
+ *
+ * @since 3.0.17
+ * @param {string} family - The font-family we're interested in.
+ * @returns {Object}
+ */
+ getSubsets: function( family ) {
+ var self = this,
+ font = self.getFont( family );
+
+ // Early exit if font was not found.
+ if ( ! font ) {
+ return false;
+ }
+
+ // Early exit if font doesn't have subsets.
+ if ( _.isUndefined( font.subsets ) ) {
+ return false;
+ }
+
+ // Return the variants.
+ return font.subsets;
+ }
+ },
+
+ /**
+ * Standard fonts related methods.
+ *
+ * @since 3.0.17
+ */
+ standard: {
+
+ /**
+ * An object containing all Standard fonts.
+ *
+ * to set this call this.setFonts();
+ *
+ * @since 3.0.17
+ */
+ fonts: {},
+
+ /**
+ * Init for google-fonts.
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ initialize: function() {
+ var self = this;
+
+ self.setFonts();
+ },
+
+ /**
+ * Set fonts in this.fonts
+ *
+ * @since 3.0.17
+ * @returns {null}
+ */
+ setFonts: function() {
+ var self = this;
+
+ // No need to run if we already have the fonts.
+ if ( ! _.isEmpty( self.fonts ) ) {
+ return;
+ }
+
+ // Make an AJAX call to set the fonts object.
+ jQuery.post( ajaxurl, { 'action': 'kirki_fonts_standard_all_get' }, function( response ) {
+
+ // Get fonts from the JSON array.
+ self.fonts = JSON.parse( response );
+ } );
+ },
+
+ /**
+ * Gets the variants for a font-family.
+ *
+ * @since 3.0.17
+ * @returns {Array}
+ */
+ getVariants: function( family ) { // jshint ignore: line
+ return ['regular', 'italic', '700', '700italic'];
+ }
+ },
+
+ /**
+ * Figure out what this font-family is (google/standard)
+ *
+ * @since 3.0.20
+ * @param {string} family - The font-family.
+ * @returns {string|false} - Returns string if found (google|standard)
+ * and false in case the font-family is an arbitrary value
+ * not found anywhere in our font definitions.
+ */
+ getFontType: function( family ) {
+ var self = this;
+
+ // Check for standard fonts first.
+ if (
+ 'undefined' !== typeof self.standard.fonts[ family ] || (
+ 'undefined' !== typeof self.standard.fonts.stack &&
+ 'undefined' !== typeof self.standard.fonts.stack[ family ]
+ )
+ ) {
+ return 'standard';
+ }
+
+ // Check in googlefonts.
+ if ( 'undefined' !== typeof self.google.fonts.items[ family ] ) {
+ return 'google';
+ }
+ return false;
+ }
+ }
+ }
+} );
+/* global kirki */
+/**
+ * The majority of the code in this file
+ * is derived from the wp-customize-posts plugin
+ * and the work of @westonruter to whom I am very grateful.
+ *
+ * @see https://github.com/xwp/wp-customize-posts
+ */
+
+( function() {
+ 'use strict';
+
+ /**
+ * A dynamic color-alpha control.
+ *
+ * @class
+ * @augments wp.customize.Control
+ * @augments wp.customize.Class
+ */
+ wp.customize.kirkiDynamicControl = wp.customize.Control.extend({
+
+ initialize: function( id, options ) {
+ var control = this,
+ args = options || {};
+
+ args.params = args.params || {};
+ if ( ! args.params.type ) {
+ args.params.type = 'kirki-generic';
+ }
+ if ( ! args.params.content ) {
+ args.params.content = jQuery( ' ' );
+ args.params.content.attr( 'id', 'customize-control-' + id.replace( /]/g, '' ).replace( /\[/g, '-' ) );
+ args.params.content.attr( 'class', 'customize-control customize-control-' + args.params.type );
+ }
+
+ control.propertyElements = [];
+ wp.customize.Control.prototype.initialize.call( control, id, args );
+ },
+
+ /**
+ * Add bidirectional data binding links between inputs and the setting(s).
+ *
+ * This is copied from wp.customize.Control.prototype.initialize(). It
+ * should be changed in Core to be applied once the control is embedded.
+ *
+ * @private
+ * @returns {null}
+ */
+ _setUpSettingRootLinks: function() {
+ var control = this,
+ nodes = control.container.find( '[data-customize-setting-link]' );
+
+ nodes.each( function() {
+ var node = jQuery( this );
+
+ wp.customize( node.data( 'customizeSettingLink' ), function( setting ) {
+ var element = new wp.customize.Element( node );
+ control.elements.push( element );
+ element.sync( setting );
+ element.set( setting() );
+ });
+ });
+ },
+
+ /**
+ * Add bidirectional data binding links between inputs and the setting properties.
+ *
+ * @private
+ * @returns {null}
+ */
+ _setUpSettingPropertyLinks: function() {
+ var control = this,
+ nodes;
+
+ if ( ! control.setting ) {
+ return;
+ }
+
+ nodes = control.container.find( '[data-customize-setting-property-link]' );
+
+ nodes.each( function() {
+ var node = jQuery( this ),
+ element,
+ propertyName = node.data( 'customizeSettingPropertyLink' );
+
+ element = new wp.customize.Element( node );
+ control.propertyElements.push( element );
+ element.set( control.setting()[ propertyName ] );
+
+ element.bind( function( newPropertyValue ) {
+ var newSetting = control.setting();
+ if ( newPropertyValue === newSetting[ propertyName ] ) {
+ return;
+ }
+ newSetting = _.clone( newSetting );
+ newSetting[ propertyName ] = newPropertyValue;
+ control.setting.set( newSetting );
+ } );
+ control.setting.bind( function( newValue ) {
+ if ( newValue[ propertyName ] !== element.get() ) {
+ element.set( newValue[ propertyName ] );
+ }
+ } );
+ });
+ },
+
+ /**
+ * @inheritdoc
+ */
+ ready: function() {
+ var control = this;
+
+ control._setUpSettingRootLinks();
+ control._setUpSettingPropertyLinks();
+
+ wp.customize.Control.prototype.ready.call( control );
+
+ control.deferred.embedded.done( function() {
+ control.initKirkiControl( control );
+ });
+ },
+
+ /**
+ * Embed the control in the document.
+ *
+ * Override the embed() method to do nothing,
+ * so that the control isn't embedded on load,
+ * unless the containing section is already expanded.
+ *
+ * @returns {null}
+ */
+ embed: function() {
+ var control = this,
+ sectionId = control.section();
+
+ if ( ! sectionId ) {
+ return;
+ }
+
+ wp.customize.section( sectionId, function( section ) {
+ if ( 'kirki-expanded' === section.params.type || section.expanded() || wp.customize.settings.autofocus.control === control.id ) {
+ control.actuallyEmbed();
+ } else {
+ section.expanded.bind( function( expanded ) {
+ if ( expanded ) {
+ control.actuallyEmbed();
+ }
+ } );
+ }
+ } );
+ },
+
+ /**
+ * Deferred embedding of control when actually
+ *
+ * This function is called in Section.onChangeExpanded() so the control
+ * will only get embedded when the Section is first expanded.
+ *
+ * @returns {null}
+ */
+ actuallyEmbed: function() {
+ var control = this;
+ if ( 'resolved' === control.deferred.embedded.state() ) {
+ return;
+ }
+ control.renderContent();
+ control.deferred.embedded.resolve(); // This triggers control.ready().
+ },
+
+ /**
+ * This is not working with autofocus.
+ *
+ * @param {object} [args] Args.
+ * @returns {null}
+ */
+ focus: function( args ) {
+ var control = this;
+ control.actuallyEmbed();
+ wp.customize.Control.prototype.focus.call( control, args );
+ },
+
+ /**
+ * Additional actions that run on ready.
+ *
+ * @param {object} [args] Args.
+ * @returns {null}
+ */
+ initKirkiControl: function( control ) {
+ if ( 'undefined' !== typeof kirki.control[ control.params.type ] ) {
+ kirki.control[ control.params.type ].init( control );
+ return;
+ }
+
+ // Save the value
+ this.container.on( 'change keyup paste click', 'input', function() {
+ control.setting.set( jQuery( this ).val() );
+ });
+ },
+
+ kirkiValidateCSSValue: function( value ) {
+
+ var validUnits = ['rem', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vh', 'vw', 'vmin', 'vmax'],
+ numericValue,
+ unit;
+
+ // 0 is always a valid value, and we can't check calc() values effectively.
+ if ( '0' === value || ( 0 <= value.indexOf( 'calc(' ) && 0 <= value.indexOf( ')' ) ) ) {
+ return true;
+ }
+
+ if ( 'auto' === value || 'inherit' === value || 'initial' === value ) {
+ return true;
+ }
+
+ // Get the numeric value.
+ numericValue = parseFloat( value );
+
+ // Get the unit
+ unit = value.replace( numericValue, '' );
+
+ // Check the validity of the numeric value and units.
+ if ( isNaN( numericValue ) || -1 === jQuery.inArray( unit, validUnits ) ) {
+ return false;
+ }
+ return true;
+ }
+ });
+})();
+
+_.each( kirki.control, function( obj, type ) {
+ wp.customize.controlConstructor[ type ] = wp.customize.kirkiDynamicControl.extend({});
+} );
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.setting._value,
+ picker = control.container.find( '.kirki-color-control' );
+
+ // Hide unnecessary controls if the value doesn't have an image.
+ if ( _.isUndefined( value['background-image'] ) || '' === value['background-image'] ) {
+ control.container.find( '.background-wrapper > .background-repeat' ).hide();
+ control.container.find( '.background-wrapper > .background-position' ).hide();
+ control.container.find( '.background-wrapper > .background-size' ).hide();
+ control.container.find( '.background-wrapper > .background-attachment' ).hide();
+ }
+
+ // Color.
+ picker.wpColorPicker({
+ change: function() {
+ setTimeout( function() {
+ control.saveValue( 'background-color', picker.val() );
+ }, 100 );
+ }
+ });
+
+ // Background-Repeat.
+ control.container.on( 'change', '.background-repeat select', function() {
+ control.saveValue( 'background-repeat', jQuery( this ).val() );
+ });
+
+ // Background-Size.
+ control.container.on( 'change click', '.background-size input', function() {
+ control.saveValue( 'background-size', jQuery( this ).val() );
+ });
+
+ // Background-Position.
+ control.container.on( 'change', '.background-position select', function() {
+ control.saveValue( 'background-position', jQuery( this ).val() );
+ });
+
+ // Background-Attachment.
+ control.container.on( 'change click', '.background-attachment input', function() {
+ control.saveValue( 'background-attachment', jQuery( this ).val() );
+ });
+
+ // Background-Image.
+ control.container.on( 'click', '.background-image-upload-button', function( e ) {
+ var image = wp.media({ multiple: false }).open().on( 'select', function() {
+
+ // This will return the selected image from the Media Uploader, the result is an object.
+ var uploadedImage = image.state().get( 'selection' ).first(),
+ previewImage = uploadedImage.toJSON().sizes.full.url,
+ imageUrl,
+ imageID,
+ imageWidth,
+ imageHeight,
+ preview,
+ removeButton;
+
+ if ( ! _.isUndefined( uploadedImage.toJSON().sizes.medium ) ) {
+ previewImage = uploadedImage.toJSON().sizes.medium.url;
+ } else if ( ! _.isUndefined( uploadedImage.toJSON().sizes.thumbnail ) ) {
+ previewImage = uploadedImage.toJSON().sizes.thumbnail.url;
+ }
+
+ imageUrl = uploadedImage.toJSON().sizes.full.url;
+ imageID = uploadedImage.toJSON().id;
+ imageWidth = uploadedImage.toJSON().width;
+ imageHeight = uploadedImage.toJSON().height;
+
+ // Show extra controls if the value has an image.
+ if ( '' !== imageUrl ) {
+ control.container.find( '.background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment' ).show();
+ }
+
+ control.saveValue( 'background-image', imageUrl );
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.background-image-upload-remove-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ }
+ });
+
+ e.preventDefault();
+ });
+
+ control.container.on( 'click', '.background-image-upload-remove-button', function( e ) {
+
+ var preview,
+ removeButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'background-image', '' );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.background-image-upload-remove-button' );
+
+ // Hide unnecessary controls.
+ control.container.find( '.background-wrapper > .background-repeat' ).hide();
+ control.container.find( '.background-wrapper > .background-position' ).hide();
+ control.container.find( '.background-wrapper > .background-size' ).hide();
+ control.container.find( '.background-wrapper > .background-attachment' ).hide();
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ }
+ if ( removeButton.length ) {
+ removeButton.hide();
+ }
+ });
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ var control = this,
+ input = jQuery( '#customize-control-' + control.id.replace( '[', '-' ).replace( ']', '' ) + ' .background-hidden-value' ),
+ val = control.setting._value;
+
+ val[ property ] = value;
+
+ jQuery( input ).attr( 'value', JSON.stringify( val ) ).trigger( 'change' );
+ control.setting.set( val );
+ }
+});
+wp.customize.controlConstructor['kirki-code'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Early exit if wp.customize.CodeEditorControl is not available.
+ if ( _.isUndefined( wp.customize.CodeEditorControl ) ) {
+ return;
+ }
+
+ // Hide the textarea.
+ jQuery( control.container.find( 'textarea.kirki-codemirror-editor' ) ).hide();
+
+ // Add the control.
+ wp.customize.control.add( new wp.customize.CodeEditorControl( control.id, {
+ section: control.params.section,
+ priority: control.params.priority,
+ label: control.params.label,
+ editor_settings: {
+ codemirror: {
+ mode: control.params.choices.language
+ }
+ },
+ settings: { 'default': control.id }
+ } ) );
+ }
+});
+wp.customize.controlConstructor['kirki-color-palette'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-dashicons'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-date'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Only add in WP 4.9+.
+ if ( _.isUndefined( wp.customize.DateTimeControl ) ) {
+ return;
+ }
+
+ // New method for the DateTime control.
+ wp.customize.control.add( new wp.customize.DateTimeControl( control.id, {
+ section: control.params.section,
+ priority: control.params.priority,
+ label: control.params.label,
+ description: control.params.description,
+ settings: { 'default': control.id },
+ 'default': control.params['default']
+ } ) );
+ }
+});
+/* global dimensionkirkiL10n */
+wp.customize.controlConstructor['kirki-dimension'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value;
+
+ // Notifications.
+ control.kirkiNotifications();
+
+ // Save the value
+ this.container.on( 'change keyup paste', 'input', function() {
+
+ value = jQuery( this ).val();
+ control.setting.set( value );
+ });
+ },
+
+ /**
+ * Handles notifications.
+ */
+ kirkiNotifications: function() {
+
+ var control = this;
+
+ wp.customize( control.id, function( setting ) {
+ setting.bind( function( value ) {
+ var code = 'long_title';
+
+ if ( false === control.kirkiValidateCSSValue( value ) ) {
+ setting.notifications.add( code, new wp.customize.Notification(
+ code,
+ {
+ type: 'warning',
+ message: dimensionkirkiL10n['invalid-value']
+ }
+ ) );
+ } else {
+ setting.notifications.remove( code );
+ }
+ } );
+ } );
+ }
+});
+/* global dimensionskirkiL10n */
+wp.customize.controlConstructor['kirki-dimensions'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ subControls = control.params.choices.controls,
+ value = {},
+ subsArray = [],
+ i;
+
+ _.each( subControls, function( v, i ) {
+ if ( true === v ) {
+ subsArray.push( i );
+ }
+ } );
+
+ for ( i = 0; i < subsArray.length; i++ ) {
+ value[ subsArray[ i ] ] = control.setting._value[ subsArray[ i ] ];
+ control.updateDimensionsValue( subsArray[ i ], value );
+ }
+ },
+
+ /**
+ * Updates the value.
+ */
+ updateDimensionsValue: function( context, value ) {
+
+ var control = this;
+
+ control.container.on( 'change keyup paste', '.' + context + ' input', function() {
+ value[ context ] = jQuery( this ).val();
+
+ // Notifications.
+ control.kirkiNotifications();
+
+ // Save the value
+ control.saveValue( value );
+ });
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( value ) {
+
+ var control = this,
+ newValue = {};
+
+ _.each( value, function( newSubValue, i ) {
+ newValue[ i ] = newSubValue;
+ });
+
+ control.setting.set( newValue );
+ },
+
+ /**
+ * Handles notifications.
+ */
+ kirkiNotifications: function() {
+
+ var control = this;
+
+ wp.customize( control.id, function( setting ) {
+ setting.bind( function( value ) {
+ var code = 'long_title',
+ subs = {},
+ message;
+
+ setting.notifications.remove( code );
+
+ _.each( value, function( val, direction ) {
+ if ( false === control.kirkiValidateCSSValue( val ) ) {
+ subs[ direction ] = val;
+ } else {
+ delete subs[ direction ];
+ }
+ } );
+
+ if ( ! _.isEmpty( subs ) ) {
+ message = dimensionskirkiL10n['invalid-value'] + ' (' + _.values( subs ).toString() + ') ';
+ setting.notifications.add( code, new wp.customize.Notification( code, {
+ type: 'warning',
+ message: message
+ } ) );
+ return;
+ }
+ setting.notifications.remove( code );
+ } );
+ } );
+ }
+});
+/* global tinyMCE */
+wp.customize.controlConstructor['kirki-editor'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ element = control.container.find( 'textarea' ),
+ id = 'kirki-editor-' + control.id.replace( '[', '' ).replace( ']', '' ),
+ editor;
+
+ wp.editor.initialize( id, {
+ tinymce: {
+ wpautop: true
+ },
+ quicktags: true,
+ mediaButtons: true
+ });
+
+ editor = tinyMCE.get( id );
+
+ if ( editor ) {
+ editor.onChange.add( function( ed ) {
+ var content;
+
+ ed.save();
+ content = editor.getContent();
+ element.val( content ).trigger( 'change' );
+ wp.customize.instance( control.id ).set( content );
+ });
+ }
+ }
+});
+/* global fontAwesomeJSON */
+wp.customize.controlConstructor['kirki-fontawesome'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ element = this.container.find( 'select' ),
+ icons = jQuery.parseJSON( fontAwesomeJSON ),
+ selectValue,
+ selectWooOptions = {
+ data: [],
+ escapeMarkup: function( markup ) {
+ return markup;
+ },
+ templateResult: function( val ) {
+ return ' ' + ' ' + val.text;
+ },
+ templateSelection: function( val ) {
+ return ' ' + ' ' + val.text;
+ }
+ },
+ select;
+
+ _.each( icons.icons, function( icon ) {
+ selectWooOptions.data.push({
+ id: icon.id,
+ text: icon.name
+ });
+ });
+
+ select = jQuery( element ).selectWoo( selectWooOptions );
+
+ select.on( 'change', function() {
+ selectValue = jQuery( this ).val();
+ control.setting.set( selectValue );
+ });
+ select.val( control.setting._value ).trigger( 'change' );
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.getValue(),
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url',
+ preview = control.container.find( '.placeholder, .thumbnail' ),
+ previewImage = ( 'array' === saveAs ) ? value.url : value,
+ removeButton = control.container.find( '.image-upload-remove-button' ),
+ defaultButton = control.container.find( '.image-default-button' );
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // Tweaks for save_as = id.
+ if ( ( 'id' === saveAs || 'ID' === saveAs ) && '' !== value ) {
+ wp.media.attachment( value ).fetch().then( function() {
+ setTimeout( function() {
+ var url = wp.media.attachment( value ).get( 'url' );
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }, 700 );
+ } );
+ }
+
+ // If value is not empty, hide the "default" button.
+ if ( ( 'url' === saveAs && '' !== value ) || ( 'array' === saveAs && ! _.isUndefined( value.url ) && '' !== value.url ) ) {
+ control.container.find( 'image-default-button' ).hide();
+ }
+
+ // If value is empty, hide the "remove" button.
+ if ( ( 'url' === saveAs && '' === value ) || ( 'array' === saveAs && ( _.isUndefined( value.url ) || '' === value.url ) ) ) {
+ removeButton.hide();
+ }
+
+ // If value is default, hide the default button.
+ if ( value === control.params['default'] ) {
+ control.container.find( 'image-default-button' ).hide();
+ }
+
+ if ( '' !== previewImage ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+
+ control.container.on( 'click', '.image-upload-button', function( e ) {
+ var image = wp.media({ multiple: false }).open().on( 'select', function() {
+
+ // This will return the selected image from the Media Uploader, the result is an object.
+ var uploadedImage = image.state().get( 'selection' ).first(),
+ previewImage = uploadedImage.toJSON().sizes.full.url;
+
+ if ( ! _.isUndefined( uploadedImage.toJSON().sizes.medium ) ) {
+ previewImage = uploadedImage.toJSON().sizes.medium.url;
+ } else if ( ! _.isUndefined( uploadedImage.toJSON().sizes.thumbnail ) ) {
+ previewImage = uploadedImage.toJSON().sizes.thumbnail.url;
+ }
+
+ if ( 'array' === saveAs ) {
+ control.saveValue( 'id', uploadedImage.toJSON().id );
+ control.saveValue( 'url', uploadedImage.toJSON().sizes.full.url );
+ control.saveValue( 'width', uploadedImage.toJSON().width );
+ control.saveValue( 'height', uploadedImage.toJSON().height );
+ } else if ( 'id' === saveAs ) {
+ control.saveValue( 'id', uploadedImage.toJSON().id );
+ } else {
+ control.saveValue( 'url', uploadedImage.toJSON().sizes.full.url );
+ }
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ defaultButton.hide();
+ }
+ });
+
+ e.preventDefault();
+ });
+
+ control.container.on( 'click', '.image-upload-remove-button', function( e ) {
+
+ var preview,
+ removeButton,
+ defaultButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'id', '' );
+ control.saveValue( 'url', '' );
+ control.saveValue( 'width', '' );
+ control.saveValue( 'height', '' );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.image-upload-remove-button' );
+ defaultButton = control.container.find( '.image-default-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'placeholder' ).html( 'No file selected' );
+ }
+ if ( removeButton.length ) {
+ removeButton.hide();
+ if ( jQuery( defaultButton ).hasClass( 'button' ) ) {
+ defaultButton.show();
+ }
+ }
+ });
+
+ control.container.on( 'click', '.image-default-button', function( e ) {
+
+ var preview,
+ removeButton,
+ defaultButton;
+
+ e.preventDefault();
+
+ control.saveValue( 'url', control.params['default'] );
+
+ preview = control.container.find( '.placeholder, .thumbnail' );
+ removeButton = control.container.find( '.image-upload-remove-button' );
+ defaultButton = control.container.find( '.image-default-button' );
+
+ if ( preview.length ) {
+ preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( ' ' );
+ }
+ if ( removeButton.length ) {
+ removeButton.show();
+ defaultButton.hide();
+ }
+ });
+ },
+
+ /**
+ * Gets the value.
+ */
+ getValue: function() {
+ var control = this,
+ value = control.setting._value,
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url';
+
+ if ( 'array' === saveAs && _.isString( value ) ) {
+ value = {
+ url: value
+ };
+ }
+ return value;
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+ var control = this,
+ valueOld = control.setting._value,
+ saveAs = ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.save_as ) ) ? control.params.choices.save_as : 'url';
+
+ if ( 'array' === saveAs ) {
+ if ( _.isString( valueOld ) ) {
+ valueOld = {};
+ }
+ valueOld[ property ] = value;
+ control.setting.set( valueOld );
+ control.container.find( 'button' ).trigger( 'change' );
+ return;
+ }
+ control.setting.set( value );
+ control.container.find( 'button' ).trigger( 'change' );
+ }
+});
+wp.customize.controlConstructor['kirki-multicheck'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this;
+
+ // Save the value
+ control.container.on( 'change', 'input', function() {
+ var value = [],
+ i = 0;
+
+ // Build the value as an object using the sub-values from individual checkboxes.
+ jQuery.each( control.params.choices, function( key ) {
+ if ( control.container.find( 'input[value="' + key + '"]' ).is( ':checked' ) ) {
+ value[ i ] = key;
+ i++;
+ }
+ });
+
+ // Update the value in the customizer.
+ control.setting.set( value );
+ });
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-multicolor'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ colors = control.params.choices,
+ keys = Object.keys( colors ),
+ value = this.params.value,
+ i = 0;
+
+ // Proxy function that handles changing the individual colors
+ function kirkiMulticolorChangeHandler( control, value, subSetting ) {
+
+ var picker = control.container.find( '.multicolor-index-' + subSetting ),
+ args = {
+ change: function() {
+
+ // Color controls require a small delay.
+ setTimeout( function() {
+
+ // Set the value.
+ control.saveValue( subSetting, picker.val() );
+
+ // Trigger the change.
+ control.container.find( '.multicolor-index-' + subSetting ).trigger( 'change' );
+ }, 100 );
+ }
+ };
+
+ if ( _.isObject( colors.irisArgs ) ) {
+ _.each( colors.irisArgs, function( irisValue, irisKey ) {
+ args[ irisKey ] = irisValue;
+ });
+ }
+
+ // Did we change the value?
+ picker.wpColorPicker( args );
+ }
+
+ // Colors loop
+ while ( i < Object.keys( colors ).length ) {
+ kirkiMulticolorChangeHandler( this, value, keys[ i ] );
+ i++;
+ }
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ var control = this,
+ input = control.container.find( '.multicolor-hidden-value' ),
+ val = control.setting._value;
+
+ val[ property ] = value;
+
+ jQuery( input ).attr( 'value', JSON.stringify( val ) ).trigger( 'change' );
+ control.setting.set( val );
+ }
+});
+wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ value = control.setting._value,
+ html = '',
+ input,
+ up,
+ down;
+
+ // Make sure we use default values if none are define for some arguments.
+ control.params.choices = _.defaults( control.params.choices, {
+ min: 0,
+ max: 100,
+ step: 1
+ } );
+
+ // Make sure we have a valid value.
+ if ( isNaN( value ) || '' === value ) {
+ value = ( 0 > control.params.choices.min && 0 < control.params.choices.max ) ? 0 : control.params.choices.min;
+ }
+ value = parseFloat( value );
+
+ // If step is 'any', set to 0.001.
+ control.params.choices.step = ( 'any' === control.params.choices.step ) ? 0.001 : control.params.choices.step;
+
+ // Make sure choices are properly formtted as numbers.
+ control.params.choices.min = parseFloat( control.params.choices.min );
+ control.params.choices.max = parseFloat( control.params.choices.max );
+ control.params.choices.step = parseFloat( control.params.choices.step );
+
+ // Build the HTML for the control.
+ html += '';
+ if ( control.params.label ) {
+ html += '' + control.params.label + ' ';
+ }
+ if ( control.params.description ) {
+ html += '' + control.params.description + ' ';
+ }
+ html += '';
+ html += '
';
+ html += '
-
';
+ html += '
+
';
+ html += '
';
+ html += ' ';
+
+ control.container.html( html );
+
+ input = control.container.find( 'input' );
+ up = control.container.find( '.plus' );
+ down = control.container.find( '.minus' );
+
+ up.click( function() {
+ var oldVal = parseFloat( input.val() ),
+ newVal;
+
+ newVal = ( oldVal >= control.params.choices.max ) ? oldVal : oldVal + control.params.choices.step;
+
+ input.val( newVal );
+ input.trigger( 'change' );
+ } );
+
+ down.click( function() {
+ var oldVal = parseFloat( input.val() ),
+ newVal;
+
+ newVal = ( oldVal <= control.params.choices.min ) ? oldVal : oldVal - control.params.choices.step;
+
+ input.val( newVal );
+ input.trigger( 'change' );
+ } );
+
+ this.container.on( 'change keyup paste click', 'input', function() {
+ control.setting.set( jQuery( this ).val() );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-palette'] = wp.customize.kirkiDynamicControl.extend({});
+/* global kirkiSetSettingValue */
+wp.customize.controlConstructor['kirki-preset'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ selectValue;
+
+ // Trigger a change
+ this.container.on( 'change', 'select', function() {
+
+ // Get the control's value
+ selectValue = jQuery( this ).val();
+
+ // Update the value using the customizer API and trigger the "save" button
+ control.setting.set( selectValue );
+
+ // We have to get the choices of this control
+ // and then start parsing them to see what we have to do for each of the choices.
+ jQuery.each( control.params.choices, function( key, value ) {
+
+ // If the current value of the control is the key of the choice,
+ // then we can continue processing, Otherwise there's no reason to do anything.
+ if ( selectValue === key ) {
+
+ // Each choice has an array of settings defined in it.
+ // We'll have to loop through them all and apply the changes needed to them.
+ jQuery.each( value.settings, function( presetSetting, presetSettingValue ) {
+ kirkiSetSettingValue.set( presetSetting, presetSettingValue );
+ });
+ }
+ });
+ wp.customize.previewer.refresh();
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-radio-buttonset'] = wp.customize.kirkiDynamicControl.extend({});
+wp.customize.controlConstructor['kirki-radio-image'] = wp.customize.kirkiDynamicControl.extend({});
+/* global kirkiControlLoader */
+var RepeaterRow = function( rowIndex, container, label, control ) {
+
+ 'use strict';
+
+ var self = this;
+ this.rowIndex = rowIndex;
+ this.container = container;
+ this.label = label;
+ this.header = this.container.find( '.repeater-row-header' ),
+
+ this.header.on( 'click', function() {
+ self.toggleMinimize();
+ });
+
+ this.container.on( 'click', '.repeater-row-remove', function() {
+ self.remove();
+ });
+
+ this.header.on( 'mousedown', function() {
+ self.container.trigger( 'row:start-dragging' );
+ });
+
+ this.container.on( 'keyup change', 'input, select, textarea', function( e ) {
+ self.container.trigger( 'row:update', [ self.rowIndex, jQuery( e.target ).data( 'field' ), e.target ] );
+ });
+
+ this.setRowIndex = function( rowIndex ) {
+ this.rowIndex = rowIndex;
+ this.container.attr( 'data-row', rowIndex );
+ this.container.data( 'row', rowIndex );
+ this.updateLabel();
+ };
+
+ this.toggleMinimize = function() {
+
+ // Store the previous state.
+ this.container.toggleClass( 'minimized' );
+ this.header.find( '.dashicons' ).toggleClass( 'dashicons-arrow-up' ).toggleClass( 'dashicons-arrow-down' );
+ };
+
+ this.remove = function() {
+ this.container.slideUp( 300, function() {
+ jQuery( this ).detach();
+ });
+ this.container.trigger( 'row:remove', [ this.rowIndex ] );
+ };
+
+ this.updateLabel = function() {
+ var rowLabelField,
+ rowLabel,
+ rowLabelSelector;
+
+ if ( 'field' === this.label.type ) {
+ rowLabelField = this.container.find( '.repeater-field [data-field="' + this.label.field + '"]' );
+ if ( _.isFunction( rowLabelField.val ) ) {
+ rowLabel = rowLabelField.val();
+ if ( '' !== rowLabel ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ] ) ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ].type ) ) {
+ if ( 'select' === control.params.fields[ this.label.field ].type ) {
+ if ( ! _.isUndefined( control.params.fields[ this.label.field ].choices ) && ! _.isUndefined( control.params.fields[ this.label.field ].choices[ rowLabelField.val() ] ) ) {
+ rowLabel = control.params.fields[ this.label.field ].choices[ rowLabelField.val() ];
+ }
+ } else if ( 'radio' === control.params.fields[ this.label.field ].type || 'radio-image' === control.params.fields[ this.label.field ].type ) {
+ rowLabelSelector = control.selector + ' [data-row="' + this.rowIndex + '"] .repeater-field [data-field="' + this.label.field + '"]:checked';
+ rowLabel = jQuery( rowLabelSelector ).val();
+ }
+ }
+ }
+ this.header.find( '.repeater-row-label' ).text( rowLabel );
+ return;
+ }
+ }
+ }
+ this.header.find( '.repeater-row-label' ).text( this.label.value + ' ' + ( this.rowIndex + 1 ) );
+ };
+ this.updateLabel();
+};
+
+wp.customize.controlConstructor.repeater = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ limit,
+ theNewRow;
+
+ // The current value set in Control Class (set in Kirki_Customize_Repeater_Control::to_json() function)
+ var settingValue = this.params.value;
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // The hidden field that keeps the data saved (though we never update it)
+ this.settingField = this.container.find( '[data-customize-setting-link]' ).first();
+
+ // Set the field value for the first time, we'll fill it up later
+ this.setValue( [], false );
+
+ // The DIV that holds all the rows
+ this.repeaterFieldsContainer = this.container.find( '.repeater-fields' ).first();
+
+ // Set number of rows to 0
+ this.currentIndex = 0;
+
+ // Save the rows objects
+ this.rows = [];
+
+ // Default limit choice
+ limit = false;
+ if ( ! _.isUndefined( this.params.choices.limit ) ) {
+ limit = ( 0 >= this.params.choices.limit ) ? false : parseInt( this.params.choices.limit, 10 );
+ }
+
+ this.container.on( 'click', 'button.repeater-add', function( e ) {
+ e.preventDefault();
+ if ( ! limit || control.currentIndex < limit ) {
+ theNewRow = control.addRow();
+ theNewRow.toggleMinimize();
+ control.initColorPicker();
+ control.initSelect( theNewRow );
+ } else {
+ jQuery( control.selector + ' .limit' ).addClass( 'highlight' );
+ }
+ });
+
+ this.container.on( 'click', '.repeater-row-remove', function() {
+ control.currentIndex--;
+ if ( ! limit || control.currentIndex < limit ) {
+ jQuery( control.selector + ' .limit' ).removeClass( 'highlight' );
+ }
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-image .upload-button,.repeater-field-cropped_image .upload-button,.repeater-field-upload .upload-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.openFrame( e );
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-image .remove-button,.repeater-field-cropped_image .remove-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.removeImage( e );
+ });
+
+ this.container.on( 'click keypress', '.repeater-field-upload .remove-button', function( e ) {
+ e.preventDefault();
+ control.$thisButton = jQuery( this );
+ control.removeFile( e );
+ });
+
+ /**
+ * Function that loads the Mustache template
+ */
+ this.repeaterTemplate = _.memoize( function() {
+ var compiled,
+ /*
+ * Underscore's default ERB-style templates are incompatible with PHP
+ * when asp_tags is enabled, so WordPress uses Mustache-inspired templating syntax.
+ *
+ * @see trac ticket #22344.
+ */
+ options = {
+ evaluate: /<#([\s\S]+?)#>/g,
+ interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
+ escape: /\{\{([^\}]+?)\}\}(?!\})/g,
+ variable: 'data'
+ };
+
+ return function( data ) {
+ compiled = _.template( control.container.find( '.customize-control-repeater-content' ).first().html(), null, options );
+ return compiled( data );
+ };
+ });
+
+ // When we load the control, the fields have not been filled up
+ // This is the first time that we create all the rows
+ if ( settingValue.length ) {
+ _.each( settingValue, function( subValue ) {
+ theNewRow = control.addRow( subValue );
+ control.initColorPicker();
+ control.initSelect( theNewRow, subValue );
+ });
+ }
+
+ // Once we have displayed the rows, we cleanup the values
+ this.setValue( settingValue, true, true );
+
+ this.repeaterFieldsContainer.sortable({
+ handle: '.repeater-row-header',
+ update: function() {
+ control.sort();
+ }
+ });
+
+ },
+
+ /**
+ * Open the media modal.
+ */
+ openFrame: function( event ) {
+
+ 'use strict';
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ if ( this.$thisButton.closest( '.repeater-field' ).hasClass( 'repeater-field-cropped_image' ) ) {
+ this.initCropperFrame();
+ } else {
+ this.initFrame();
+ }
+
+ this.frame.open();
+ },
+
+ initFrame: function() {
+
+ 'use strict';
+
+ var libMediaType = this.getMimeType();
+
+ this.frame = wp.media({
+ states: [
+ new wp.media.controller.Library({
+ library: wp.media.query({ type: libMediaType }),
+ multiple: false,
+ date: false
+ })
+ ]
+ });
+
+ // When a file is selected, run a callback.
+ this.frame.on( 'select', this.onSelect, this );
+ },
+ /**
+ * Create a media modal select frame, and store it so the instance can be reused when needed.
+ * This is mostly a copy/paste of Core api.CroppedImageControl in /wp-admin/js/customize-control.js
+ */
+ initCropperFrame: function() {
+
+ 'use strict';
+
+ // We get the field id from which this was called
+ var currentFieldId = this.$thisButton.siblings( 'input.hidden-field' ).attr( 'data-field' ),
+ attrs = [ 'width', 'height', 'flex_width', 'flex_height' ], // A list of attributes to look for
+ libMediaType = this.getMimeType();
+
+ // Make sure we got it
+ if ( _.isString( currentFieldId ) && '' !== currentFieldId ) {
+
+ // Make fields is defined and only do the hack for cropped_image
+ if ( _.isObject( this.params.fields[ currentFieldId ] ) && 'cropped_image' === this.params.fields[ currentFieldId ].type ) {
+
+ //Iterate over the list of attributes
+ attrs.forEach( function( el ) {
+
+ // If the attribute exists in the field
+ if ( ! _.isUndefined( this.params.fields[ currentFieldId ][ el ] ) ) {
+
+ // Set the attribute in the main object
+ this.params[ el ] = this.params.fields[ currentFieldId ][ el ];
+ }
+ }.bind( this ) );
+ }
+ }
+
+ this.frame = wp.media({
+ button: {
+ text: 'Select and Crop',
+ close: false
+ },
+ states: [
+ new wp.media.controller.Library({
+ library: wp.media.query({ type: libMediaType }),
+ multiple: false,
+ date: false,
+ suggestedWidth: this.params.width,
+ suggestedHeight: this.params.height
+ }),
+ new wp.media.controller.CustomizeImageCropper({
+ imgSelectOptions: this.calculateImageSelectOptions,
+ control: this
+ })
+ ]
+ });
+
+ this.frame.on( 'select', this.onSelectForCrop, this );
+ this.frame.on( 'cropped', this.onCropped, this );
+ this.frame.on( 'skippedcrop', this.onSkippedCrop, this );
+
+ },
+
+ onSelect: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+
+ if ( this.$thisButton.closest( '.repeater-field' ).hasClass( 'repeater-field-upload' ) ) {
+ this.setFileInRepeaterField( attachment );
+ } else {
+ this.setImageInRepeaterField( attachment );
+ }
+ },
+
+ /**
+ * After an image is selected in the media modal, switch to the cropper
+ * state if the image isn't the right size.
+ */
+
+ onSelectForCrop: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+
+ if ( this.params.width === attachment.width && this.params.height === attachment.height && ! this.params.flex_width && ! this.params.flex_height ) {
+ this.setImageInRepeaterField( attachment );
+ } else {
+ this.frame.setState( 'cropper' );
+ }
+ },
+
+ /**
+ * After the image has been cropped, apply the cropped image data to the setting.
+ *
+ * @param {object} croppedImage Cropped attachment data.
+ */
+ onCropped: function( croppedImage ) {
+
+ 'use strict';
+
+ this.setImageInRepeaterField( croppedImage );
+
+ },
+
+ /**
+ * Returns a set of options, computed from the attached image data and
+ * control-specific data, to be fed to the imgAreaSelect plugin in
+ * wp.media.view.Cropper.
+ *
+ * @param {wp.media.model.Attachment} attachment
+ * @param {wp.media.controller.Cropper} controller
+ * @returns {Object} Options
+ */
+ calculateImageSelectOptions: function( attachment, controller ) {
+
+ 'use strict';
+
+ var control = controller.get( 'control' ),
+ flexWidth = !! parseInt( control.params.flex_width, 10 ),
+ flexHeight = !! parseInt( control.params.flex_height, 10 ),
+ realWidth = attachment.get( 'width' ),
+ realHeight = attachment.get( 'height' ),
+ xInit = parseInt( control.params.width, 10 ),
+ yInit = parseInt( control.params.height, 10 ),
+ ratio = xInit / yInit,
+ xImg = realWidth,
+ yImg = realHeight,
+ x1,
+ y1,
+ imgSelectOptions;
+
+ controller.set( 'canSkipCrop', ! control.mustBeCropped( flexWidth, flexHeight, xInit, yInit, realWidth, realHeight ) );
+
+ if ( xImg / yImg > ratio ) {
+ yInit = yImg;
+ xInit = yInit * ratio;
+ } else {
+ xInit = xImg;
+ yInit = xInit / ratio;
+ }
+
+ x1 = ( xImg - xInit ) / 2;
+ y1 = ( yImg - yInit ) / 2;
+
+ imgSelectOptions = {
+ handles: true,
+ keys: true,
+ instance: true,
+ persistent: true,
+ imageWidth: realWidth,
+ imageHeight: realHeight,
+ x1: x1,
+ y1: y1,
+ x2: xInit + x1,
+ y2: yInit + y1
+ };
+
+ if ( false === flexHeight && false === flexWidth ) {
+ imgSelectOptions.aspectRatio = xInit + ':' + yInit;
+ }
+ if ( false === flexHeight ) {
+ imgSelectOptions.maxHeight = yInit;
+ }
+ if ( false === flexWidth ) {
+ imgSelectOptions.maxWidth = xInit;
+ }
+
+ return imgSelectOptions;
+ },
+
+ /**
+ * Return whether the image must be cropped, based on required dimensions.
+ *
+ * @param {bool} flexW
+ * @param {bool} flexH
+ * @param {int} dstW
+ * @param {int} dstH
+ * @param {int} imgW
+ * @param {int} imgH
+ * @return {bool}
+ */
+ mustBeCropped: function( flexW, flexH, dstW, dstH, imgW, imgH ) {
+
+ 'use strict';
+
+ if ( ( true === flexW && true === flexH ) || ( true === flexW && dstH === imgH ) || ( true === flexH && dstW === imgW ) || ( dstW === imgW && dstH === imgH ) || ( imgW <= dstW ) ) {
+ return false;
+ }
+
+ return true;
+ },
+
+ /**
+ * If cropping was skipped, apply the image data directly to the setting.
+ */
+ onSkippedCrop: function() {
+
+ 'use strict';
+
+ var attachment = this.frame.state().get( 'selection' ).first().toJSON();
+ this.setImageInRepeaterField( attachment );
+
+ },
+
+ /**
+ * Updates the setting and re-renders the control UI.
+ *
+ * @param {object} attachment
+ */
+ setImageInRepeaterField: function( attachment ) {
+
+ 'use strict';
+
+ var $targetDiv = this.$thisButton.closest( '.repeater-field-image,.repeater-field-cropped_image' );
+
+ $targetDiv.find( '.kirki-image-attachment' ).html( ' ' ).hide().slideDown( 'slow' );
+
+ $targetDiv.find( '.hidden-field' ).val( attachment.id );
+ this.$thisButton.text( this.$thisButton.data( 'alt-label' ) );
+ $targetDiv.find( '.remove-button' ).show();
+
+ //This will activate the save button
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+ this.frame.close();
+
+ },
+
+ /**
+ * Updates the setting and re-renders the control UI.
+ *
+ * @param {object} attachment
+ */
+ setFileInRepeaterField: function( attachment ) {
+
+ 'use strict';
+
+ var $targetDiv = this.$thisButton.closest( '.repeater-field-upload' );
+
+ $targetDiv.find( '.kirki-file-attachment' ).html( ' ' + attachment.filename + ' ' ).hide().slideDown( 'slow' );
+
+ $targetDiv.find( '.hidden-field' ).val( attachment.id );
+ this.$thisButton.text( this.$thisButton.data( 'alt-label' ) );
+ $targetDiv.find( '.upload-button' ).show();
+ $targetDiv.find( '.remove-button' ).show();
+
+ //This will activate the save button
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+ this.frame.close();
+
+ },
+
+ getMimeType: function() {
+
+ 'use strict';
+
+ // We get the field id from which this was called
+ var currentFieldId = this.$thisButton.siblings( 'input.hidden-field' ).attr( 'data-field' );
+
+ // Make sure we got it
+ if ( _.isString( currentFieldId ) && '' !== currentFieldId ) {
+
+ // Make fields is defined and only do the hack for cropped_image
+ if ( _.isObject( this.params.fields[ currentFieldId ] ) && 'upload' === this.params.fields[ currentFieldId ].type ) {
+
+ // If the attribute exists in the field
+ if ( ! _.isUndefined( this.params.fields[ currentFieldId ].mime_type ) ) {
+
+ // Set the attribute in the main object
+ return this.params.fields[ currentFieldId ].mime_type;
+ }
+ }
+ }
+ return 'image';
+
+ },
+
+ removeImage: function( event ) {
+
+ 'use strict';
+
+ var $targetDiv,
+ $uploadButton;
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ $targetDiv = this.$thisButton.closest( '.repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload' );
+ $uploadButton = $targetDiv.find( '.upload-button' );
+
+ $targetDiv.find( '.kirki-image-attachment' ).slideUp( 'fast', function() {
+ jQuery( this ).show().html( jQuery( this ).data( 'placeholder' ) );
+ });
+ $targetDiv.find( '.hidden-field' ).val( '' );
+ $uploadButton.text( $uploadButton.data( 'label' ) );
+ this.$thisButton.hide();
+
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+
+ },
+
+ removeFile: function( event ) {
+
+ 'use strict';
+
+ var $targetDiv,
+ $uploadButton;
+
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+
+ $targetDiv = this.$thisButton.closest( '.repeater-field-upload' );
+ $uploadButton = $targetDiv.find( '.upload-button' );
+
+ $targetDiv.find( '.kirki-file-attachment' ).slideUp( 'fast', function() {
+ jQuery( this ).show().html( jQuery( this ).data( 'placeholder' ) );
+ });
+ $targetDiv.find( '.hidden-field' ).val( '' );
+ $uploadButton.text( $uploadButton.data( 'label' ) );
+ this.$thisButton.hide();
+
+ $targetDiv.find( 'input, textarea, select' ).trigger( 'change' );
+
+ },
+
+ /**
+ * Get the current value of the setting
+ *
+ * @return Object
+ */
+ getValue: function() {
+
+ 'use strict';
+
+ // The setting is saved in JSON
+ return JSON.parse( decodeURI( this.setting.get() ) );
+
+ },
+
+ /**
+ * Set a new value for the setting
+ *
+ * @param newValue Object
+ * @param refresh If we want to refresh the previewer or not
+ */
+ setValue: function( newValue, refresh, filtering ) {
+
+ 'use strict';
+
+ // We need to filter the values after the first load to remove data requrired for diplay but that we don't want to save in DB
+ var filteredValue = newValue,
+ filter = [];
+
+ if ( filtering ) {
+ jQuery.each( this.params.fields, function( index, value ) {
+ if ( 'image' === value.type || 'cropped_image' === value.type || 'upload' === value.type ) {
+ filter.push( index );
+ }
+ });
+ jQuery.each( newValue, function( index, value ) {
+ jQuery.each( filter, function( ind, field ) {
+ if ( ! _.isUndefined( value[ field ] ) && ! _.isUndefined( value[ field ].id ) ) {
+ filteredValue[index][ field ] = value[ field ].id;
+ }
+ });
+ });
+ }
+
+ this.setting.set( encodeURI( JSON.stringify( filteredValue ) ) );
+
+ if ( refresh ) {
+
+ // Trigger the change event on the hidden field so
+ // previewer refresh the website on Customizer
+ this.settingField.trigger( 'change' );
+ }
+ },
+
+ /**
+ * Add a new row to repeater settings based on the structure.
+ *
+ * @param data (Optional) Object of field => value pairs (undefined if you want to get the default values)
+ */
+ addRow: function( data ) {
+
+ 'use strict';
+
+ var control = this,
+ template = control.repeaterTemplate(), // The template for the new row (defined on Kirki_Customize_Repeater_Control::render_content() ).
+ settingValue = this.getValue(), // Get the current setting value.
+ newRowSetting = {}, // Saves the new setting data.
+ templateData, // Data to pass to the template
+ newRow,
+ i;
+
+ if ( template ) {
+
+ // The control structure is going to define the new fields
+ // We need to clone control.params.fields. Assigning it
+ // ould result in a reference assignment.
+ templateData = jQuery.extend( true, {}, control.params.fields );
+
+ // But if we have passed data, we'll use the data values instead
+ if ( data ) {
+ for ( i in data ) {
+ if ( data.hasOwnProperty( i ) && templateData.hasOwnProperty( i ) ) {
+ templateData[ i ]['default'] = data[ i ];
+ }
+ }
+ }
+
+ templateData.index = this.currentIndex;
+
+ // Append the template content
+ template = template( templateData );
+
+ // Create a new row object and append the element
+ newRow = new RepeaterRow(
+ control.currentIndex,
+ jQuery( template ).appendTo( control.repeaterFieldsContainer ),
+ control.params.row_label,
+ control
+ );
+
+ newRow.container.on( 'row:remove', function( e, rowIndex ) {
+ control.deleteRow( rowIndex );
+ });
+
+ newRow.container.on( 'row:update', function( e, rowIndex, fieldName, element ) {
+ control.updateField.call( control, e, rowIndex, fieldName, element );
+ newRow.updateLabel();
+ });
+
+ // Add the row to rows collection
+ this.rows[ this.currentIndex ] = newRow;
+
+ for ( i in templateData ) {
+ if ( templateData.hasOwnProperty( i ) ) {
+ newRowSetting[ i ] = templateData[ i ]['default'];
+ }
+ }
+
+ settingValue[ this.currentIndex ] = newRowSetting;
+ this.setValue( settingValue, true );
+
+ this.currentIndex++;
+
+ return newRow;
+ }
+ },
+
+ sort: function() {
+
+ 'use strict';
+
+ var control = this,
+ $rows = this.repeaterFieldsContainer.find( '.repeater-row' ),
+ newOrder = [],
+ settings = control.getValue(),
+ newRows = [],
+ newSettings = [];
+
+ $rows.each( function( i, element ) {
+ newOrder.push( jQuery( element ).data( 'row' ) );
+ });
+
+ jQuery.each( newOrder, function( newPosition, oldPosition ) {
+ newRows[ newPosition ] = control.rows[ oldPosition ];
+ newRows[ newPosition ].setRowIndex( newPosition );
+
+ newSettings[ newPosition ] = settings[ oldPosition ];
+ });
+
+ control.rows = newRows;
+ control.setValue( newSettings );
+
+ },
+
+ /**
+ * Delete a row in the repeater setting
+ *
+ * @param index Position of the row in the complete Setting Array
+ */
+ deleteRow: function( index ) {
+
+ 'use strict';
+
+ var currentSettings = this.getValue(),
+ row,
+ i,
+ prop;
+
+ if ( currentSettings[ index ] ) {
+
+ // Find the row
+ row = this.rows[ index ];
+ if ( row ) {
+
+ // Remove the row settings
+ delete currentSettings[ index ];
+
+ // Remove the row from the rows collection
+ delete this.rows[ index ];
+
+ // Update the new setting values
+ this.setValue( currentSettings, true );
+
+ }
+
+ }
+
+ // Remap the row numbers
+ i = 1;
+ for ( prop in this.rows ) {
+ if ( this.rows.hasOwnProperty( prop ) && this.rows[ prop ] ) {
+ this.rows[ prop ].updateLabel();
+ i++;
+ }
+ }
+ },
+
+ /**
+ * Update a single field inside a row.
+ * Triggered when a field has changed
+ *
+ * @param e Event Object
+ */
+ updateField: function( e, rowIndex, fieldId, element ) {
+
+ 'use strict';
+
+ var type,
+ row,
+ currentSettings;
+
+ if ( ! this.rows[ rowIndex ] ) {
+ return;
+ }
+
+ if ( ! this.params.fields[ fieldId ] ) {
+ return;
+ }
+
+ type = this.params.fields[ fieldId].type;
+ row = this.rows[ rowIndex ];
+ currentSettings = this.getValue();
+
+ element = jQuery( element );
+
+ if ( _.isUndefined( currentSettings[ row.rowIndex ][ fieldId ] ) ) {
+ return;
+ }
+
+ if ( 'checkbox' === type ) {
+ currentSettings[ row.rowIndex ][ fieldId ] = element.is( ':checked' );
+ } else {
+
+ // Update the settings
+ currentSettings[ row.rowIndex ][ fieldId ] = element.val();
+ }
+ this.setValue( currentSettings, true );
+ },
+
+ /**
+ * Init the color picker on color fields
+ * Called after AddRow
+ *
+ */
+ initColorPicker: function() {
+
+ 'use strict';
+
+ var control = this,
+ colorPicker = control.container.find( '.color-picker-hex' ),
+ options = {},
+ fieldId = colorPicker.data( 'field' );
+
+ // We check if the color palette parameter is defined.
+ if ( ! _.isUndefined( fieldId ) && ! _.isUndefined( control.params.fields[ fieldId ] ) && ! _.isUndefined( control.params.fields[ fieldId ].palettes ) && _.isObject( control.params.fields[ fieldId ].palettes ) ) {
+ options.palettes = control.params.fields[ fieldId ].palettes;
+ }
+
+ // When the color picker value is changed we update the value of the field
+ options.change = function( event, ui ) {
+
+ var currentPicker = jQuery( event.target ),
+ row = currentPicker.closest( '.repeater-row' ),
+ rowIndex = row.data( 'row' ),
+ currentSettings = control.getValue();
+
+ currentSettings[ rowIndex ][ currentPicker.data( 'field' ) ] = ui.color.toString();
+ control.setValue( currentSettings, true );
+
+ };
+
+ // Init the color picker
+ if ( 0 !== colorPicker.length ) {
+ colorPicker.wpColorPicker( options );
+ }
+ },
+
+ /**
+ * Init the dropdown-pages field with selectWoo
+ * Called after AddRow
+ *
+ * @param {object} theNewRow the row that was added to the repeater
+ * @param {object} data the data for the row if we're initializing a pre-existing row
+ *
+ */
+ initSelect: function( theNewRow, data ) {
+
+ 'use strict';
+
+ var control = this,
+ dropdown = theNewRow.container.find( '.repeater-field select' ),
+ $select,
+ dataField,
+ multiple,
+ selectWooOptions = {};
+
+ if ( 0 === dropdown.length ) {
+ return;
+ }
+
+ dataField = dropdown.data( 'field' );
+ multiple = jQuery( dropdown ).data( 'multiple' );
+ if ( 'undefed' !== multiple && jQuery.isNumeric( multiple ) ) {
+ multiple = parseInt( multiple, 10 );
+ if ( 1 < multiple ) {
+ selectWooOptions.maximumSelectionLength = multiple;
+ }
+ }
+
+ data = data || {};
+ data[ dataField ] = data[ dataField ] || '';
+
+ $select = jQuery( dropdown ).selectWoo( selectWooOptions ).val( data[ dataField ] );
+
+ this.container.on( 'change', '.repeater-field select', function( event ) {
+
+ var currentDropdown = jQuery( event.target ),
+ row = currentDropdown.closest( '.repeater-row' ),
+ rowIndex = row.data( 'row' ),
+ currentSettings = control.getValue();
+
+ currentSettings[ rowIndex ][ currentDropdown.data( 'field' ) ] = jQuery( this ).val();
+ control.setValue( currentSettings );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-slider'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+ var control = this,
+ changeAction = ( 'postMessage' === control.setting.transport ) ? 'mousemove change' : 'change',
+ rangeInput = control.container.find( 'input[type="range"]' ),
+ textInput = control.container.find( 'input[type="text"]' ),
+ value = control.setting._value;
+
+ // Set the initial value in the text input.
+ textInput.attr( 'value', value );
+
+ // If the range input value changes copy the value to the text input.
+ rangeInput.on( 'mousemove change', function() {
+ textInput.attr( 'value', rangeInput.val() );
+ } );
+
+ // Save the value when the range input value changes.
+ // This is separate from the above because of the postMessage differences.
+ // If the control refreshes the preview pane,
+ // we don't want a refresh for every change
+ // but 1 final refresh when the value is changed.
+ rangeInput.on( changeAction, function() {
+ control.setting.set( rangeInput.val() );
+ } );
+
+ // If the text input value changes,
+ // copy the value to the range input
+ // and then save.
+ textInput.on( 'input paste change', function() {
+ rangeInput.attr( 'value', textInput.val() );
+ control.setting.set( textInput.val() );
+ } );
+
+ // If the reset button is clicked,
+ // set slider and text input values to default
+ // and hen save.
+ control.container.find( '.slider-reset' ).on( 'click', function() {
+ textInput.attr( 'value', control.params['default'] );
+ rangeInput.attr( 'value', control.params['default'] );
+ control.setting.set( textInput.val() );
+ } );
+ }
+});
+/* global kirkiControlLoader */
+wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend({
+
+ // When we're finished loading continue processing
+ ready: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ // Init the control.
+ if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) {
+ kirkiControlLoader( control );
+ } else {
+ control.initKirkiControl();
+ }
+ },
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this;
+
+ control.container.find( '.kirki-controls-loading-spinner' ).hide();
+
+ // Set the sortable container.
+ control.sortableContainer = control.container.find( 'ul.sortable' ).first();
+
+ // Init sortable.
+ control.sortableContainer.sortable({
+
+ // Update value when we stop sorting.
+ stop: function() {
+ control.updateValue();
+ }
+ }).disableSelection().find( 'li' ).each( function() {
+
+ // Enable/disable options when we click on the eye of Thundera.
+ jQuery( this ).find( 'i.visibility' ).click( function() {
+ jQuery( this ).toggleClass( 'dashicons-visibility-faint' ).parents( 'li:eq(0)' ).toggleClass( 'invisible' );
+ });
+ }).click( function() {
+
+ // Update value on click.
+ control.updateValue();
+ });
+ },
+
+ /**
+ * Updates the sorting list
+ */
+ updateValue: function() {
+
+ 'use strict';
+
+ var control = this,
+ newValue = [];
+
+ this.sortableContainer.find( 'li' ).each( function() {
+ if ( ! jQuery( this ).is( '.invisible' ) ) {
+ newValue.push( jQuery( this ).data( 'value' ) );
+ }
+ });
+ control.setting.set( newValue );
+ }
+});
+wp.customize.controlConstructor['kirki-switch'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ checkboxValue = control.setting._value;
+
+ // Save the value
+ this.container.on( 'change', 'input', function() {
+ checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false;
+ control.setting.set( checkboxValue );
+ });
+ }
+});
+wp.customize.controlConstructor['kirki-toggle'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ var control = this,
+ checkboxValue = control.setting._value;
+
+ // Save the value
+ this.container.on( 'change', 'input', function() {
+ checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false;
+ control.setting.set( checkboxValue );
+ });
+ }
+});
+/* global kirkiL10n, kirki */
+wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicControl.extend({
+
+ initKirkiControl: function() {
+
+ 'use strict';
+
+ var control = this,
+ value = control.setting._value,
+ picker;
+
+ control.renderFontSelector();
+ control.renderBackupFontSelector();
+ control.renderVariantSelector();
+ control.renderSubsetSelector();
+
+ // Font-size.
+ if ( control.params['default']['font-size'] ) {
+ this.container.on( 'change keyup paste', '.font-size input', function() {
+ control.saveValue( 'font-size', jQuery( this ).val() );
+ });
+ }
+
+ // Line-height.
+ if ( control.params['default']['line-height'] ) {
+ this.container.on( 'change keyup paste', '.line-height input', function() {
+ control.saveValue( 'line-height', jQuery( this ).val() );
+ });
+ }
+
+ // Margin-top.
+ if ( control.params['default']['margin-top'] ) {
+ this.container.on( 'change keyup paste', '.margin-top input', function() {
+ control.saveValue( 'margin-top', jQuery( this ).val() );
+ });
+ }
+
+ // Margin-bottom.
+ if ( control.params['default']['margin-bottom'] ) {
+ this.container.on( 'change keyup paste', '.margin-bottom input', function() {
+ control.saveValue( 'margin-bottom', jQuery( this ).val() );
+ });
+ }
+
+ // Letter-spacing.
+ if ( control.params['default']['letter-spacing'] ) {
+ value['letter-spacing'] = ( jQuery.isNumeric( value['letter-spacing'] ) ) ? value['letter-spacing'] + 'px' : value['letter-spacing'];
+ this.container.on( 'change keyup paste', '.letter-spacing input', function() {
+ value['letter-spacing'] = ( jQuery.isNumeric( jQuery( this ).val() ) ) ? jQuery( this ).val() + 'px' : jQuery( this ).val();
+ control.saveValue( 'letter-spacing', value['letter-spacing'] );
+ });
+ }
+
+ // Word-spacing.
+ if ( control.params['default']['word-spacing'] ) {
+ this.container.on( 'change keyup paste', '.word-spacing input', function() {
+ control.saveValue( 'word-spacing', jQuery( this ).val() );
+ });
+ }
+
+ // Text-align.
+ if ( control.params['default']['text-align'] ) {
+ this.container.on( 'change', '.text-align input', function() {
+ control.saveValue( 'text-align', jQuery( this ).val() );
+ });
+ }
+
+ // Text-transform.
+ if ( control.params['default']['text-transform'] ) {
+ jQuery( control.selector + ' .text-transform select' ).selectWoo().on( 'change', function() {
+ control.saveValue( 'text-transform', jQuery( this ).val() );
+ });
+ }
+
+ // Text-decoration.
+ if ( control.params['default']['text-decoration'] ) {
+ jQuery( control.selector + ' .text-decoration select' ).selectWoo().on( 'change', function() {
+ control.saveValue( 'text-decoration', jQuery( this ).val() );
+ });
+ }
+
+ // Color.
+ if ( control.params['default'].color ) {
+ picker = this.container.find( '.kirki-color-control' );
+ picker.wpColorPicker({
+ change: function() {
+ setTimeout( function() {
+ control.saveValue( 'color', picker.val() );
+ }, 100 );
+ }
+ });
+ }
+ },
+
+ /**
+ * Adds the font-families to the font-family dropdown
+ * and instantiates selectWoo.
+ */
+ renderFontSelector: function() {
+
+ var control = this,
+ selector = control.selector + ' .font-family select',
+ data = [],
+ standardFonts = [],
+ googleFonts = [],
+ value = control.setting._value,
+ fonts = control.getFonts(),
+ fontSelect;
+
+ // Format standard fonts as an array.
+ if ( ! _.isUndefined( fonts.standard ) ) {
+ _.each( fonts.standard, function( font ) {
+ standardFonts.push({
+ id: font.family.replace( /"/g, ''' ),
+ text: font.label
+ });
+ });
+ }
+
+ // Format google fonts as an array.
+ if ( ! _.isUndefined( fonts.google ) ) {
+ _.each( fonts.google, function( font ) {
+ googleFonts.push({
+ id: font.family,
+ text: font.family
+ });
+ });
+ }
+
+ // Combine forces and build the final data.
+ data = [
+ { text: kirkiL10n.standardFonts, children: standardFonts },
+ { text: kirkiL10n.googleFonts, children: googleFonts }
+ ];
+
+ // Instantiate selectWoo with the data.
+ fontSelect = jQuery( selector ).selectWoo({
+ data: data
+ });
+
+ // Set the initial value.
+ if ( value['font-family'] ) {
+ fontSelect.val( value['font-family'].replace( /'/g, '"' ) ).trigger( 'change' );
+ }
+
+ // When the value changes
+ fontSelect.on( 'change', function() {
+
+ // Set the value.
+ control.saveValue( 'font-family', jQuery( this ).val() );
+
+ // Re-init the font-backup selector.
+ control.renderBackupFontSelector();
+
+ // Re-init variants selector.
+ control.renderVariantSelector();
+
+ // Re-init subsets selector.
+ control.renderSubsetSelector();
+ });
+ },
+
+ /**
+ * Adds the font-families to the font-family dropdown
+ * and instantiates selectWoo.
+ */
+ renderBackupFontSelector: function() {
+
+ var control = this,
+ selector = control.selector + ' .font-backup select',
+ standardFonts = [],
+ value = control.setting._value,
+ fontFamily = value['font-family'],
+ fonts = control.getFonts(),
+ fontSelect;
+
+ if ( _.isUndefined( value['font-backup'] ) || null === value['font-backup'] ) {
+ value['font-backup'] = '';
+ }
+
+ // Hide if we're not on a google-font.
+ if ( 'google' !== kirki.util.webfonts.getFontType( fontFamily ) ) {
+ jQuery( control.selector + ' .font-backup' ).hide();
+ return;
+ }
+ jQuery( control.selector + ' .font-backup' ).show();
+
+ // Format standard fonts as an array.
+ if ( ! _.isUndefined( fonts.standard ) ) {
+ _.each( fonts.standard, function( font ) {
+ standardFonts.push({
+ id: font.family.replace( /"/g, ''' ),
+ text: font.label
+ });
+ });
+ }
+
+ // Instantiate selectWoo with the data.
+ fontSelect = jQuery( selector ).selectWoo({
+ data: standardFonts
+ });
+
+ // Set the initial value.
+ if ( 'undefined' !== typeof value['font-backup'] ) {
+ fontSelect.val( value['font-backup'].replace( /'/g, '"' ) ).trigger( 'change' );
+ }
+
+ // When the value changes
+ fontSelect.on( 'change', function() {
+
+ // Set the value.
+ control.saveValue( 'font-backup', jQuery( this ).val() );
+ });
+ },
+
+ /**
+ * Renders the variants selector using selectWoo
+ * Displays font-variants for the currently selected font-family.
+ */
+ renderVariantSelector: function() {
+
+ var control = this,
+ value = control.setting._value,
+ fontFamily = value['font-family'],
+ selector = control.selector + ' .variant select',
+ data = [],
+ isValid = false,
+ fontType = kirki.util.webfonts.getFontType( fontFamily ),
+ variants = ['regular', 'italic', '700', '700italic'],
+ fontWeight,
+ variantSelector,
+ fontStyle;
+
+ if ( 'google' === fontType ) {
+ variants = kirki.util.webfonts.google.getVariants( fontFamily );
+ }
+
+ jQuery( control.selector + ' .variant' ).show();
+ _.each( variants, function( variant ) {
+ if ( value.variant === variant ) {
+ isValid = true;
+ }
+ data.push({
+ id: variant,
+ text: variant
+ });
+ });
+ if ( ! isValid ) {
+ value.variant = 'regular';
+ }
+
+ if ( jQuery( selector ).hasClass( 'select2-hidden-accessible' ) ) {
+ jQuery( selector ).selectWoo( 'destroy' );
+ jQuery( selector ).empty();
+ }
+
+ // Instantiate selectWoo with the data.
+ variantSelector = jQuery( selector ).selectWoo({
+ data: data
+ });
+ variantSelector.val( value.variant ).trigger( 'change' );
+ variantSelector.on( 'change', function() {
+ control.saveValue( 'variant', jQuery( this ).val() );
+
+ fontWeight = ( ! _.isString( value.variant ) ) ? '400' : value.variant.match( /\d/g );
+ fontWeight = ( ! _.isObject( fontWeight ) ) ? '400' : fontWeight.join( '' );
+ fontStyle = ( -1 !== value.variant.indexOf( 'italic' ) ) ? 'italic' : 'normal';
+
+ control.saveValue( 'font-weight', fontWeight );
+ control.saveValue( 'font-style', fontStyle );
+ });
+ },
+
+ /**
+ * Renders the subsets selector using selectWoo
+ * Displays font-subsets for the currently selected font-family.
+ */
+ renderSubsetSelector: function() {
+
+ var control = this,
+ value = control.setting._value,
+ fontFamily = value['font-family'],
+ subsets = kirki.util.webfonts.google.getSubsets( fontFamily ),
+ selector = control.selector + ' .subsets select',
+ data = [],
+ validValue = value.subsets,
+ subsetSelector;
+
+ if ( false !== subsets ) {
+ jQuery( control.selector + ' .subsets' ).show();
+ _.each( subsets, function( subset ) {
+
+ if ( _.isObject( validValue ) ) {
+ if ( -1 === validValue.indexOf( subset ) ) {
+ validValue = _.reject( validValue, function( subValue ) {
+ return subValue === subset;
+ });
+ }
+ }
+
+ data.push({
+ id: subset,
+ text: subset
+ });
+ });
+
+ } else {
+ jQuery( control.selector + ' .subsets' ).hide();
+ }
+
+ if ( jQuery( selector ).hasClass( 'select2-hidden-accessible' ) ) {
+ jQuery( selector ).selectWoo( 'destroy' );
+ jQuery( selector ).empty();
+ }
+
+ // Instantiate selectWoo with the data.
+ subsetSelector = jQuery( selector ).selectWoo({
+ data: data
+ });
+ subsetSelector.val( validValue ).trigger( 'change' );
+ subsetSelector.on( 'change', function() {
+ control.saveValue( 'subsets', jQuery( this ).val() );
+ });
+ },
+
+ /**
+ * Get fonts.
+ */
+ getFonts: function() {
+ var control = this,
+ initialGoogleFonts = kirki.util.webfonts.google.getFonts(),
+ googleFonts = {},
+ googleFontsSort = 'alpha',
+ googleFontsNumber = 0,
+ standardFonts = {};
+
+ // Get google fonts.
+ if ( ! _.isEmpty( control.params.choices.fonts.google ) ) {
+ if ( 'alpha' === control.params.choices.fonts.google[0] || 'popularity' === control.params.choices.fonts.google[0] || 'trending' === control.params.choices.fonts.google[0] ) {
+ googleFontsSort = control.params.choices.fonts.google[0];
+ if ( ! isNaN( control.params.choices.fonts.google[1] ) ) {
+ googleFontsNumber = parseInt( control.params.choices.fonts.google[1], 10 );
+ }
+ googleFonts = kirki.util.webfonts.google.getFonts( googleFontsSort, googleFontsNumber );
+
+ } else {
+ _.each( control.params.choices.fonts.google, function( fontName ) {
+ if ( 'undefined' !== typeof initialGoogleFonts[ fontName ] && ! _.isEmpty( initialGoogleFonts[ fontName ] ) ) {
+ googleFonts[ fontName ] = initialGoogleFonts[ fontName ];
+ }
+ } );
+ }
+ } else {
+ googleFonts = kirki.util.webfonts.google.getFonts( googleFontsSort, googleFontsNumber );
+ }
+
+ // Get standard fonts.
+ if ( ! _.isEmpty( control.params.choices.fonts.standard ) ) {
+ _.each( control.params.choices.fonts.standard, function( fontName ) {
+ if ( 'undefined' !== typeof kirki.util.webfonts.standard.fonts[ fontName ] && ! _.isEmpty( kirki.util.webfonts.standard.fonts[ fontName ] ) ) {
+ standardFonts[ fontName ] = {};
+ if ( 'undefined' !== kirki.util.webfonts.standard.fonts[ fontName ].stack && ! _.isEmpty( kirki.util.webfonts.standard.fonts[ fontName ].stack ) ) {
+ standardFonts[ fontName ].family = kirki.util.webfonts.standard.fonts[ fontName ].stack;
+ } else {
+ standardFonts[ fontName ].family = googleFonts[ fontName ];
+ }
+ if ( 'undefined' !== kirki.util.webfonts.standard.fonts[ fontName ].label && ! _.isEmpty( kirki.util.webfonts.standard.fonts[ fontName ].label ) ) {
+ standardFonts[ fontName ].label = kirki.util.webfonts.standard.fonts[ fontName ].label;
+ } else if ( ! _.isEmpty( standardFonts[ fontName ] ) ) {
+ standardFonts[ fontName ].label = standardFonts[ fontName ];
+ }
+ } else {
+ standardFonts[ fontName ] = {
+ family: fontName,
+ label: fontName
+ };
+ }
+ } );
+ } else {
+ _.each( kirki.util.webfonts.standard.fonts, function( font, id ) {
+ standardFonts[ id ] = {
+ family: font.stack,
+ label: font.label
+ };
+ } );
+ }
+ return {
+ google: googleFonts,
+ standard: standardFonts
+ };
+ },
+
+ /**
+ * Saves the value.
+ */
+ saveValue: function( property, value ) {
+
+ var control = this,
+ input = control.container.find( '.typography-hidden-value' ),
+ val = control.setting._value;
+
+ val[ property ] = value;
+
+ jQuery( input ).attr( 'value', JSON.stringify( val ) ).trigger( 'change' );
+ control.setting.set( val );
+ }
+});
diff --git a/functions/kirki/controls/js/dist/script.min.js b/functions/kirki/controls/js/dist/script.min.js
new file mode 100644
index 0000000..bf7bd5a
--- /dev/null
+++ b/functions/kirki/controls/js/dist/script.min.js
@@ -0,0 +1 @@
+if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};(kirki={initialized:!1,initialize:function(){this.initialized||(setTimeout(function(){kirki.util.webfonts.standard.initialize(),kirki.util.webfonts.google.initialize()},150),this.initialized=!0)}}).initialize();var kirki=kirki||{};kirki=(kirki=jQuery.extend(kirki,{control:{"kirki-code":{},"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){var t=wp.template("kirki-input-radio");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){var t=wp.template("kirki-input-color");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t,i={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};if(!_.isUndefined(e.params)&&!_.isUndefined(e.params.choices)&&!_.isUndefined(e.params.choices.element)&&"textarea"===e.params.choices.element)return t=wp.template("kirki-input-textarea"),void e.container.html(t(i));t=wp.template("kirki-input-generic"),e.container.html(t(i))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t=wp.template("kirki-input-select");e.container.html(t({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id),multiple:e.params.multiple||1}))}}}}))||{},kirki=(kirki=jQuery.extend(kirki,{input:{radio:{init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){kirki.setting.set(e.id,"")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"]'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+" "),e.description&&(i+=''+e.description+" "),i+="",i+='",''+i+"
"},init:function(e){}}}}))||{},kirki=(kirki=jQuery.extend(kirki,{setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),i.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),i.params.content.attr("class","customize-control customize-control-"+i.params.type)),this.propertyElements=[],wp.customize.Control.prototype.initialize.call(this,e,i)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},focus:function(e){this.actuallyEmbed(),wp.customize.Control.prototype.focus.call(this,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i;return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||("auto"===e||"inherit"===e||"initial"===e||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"])))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.setting._value,i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),s=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(s=r.toJSON().sizes.thumbnail.url):s=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},saveValue:function(e,t){var i=jQuery("#customize-control-"+this.id.replace("[","-").replace("]","")+" .background-hidden-value"),n=this.setting._value;n[e]=t,jQuery(i).attr("value",JSON.stringify(n)).trigger("change"),this.setting.set(n)}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(this.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(this.id,{section:this.params.section,priority:this.params.priority,label:this.params.label,editor_settings:{codemirror:{mode:this.params.choices.language}},settings:{default:this.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(this.id,{section:this.params.section,priority:this.params.priority,label:this.params.label,description:this.params.description,settings:{default:this.id},default:this.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this.params.choices.controls,i={},n=[];for(_.each(t,function(e,t){!0===e&&n.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),s=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html(' ')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),o=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(o=t.toJSON().sizes.thumbnail.url):o=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(' '),r.length&&(r.show(),s.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(' '),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this.setting._value;return"array"===(_.isUndefined(this.params.choices)||_.isUndefined(this.params.choices.save_as)?"url":this.params.choices.save_as)&&_.isString(e)&&(e={url:e}),e},saveValue:function(e,t){var i=this.setting._value;if("array"===(_.isUndefined(this.params.choices)||_.isUndefined(this.params.choices.save_as)?"url":this.params.choices.save_as))return _.isString(i)&&(i={}),i[e]=t,this.setting.set(i),void this.container.find("button").trigger("change");this.setting.set(t),this.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";function e(e,i,n){var a=e.container.find(".multicolor-index-"+n),r={change:function(){setTimeout(function(){e.saveValue(n,a.val()),e.container.find(".multicolor-index-"+n).trigger("change")},100)}};_.isObject(t.irisArgs)&&_.each(t.irisArgs,function(e,t){r[t]=e}),a.wpColorPicker(r)}for(var t=this.params.choices,i=Object.keys(t),n=(this.params.value,0);nn.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+" "),n.params.description&&(r+=''+n.params.description+" "),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){return _.template(i.container.find(".customize-control-repeater-content").first().html(),null,e)(t)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&["width","height","flex_width","flex_height"].forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:t}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),s=!!parseInt(r.params.flex_width,10),o=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(s,o,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===o&&!1===s&&(a.aspectRatio=u+":"+d),!1===o&&(a.maxHeight=d),!1===s&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html(' ').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+" ").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),s=this.getValue(),o={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n].default);return s[this.currentIndex]=o,this.setValue(s,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,s;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],s=this.getValue(),n=jQuery(n),_.isUndefined(s[r.rowIndex][i])||(s[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(s,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),s={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(s.maximumSelectionLength=n),(t=t||{})[i]=t[i]||"",jQuery(r).selectWoo(s).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(this):this.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||e.push(jQuery(this).data("value"))}),this.setting.set(e)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e,t=this,i=t.setting._value;t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default["text-decoration"]&&jQuery(t.selector+" .text-decoration select").selectWoo().on("change",function(){t.saveValue("text-decoration",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],s=t.setting._value,o=t.getFonts();_.isUndefined(o.standard)||_.each(o.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(o.google)||_.each(o.google,function(e){r.push({id:e.family,text:e.family})}),n=[{text:kirkiL10n.standardFonts,children:a},{text:kirkiL10n.googleFonts,children:r}],e=jQuery(i).selectWoo({data:n}),s["font-family"]&&e.val(s["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.setting._value,r=a["font-family"],s=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),"google"===kirki.util.webfonts.getFontType(r)?(jQuery(t.selector+" .font-backup").show(),_.isUndefined(s.standard)||_.each(s.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})):jQuery(t.selector+" .font-backup").hide()},renderVariantSelector:function(){var e,t,i,n=this,a=n.setting._value,r=a["font-family"],s=n.selector+" .variant select",o=[],c=!1,l=["regular","italic","700","700italic"];"google"===kirki.util.webfonts.getFontType(r)&&(l=kirki.util.webfonts.google.getVariants(r)),jQuery(n.selector+" .variant").show(),_.each(l,function(e){a.variant===e&&(c=!0),o.push({id:e,text:e})}),c||(a.variant="regular"),jQuery(s).hasClass("select2-hidden-accessible")&&(jQuery(s).selectWoo("destroy"),jQuery(s).empty()),(t=jQuery(s).selectWoo({data:o})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})},renderSubsetSelector:function(){var e,t=this,i=t.setting._value,n=i["font-family"],a=kirki.util.webfonts.google.getSubsets(n),r=t.selector+" .subsets select",s=[],o=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(o)&&-1===o.indexOf(e)&&(o=_.reject(o,function(t){return t===e})),s.push({id:e,text:e})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:s})).val(o).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){var e=kirki.util.webfonts.google.getFonts(),t={},i="alpha",n=0,a={};return _.isEmpty(this.params.choices.fonts.google)?t=kirki.util.webfonts.google.getFonts(i,n):"alpha"===this.params.choices.fonts.google[0]||"popularity"===this.params.choices.fonts.google[0]||"trending"===this.params.choices.fonts.google[0]?(i=this.params.choices.fonts.google[0],isNaN(this.params.choices.fonts.google[1])||(n=parseInt(this.params.choices.fonts.google[1],10)),t=kirki.util.webfonts.google.getFonts(i,n)):_.each(this.params.choices.fonts.google,function(i){void 0===e[i]||_.isEmpty(e[i])||(t[i]=e[i])}),_.isEmpty(this.params.choices.fonts.standard)?_.each(kirki.util.webfonts.standard.fonts,function(e,t){a[t]={family:e.stack,label:e.label}}):_.each(this.params.choices.fonts.standard,function(e){void 0===kirki.util.webfonts.standard.fonts[e]||_.isEmpty(kirki.util.webfonts.standard.fonts[e])?a[e]={family:e,label:e}:(a[e]={},"undefined"===kirki.util.webfonts.standard.fonts[e].stack||_.isEmpty(kirki.util.webfonts.standard.fonts[e].stack)?a[e].family=t[e]:a[e].family=kirki.util.webfonts.standard.fonts[e].stack,"undefined"===kirki.util.webfonts.standard.fonts[e].label||_.isEmpty(kirki.util.webfonts.standard.fonts[e].label)?_.isEmpty(a[e])||(a[e].label=a[e]):a[e].label=kirki.util.webfonts.standard.fonts[e].label)}),{google:t,standard:a}},saveValue:function(e,t){var i=this.container.find(".typography-hidden-value"),n=this.setting._value;n[e]=t,jQuery(i).attr("value",JSON.stringify(n)).trigger("change"),this.setting.set(n)}});
\ No newline at end of file
diff --git a/functions/kirki/controls/php/class-kirki-control-background.php b/functions/kirki/controls/php/class-kirki-control-background.php
new file mode 100644
index 0000000..d3d0e1e
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-background.php
@@ -0,0 +1,131 @@
+
+
+ {{{ data.label }}}
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+
+
+
+
+
+
+
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+ selected <# } #>>
+
+
+
+
+
+
+
+
+ = 4.9 ) : ?>
+
+
+ <# valueJSON = JSON.stringify( data.value ).replace( /'/g, ''' ); #>
+
+
+ = 4.9 ) ? '' : '-legacy';
+ $suffix .= ( ! defined( 'SCRIPT_DEBUG' ) || true !== SCRIPT_DEBUG ) ? '.min' : '';
+
+ // The Kirki plugin URL.
+ $kirki_url = trailingslashit( Kirki::$url );
+
+ // Enqueue ColorPicker.
+ wp_enqueue_script( 'wp-color-picker-alpha', trailingslashit( Kirki::$url ) . 'assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js', array( 'wp-color-picker' ), KIRKI_VERSION, true );
+ wp_enqueue_style( 'wp-color-picker' );
+
+ // Enqueue selectWoo.
+ wp_enqueue_script( 'selectWoo', trailingslashit( Kirki::$url ) . 'assets/vendor/selectWoo/js/selectWoo.full.js', array( 'jquery' ), '1.0.1', true );
+ wp_enqueue_style( 'selectWoo', trailingslashit( Kirki::$url ) . 'assets/vendor/selectWoo/css/selectWoo.css', array(), '1.0.1' );
+ wp_enqueue_style( 'kirki-selectWoo', trailingslashit( Kirki::$url ) . 'assets/vendor/selectWoo/kirki.css', null );
+
+ // Enqueue the script.
+ wp_enqueue_script(
+ 'kirki-script',
+ "{$kirki_url}controls/js/dist/script{$suffix}.js",
+ array(
+ 'jquery',
+ 'customize-base',
+ 'wp-color-picker-alpha',
+ 'selectWoo',
+ 'jquery-ui-button',
+ ),
+ KIRKI_VERSION
+ );
+
+ wp_localize_script(
+ 'kirki-script',
+ 'kirkiL10n',
+ array(
+ 'noFileSelected' => esc_attr__( 'No File Selected', 'blogrow' ),
+ 'remove' => esc_attr__( 'Remove', 'blogrow' ),
+ 'default' => esc_attr__( 'Default', 'blogrow' ),
+ 'selectFile' => esc_attr__( 'Select File', 'blogrow' ),
+ 'standardFonts' => esc_attr__( 'Standard Fonts', 'blogrow' ),
+ 'googleFonts' => esc_attr__( 'Google Fonts', 'blogrow' ),
+ )
+ );
+
+ $suffix = str_replace( '.min', '', $suffix );
+ // Enqueue the style.
+ wp_enqueue_style(
+ 'kirki-styles',
+ "{$kirki_url}controls/css/styles{$suffix}.css",
+ array(),
+ KIRKI_VERSION
+ );
+ }
+
+ /**
+ * Refresh the parameters passed to the JavaScript via JSON.
+ *
+ * @see WP_Customize_Control::to_json()
+ */
+ public function to_json() {
+ // Get the basics from the parent class.
+ parent::to_json();
+ // Default.
+ $this->json['default'] = $this->setting->default;
+ if ( isset( $this->default ) ) {
+ $this->json['default'] = $this->default;
+ }
+ // Required.
+ $this->json['required'] = $this->required;
+ // Output.
+ $this->json['output'] = $this->output;
+ // Value.
+ $this->json['value'] = $this->value();
+ // Choices.
+ $this->json['choices'] = $this->choices;
+ // The link.
+ $this->json['link'] = $this->get_link();
+ // The ID.
+ $this->json['id'] = $this->id;
+ // Translation strings.
+ $this->json['l10n'] = $this->l10n();
+ // The ajaxurl in case we need it.
+ $this->json['ajaxurl'] = admin_url( 'admin-ajax.php' );
+ // Input attributes.
+ $this->json['inputAttrs'] = '';
+ foreach ( $this->input_attrs as $attr => $value ) {
+ $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
+ }
+ }
+
+ /**
+ * Render the control's content.
+ *
+ * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`.
+ *
+ * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`.
+ * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly.
+ *
+ * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template().
+ *
+ * @since 3.4.0
+ */
+ protected function render_content() {}
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {}
+
+ /**
+ * Returns an array of translation strings.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return array
+ */
+ protected function l10n() {
+ return array();
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-control-code.php b/functions/kirki/controls/php/class-kirki-control-code.php
new file mode 100644
index 0000000..87e29ff
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-code.php
@@ -0,0 +1,62 @@
+= 0 ) {
+ return;
+ }
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+
+
+
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+ json['choices']['colors'] ) || empty( $this->json['choices']['colors'] ) ) {
+ $this->json['choices']['colors'] = Kirki_Helper::get_material_design_colors( 'primary' );
+ }
+ if ( ! isset( $this->json['choices']['size'] ) || empty( $this->json['choices']['size'] ) ) {
+ $this->json['choices']['size'] = 20;
+ }
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+ <# if ( ! data.choices ) { return; } #>
+
+ {{ data.label }}
+
+ <# if ( data.description ) { #>
+
{{{ data.description }}}
+ <# } #>
+
+ <# for ( key in data.choices['colors'] ) { #>
+ checked<# } #>>
+
+ {{ data.choices['colors'][ key ] }}
+
+
+ <# } #>
+
+ json['palette'] = $this->palette;
+ $this->json['choices']['alpha'] = ( isset( $this->choices['alpha'] ) && $this->choices['alpha'] ) ? 'true' : 'false';
+ $this->json['mode'] = $this->mode;
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-control-custom.php b/functions/kirki/controls/php/class-kirki-control-custom.php
new file mode 100644
index 0000000..a618ee6
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-custom.php
@@ -0,0 +1,62 @@
+
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+ {{{ data.value }}}
+
+ json['icons'] = Kirki_Helper::get_dashicons();
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+ <# if ( data.label ) { #>
{{ data.label }} <# } #>
+ <# if ( data.description ) { #>
{{{ data.description }}} <# } #>
+
+ <# if ( ! _.isUndefined( data.choices ) && 1 < _.size( data.choices ) ) { #>
+ <# for ( key in data.choices ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ <# } else { #>
+
Admin Menu
+ <# for ( key in data.icons['admin-menu'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Welcome Screen
+ <# for ( key in data.icons['welcome-screen'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Post Formats
+ <# for ( key in data.icons['post-formats'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Media
+ <# for ( key in data.icons['media'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Image Editing
+ <# for ( key in data.icons['image-editing'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ TinyMCE
+ <# for ( key in data.icons['tinymce'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Posts
+ <# for ( key in data.icons['posts'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Sorting
+ <# for ( key in data.icons['sorting'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Social
+ <# for ( key in data.icons['social'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ WordPress
+ <# for ( key in data.icons['wordpress_org'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Products
+ <# for ( key in data.icons['products'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Taxonomies
+ <# for ( key in data.icons['taxonomies'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Widgets
+ <# for ( key in data.icons['widgets'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Notifications
+ <# for ( key in data.icons['notifications'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ Misc
+ <# for ( key in data.icons['misc'] ) { #>
+ checked="checked"<# } #>>
+
+
+ <# } #>
+ <# } #>
+
+ = 0 ) {
+ return;
+ }
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+
+
+
+
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+ esc_attr__( 'Invalid Value', 'blogrow' ),
+ ) );
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+ <# var val = ( ! _.isUndefined( data.value ) ) ? data.value.replace( '%%', '%' ) : ''; #>
+
+
+
+ choices ) ) {
+ foreach ( $this->choices as $choice => $value ) {
+ if ( 'labels' !== $choice && true === $value ) {
+ $this->json['choices'][ $choice ] = true;
+ }
+ }
+ }
+ if ( is_array( $this->json['default'] ) ) {
+ foreach ( $this->json['default'] as $key => $value ) {
+ if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) {
+ $this->json['value'][ $key ] = $value;
+ }
+ }
+ }
+ }
+
+ /**
+ * Enqueue control related scripts/styles.
+ *
+ * @access public
+ */
+ public function enqueue() {
+
+ wp_enqueue_style( 'kirki-styles', trailingslashit( Kirki::$url ) . 'controls/css/styles.css', array(), KIRKI_VERSION );
+ wp_localize_script( 'kirki-script', 'dimensionskirkiL10n', $this->l10n() );
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+ <# for ( choiceKey in data.default ) { #>
+
+
+ <# if ( ! _.isUndefined( data.choices.labels ) && ! _.isUndefined( data.choices.labels[ choiceKey ] ) ) { #>
+ {{ data.choices.labels[ choiceKey ] }}
+ <# } else if ( ! _.isUndefined( data.l10n[ choiceKey ] ) ) { #>
+ {{ data.l10n[ choiceKey ] }}
+ <# } else { #>
+ {{ choiceKey }}
+ <# } #>
+
+
+ <# var val = ( ! _.isUndefined( data.value ) && ! _.isUndefined( data.value[ choiceKey ] ) ) ? data.value[ choiceKey ].replace( '%%', '%' ) : ''; #>
+
+
+
+ <# } #>
+
+
+
+ esc_attr__( 'Left Top', 'blogrow' ),
+ 'left-center' => esc_attr__( 'Left Center', 'blogrow' ),
+ 'left-bottom' => esc_attr__( 'Left Bottom', 'blogrow' ),
+ 'right-top' => esc_attr__( 'Right Top', 'blogrow' ),
+ 'right-center' => esc_attr__( 'Right Center', 'blogrow' ),
+ 'right-bottom' => esc_attr__( 'Right Bottom', 'blogrow' ),
+ 'center-top' => esc_attr__( 'Center Top', 'blogrow' ),
+ 'center-center' => esc_attr__( 'Center Center', 'blogrow' ),
+ 'center-bottom' => esc_attr__( 'Center Bottom', 'blogrow' ),
+ 'font-size' => esc_attr__( 'Font Size', 'blogrow' ),
+ 'font-weight' => esc_attr__( 'Font Weight', 'blogrow' ),
+ 'line-height' => esc_attr__( 'Line Height', 'blogrow' ),
+ 'font-style' => esc_attr__( 'Font Style', 'blogrow' ),
+ 'letter-spacing' => esc_attr__( 'Letter Spacing', 'blogrow' ),
+ 'word-spacing' => esc_attr__( 'Word Spacing', 'blogrow' ),
+ 'top' => esc_attr__( 'Top', 'blogrow' ),
+ 'bottom' => esc_attr__( 'Bottom', 'blogrow' ),
+ 'left' => esc_attr__( 'Left', 'blogrow' ),
+ 'right' => esc_attr__( 'Right', 'blogrow' ),
+ 'center' => esc_attr__( 'Center', 'blogrow' ),
+ 'size' => esc_attr__( 'Size', 'blogrow' ),
+ 'height' => esc_attr__( 'Height', 'blogrow' ),
+ 'spacing' => esc_attr__( 'Spacing', 'blogrow' ),
+ 'width' => esc_attr__( 'Width', 'blogrow' ),
+ 'height' => esc_attr__( 'Height', 'blogrow' ),
+ 'invalid-value' => esc_attr__( 'Invalid Value', 'blogrow' ),
+ );
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-control-editor.php b/functions/kirki/controls/php/class-kirki-control-editor.php
new file mode 100644
index 0000000..0ba0163
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-editor.php
@@ -0,0 +1,55 @@
+
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+ <# if ( data.label ) { #>{{ data.label }} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+ <#
+ var saveAs = 'url';
+ if ( ! _.isUndefined( data.choices ) && ! _.isUndefined( data.choices.save_as ) ) {
+ saveAs = data.choices.save_as;
+ }
+ url = data.value;
+ if ( _.isObject( data.value ) && ! _.isUndefined( data.value.url ) ) {
+ url = data.value.url;
+ }
+ #>
+
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+ {{{ data.description }}}
+ <# } #>
+
+
+
+ <# if ( ! data.choices ) { return; } #>
+
+ <# if ( data.label ) { #>
{{ data.label }} <# } #>
+ <# if ( data.description ) { #>
{{{ data.description }}} <# } #>
+
+
+ json['alpha'] = (bool) $this->alpha;
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+ = 4.9 ) : ?>
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+
{{{ data.description }}}
+ <# } #>
+
+ <# for ( key in data.choices ) { #>
+ <# if ( 'irisArgs' !== key ) { #>
+
+
+
+ <# } #>
+ <# } #>
+
+ = 4.9 ) : ?>
+
+
+
+
+
+
+
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+
{{{ data.description }}}
+ <# } #>
+
+ <# for ( key in data.choices ) { #>
+ <# if ( 'irisArgs' !== key ) { #>
+
+ <# if ( data.choices[ key ] ) { #>
+ {{ data.choices[ key ] }}
+ <# } #>
+
+
+ <# } #>
+ <# } #>
+
+
+
+
+ <# if ( ! data.choices ) { return; } #>
+
+ {{ data.label }}
+
+ <# if ( data.description ) { #>
+
{{{ data.description }}}
+ <# } #>
+
+ <# for ( key in data.choices ) { #>
+ checked<# } #>>
+
+ <# for ( color in data.choices[ key ] ) { #>
+ {{ data.choices[ key ][ color ] }}
+ <# } #>
+
+
+ <# } #>
+
+
+ <# if ( ! data.choices ) return; #>
+
+ <# if ( data.label ) { #>{{ data.label }} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+ <# for ( key in data.choices ) { #>
+ selected<# } #>>
+ {{ data.choices[ key ]['label'] }}
+
+ <# } #>
+
+
+
+ <# if ( data.label ) { #>
{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>
{{{ data.description }}} <# } #>
+
+ <# for ( key in data.choices ) { #>
+ checked="checked" <# } #>>
+ {{ data.choices[ key ] }}
+
+ <# } #>
+
+ input_attrs as $attr => $value ) {
+ if ( 'style' !== $attr ) {
+ $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
+ continue;
+ }
+ $this->json['labelStyle'] = 'style="' . esc_attr( $value ) . '" ';
+ }
+
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+ row_label = array(
+ 'type' => 'text',
+ 'value' => esc_attr__( 'row', 'blogrow' ),
+ 'field' => false,
+ );
+
+ // Validate row-labels.
+ $this->row_label( $args );
+
+ if ( empty( $this->button_label ) ) {
+ /* translators: %s represents the label of the row. */
+ $this->button_label = sprintf( esc_attr__( 'Add new %s', 'blogrow' ), $this->row_label['value'] );
+ }
+
+ if ( empty( $args['fields'] ) || ! is_array( $args['fields'] ) ) {
+ $args['fields'] = array();
+ }
+
+ // An array to store keys of fields that need to be filtered.
+ $media_fields_to_filter = array();
+
+ foreach ( $args['fields'] as $key => $value ) {
+ if ( ! isset( $value['default'] ) ) {
+ $args['fields'][ $key ]['default'] = '';
+ }
+ if ( ! isset( $value['label'] ) ) {
+ $args['fields'][ $key ]['label'] = '';
+ }
+ $args['fields'][ $key ]['id'] = $key;
+
+ // We check if the filed is an uploaded media ( image , file, video, etc.. ).
+ if ( isset( $value['type'] ) ) {
+ switch ( $value['type'] ) {
+ case 'image':
+ case 'cropped_image':
+ case 'upload':
+ // We add it to the list of fields that need some extra filtering/processing.
+ $media_fields_to_filter[ $key ] = true;
+ break;
+
+ case 'dropdown-pages':
+ // If the field is a dropdown-pages field then add it to args.
+ $dropdown = wp_dropdown_pages(
+ array(
+ 'name' => '',
+ 'echo' => 0,
+ 'show_option_none' => esc_attr__( 'Select a Page', 'blogrow' ),
+ 'option_none_value' => '0',
+ 'selected' => '',
+ )
+ );
+ // Hackily add in the data link parameter.
+ $dropdown = str_replace( '
get_link(), $dropdown );
+ $args['fields'][ $key ]['dropdown'] = $dropdown;
+ break;
+ }
+ }
+ } // End foreach().
+
+ $this->fields = $args['fields'];
+
+ // Now we are going to filter the fields.
+ // First we create a copy of the value that would be used otherwise.
+ $this->filtered_value = $this->value();
+
+ if ( is_array( $this->filtered_value ) && ! empty( $this->filtered_value ) ) {
+
+ // We iterate over the list of fields.
+ foreach ( $this->filtered_value as &$filtered_value_field ) {
+
+ if ( is_array( $filtered_value_field ) && ! empty( $filtered_value_field ) ) {
+
+ // We iterate over the list of properties for this field.
+ foreach ( $filtered_value_field as $key => &$value ) {
+
+ // We check if this field was marked as requiring extra filtering (in this case image, cropped_images, upload).
+ if ( array_key_exists( $key, $media_fields_to_filter ) ) {
+
+ // What follows was made this way to preserve backward compatibility.
+ // The repeater control use to store the URL for images instead of the attachment ID.
+ // We check if the value look like an ID (otherwise it's probably a URL so don't filter it).
+ if ( is_numeric( $value ) ) {
+
+ // "sanitize" the value.
+ $attachment_id = (int) $value;
+
+ // Try to get the attachment_url.
+ $url = wp_get_attachment_url( $attachment_id );
+
+ $filename = basename( get_attached_file( $attachment_id ) );
+
+ // If we got a URL.
+ if ( $url ) {
+
+ // 'id' is needed for form hidden value, URL is needed to display the image.
+ $value = array(
+ 'id' => $attachment_id,
+ 'url' => $url,
+ 'filename' => $filename,
+ );
+ }
+ }
+ }
+ }
+ }
+ } // End foreach().
+ } // End if().
+ }
+
+ /**
+ * Refresh the parameters passed to the JavaScript via JSON.
+ *
+ * @access public
+ */
+ public function to_json() {
+ parent::to_json();
+
+ $fields = $this->fields;
+
+ $this->json['fields'] = $fields;
+ $this->json['row_label'] = $this->row_label;
+
+ // If filtered_value has been set and is not empty we use it instead of the actual value.
+ if ( is_array( $this->filtered_value ) && ! empty( $this->filtered_value ) ) {
+ $this->json['value'] = $this->filtered_value;
+ }
+ $this->json['value'] = apply_filters( "kirki/controls/repeater/value/{$this->id}", $this->json['value'] );
+ }
+
+ /**
+ * Render the control's content.
+ * Allows the content to be overriden without having to rewrite the wrapper in $this->render().
+ *
+ * @access protected
+ */
+ protected function render_content() {
+ ?>
+
+ label ) ) : ?>
+ label ); ?>
+
+ description ) ) : ?>
+ description ); ?>
+
+ get_link() ); ?> />
+
+
+
+
+ choices['limit'] ) ) : ?>
+
+
+ choices['limit'] ) ); ?>
+
+ button_label ); ?>
+
+ repeater_js_template();
+
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ * Class variables for this control class are available in the `data` JS object.
+ *
+ * @access public
+ */
+ public function repeater_js_template() {
+ ?>
+
+ row_label['type'] = $args['row_label']['type'];
+ }
+
+ // Validating row label type.
+ if ( isset( $args['row_label']['value'] ) && ! empty( $args['row_label']['value'] ) ) {
+ $this->row_label['value'] = esc_attr( $args['row_label']['value'] );
+ }
+
+ // Validating row label field.
+ if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][ esc_attr( $args['row_label']['field'] ) ] ) ) {
+ $this->row_label['field'] = esc_attr( $args['row_label']['field'] );
+ } else {
+ // If from field is not set correctly, making sure standard is set as the type.
+ $this->row_label['type'] = 'text';
+ }
+ }
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-control-select.php b/functions/kirki/controls/php/class-kirki-control-select.php
new file mode 100644
index 0000000..8eb28ba
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-select.php
@@ -0,0 +1,49 @@
+json['multiple'] = $this->multiple;
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-control-slider.php b/functions/kirki/controls/php/class-kirki-control-slider.php
new file mode 100644
index 0000000..9fe4184
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-control-slider.php
@@ -0,0 +1,74 @@
+json['choices'] = wp_parse_args( $this->json['choices'], array(
+ 'min' => '0',
+ 'max' => '100',
+ 'step' => '1',
+ 'suffix' => '',
+ ) );
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+
+ {{ data.choices['suffix'] }}
+
+
+
+
+
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+ {{{ data.description }}}
+ <# } #>
+
+
+ <# _.each( data.value, function( choiceID ) { #>
+
+
+
+ {{{ data.choices[ choiceID ] }}}
+
+ <# }); #>
+ <# _.each( data.choices, function( choiceLabel, choiceID ) { #>
+ <# if ( -1 === data.value.indexOf( choiceID ) ) { #>
+
+
+
+ {{{ data.choices[ choiceID ] }}}
+
+ <# } #>
+ <# }); #>
+
+
+
+
+
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+ {{{ data.description }}}
+ <# } #>
+ checked<# } #> />
+
+
+ <# data.choices.on = data.choices.on || '' #>
+ {{ data.choices.on }}
+
+
+ <# data.choices.off = data.choices.off || '' #>
+ {{ data.choices.off }}
+
+
+
+
+
+
+ {{{ data.label }}}
+
+ <# if ( data.description ) { #>
+ {{{ data.description }}}
+ <# } #>
+ checked<# } #> hidden />
+
+
+ = 4.9 ) {
+ return;
+ }
+ $custom_fonts_array = ( isset( $this->choices['fonts'] ) && ( isset( $this->choices['fonts']['google'] ) || isset( $this->choices['fonts']['standard'] ) ) && ( ! empty( $this->choices['fonts']['google'] ) || ! empty( $this->choices['fonts']['standard'] ) ) );
+ $localize_script_var = ( $custom_fonts_array ) ? 'kirkiFonts' . $this->id : 'kirkiAllFonts';
+ wp_localize_script(
+ 'kirki-script', $localize_script_var, array(
+ 'standard' => $this->get_standard_fonts(),
+ 'google' => $this->get_google_fonts(),
+ )
+ );
+ }
+
+ /**
+ * Refresh the parameters passed to the JavaScript via JSON.
+ *
+ * @see WP_Customize_Control::to_json()
+ */
+ public function to_json() {
+ parent::to_json();
+
+ if ( is_array( $this->json['value'] ) ) {
+ foreach ( array_keys( $this->json['value'] ) as $key ) {
+ if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][ $key ] ) ) {
+ unset( $this->json['value'][ $key ] );
+ }
+ // Fix for https://wordpress.org/support/topic/white-font-after-updateing-to-3-0-16.
+ if ( ! isset( $this->json['default'][ $key ] ) ) {
+ unset( $this->json['value'][ $key ] );
+ }
+ // Fix for https://github.com/aristath/kirki/issues/1405.
+ if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) {
+ unset( $this->json['value'][ $key ] );
+ }
+ }
+ }
+
+ $this->json['show_variants'] = ( true === Kirki_Fonts_Google::$force_load_all_variants ) ? false : true;
+ $this->json['show_subsets'] = ( true === Kirki_Fonts_Google::$force_load_all_subsets ) ? false : true;
+ $this->json['languages'] = Kirki_Fonts::get_google_font_subsets();
+ }
+
+ /**
+ * An Underscore (JS) template for this control's content (but not its container).
+ *
+ * Class variables for this control class are available in the `data` JS object;
+ * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+ *
+ * @see WP_Customize_Control::print_template()
+ *
+ * @access protected
+ */
+ protected function content_template() {
+ ?>
+
+ <# if ( data.label ) { #>{{{ data.label }}} <# } #>
+ <# if ( data.description ) { #>{{{ data.description }}} <# } #>
+
+
+
+
+ <# if ( data.default['font-family'] ) { #>
+ <# data.value['font-family'] = data.value['font-family'] || data['default']['font-family']; #>
+ <# if ( data.choices['fonts'] ) { data.fonts = data.choices['fonts']; } #>
+
+
+
+
+ <# if ( ! _.isUndefined( data.choices['font-backup'] ) && true === data.choices['font-backup'] ) { #>
+
+
+
+
+ <# } #>
+ <# if ( true === data.show_variants || false !== data.default.variant ) { #>
+
+
+
+
+ <# } #>
+ <# if ( true === data.show_subsets ) { #>
+
+
+ multiple<# } #>>
+ <# _.each( data.value.subsets, function( subset ) { #>
+ {{ data.languages[ subset ] }}
+ <# } ); #>
+
+
+ <# } #>
+ <# } #>
+
+ <# if ( data.default['font-size'] ) { #>
+ <# data.value['font-size'] = data.value['font-size'] || data['default']['font-size']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( data.default['line-height'] ) { #>
+ <# data.value['line-height'] = data.value['line-height'] || data['default']['line-height']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( data.default['letter-spacing'] ) { #>
+ <# data.value['letter-spacing'] = data.value['letter-spacing'] || data['default']['letter-spacing']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( data.default['word-spacing'] ) { #>
+ <# data.value['word-spacing'] = data.value['word-spacing'] || data['default']['word-spacing']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( data.default['text-align'] ) { #>
+ <# data.value['text-align'] = data.value['text-align'] || data['default']['text-align']; #>
+
+ <# } #>
+
+ <# if ( data.default['text-transform'] ) { #>
+ <# data.value['text-transform'] = data.value['text-transform'] || data['default']['text-transform']; #>
+
+
+
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+
+
+ <# } #>
+
+ <# if ( data.default['text-decoration'] ) { #>
+ <# data.value['text-decoration'] = data.value['text-decoration'] || data['default']['text-decoration']; #>
+
+
+
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+ selected<# } #>>
+
+
+ <# } #>
+
+ <# if ( data.default['margin-top'] ) { #>
+ <# data.value['margin-top'] = data.value['margin-top'] || data['default']['margin-top']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( data.default['margin-bottom'] ) { #>
+ <# data.value['margin-bottom'] = data.value['margin-bottom'] || data['default']['margin-bottom']; #>
+
+
+
+
+ <# } #>
+
+ <# if ( false !== data.default['color'] && data.default['color'] ) { #>
+ <# data.value['color'] = data.value['color'] || data['default']['color']; #>
+
+
+
+
+ <# } #>
+
+
+ = 4.9 ) : ?>
+
+
+
+ <#
+ if ( ! _.isUndefined( data.value['font-family'] ) ) {
+ data.value['font-family'] = data.value['font-family'].replace( /"/g, ''' );
+ }
+ valueJSON = JSON.stringify( data.value ).replace( /'/g, ''' );
+ #>
+
+ $variant,
+ 'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant,
+ );
+ } elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) {
+ $final_variants[] = $variant;
+ }
+ }
+ return $final_variants;
+ }
+
+ /**
+ * Gets standard fonts properly formatted for our control.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return array
+ */
+ protected function get_standard_fonts() {
+ // Add fonts to our JS objects.
+ $standard_fonts = Kirki_Fonts::get_standard_fonts();
+
+ $std_user_keys = array();
+ if ( isset( $this->choices['fonts'] ) && isset( $this->choices['fonts']['standard'] ) ) {
+ $std_user_keys = $this->choices['fonts']['standard'];
+ }
+
+ $standard_fonts_final = array();
+ $default_variants = $this->format_variants_array(
+ array(
+ 'regular',
+ 'italic',
+ '700',
+ '700italic',
+ )
+ );
+ foreach ( $standard_fonts as $key => $font ) {
+ if ( ( ! empty( $std_user_keys ) && ! in_array( $key, $std_user_keys, true ) ) || ! isset( $font['stack'] ) || ! isset( $font['label'] ) ) {
+ continue;
+ }
+ $standard_fonts_final[] = array(
+ 'family' => $font['stack'],
+ 'label' => $font['label'],
+ 'subsets' => array(),
+ 'is_standard' => true,
+ 'variants' => ( isset( $font['variants'] ) ) ? $this->format_variants_array( $font['variants'] ) : $default_variants,
+ );
+ }
+ return $standard_fonts_final;
+ }
+
+ /**
+ * Gets google fonts properly formatted for our control.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return array
+ */
+ protected function get_google_fonts() {
+ // Add fonts to our JS objects.
+ $google_fonts = Kirki_Fonts::get_google_fonts();
+ $all_variants = Kirki_Fonts::get_all_variants();
+ $all_subsets = Kirki_Fonts::get_google_font_subsets();
+
+ $gf_user_keys = array();
+ if ( isset( $this->choices['fonts'] ) && isset( $this->choices['fonts']['google'] ) ) {
+ $gf_user_keys = $this->choices['fonts']['google'];
+ }
+
+ $google_fonts_final = array();
+ foreach ( $google_fonts as $family => $args ) {
+ if ( ! empty( $gf_user_keys ) && ! in_array( $family, $gf_user_keys, true ) ) {
+ continue;
+ }
+
+ $label = ( isset( $args['label'] ) ) ? $args['label'] : $family;
+ $variants = ( isset( $args['variants'] ) ) ? $args['variants'] : array( 'regular', '700' );
+ $subsets = ( isset( $args['subsets'] ) ) ? $args['subsets'] : array();
+
+ $available_variants = array();
+ if ( is_array( $variants ) ) {
+ foreach ( $variants as $variant ) {
+ if ( array_key_exists( $variant, $all_variants ) ) {
+ $available_variants[] = array(
+ 'id' => $variant,
+ 'label' => $all_variants[ $variant ],
+ );
+ }
+ }
+ }
+
+ $available_subsets = array();
+ if ( is_array( $subsets ) ) {
+ foreach ( $subsets as $subset ) {
+ if ( array_key_exists( $subset, $all_subsets ) ) {
+ $available_subsets[] = array(
+ 'id' => $subset,
+ 'label' => $all_subsets[ $subset ],
+ );
+ }
+ }
+ }
+
+ $google_fonts_final[] = array(
+ 'family' => $family,
+ 'label' => $label,
+ 'variants' => $available_variants,
+ 'subsets' => $available_subsets,
+ );
+ } // End foreach().
+ return $google_fonts_final;
+ }
+}
diff --git a/functions/kirki/controls/php/class-kirki-settings-repeater-setting.php b/functions/kirki/controls/php/class-kirki-settings-repeater-setting.php
new file mode 100644
index 0000000..0c04de6
--- /dev/null
+++ b/functions/kirki/controls/php/class-kirki-settings-repeater-setting.php
@@ -0,0 +1,84 @@
+id}", array( $this, 'sanitize_repeater_setting' ), 10, 1 );
+ }
+
+ /**
+ * Fetch the value of the setting.
+ *
+ * @access public
+ * @return mixed The value.
+ */
+ public function value() {
+ $value = parent::value();
+ if ( ! is_array( $value ) ) {
+ $value = array();
+ }
+
+ return $value;
+ }
+
+ /**
+ * Convert the JSON encoded setting coming from Customizer to an Array.
+ *
+ * @access public
+ * @param string $value URL Encoded JSON Value.
+ * @return array
+ */
+ public function sanitize_repeater_setting( $value ) {
+
+ if ( ! is_array( $value ) ) {
+ $value = json_decode( urldecode( $value ) );
+ }
+ $sanitized = ( empty( $value ) || ! is_array( $value ) ) ? array() : $value;
+
+ // Make sure that every row is an array, not an object.
+ foreach ( $sanitized as $key => $_value ) {
+ $sanitized[ $key ] = (array) $_value;
+ if ( empty( $_value ) ) {
+ unset( $sanitized[ $key ] );
+ }
+ }
+
+ // Reindex array.
+ if ( is_array( $sanitized ) ) {
+ $sanitized = array_values( $sanitized );
+ }
+
+ return $sanitized;
+
+ }
+}
diff --git a/functions/kirki/controls/views/code.php b/functions/kirki/controls/views/code.php
new file mode 100644
index 0000000..13e0b54
--- /dev/null
+++ b/functions/kirki/controls/views/code.php
@@ -0,0 +1,24 @@
+<#
+data = _.defaults( data, {
+ id: '',
+ label: '',
+ description: '',
+ input_attrs: {}
+});
+<# var elementIdPrefix = 'el' + String( Math.random() ); #>
+
diff --git a/functions/kirki/controls/views/color.php b/functions/kirki/controls/views/color.php
new file mode 100644
index 0000000..c78b426
--- /dev/null
+++ b/functions/kirki/controls/views/color.php
@@ -0,0 +1,35 @@
+<#
+data = _.defaults( data, {
+ label: '',
+ description: '',
+ mode: 'full',
+ inputAttrs: '',
+ 'data-palette': data['data-palette'] ? data['data-palette'] : true,
+ 'data-default-color': data['data-default-color'] ? data['data-default-color'] : '',
+ 'data-alpha': data['data-alpha'] ? data['data-alpha'] : false,
+ value: '',
+ 'data-id': ''
+} );
+#>
+
+
+
+ <# if ( data.label ) { #>
+ {{ data.label }}
+ <# } #>
+ <# if ( data.description ) { #>
+ {{ data.description }}
+ <# } #>
+
+
+
diff --git a/functions/kirki/controls/views/generic.php b/functions/kirki/controls/views/generic.php
new file mode 100644
index 0000000..d799ca9
--- /dev/null
+++ b/functions/kirki/controls/views/generic.php
@@ -0,0 +1,31 @@
+<#
+element = ( data.choices.element ) ? data.choices.element : 'input';
+data = _.defaults( data, {
+ label: '',
+ description: '',
+ inputAttrs: '',
+ value: '',
+ 'data-id': '',
+ choices: {}
+} );
+#>
+
diff --git a/functions/kirki/controls/views/radio.php b/functions/kirki/controls/views/radio.php
new file mode 100644
index 0000000..320d26d
--- /dev/null
+++ b/functions/kirki/controls/views/radio.php
@@ -0,0 +1,36 @@
+<# data = _.defaults( data, {
+ choices: {},
+ label: '',
+ description: '',
+ inputAttrs: '',
+ value: '',
+ 'data-id': '',
+ 'default': ''
+} );
+#>
+
+
+ <# if ( data.label ) { #>
+ {{ data.label }}
+ <# } #>
+ <# if ( data.description ) { #>
+ {{ data.description }}
+ <# } #>
+ <# _.each( data.choices, function( val, key ) { #>
+
+ checked<# } #>
+ />
+ <# if ( _.isArray( val ) ) { #>
+ {{{ val[0] }}}{{{ val[1] }}}
+ <# } else { #>
+ {{ val }}
+ <# } #>
+
+ <# } ); #>
+
diff --git a/functions/kirki/controls/views/select.php b/functions/kirki/controls/views/select.php
new file mode 100644
index 0000000..ef03ec2
--- /dev/null
+++ b/functions/kirki/controls/views/select.php
@@ -0,0 +1,56 @@
+<#
+data = _.defaults( data, {
+ label: '',
+ description: '',
+ inputAttrs: '',
+ 'data-id': '',
+ choices: {},
+ multiple: 1,
+ value: ( 1 < data.multiple ) ? [] : ''
+} );
+
+if ( 1 < data.multiple && data.value && _.isString( data.value ) ) {
+ data.value = [ data.value ];
+}
+#>
+
+
+ <# if ( data.label ) { #>
+ {{ data.label }}
+ <# } #>
+ <# if ( data.description ) { #>
+ {{ data.description }}
+ <# } #>
+
+ data-multiple="{{ data.multiple }}" multiple="multiple"
+ <# } #>
+ >
+ <# _.each( data.choices, function( optionLabel, optionKey ) { #>
+ <#
+ selected = ( data.value === optionKey );
+ if ( 1 < data.multiple && data.value ) {
+ selected = _.contains( data.value, optionKey );
+ }
+ if ( _.isObject( optionLabel ) ) {
+ #>
+
+ <# _.each( optionLabel[1], function( optgroupOptionLabel, optgroupOptionKey ) { #>
+ <#
+ selected = ( data.value === optgroupOptionKey );
+ if ( 1 < data.multiple && data.value ) {
+ selected = _.contains( data.value, optgroupOptionKey );
+ }
+ #>
+ selected<# } #>>{{{ optgroupOptionLabel }}}
+ <# } ); #>
+
+ <# } else { #>
+ selected<# } #>>{{{ optionLabel }}}
+ <# } #>
+ <# } ); #>
+
+
+
diff --git a/functions/kirki/controls/views/textarea.php b/functions/kirki/controls/views/textarea.php
new file mode 100644
index 0000000..d6b0a0e
--- /dev/null
+++ b/functions/kirki/controls/views/textarea.php
@@ -0,0 +1,29 @@
+<#
+data = _.defaults( data, {
+ label: '',
+ description: '',
+ inputAttrs: '',
+ value: '',
+ 'data-id': '',
+ choices: {}
+} );
+#>
+
diff --git a/functions/kirki/core/class-kirki-config.php b/functions/kirki/core/class-kirki-config.php
new file mode 100644
index 0000000..c4a9f80
--- /dev/null
+++ b/functions/kirki/core/class-kirki-config.php
@@ -0,0 +1,163 @@
+ $value ) {
+ // Is this property whitelisted?
+ if ( property_exists( $this, $key ) ) {
+ $args[ $key ] = $value;
+ }
+ }
+
+ $this->config_final = wp_parse_args(
+ array(
+ 'id' => $config_id,
+ ),
+ $args
+ );
+ }
+
+ /**
+ * Use this method to get an instance of your config.
+ * Each config has its own instance of this object.
+ *
+ * @static
+ * @access public
+ * @param string $id Config ID.
+ * @param array $args {
+ * Optional. Arguments to override config defaults.
+ *
+ * @type string $capability @see https://codex.wordpress.org/Roles_and_Capabilities
+ * @type string $option_type theme_mod or option.
+ * @type string $option_name If we want to used serialized options,
+ * this is where we'll be adding the option name.
+ * All fields using this config will be items in that array.
+ * @type array $compiler Not yet fully implemented
+ * @type bool $disable_output If set to true, no CSS will be generated
+ * from fields using this configuration.
+ * }
+ *
+ * @return Kirki_Config
+ */
+ public static function get_instance( $id = 'global', $args = array() ) {
+
+ $id = trim( esc_attr( $id ) );
+ $id = ( '' === $id ) ? 'global' : $id;
+
+ $id_md5 = md5( $id );
+ if ( ! isset( self::$instances[ $id_md5 ] ) ) {
+ self::$instances[ $id_md5 ] = new self( $id, $args );
+ }
+ return self::$instances[ $id_md5 ];
+
+ }
+
+ /**
+ * Returns the $config_final property
+ *
+ * @access public
+ * @return array
+ */
+ public function get_config() {
+
+ return $this->config_final;
+ }
+}
diff --git a/functions/kirki/core/class-kirki-control.php b/functions/kirki/core/class-kirki-control.php
new file mode 100644
index 0000000..b563a7e
--- /dev/null
+++ b/functions/kirki/core/class-kirki-control.php
@@ -0,0 +1,137 @@
+wp_customize = $wp_customize;
+
+ // Set the control types.
+ $this->set_control_types();
+ // Add the control.
+ $this->add_control( $args );
+
+ }
+
+ /**
+ * Get the class name of the class needed to create tis control.
+ *
+ * @access private
+ * @param array $args The field definition as sanitized in Kirki_Field.
+ *
+ * @return string the name of the class that will be used to create this control.
+ */
+ final private function get_control_class_name( $args ) {
+
+ // Set a default class name.
+ $class_name = 'WP_Customize_Control';
+ // Get the classname from the array of control classnames.
+ if ( array_key_exists( $args['type'], self::$control_types ) ) {
+ $class_name = self::$control_types[ $args['type'] ];
+ }
+ return $class_name;
+
+ }
+
+ /**
+ * Adds the control.
+ *
+ * @access protected
+ * @param array $args The field definition as sanitized in Kirki_Field.
+ */
+ final protected function add_control( $args ) {
+
+ // Get the name of the class we're going to use.
+ $class_name = $this->get_control_class_name( $args );
+ // Fixes https://github.com/aristath/kirki/issues/1622.
+ if ( 'kirki-code' === $args['type'] && class_exists( 'WP_Customize_Code_Editor_Control' ) ) {
+ $this->wp_customize->add_control(
+ new WP_Customize_Code_Editor_Control(
+ $this->wp_customize,
+ $args['settings'],
+ array(
+ 'label' => isset( $args['label'] ) ? $args['label'] : '',
+ 'section' => $args['section'],
+ 'settings' => $args['settings'],
+ 'code_type' => isset( $args['choices'] ) ? $args['choices']['language'] : 'text/css',
+ 'priority' => isset( $args['priority'] ) ? $args['priority'] : 10,
+ 'input_attrs' => array(
+ 'aria-describedby' => 'editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4',
+ ),
+ )
+ )
+ );
+ return;
+ }
+
+ // Add the control.
+ $this->wp_customize->add_control( new $class_name( $this->wp_customize, $args['settings'], $args ) );
+
+ }
+
+ /**
+ * Sets the $control_types property.
+ * Makes sure the kirki/control_types filter is applied
+ * and that the defined classes actually exist.
+ * If a defined class does not exist, it is removed.
+ *
+ * @access private
+ */
+ final private function set_control_types() {
+
+ // Early exit if this has already run.
+ if ( ! empty( self::$control_types ) ) {
+ return;
+ }
+
+ self::$control_types = apply_filters( 'kirki/control_types', array() );
+
+ // Make sure the defined classes actually exist.
+ foreach ( self::$control_types as $key => $classname ) {
+
+ if ( ! class_exists( $classname ) ) {
+ unset( self::$control_types[ $key ] );
+ }
+ }
+ }
+}
diff --git a/functions/kirki/core/class-kirki-field.php b/functions/kirki/core/class-kirki-field.php
new file mode 100644
index 0000000..18d20db
--- /dev/null
+++ b/functions/kirki/core/class-kirki-field.php
@@ -0,0 +1,685 @@
+ 'auto'
+ * and have already set an array for the 'output' argument.
+ *
+ * @see https://kirki.org/docs/arguments/js_vars
+ * @access protected
+ * @var array
+ */
+ protected $js_vars = array();
+
+ /**
+ * If you want to use a CSS compiler, then use this to set the variable names.
+ *
+ * @see https://kirki.org/docs/arguments/variables
+ * @access protected
+ * @var array
+ */
+ protected $variables = array();
+
+ /**
+ * Text that will be used in a tooltip to provide extra info for this field.
+ *
+ * @access protected
+ * @var string
+ */
+ protected $tooltip = '';
+
+ /**
+ * A custom callback to determine if the field should be visible or not.
+ *
+ * @access protected
+ * @var string|array
+ */
+ protected $active_callback = '__return_true';
+
+ /**
+ * A custom sanitize callback that will be used to properly save the values.
+ *
+ * @access protected
+ * @var string|array
+ */
+ protected $sanitize_callback = '';
+
+ /**
+ * Use 'refresh', 'postMessage' or 'auto'.
+ * 'auto' will automatically geberate any 'js_vars' from the 'output' argument.
+ *
+ * @access protected
+ * @var string
+ */
+ protected $transport = 'refresh';
+
+ /**
+ * Define dependencies to show/hide this field based on the values of other fields.
+ *
+ * @access protected
+ * @var array
+ */
+ protected $required = array();
+
+ /**
+ * Partial Refreshes array.
+ *
+ * @access protected
+ * @var array
+ */
+ protected $partial_refresh = array();
+
+ /**
+ * The class constructor.
+ * Parses and sanitizes all field arguments.
+ * Then it adds the field to Kirki::$fields.
+ *
+ * @access public
+ * @param string $config_id The ID of the config we want to use.
+ * Defaults to "global".
+ * Configs are handled by the Kirki_Config class.
+ * @param array $args The arguments of the field.
+ */
+ public function __construct( $config_id = 'global', $args = array() ) {
+
+ if ( isset( $args['setting'] ) && ! empty( $args['setting'] ) && ( ! isset( $args['settings'] ) || empty( $args['settings'] ) ) ) {
+ /* translators: %s represents the field ID where the error occurs. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( 'Typo found in field %s - setting instead of settings.', 'blogrow' ), esc_attr( $args['settings'] ) ), '3.0.10' );
+ $args['settings'] = $args['setting'];
+ unset( $args['setting'] );
+ }
+
+ // In case the user only provides 1 argument,
+ // assume that the provided argument is $args and set $config_id = 'global'.
+ if ( is_array( $config_id ) && empty( $args ) ) {
+ /* translators: %1$s represents the field ID where the error occurs. %2$s is the URL in the documentation site. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( 'Config not defined for field %1$s - See %2$s for details on how to properly add fields.', 'blogrow' ), esc_attr( $args['settings'] ), 'https://aristath.github.io/kirki/docs/getting-started/fields.html' ), '3.0.10' );
+ $args = $config_id;
+ $config_id = 'global';
+ }
+
+ $args['kirki_config'] = $config_id;
+
+ $this->kirki_config = trim( esc_attr( $config_id ) );
+ if ( '' === $config_id ) {
+ /* translators: %1$s represents the field ID where the error occurs. %2$s is the URL in the documentation site. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( 'Config not defined for field %1$s - See %2$s for details on how to properly add fields.', 'blogrow' ), esc_attr( $args['settings'] ), 'https://aristath.github.io/kirki/docs/getting-started/fields.html' ), '3.0.10' );
+ $this->kirki_config = 'global';
+ }
+
+ // Get defaults from the class.
+ $defaults = get_class_vars( __CLASS__ );
+
+ // Get the config arguments, and merge them with the defaults.
+ $config_defaults = ( isset( Kirki::$config['global'] ) ) ? Kirki::$config['global'] : array();
+ if ( 'global' !== $this->kirki_config && isset( Kirki::$config[ $this->kirki_config ] ) ) {
+ $config_defaults = Kirki::$config[ $this->kirki_config ];
+ }
+ $config_defaults = ( is_array( $config_defaults ) ) ? $config_defaults : array();
+ foreach ( $config_defaults as $key => $value ) {
+ if ( isset( $defaults[ $key ] ) && ! empty( $value ) && $value !== $defaults[ $key ] ) {
+ $defaults[ $key ] = $value;
+ }
+ }
+
+ // Merge our args with the defaults.
+ $args = wp_parse_args( $args, $defaults );
+
+ // Set the class properties using the parsed args.
+ foreach ( $args as $key => $value ) {
+ $this->$key = $value;
+ }
+
+ $this->args = $args;
+
+ $this->set_field();
+ }
+
+ /**
+ * Processes the field arguments
+ *
+ * @access protected
+ */
+ protected function set_field() {
+
+ $properties = get_class_vars( __CLASS__ );
+
+ // Some things must run before the others.
+ $this->set_option_name();
+ $this->set_option_type();
+ $this->set_settings();
+
+ // Sanitize the properties, skipping the ones that have already run above.
+ foreach ( $properties as $property => $value ) {
+ if ( in_array( $property, array( 'option_name', 'option_type', 'settings' ), true ) ) {
+ continue;
+ }
+ if ( method_exists( $this, 'set_' . $property ) ) {
+ $method_name = 'set_' . $property;
+ $this->$method_name();
+ }
+ }
+
+ // Get all arguments with their values.
+ $args = get_object_vars( $this );
+ foreach ( array_keys( $args ) as $key ) {
+ $args[ $key ] = $this->$key;
+ }
+
+ // Add the field to the static $fields variable properly indexed.
+ Kirki::$fields[ $this->settings ] = $args;
+
+ }
+
+ /**
+ * Escape $kirki_config.
+ *
+ * @access protected
+ */
+ protected function set_kirki_config() {
+
+ $this->kirki_config = esc_attr( $this->kirki_config );
+ }
+
+ /**
+ * Escape $option_name.
+ *
+ * @access protected
+ */
+ protected function set_option_name() {
+
+ $this->option_name = esc_attr( $this->option_name );
+ }
+
+ /**
+ * Escape the $section.
+ *
+ * @access protected
+ */
+ protected function set_section() {
+
+ $this->section = sanitize_key( $this->section );
+ }
+
+ /**
+ * Escape the $section.
+ *
+ * @access protected
+ */
+ protected function set_input_attrs() {
+
+ if ( ! is_array( $this->input_attrs ) ) {
+ $this->input_attrs = array();
+ }
+ }
+
+ /**
+ * Checks the capability chosen is valid.
+ * If not, then falls back to 'edit_theme_options'
+ *
+ * @access protected
+ */
+ protected function set_capability() {
+
+ // Early exit if we're using 'edit_theme_options'.
+ if ( 'edit_theme_options' === $this->capability ) {
+ return;
+ }
+ // Escape & trim the capability.
+ $this->capability = trim( esc_attr( $this->capability ) );
+ }
+
+ /**
+ * Make sure we're using the correct option_type
+ *
+ * @access protected
+ */
+ protected function set_option_type() {
+
+ // Take care of common typos.
+ if ( 'options' === $this->option_type ) {
+ $this->option_type = 'option';
+ }
+ // Take care of common typos.
+ if ( 'theme_mods' === $this->option_type ) {
+ /* translators: %1$s represents the field ID where the error occurs. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( 'Typo found in field %s - "theme_mods" vs "theme_mod"', 'blogrow' ), esc_attr( $this->settings ) ), '3.0.10' );
+ $this->option_type = 'theme_mod';
+ }
+ }
+
+ /**
+ * Modifications for partial refreshes.
+ *
+ * @access protected
+ */
+ protected function set_partial_refresh() {
+
+ if ( ! is_array( $this->partial_refresh ) ) {
+ $this->partial_refresh = array();
+ }
+ foreach ( $this->partial_refresh as $id => $args ) {
+ if ( ! is_array( $args ) || ! isset( $args['selector'] ) || ! isset( $args['render_callback'] ) || ! is_callable( $args['render_callback'] ) ) {
+ /* translators: %1$s represents the field ID where the error occurs. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( '"partial_refresh" invalid entry in field %s', 'blogrow' ), esc_attr( $this->settings ) ), '3.0.10' );
+ unset( $this->partial_refresh[ $id ] );
+ continue;
+ }
+ }
+ if ( ! empty( $this->partial_refresh ) ) {
+ $this->transport = 'postMessage';
+ }
+ }
+
+ /**
+ * Sets the settings.
+ * If we're using serialized options it makes sure that settings are properly formatted.
+ * We'll also be escaping all setting names here for consistency.
+ *
+ * @access protected
+ */
+ protected function set_settings() {
+
+ // If settings is not an array, temporarily convert it to an array.
+ // This is just to allow us to process everything the same way and avoid code duplication.
+ // if settings is not an array then it will not be set as an array in the end.
+ if ( ! is_array( $this->settings ) ) {
+ $this->settings = array(
+ 'kirki_placeholder_setting' => $this->settings,
+ );
+ }
+ $settings = array();
+ foreach ( $this->settings as $setting_key => $setting_value ) {
+ $settings[ $setting_key ] = $setting_value;
+ // If we're using serialized options then we need to spice this up.
+ if ( 'option' === $this->option_type && '' !== $this->option_name && ( false === strpos( $setting_key, '[' ) ) ) {
+ $settings[ $setting_key ] = "{$this->option_name}[{$setting_value}]";
+ }
+ }
+ $this->settings = $settings;
+ if ( isset( $this->settings['kirki_placeholder_setting'] ) ) {
+ $this->settings = $this->settings['kirki_placeholder_setting'];
+ }
+ }
+
+ /**
+ * Sets the active_callback
+ * If we're using the $required argument,
+ * Then this is where the switch is made to our evaluation method.
+ *
+ * @access protected
+ */
+ protected function set_active_callback() {
+
+ if ( is_array( $this->active_callback ) && ! is_callable( $this->active_callback ) ) {
+ if ( isset( $this->active_callback[0] ) ) {
+ $this->required = $this->active_callback;
+ }
+ }
+
+ if ( ! empty( $this->required ) ) {
+ $this->active_callback = '__return_true';
+ return;
+ }
+ // No need to proceed any further if we're using the default value.
+ if ( '__return_true' === $this->active_callback ) {
+ return;
+ }
+ // Make sure the function is callable, otherwise fallback to __return_true.
+ if ( ! is_callable( $this->active_callback ) ) {
+ $this->active_callback = '__return_true';
+ }
+ }
+
+ /**
+ * Sets the control type.
+ *
+ * @access protected
+ */
+ protected function set_type() {
+
+ // Escape the control type (it doesn't hurt to be sure).
+ $this->type = esc_attr( $this->type );
+ }
+
+ /**
+ * Sets the $id.
+ * Setting the ID should happen after the 'settings' sanitization.
+ * This way we can also properly handle cases where the option_type is set to 'option'
+ * and we're using an array instead of individual options.
+ *
+ * @access protected
+ */
+ protected function set_id() {
+
+ $this->id = sanitize_key( str_replace( '[', '-', str_replace( ']', '', $this->settings ) ) );
+ }
+
+ /**
+ * Sets the $choices.
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+ }
+
+ /**
+ * Escapes the $disable_output.
+ *
+ * @access protected
+ */
+ protected function set_disable_output() {
+
+ $this->disable_output = (bool) $this->disable_output;
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_output() {
+
+ if ( empty( $this->output ) ) {
+ return;
+ }
+ if ( ! is_array( $this->output ) ) {
+ /* translators: The field ID where the error occurs. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( '"output" invalid format in field %s. The "output" argument should be defined as an array of arrays.', 'blogrow' ), esc_attr( $this->settings ) ), '3.0.10' );
+ $this->output = array(
+ array(
+ 'element' => $this->output,
+ ),
+ );
+ }
+ // Convert to array of arrays if needed.
+ if ( isset( $this->output['element'] ) ) {
+ /* translators: The field ID where the error occurs. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( '"output" invalid format in field %s. The "output" argument should be defined as an array of arrays.', 'blogrow' ), esc_attr( $this->settings ) ), '3.0.10' );
+ $this->output = array( $this->output );
+ }
+ foreach ( $this->output as $key => $output ) {
+ if ( empty( $output ) || ! isset( $output['element'] ) ) {
+ unset( $this->output[ $key ] );
+ continue;
+ }
+ if ( ! isset( $output['sanitize_callback'] ) && isset( $output['callback'] ) ) {
+ $this->output[ $key ]['sanitize_callback'] = $output['callback'];
+ }
+ // Convert element arrays to strings.
+ if ( isset( $output['element'] ) && is_array( $output['element'] ) ) {
+ $this->output[ $key ]['element'] = array_unique( $this->output[ $key ]['element'] );
+ sort( $this->output[ $key ]['element'] );
+
+ // Trim each element in the array.
+ foreach ( $this->output[ $key ]['element'] as $index => $element ) {
+ $this->output[ $key ]['element'][ $index ] = trim( $element );
+ }
+ $this->output[ $key ]['element'] = implode( ',', $this->output[ $key ]['element'] );
+ }
+
+ // Fix for https://github.com/aristath/kirki/issues/1659#issuecomment-346229751.
+ $this->output[ $key ]['element'] = str_replace( array( "\t", "\n", "\r", "\0", "\x0B" ), ' ', $this->output[ $key ]['element'] );
+ $this->output[ $key ]['element'] = trim( preg_replace( '/\s+/', ' ', $this->output[ $key ]['element'] ) );
+ }
+ }
+
+ /**
+ * Sets the $js_vars
+ *
+ * @access protected
+ */
+ protected function set_js_vars() {
+
+ if ( ! is_array( $this->js_vars ) ) {
+ $this->js_vars = array();
+ }
+
+ // Check if transport is set to auto.
+ // If not, then skip the auto-calculations and exit early.
+ if ( 'auto' !== $this->transport ) {
+ return;
+ }
+
+ // Set transport to refresh initially.
+ // Serves as a fallback in case we failt to auto-calculate js_vars.
+ $this->transport = 'refresh';
+
+ $js_vars = array();
+
+ // Try to auto-generate js_vars.
+ // First we need to check if js_vars are empty, and that output is not empty.
+ if ( empty( $this->js_vars ) && ! empty( $this->output ) ) {
+
+ // Start going through each item in the $output array.
+ foreach ( $this->output as $output ) {
+ $output['function'] = ( isset( $output['function'] ) ) ? $output['function'] : 'style';
+
+ // If 'element' or 'property' are not defined, skip this.
+ if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
+ continue;
+ }
+ if ( is_array( $output['element'] ) ) {
+ $output['element'] = implode( ',', $output['element'] );
+ }
+
+ // If there's a sanitize_callback defined skip this, unless we also have a js_callback defined.
+ if ( isset( $output['sanitize_callback'] ) && ! empty( $output['sanitize_callback'] ) && ! isset( $output['js_callback'] ) ) {
+ continue;
+ }
+
+ // If we got this far, it's safe to add this.
+ $js_vars[] = $output;
+ }
+
+ // Did we manage to get all the items from 'output'?
+ // If not, then we're missing something so don't add this.
+ if ( count( $js_vars ) !== count( $this->output ) ) {
+ return;
+ }
+ $this->js_vars = $js_vars;
+ $this->transport = 'postMessage';
+
+ }
+ }
+
+ /**
+ * Sets the $variables
+ *
+ * @access protected
+ */
+ protected function set_variables() {
+
+ if ( ! is_array( $this->variables ) ) {
+ $variable = ( is_string( $this->variables ) && ! empty( $this->variables ) ) ? $this->variables : false;
+ $this->variables = array();
+ if ( $variable && empty( $this->variables ) ) {
+ $this->variables[0]['name'] = $variable;
+ }
+ }
+ }
+
+ /**
+ * Sets the $transport
+ *
+ * @access protected
+ */
+ protected function set_transport() {
+
+ if ( 'postmessage' === trim( strtolower( $this->transport ) ) ) {
+ $this->transport = 'postMessage';
+ }
+ }
+
+ /**
+ * Sets the $required
+ *
+ * @access protected
+ */
+ protected function set_required() {
+
+ if ( ! is_array( $this->required ) ) {
+ $this->required = array();
+ }
+ }
+
+ /**
+ * Sets the $priority
+ *
+ * @access protected
+ */
+ protected function set_priority() {
+
+ $this->priority = absint( $this->priority );
+ }
+}
diff --git a/functions/kirki/core/class-kirki-helper.php b/functions/kirki/core/class-kirki-helper.php
new file mode 100644
index 0000000..c3e8e40
--- /dev/null
+++ b/functions/kirki/core/class-kirki-helper.php
@@ -0,0 +1,412 @@
+ $value ) {
+ // Create new key in $array, if it is empty or not an array.
+ if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) {
+ $array[ $key ] = array();
+ }
+
+ // Overwrite the value in the base array.
+ if ( is_array( $value ) ) {
+ $value = self::recurse( $array[ $key ], $value );
+ }
+ $array[ $key ] = $value;
+ }
+ return $array;
+ }
+
+ /**
+ * Initialize the WP_Filesystem
+ *
+ * @static
+ * @access public
+ * @return object WP_Filesystem
+ */
+ public static function init_filesystem() {
+ global $wp_filesystem;
+ if ( empty( $wp_filesystem ) ) {
+ require_once( ABSPATH . '/wp-admin/includes/file.php' );
+ WP_Filesystem();
+ }
+ return $wp_filesystem;
+ }
+
+ /**
+ * Returns the attachment object
+ *
+ * @static
+ * @access public
+ * @see https://pippinsplugins.com/retrieve-attachment-id-from-image-url/
+ * @param string $url URL to the image.
+ * @return int|string Numeric ID of the attachement.
+ */
+ public static function get_image_id( $url ) {
+ global $wpdb;
+ if ( empty( $url ) ) {
+ return 0;
+ }
+
+ $attachment = wp_cache_get( 'kirki_image_id_' . md5( $url ), null );
+ if ( false === $attachment ) {
+ $attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid = %s;", $url ) );
+ wp_cache_add( 'kirki_image_id_' . md5( $url ), $attachment, null );
+ }
+
+ if ( ! empty( $attachment ) ) {
+ return $attachment[0];
+ }
+ return 0;
+ }
+
+ /**
+ * Returns an array of the attachment's properties.
+ *
+ * @param string $url URL to the image.
+ * @return array
+ */
+ public static function get_image_from_url( $url ) {
+
+ $image_id = self::get_image_id( $url );
+ $image = wp_get_attachment_image_src( $image_id, 'full' );
+
+ return array(
+ 'url' => $image[0],
+ 'width' => $image[1],
+ 'height' => $image[2],
+ 'thumbnail' => $image[3],
+ );
+
+ }
+
+ /**
+ * Get an array of posts.
+ *
+ * @static
+ * @access public
+ * @param array $args Define arguments for the get_posts function.
+ * @return array
+ */
+ public static function get_posts( $args ) {
+
+ if ( is_string( $args ) ) {
+ $args = add_query_arg(
+ array(
+ 'suppress_filters' => false,
+ )
+ );
+ } elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
+ $args['suppress_filters'] = false;
+ }
+
+ // Get the posts.
+ $posts = get_posts( $args );
+
+ // Properly format the array.
+ $items = array();
+ foreach ( $posts as $post ) {
+ $items[ $post->ID ] = $post->post_title;
+ }
+ wp_reset_postdata();
+
+ return $items;
+
+ }
+
+ /**
+ * Get an array of publicly-querable taxonomies.
+ *
+ * @static
+ * @access public
+ * @return array
+ */
+ public static function get_taxonomies() {
+
+ $items = array();
+
+ // Get the taxonomies.
+ $taxonomies = get_taxonomies(
+ array(
+ 'public' => true,
+ )
+ );
+
+ // Build the array.
+ foreach ( $taxonomies as $taxonomy ) {
+ $id = $taxonomy;
+ $taxonomy = get_taxonomy( $taxonomy );
+ $items[ $id ] = $taxonomy->labels->name;
+ }
+
+ return $items;
+
+ }
+
+ /**
+ * Get an array of publicly-querable post-types.
+ *
+ * @static
+ * @access public
+ * @return array
+ */
+ public static function get_post_types() {
+
+ $items = array();
+
+ // Get the post types.
+ $post_types = get_post_types(
+ array(
+ 'public' => true,
+ ), 'objects'
+ );
+
+ // Build the array.
+ foreach ( $post_types as $post_type ) {
+ $items[ $post_type->name ] = $post_type->labels->name;
+ }
+
+ return $items;
+
+ }
+
+ /**
+ * Get an array of terms from a taxonomy
+ *
+ * @static
+ * @access public
+ * @param string|array $taxonomies See https://developer.wordpress.org/reference/functions/get_terms/ for details.
+ * @return array
+ */
+ public static function get_terms( $taxonomies ) {
+
+ $items = array();
+
+ // Get the post types.
+ $terms = get_terms( $taxonomies );
+
+ // Build the array.
+ foreach ( $terms as $term ) {
+ $items[ $term->term_id ] = $term->name;
+ }
+
+ return $items;
+
+ }
+
+ /**
+ * Gets an array of material-design colors.
+ *
+ * @static
+ * @access public
+ * @param string $context Allows us to get subsets of the palette.
+ * @return array
+ */
+ public static function get_material_design_colors( $context = 'primary' ) {
+
+ $colors = array(
+ 'primary' => array( '#FFFFFF', '#000000', '#F44336', '#E91E63', '#9C27B0', '#673AB7', '#3F51B5', '#2196F3', '#03A9F4', '#00BCD4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800', '#FF5722', '#795548', '#9E9E9E', '#607D8B' ),
+ 'red' => array( '#FFEBEE', '#FFCDD2', '#EF9A9A', '#E57373', '#EF5350', '#F44336', '#E53935', '#D32F2F', '#C62828', '#B71C1C', '#FF8A80', '#FF5252', '#FF1744', '#D50000' ),
+ 'pink' => array( '#FCE4EC', '#F8BBD0', '#F48FB1', '#F06292', '#EC407A', '#E91E63', '#D81B60', '#C2185B', '#AD1457', '#880E4F', '#FF80AB', '#FF4081', '#F50057', '#C51162' ),
+ 'purple' => array( '#F3E5F5', '#E1BEE7', '#CE93D8', '#BA68C8', '#AB47BC', '#9C27B0', '#8E24AA', '#7B1FA2', '#6A1B9A', '#4A148C', '#EA80FC', '#E040FB', '#D500F9', '#AA00FF' ),
+ 'deep-purple' => array( '#EDE7F6', '#D1C4E9', '#B39DDB', '#9575CD', '#7E57C2', '#673AB7', '#5E35B1', '#512DA8', '#4527A0', '#311B92', '#B388FF', '#7C4DFF', '#651FFF', '#6200EA' ),
+ 'indigo' => array( '#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E', '#8C9EFF', '#536DFE', '#3D5AFE', '#304FFE' ),
+ 'blue' => array( '#E3F2FD', '#BBDEFB', '#90CAF9', '#64B5F6', '#42A5F5', '#2196F3', '#1E88E5', '#1976D2', '#1565C0', '#0D47A1', '#82B1FF', '#448AFF', '#2979FF', '#2962FF' ),
+ 'light_blue' => array( '#E1F5FE', '#B3E5FC', '#81D4fA', '#4fC3F7', '#29B6FC', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B', '#80D8FF', '#40C4FF', '#00B0FF', '#0091EA' ),
+ 'cyan' => array( '#E0F7FA', '#B2EBF2', '#80DEEA', '#4DD0E1', '#26C6DA', '#00BCD4', '#00ACC1', '#0097A7', '#00838F', '#006064', '#84FFFF', '#18FFFF', '#00E5FF', '#00B8D4' ),
+ 'teal' => array( '#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40', '#A7FFEB', '#64FFDA', '#1DE9B6', '#00BFA5' ),
+ 'green' => array( '#E8F5E9', '#C8E6C9', '#A5D6A7', '#81C784', '#66BB6A', '#4CAF50', '#43A047', '#388E3C', '#2E7D32', '#1B5E20', '#B9F6CA', '#69F0AE', '#00E676', '#00C853' ),
+ 'light-green' => array( '#F1F8E9', '#DCEDC8', '#C5E1A5', '#AED581', '#9CCC65', '#8BC34A', '#7CB342', '#689F38', '#558B2F', '#33691E', '#CCFF90', '#B2FF59', '#76FF03', '#64DD17' ),
+ 'lime' => array( '#F9FBE7', '#F0F4C3', '#E6EE9C', '#DCE775', '#D4E157', '#CDDC39', '#C0CA33', '#A4B42B', '#9E9D24', '#827717', '#F4FF81', '#EEFF41', '#C6FF00', '#AEEA00' ),
+ 'yellow' => array( '#FFFDE7', '#FFF9C4', '#FFF590', '#FFF176', '#FFEE58', '#FFEB3B', '#FDD835', '#FBC02D', '#F9A825', '#F57F17', '#FFFF82', '#FFFF00', '#FFEA00', '#FFD600' ),
+ 'amber' => array( '#FFF8E1', '#FFECB3', '#FFE082', '#FFD54F', '#FFCA28', '#FFC107', '#FFB300', '#FFA000', '#FF8F00', '#FF6F00', '#FFE57F', '#FFD740', '#FFC400', '#FFAB00' ),
+ 'orange' => array( '#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100', '#FFD180', '#FFAB40', '#FF9100', '#FF6D00' ),
+ 'deep-orange' => array( '#FBE9A7', '#FFCCBC', '#FFAB91', '#FF8A65', '#FF7043', '#FF5722', '#F4511E', '#E64A19', '#D84315', '#BF360C', '#FF9E80', '#FF6E40', '#FF3D00', '#DD2600' ),
+ 'brown' => array( '#EFEBE9', '#D7CCC8', '#BCAAA4', '#A1887F', '#8D6E63', '#795548', '#6D4C41', '#5D4037', '#4E342E', '#3E2723' ),
+ 'grey' => array( '#FAFAFA', '#F5F5F5', '#EEEEEE', '#E0E0E0', '#BDBDBD', '#9E9E9E', '#757575', '#616161', '#424242', '#212121', '#000000', '#ffffff' ),
+ 'blue-grey' => array( '#ECEFF1', '#CFD8DC', '#B0BBC5', '#90A4AE', '#78909C', '#607D8B', '#546E7A', '#455A64', '#37474F', '#263238' ),
+ );
+
+ switch ( $context ) {
+
+ case '50':
+ case '100':
+ case '200':
+ case '300':
+ case '400':
+ case '500':
+ case '600':
+ case '700':
+ case '800':
+ case '900':
+ case 'A100':
+ case 'A200':
+ case 'A400':
+ case 'A700':
+ $key = absint( $context ) / 100;
+ if ( 'A100' === $context ) {
+ $key = 10;
+ unset( $colors['grey'] );
+ } elseif ( 'A200' === $context ) {
+ $key = 11;
+ unset( $colors['grey'] );
+ } elseif ( 'A400' === $context ) {
+ $key = 12;
+ unset( $colors['grey'] );
+ } elseif ( 'A700' === $context ) {
+ $key = 13;
+ unset( $colors['grey'] );
+ }
+ unset( $colors['primary'] );
+ $position_colors = array();
+ foreach ( $colors as $color_family ) {
+ if ( isset( $color_family[ $key ] ) ) {
+ $position_colors[] = $color_family[ $key ];
+ }
+ }
+ return $position_colors;
+ case 'all':
+ unset( $colors['primary'] );
+ $all_colors = array();
+ foreach ( $colors as $color_family ) {
+ foreach ( $color_family as $color ) {
+ $all_colors[] = $color;
+ }
+ }
+ return $all_colors;
+ case 'primary':
+ return $colors['primary'];
+ default:
+ if ( isset( $colors[ $context ] ) ) {
+ return $colors[ $context ];
+ }
+ return $colors['primary'];
+ } // End switch().
+ }
+
+ /**
+ * Get an array of all available dashicons.
+ *
+ * @static
+ * @access public
+ * @return array
+ */
+ public static function get_dashicons() {
+
+ return array(
+ 'admin-menu' => array( 'menu', 'admin-site', 'dashboard', 'admin-post', 'admin-media', 'admin-links', 'admin-page', 'admin-comments', 'admin-appearance', 'admin-plugins', 'admin-users', 'admin-tools', 'admin-settings', 'admin-network', 'admin-home', 'admin-generic', 'admin-collapse', 'filter', 'admin-customizer', 'admin-multisite' ),
+ 'welcome-screen' => array( 'welcome-write-blog', 'welcome-add-page', 'welcome-view-site', 'welcome-widgets-menus', 'welcome-comments', 'welcome-learn-more' ),
+ 'post-formats' => array( 'format-aside', 'format-image', 'format-gallery', 'format-video', 'format-status', 'format-quote', 'format-chat', 'format-audio', 'camera', 'images-alt', 'images-alt2', 'video-alt', 'video-alt2', 'video-alt3' ),
+ 'media' => array( 'media-archive', 'media-audio', 'media-code', 'media-default', 'media-document', 'media-interactive', 'media-spreadsheet', 'media-text', 'media-video', 'playlist-audio', 'playlist-video', 'controls-play', 'controls-pause', 'controls-forward', 'controls-skipforward', 'controls-back', 'controls-skipback', 'controls-repeat', 'controls-volumeon', 'controls-volumeoff' ),
+ 'image-editing' => array( 'image-crop', 'image-rotate', 'image-rotate-left', 'image-rotate-right', 'image-flip-vertical', 'image-flip-horizontal', 'image-filter', 'undo', 'redo' ),
+ 'tinymce' => array( 'editor-bold', 'editor-italic', 'editor-ul', 'editor-ol', 'editor-quote', 'editor-alignleft', 'editor-aligncenter', 'editor-alignright', 'editor-insertmore', 'editor-spellcheck', 'editor-expand', 'editor-contract', 'editor-kitchensink', 'editor-underline', 'editor-justify', 'editor-textcolor', 'editor-paste-word', 'editor-paste-text', 'editor-removeformatting', 'editor-video', 'editor-customchar', 'editor-outdent', 'editor-indent', 'editor-help', 'editor-strikethrough', 'editor-unlink', 'editor-rtl', 'editor-break', 'editor-code', 'editor-paragraph', 'editor-table' ),
+ 'posts' => array( 'align-left', 'align-right', 'align-center', 'align-none', 'lock', 'unlock', 'calendar', 'calendar-alt', 'visibility', 'hidden', 'post-status', 'edit', 'trash', 'sticky' ),
+ 'sorting' => array( 'external', 'arrow-up', 'arrow-down', 'arrow-right', 'arrow-left', 'arrow-up-alt', 'arrow-down-alt', 'arrow-right-alt', 'arrow-left-alt', 'arrow-up-alt2', 'arrow-down-alt2', 'arrow-right-alt2', 'arrow-left-alt2', 'sort', 'leftright', 'randomize', 'list-view', 'exerpt-view', 'grid-view' ),
+ 'social' => array( 'share', 'share-alt', 'share-alt2', 'twitter', 'rss', 'email', 'email-alt', 'facebook', 'facebook-alt', 'googleplus', 'networking' ),
+ 'wordpress_org' => array( 'hammer', 'art', 'migrate', 'performance', 'universal-access', 'universal-access-alt', 'tickets', 'nametag', 'clipboard', 'heart', 'megaphone', 'schedule' ),
+ 'products' => array( 'wordpress', 'wordpress-alt', 'pressthis', 'update', 'screenoptions', 'info', 'cart', 'feedback', 'cloud', 'translation' ),
+ 'taxonomies' => array( 'tag', 'category' ),
+ 'widgets' => array( 'archive', 'tagcloud', 'text' ),
+ 'notifications' => array( 'yes', 'no', 'no-alt', 'plus', 'plus-alt', 'minus', 'dismiss', 'marker', 'star-filled', 'star-half', 'star-empty', 'flag', 'warning' ),
+ 'misc' => array( 'location', 'location-alt', 'vault', 'shield', 'shield-alt', 'sos', 'search', 'slides', 'analytics', 'chart-pie', 'chart-bar', 'chart-line', 'chart-area', 'groups', 'businessman', 'id', 'id-alt', 'products', 'awards', 'forms', 'testimonial', 'portfolio', 'book', 'book-alt', 'download', 'upload', 'backup', 'clock', 'lightbulb', 'microphone', 'desktop', 'tablet', 'smartphone', 'phone', 'index-card', 'carrot', 'building', 'store', 'album', 'palmtree', 'tickets-alt', 'money', 'smiley', 'thumbs-up', 'thumbs-down', 'layout' ),
+ );
+
+ }
+
+ /**
+ * Compares the 2 values given the condition
+ *
+ * @param mixed $value1 The 1st value in the comparison.
+ * @param mixed $value2 The 2nd value in the comparison.
+ * @param string $operator The operator we'll use for the comparison.
+ * @return boolean whether The comparison has succeded (true) or failed (false).
+ */
+ public static function compare_values( $value1, $value2, $operator ) {
+ $return = false;
+ if ( '===' === $operator && $value1 === $value2 ) {
+ $return = true;
+ } elseif ( '!==' === $operator && $value1 !== $value2 ) {
+ $return = true;
+ } elseif ( ( '!=' === $operator || 'not equal' === $operator ) && $value1 != $value2 ) {
+ $return = true;
+ } elseif ( ( '>=' === $operator || 'greater or equal' === $operator || 'equal or greater' === $operator ) && $value2 >= $value1 ) {
+ $return = true;
+ } elseif ( ( '<=' === $operator || 'smaller or equal' === $operator || 'equal or smaller' === $operator ) && $value2 <= $value1 ) {
+ $return = true;
+ } elseif ( ( '>' === $operator || 'greater' === $operator ) && $value2 > $value1 ) {
+ $return = true;
+ } elseif ( ( '<' === $operator || 'smaller' === $operator ) && $value2 < $value1 ) {
+ $return = true;
+ } elseif ( 'contains' === $operator || 'in' === $operator ) {
+ if ( is_array( $value1 ) && ! is_array( $value2 ) ) {
+ // @codingStandardsIgnoreLine
+ $return = ( in_array( $value2, $value1 ) );
+ } elseif ( is_array( $value2 ) && ! is_array( $value1 ) ) {
+ // @codingStandardsIgnoreLine
+ $return = ( in_array( $value1, $value2 ) );
+ } elseif ( false === strrpos( $value1, $value2 ) && false === strpos( $value2, $value1 ) ) {
+ $return = false;
+ }
+ } else {
+ $return = ( $value1 == $value2 ) ? true : false;
+ }
+ return (bool) $return;
+ }
+}
diff --git a/functions/kirki/core/class-kirki-init.php b/functions/kirki/core/class-kirki-init.php
new file mode 100644
index 0000000..e47ebca
--- /dev/null
+++ b/functions/kirki/core/class-kirki-init.php
@@ -0,0 +1,323 @@
+control_types = array(
+ 'checkbox' => 'WP_Customize_Control',
+ 'kirki-background' => 'Kirki_Control_Background',
+ 'kirki-code' => 'Kirki_Control_Code',
+ 'kirki-color' => 'Kirki_Control_Color',
+ 'kirki-color-palette' => 'Kirki_Control_Color_Palette',
+ 'kirki-custom' => 'Kirki_Control_Custom',
+ 'kirki-date' => 'Kirki_Control_Date',
+ 'kirki-dashicons' => 'Kirki_Control_Dashicons',
+ 'kirki-dimension' => 'Kirki_Control_Dimension',
+ 'kirki-dimensions' => 'Kirki_Control_Dimensions',
+ 'kirki-editor' => 'Kirki_Control_Editor',
+ 'kirki-fontawesome' => 'Kirki_Control_FontAwesome',
+ 'kirki-image' => 'Kirki_Control_Image',
+ 'kirki-multicolor' => 'Kirki_Control_Multicolor',
+ 'kirki-multicheck' => 'Kirki_Control_MultiCheck',
+ 'kirki-number' => 'Kirki_Control_Number',
+ 'kirki-palette' => 'Kirki_Control_Palette',
+ 'kirki-preset' => 'Kirki_Control_Preset',
+ 'kirki-radio' => 'Kirki_Control_Radio',
+ 'kirki-radio-buttonset' => 'Kirki_Control_Radio_ButtonSet',
+ 'kirki-radio-image' => 'Kirki_Control_Radio_Image',
+ 'repeater' => 'Kirki_Control_Repeater',
+ 'kirki-select' => 'Kirki_Control_Select',
+ 'kirki-slider' => 'Kirki_Control_Slider',
+ 'kirki-sortable' => 'Kirki_Control_Sortable',
+ 'kirki-spacing' => 'Kirki_Control_Dimensions',
+ 'kirki-switch' => 'Kirki_Control_Switch',
+ 'kirki-generic' => 'Kirki_Control_Generic',
+ 'kirki-toggle' => 'Kirki_Control_Toggle',
+ 'kirki-typography' => 'Kirki_Control_Typography',
+ 'image' => 'Kirki_Control_Image',
+ 'cropped_image' => 'WP_Customize_Cropped_Image_Control',
+ 'upload' => 'WP_Customize_Upload_Control',
+ );
+ return array_merge( $this->control_types, $control_types );
+
+ }
+
+ /**
+ * Helper function that adds the fields, sections and panels to the customizer.
+ */
+ public function add_to_customizer() {
+ $this->fields_from_filters();
+ add_action( 'customize_register', array( $this, 'register_control_types' ) );
+ add_action( 'customize_register', array( $this, 'add_panels' ), 97 );
+ add_action( 'customize_register', array( $this, 'add_sections' ), 98 );
+ add_action( 'customize_register', array( $this, 'add_fields' ), 99 );
+ }
+
+ /**
+ * Register control types
+ */
+ public function register_control_types() {
+ global $wp_customize;
+
+ $section_types = apply_filters( 'kirki/section_types', array() );
+ foreach ( $section_types as $section_type ) {
+ $wp_customize->register_section_type( $section_type );
+ }
+
+ $this->control_types = $this->default_control_types();
+ foreach ( $this->control_types as $key => $classname ) {
+ if ( ! class_exists( $classname ) ) {
+ unset( $this->control_types[ $key ] );
+ }
+ }
+
+ $skip_control_types = apply_filters(
+ 'kirki/control_types/exclude', array(
+ 'Kirki_Control_Repeater',
+ 'WP_Customize_Control',
+ )
+ );
+
+ foreach ( $this->control_types as $control_type ) {
+ if ( ! in_array( $control_type, $skip_control_types, true ) && class_exists( $control_type ) ) {
+ $wp_customize->register_control_type( $control_type );
+ }
+ }
+ }
+
+ /**
+ * Register our panels to the WordPress Customizer.
+ *
+ * @access public
+ */
+ public function add_panels() {
+ if ( ! empty( Kirki::$panels ) ) {
+ foreach ( Kirki::$panels as $panel_args ) {
+ // Extra checks for nested panels.
+ if ( isset( $panel_args['panel'] ) ) {
+ if ( isset( Kirki::$panels[ $panel_args['panel'] ] ) ) {
+ // Set the type to nested.
+ $panel_args['type'] = 'kirki-nested';
+ }
+ }
+
+ new Kirki_Panel( $panel_args );
+ }
+ }
+ }
+
+ /**
+ * Register our sections to the WordPress Customizer.
+ *
+ * @var object The WordPress Customizer object
+ */
+ public function add_sections() {
+ if ( ! empty( Kirki::$sections ) ) {
+ foreach ( Kirki::$sections as $section_args ) {
+ // Extra checks for nested sections.
+ if ( isset( $section_args['section'] ) ) {
+ if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
+ // Set the type to nested.
+ $section_args['type'] = 'kirki-nested';
+ // We need to check if the parent section is nested inside a panel.
+ $parent_section = Kirki::$sections[ $section_args['section'] ];
+ if ( isset( $parent_section['panel'] ) ) {
+ $section_args['panel'] = $parent_section['panel'];
+ }
+ }
+ }
+ new Kirki_Section( $section_args );
+ }
+ }
+ }
+
+ /**
+ * Create the settings and controls from the $fields array and register them.
+ *
+ * @var object The WordPress Customizer object.
+ */
+ public function add_fields() {
+
+ global $wp_customize;
+ foreach ( Kirki::$fields as $args ) {
+
+ // Create the settings.
+ new Kirki_Settings( $args );
+
+ // Check if we're on the customizer.
+ // If we are, then we will create the controls, add the scripts needed for the customizer
+ // and any other tweaks that this field may require.
+ if ( $wp_customize ) {
+
+ // Create the control.
+ new Kirki_Control( $args );
+
+ }
+ }
+ }
+
+ /**
+ * Process fields added using the 'kirki/fields' and 'kirki/controls' filter.
+ * These filters are no longer used, this is simply for backwards-compatibility.
+ *
+ * @access private
+ * @since 2.0.0
+ */
+ private function fields_from_filters() {
+
+ $fields = apply_filters( 'kirki/controls', array() );
+ $fields = apply_filters( 'kirki/fields', $fields );
+
+ if ( ! empty( $fields ) ) {
+ foreach ( $fields as $field ) {
+ Kirki::add_field( 'global', $field );
+ }
+ }
+ }
+
+ /**
+ * Alias for the is_plugin static method in the Kirki_Util class.
+ * This is here for backwards-compatibility purposes.
+ *
+ * @static
+ * @access public
+ * @since 3.0.0
+ * @return bool
+ */
+ public static function is_plugin() {
+ // Return result using the Kirki_Util class.
+ return Kirki_Util::is_plugin();
+ }
+
+ /**
+ * Alias for the get_variables static method in the Kirki_Util class.
+ * This is here for backwards-compatibility purposes.
+ *
+ * @static
+ * @access public
+ * @since 2.0.0
+ * @return array Formatted as array( 'variable-name' => value ).
+ */
+ public static function get_variables() {
+ // Log error for developers.
+ _doing_it_wrong( __METHOD__, esc_attr__( 'We detected you\'re using Kirki_Init::get_variables(). Please use Kirki_Util::get_variables() instead.', 'blogrow' ), '3.0.10' );
+ // Return result using the Kirki_Util class.
+ return Kirki_Util::get_variables();
+ }
+
+ /**
+ * Remove panels.
+ *
+ * @since 3.0.17
+ * @param object $wp_customize The customizer object.
+ * @return void
+ */
+ public function remove_panels( $wp_customize ) {
+ foreach ( Kirki::$panels_to_remove as $panel ) {
+ $wp_customize->remove_panel( $panel );
+ }
+ }
+
+ /**
+ * Remove sections.
+ *
+ * @since 3.0.17
+ * @param object $wp_customize The customizer object.
+ * @return void
+ */
+ public function remove_sections( $wp_customize ) {
+ foreach ( Kirki::$sections_to_remove as $section ) {
+ $wp_customize->remove_section( $section );
+ }
+ }
+
+ /**
+ * Remove controls.
+ *
+ * @since 3.0.17
+ * @param object $wp_customize The customizer object.
+ * @return void
+ */
+ public function remove_controls( $wp_customize ) {
+ foreach ( Kirki::$controls_to_remove as $control ) {
+ $wp_customize->remove_control( $control );
+ }
+ }
+}
diff --git a/functions/kirki/core/class-kirki-l10n.php b/functions/kirki/core/class-kirki-l10n.php
new file mode 100644
index 0000000..5c9c2ad
--- /dev/null
+++ b/functions/kirki/core/class-kirki-l10n.php
@@ -0,0 +1,156 @@
+get_path() ) {
+ load_textdomain( $this->textdomain, $this->get_path() );
+ }
+ load_plugin_textdomain( $this->textdomain, false, Kirki::$path . '/languages' );
+
+ }
+
+ /**
+ * Gets the path to a translation file.
+ *
+ * @access protected
+ * @return string Absolute path to the translation file.
+ */
+ protected function get_path() {
+ $path_found = false;
+ $found_path = null;
+ foreach ( $this->get_paths() as $path ) {
+ if ( $path_found ) {
+ continue;
+ }
+ $path = wp_normalize_path( $path );
+ if ( file_exists( $path ) ) {
+ $path_found = true;
+ $found_path = $path;
+ }
+ }
+
+ return $found_path;
+
+ }
+
+ /**
+ * Returns an array of paths where translation files may be located.
+ *
+ * @access protected
+ * @return array
+ */
+ protected function get_paths() {
+
+ return array(
+ WP_LANG_DIR . '/' . $this->textdomain . '-' . get_locale() . '.mo',
+ Kirki::$path . '/languages/' . $this->textdomain . '-' . get_locale() . '.mo',
+ );
+
+ }
+
+ /**
+ * Allows overriding the "kirki" textdomain from a theme.
+ *
+ * @since 3.0.12
+ * @access public
+ * @param bool $override Whether to override the .mo file loading. Default false.
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ * @param string $mofile Path to the MO file.
+ * @return bool
+ */
+ public function override_load_textdomain( $override, $domain, $mofile ) {
+
+ global $l10n;
+ if ( isset( $l10n[ $this->get_theme_textdomain() ] ) ) {
+ // @codingStandardsIgnoreLine WordPress.Variables.GlobalVariables.OverrideProhibited
+ $l10n['blogrow'] = $l10n[ $this->get_theme_textdomain() ];
+ }
+
+ // Check if the domain is "kirki".
+ if ( 'blogrow' === $domain ) {
+ return true;
+ }
+ return $override;
+
+ }
+
+ /**
+ * Get the theme's textdomain.
+ *
+ * @since 3.0.12
+ * @access private
+ * @return string
+ */
+ private function get_theme_textdomain() {
+
+ if ( '' === $this->theme_textdomain ) {
+
+ // Get the textdomain.
+ $theme = wp_get_theme();
+ $this->theme_textdomain = $theme->get( 'TextDomain' );
+
+ // If no texdomain was found, use the template folder name.
+ if ( ! $this->theme_textdomain ) {
+ $this->theme_textdomain = get_template();
+ }
+ }
+ return $this->theme_textdomain;
+
+ }
+}
diff --git a/functions/kirki/core/class-kirki-modules.php b/functions/kirki/core/class-kirki-modules.php
new file mode 100644
index 0000000..784c11c
--- /dev/null
+++ b/functions/kirki/core/class-kirki-modules.php
@@ -0,0 +1,155 @@
+default_modules();
+ $this->init();
+
+ }
+
+ /**
+ * Set the default modules and apply the 'kirki/modules' filter.
+ *
+ * @access private
+ * @since 3.0.0
+ */
+ private function default_modules() {
+
+ self::$modules = apply_filters(
+ 'kirki/modules', array(
+ 'css' => 'Kirki_Modules_CSS',
+ 'customizer-styling' => 'Kirki_Modules_Customizer_Styling',
+ 'icons' => 'Kirki_Modules_Icons',
+ 'loading' => 'Kirki_Modules_Loading',
+ 'tooltips' => 'Kirki_Modules_Tooltips',
+ 'branding' => 'Kirki_Modules_Customizer_Branding',
+ 'postMessage' => 'Kirki_Modules_PostMessage',
+ // 'post_meta' => 'Kirki_Modules_Post_Meta',
+ 'selective-refresh' => 'Kirki_Modules_Selective_Refresh',
+ 'field-dependencies' => 'Kirki_Modules_Field_Dependencies',
+ 'custom-sections' => 'Kirki_Modules_Custom_Sections',
+ // 'collapsible' => 'Kirki_Modules_Collapsible',
+ 'webfonts' => 'Kirki_Modules_Webfonts',
+ )
+ );
+
+ }
+
+ /**
+ * Instantiates the modules.
+ *
+ * @access private
+ * @since 3.0.0
+ */
+ private function init() {
+
+ foreach ( self::$modules as $key => $module_class ) {
+ if ( class_exists( $module_class ) ) {
+ // Use this syntax instead of $module_class::get_instance()
+ // for PHP 5.2 compatibility.
+ self::$active_modules[ $key ] = call_user_func( array( $module_class, 'get_instance' ) );
+ }
+ }
+ }
+
+ /**
+ * Add a module.
+ *
+ * @static
+ * @access public
+ * @param string $module The classname of the module to add.
+ * @since 3.0.0
+ */
+ public static function add_module( $module ) {
+
+ if ( ! in_array( $module, self::$modules, true ) ) {
+ self::$modules[] = $module;
+ }
+
+ }
+
+ /**
+ * Remove a module.
+ *
+ * @static
+ * @access public
+ * @param string $module The classname of the module to add.
+ * @since 3.0.0
+ */
+ public static function remove_module( $module ) {
+
+ $key = array_search( $module, self::$modules, true );
+ if ( false !== $key ) {
+ unset( self::$modules[ $key ] );
+ }
+ }
+
+ /**
+ * Get the modules array.
+ *
+ * @static
+ * @access public
+ * @since 3.0.0
+ * @return array
+ */
+ public static function get_modules() {
+
+ return self::$modules;
+
+ }
+
+ /**
+ * Get the array of active modules (objects).
+ *
+ * @static
+ * @access public
+ * @since 3.0.0
+ * @return array
+ */
+ public static function get_active_modules() {
+
+ return self::$active_modules;
+
+ }
+}
diff --git a/functions/kirki/core/class-kirki-panel.php b/functions/kirki/core/class-kirki-panel.php
new file mode 100644
index 0000000..f14d1d3
--- /dev/null
+++ b/functions/kirki/core/class-kirki-panel.php
@@ -0,0 +1,57 @@
+ 'WP_Customize_Panel',
+ );
+
+ /**
+ * The class constructor.
+ *
+ * @access public
+ * @param array $args The panel arguments.
+ */
+ public function __construct( $args ) {
+
+ $this->panel_types = apply_filters( 'kirki/panel_types', $this->panel_types );
+ $this->add_panel( $args );
+
+ }
+
+ /**
+ * Add the panel using the Customizer API.
+ *
+ * @param array $args The panel arguments.
+ */
+ public function add_panel( $args ) {
+ global $wp_customize;
+
+ if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->panel_types ) ) {
+ $args['type'] = 'default';
+ }
+ $panel_classname = $this->panel_types[ $args['type'] ];
+
+ $wp_customize->add_panel( new $panel_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) );
+
+ }
+}
diff --git a/functions/kirki/core/class-kirki-sanitize-values.php b/functions/kirki/core/class-kirki-sanitize-values.php
new file mode 100644
index 0000000..d00e044
--- /dev/null
+++ b/functions/kirki/core/class-kirki-sanitize-values.php
@@ -0,0 +1,213 @@
+sanitize( $value );
+ }
+
+ /**
+ * Sanitize number options.
+ *
+ * @static
+ * @access public
+ * @since 0.5
+ * @param int|float|double|string $value The value to be sanitized.
+ * @return integer|double|string
+ */
+ public static function number( $value ) {
+ return ( is_numeric( $value ) ) ? $value : intval( $value );
+ }
+
+ /**
+ * Drop-down Pages sanitization callback.
+ *
+ * - Sanitization: dropdown-pages
+ * - Control: dropdown-pages
+ *
+ * Sanitization callback for 'dropdown-pages' type controls. This callback sanitizes `$page_id`
+ * as an absolute integer, and then validates that $input is the ID of a published page.
+ *
+ * @see absint() https://developer.wordpress.org/reference/functions/absint/
+ * @see get_post_status() https://developer.wordpress.org/reference/functions/get_post_status/
+ *
+ * @param int $page_id Page ID.
+ * @param WP_Customize_Setting $setting Setting instance.
+ * @return int|string Page ID if the page is published; otherwise, the setting default.
+ */
+ public static function dropdown_pages( $page_id, $setting ) {
+ // Ensure $input is an absolute integer.
+ $page_id = absint( $page_id );
+
+ // If $page_id is an ID of a published page, return it; otherwise, return the default.
+ return ( 'publish' === get_post_status( $page_id ) ? $page_id : $setting->default );
+ }
+
+ /**
+ * Sanitizes css dimensions.
+ *
+ * @static
+ * @access public
+ * @since 2.2.0
+ * @param string $value The value to be sanitized.
+ * @return string
+ */
+ public static function css_dimension( $value ) {
+
+ // Trim it.
+ $value = trim( $value );
+
+ // If the value is round, then return 50%.
+ if ( 'round' === $value ) {
+ $value = '50%';
+ }
+
+ // If the value is empty, return empty.
+ if ( '' === $value ) {
+ return '';
+ }
+
+ // If auto, inherit or initial, return the value.
+ if ( 'auto' === $value || 'initial' === $value || 'inherit' === $value ) {
+ return $value;
+ }
+
+ // Return empty if there are no numbers in the value.
+ if ( ! preg_match( '#[0-9]#', $value ) ) {
+ return '';
+ }
+
+ // If we're using calc() then return the value.
+ if ( false !== strpos( $value, 'calc(' ) ) {
+ return $value;
+ }
+
+ // The raw value without the units.
+ $raw_value = self::filter_number( $value );
+ $unit_used = '';
+
+ // An array of all valid CSS units. Their order was carefully chosen for this evaluation, don't mix it up!!!
+ $units = array( 'rem', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vh', 'vw', 'vmin', 'vmax' );
+ foreach ( $units as $unit ) {
+ if ( false !== strpos( $value, $unit ) ) {
+ $unit_used = $unit;
+ }
+ }
+
+ // Hack for rem values.
+ if ( 'em' === $unit_used && false !== strpos( $value, 'rem' ) ) {
+ $unit_used = 'rem';
+ }
+
+ return $raw_value . $unit_used;
+ }
+
+ /**
+ * Filters numeric values.
+ *
+ * @static
+ * @access public
+ * @param string $value The value to be sanitized.
+ * @return int|float
+ */
+ public static function filter_number( $value ) {
+ return filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+ }
+
+ /**
+ * Sanitize RGBA colors
+ *
+ * @static
+ * @since 0.8.5
+ * @param string $value The value to be sanitized.
+ * @return string
+ */
+ public static function rgba( $value ) {
+ $color = ariColor::newColor( $value );
+ return $color->toCSS( 'rgba' );
+ }
+
+ /**
+ * Sanitize colors.
+ *
+ * @static
+ * @since 0.8.5
+ * @param string $value The value to be sanitized.
+ * @return string
+ */
+ public static function color( $value ) {
+ // If the value is empty, then return empty.
+ if ( '' === $value ) {
+ return '';
+ }
+ // If transparent, then return 'transparent'.
+ if ( is_string( $value ) && 'transparent' === trim( $value ) ) {
+ return 'transparent';
+ }
+ // Instantiate the object.
+ $color = ariColor::newColor( $value );
+ // Return a CSS value, using the auto-detected mode.
+ return $color->toCSS( $color->mode );
+ }
+
+ /**
+ * DOES NOT SANITIZE ANYTHING.
+ *
+ * @static
+ * @since 0.5
+ * @param int|string|array $value The value to be sanitized.
+ * @return int|string|array
+ */
+ public static function unfiltered( $value ) {
+ return $value;
+ }
+}
diff --git a/functions/kirki/core/class-kirki-section.php b/functions/kirki/core/class-kirki-section.php
new file mode 100644
index 0000000..7ba04f4
--- /dev/null
+++ b/functions/kirki/core/class-kirki-section.php
@@ -0,0 +1,64 @@
+section_types = apply_filters( 'kirki/section_types', $this->section_types );
+ $this->add_section( $args );
+
+ }
+
+ /**
+ * Adds the section using the WordPress Customizer API.
+ *
+ * @access public
+ * @param array $args The section parameters.
+ */
+ public function add_section( $args ) {
+
+ global $wp_customize;
+
+ // The default class to be used when creating a section.
+ $section_classname = 'WP_Customize_Section';
+
+ if ( isset( $args['type'] ) && array_key_exists( $args['type'], $this->section_types ) ) {
+ $section_classname = $this->section_types[ $args['type'] ];
+ }
+ if ( isset( $args['type'] ) && 'kirki-outer' === $args['type'] ) {
+ $args['type'] = 'outer';
+ $section_classname = 'WP_Customize_Section';
+ }
+
+ // Add the section.
+ $wp_customize->add_section( new $section_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) );
+
+ }
+}
diff --git a/functions/kirki/core/class-kirki-sections.php b/functions/kirki/core/class-kirki-sections.php
new file mode 100644
index 0000000..d57c828
--- /dev/null
+++ b/functions/kirki/core/class-kirki-sections.php
@@ -0,0 +1,48 @@
+' . esc_attr( $css ) . '';
+ }
+ }
+}
diff --git a/functions/kirki/core/class-kirki-setting-site-option.php b/functions/kirki/core/class-kirki-setting-site-option.php
new file mode 100644
index 0000000..343a3a7
--- /dev/null
+++ b/functions/kirki/core/class-kirki-setting-site-option.php
@@ -0,0 +1,73 @@
+id_data['base'], $default );
+ }
+
+ /**
+ * Set the root value for a setting, especially for multidimensional ones.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param mixed $value Value to set as root of multidimensional setting.
+ * @return bool Whether the multidimensional root was updated successfully.
+ */
+ protected function set_root_value( $value ) {
+ return update_site_option( $this->id_data['base'], $value );
+ }
+
+ /**
+ * Save the value of the setting, using the related API.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param mixed $value The value to update.
+ * @return bool The result of saving the value.
+ */
+ protected function update( $value ) {
+ return $this->set_root_value( $value );
+ }
+
+ /**
+ * Fetch the value of the setting.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return mixed The value.
+ */
+ public function value() {
+ return $this->get_root_value( $this->default );
+ }
+}
diff --git a/functions/kirki/core/class-kirki-setting-user-meta.php b/functions/kirki/core/class-kirki-setting-user-meta.php
new file mode 100644
index 0000000..1618b91
--- /dev/null
+++ b/functions/kirki/core/class-kirki-setting-user-meta.php
@@ -0,0 +1,97 @@
+id_data['base'];
+
+ // Get all user-meta.
+ // We'll use this to check if the value is set or not,
+ // in order to figure out if we need to return the default value.
+ // @codingStandardsIgnoreLine
+ $user_meta = get_user_meta( get_current_user_id() );
+
+ // Get the single meta.
+ // @codingStandardsIgnoreLine
+ $single_meta = get_user_meta( get_current_user_id(), $id_base, true );
+
+ if ( isset( $user_meta[ $id_base ] ) ) {
+ return $single_meta;
+ }
+ return $default;
+ }
+
+ /**
+ * Set the root value for a setting, especially for multidimensional ones.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param mixed $value Value to set as root of multidimensional setting.
+ * @return bool Whether the multidimensional root was updated successfully.
+ */
+ protected function set_root_value( $value ) {
+ $id_base = $this->id_data['base'];
+
+ // First delete the current user-meta.
+ // We're doing this to avoid duplicate entries.
+ // @codingStandardsIgnoreLine
+ delete_user_meta( get_current_user_id(), $id_base );
+
+ // Update the user-meta.
+ // @codingStandardsIgnoreLine
+ return update_user_meta( get_current_user_id(), $id_base, $value );
+ }
+
+ /**
+ * Save the value of the setting, using the related API.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param mixed $value The value to update.
+ * @return bool The result of saving the value.
+ */
+ protected function update( $value ) {
+ return $this->set_root_value( $value );
+ }
+
+ /**
+ * Fetch the value of the setting.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return mixed The value.
+ */
+ public function value() {
+ return $this->get_root_value( $this->default );
+ }
+}
diff --git a/functions/kirki/core/class-kirki-settings.php b/functions/kirki/core/class-kirki-settings.php
new file mode 100644
index 0000000..3278384
--- /dev/null
+++ b/functions/kirki/core/class-kirki-settings.php
@@ -0,0 +1,148 @@
+wp_customize = $wp_customize;
+
+ // Set the setting_types.
+ $this->set_setting_types();
+ // Add the settings.
+ $this->add_settings( $args );
+
+ }
+
+ /**
+ * Adds the settings for this field.
+ * If settings are defined as an array, then it goes through them
+ * and calls the add_setting method.
+ * If not an array, then it just calls add_setting
+ *
+ * @access private
+ * @param array $args The field definition as sanitized in Kirki_Field.
+ */
+ final private function add_settings( $args = array() ) {
+
+ // Get the classname we'll be using to create our setting(s).
+ $classname = false;
+ if ( isset( $args['option_type'] ) && array_key_exists( $args['option_type'], $this->setting_types ) ) {
+ $classname = $this->setting_types[ $args['option_type'] ];
+ }
+ if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->setting_types ) ) {
+ $args['type'] = 'default';
+ }
+ $classname = ! $classname ? $this->setting_types[ $args['type'] ] : $classname;
+
+ // If settings are defined as an array, then we need to go through them
+ // and call add_setting for each one of them separately.
+ if ( isset( $args['settings'] ) && is_array( $args['settings'] ) ) {
+
+ // Make sure defaults have been defined.
+ if ( ! isset( $args['default'] ) || ! is_array( $args['default'] ) ) {
+ $args['default'] = array();
+ }
+ foreach ( $args['settings'] as $key => $value ) {
+ $default = ( isset( $defaults[ $key ] ) ) ? $defaults[ $key ] : '';
+ $this->add_setting( $classname, $value, $default, $args['option_type'], $args['capability'], $args['transport'], $args['sanitize_callback'] );
+ }
+ }
+ $this->add_setting( $classname, $args['settings'], $args['default'], $args['option_type'], $args['capability'], $args['transport'], $args['sanitize_callback'] );
+ }
+
+ /**
+ * This is where we're finally adding the setting to the Customizer.
+ *
+ * @access private
+ * @param string $classname The name of the class that will be used to create this setting.
+ * We're getting this from $this->setting_types.
+ * @param string $setting The setting-name.
+ * If settings is an array, then this method is called per-setting.
+ * @param string|array $default Default value for this setting.
+ * @param string $type The data type we're using. Valid options: theme_mod|option.
+ * @param string $capability @see https://codex.wordpress.org/Roles_and_Capabilities.
+ * @param string $transport Use refresh|postMessage.
+ * @param string|array $sanitize_callback A callable sanitization function or method.
+ */
+ final private function add_setting( $classname, $setting, $default, $type, $capability, $transport, $sanitize_callback ) {
+
+ $this->wp_customize->add_setting(
+ new $classname( $this->wp_customize, $setting, array(
+ 'default' => $default,
+ 'type' => $type,
+ 'capability' => $capability,
+ 'transport' => $transport,
+ 'sanitize_callback' => $sanitize_callback,
+ ) )
+ );
+
+ }
+
+ /**
+ * Sets the $this->setting_types property.
+ * Makes sure the kirki/setting_types filter is applied
+ * and that the defined classes actually exist.
+ * If a defined class does not exist, it is removed.
+ */
+ final private function set_setting_types() {
+
+ // Apply the kirki/setting_types filter.
+ $this->setting_types = apply_filters(
+ 'kirki/setting_types', array(
+ 'default' => 'WP_Customize_Setting',
+ 'repeater' => 'Kirki_Settings_Repeater_Setting',
+ 'user_meta' => 'Kirki_Setting_User_Meta',
+ 'site_option' => 'Kirki_Setting_Site_Option',
+ )
+ );
+
+ // Make sure the defined classes actually exist.
+ foreach ( $this->setting_types as $key => $classname ) {
+
+ if ( ! class_exists( $classname ) ) {
+ unset( $this->setting_types[ $key ] );
+ }
+ }
+ }
+}
diff --git a/functions/kirki/core/class-kirki-toolkit.php b/functions/kirki/core/class-kirki-toolkit.php
new file mode 100644
index 0000000..fc89156
--- /dev/null
+++ b/functions/kirki/core/class-kirki-toolkit.php
@@ -0,0 +1,45 @@
+ $args ) {
+ if ( ! $is_plugin && isset( $args['Name'] ) && ( 'Kirki' === $args['Name'] || 'Kirki Toolkit' === $args['Name'] ) ) {
+ $is_plugin = true;
+ $_plugin = $plugin;
+ }
+ }
+
+ // No need to proceed any further if Kirki wasn't found in the list of plugins.
+ if ( ! $is_plugin ) {
+ return false;
+ }
+
+ // Make sure the is_plugins_loaded function is loaded.
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
+
+ // Extra logic in case the plugin is installed but not activated.
+ if ( $_plugin && ! is_plugin_active( $_plugin ) ) {
+ return false;
+ }
+ return $is_plugin;
+ }
+
+ /**
+ * Build the variables.
+ *
+ * @static
+ * @access public
+ * @since 3.0.9
+ * @return array Formatted as array( 'variable-name' => value ).
+ */
+ public static function get_variables() {
+
+ $variables = array();
+
+ // Loop through all fields.
+ foreach ( Kirki::$fields as $field ) {
+
+ // Check if we have variables for this field.
+ if ( isset( $field['variables'] ) && $field['variables'] && ! empty( $field['variables'] ) ) {
+
+ // Loop through the array of variables.
+ foreach ( $field['variables'] as $field_variable ) {
+
+ // Is the variable ['name'] defined? If yes, then we can proceed.
+ if ( isset( $field_variable['name'] ) ) {
+
+ // Sanitize the variable name.
+ $variable_name = esc_attr( $field_variable['name'] );
+
+ // Do we have a callback function defined? If not then set $variable_callback to false.
+ $variable_callback = ( isset( $field_variable['callback'] ) && is_callable( $field_variable['callback'] ) ) ? $field_variable['callback'] : false;
+
+ // If we have a variable_callback defined then get the value of the option
+ // and run it through the callback function.
+ // If no callback is defined (false) then just get the value.
+ $variables[ $variable_name ] = Kirki_Values::get_value( $field['settings'] );
+ if ( $variable_callback ) {
+ $variables[ $variable_name ] = call_user_func( $field_variable['callback'], Kirki_Values::get_value( $field['settings'] ) );
+ }
+ }
+ }
+ }
+ }
+
+ // Pass the variables through a filter ('kirki/variable') and return the array of variables.
+ return apply_filters( 'kirki/variable', $variables );
+
+ }
+
+ /**
+ * HTTP Request injection.
+ *
+ * @access public
+ * @since 3.0.0
+ * @param array $request The request params.
+ * @param string $url The request URL.
+ * @return array
+ */
+ public function http_request( $request = array(), $url = '' ) {
+ // Early exit if installed as a plugin or not a request to wordpress.org,
+ // or finally if we don't have everything we need.
+ if (
+ self::is_plugin() ||
+ false === strpos( $url, 'wordpress.org' ) || (
+ ! isset( $request['body'] ) ||
+ ! isset( $request['body']['plugins'] ) ||
+ ! isset( $request['body']['translations'] ) ||
+ ! isset( $request['body']['locale'] ) ||
+ ! isset( $request['body']['all'] )
+ )
+ ) {
+ return $request;
+ }
+
+ $plugins = json_decode( $request['body']['plugins'], true );
+ if ( ! isset( $plugins['plugins'] ) ) {
+ return $request;
+ }
+ $exists = false;
+ foreach ( $plugins['plugins'] as $plugin ) {
+ if ( isset( $plugin['Name'] ) && 'Kirki Toolkit' === $plugin['Name'] ) {
+ $exists = true;
+ }
+ }
+ // Inject data.
+ if ( ! $exists && defined( 'KIRKI_PLUGIN_FILE' ) ) {
+ $plugins['plugins']['kirki/kirki.php'] = get_plugin_data( KIRKI_PLUGIN_FILE );
+ }
+ $request['body']['plugins'] = wp_json_encode( $plugins );
+ return $request;
+ }
+
+ /**
+ * Returns the $wp_version.
+ *
+ * @static
+ * @access public
+ * @since 3.0.12
+ * @param string $context Use 'minor' or 'major'.
+ * @param boolean $only_numeric Set to true if you want to skip the alpha/beta etc parts.
+ * @return int|float|string Returns integer when getting the 'major' version.
+ * Returns float when getting the 'minor' version with $only_numeric set to true.
+ * Returns string when getting the 'minor' version with $only_numeric set to false.
+ */
+ public static function get_wp_version( $context = 'minor', $only_numeric = true ) {
+ global $wp_version;
+
+ // We only need the major version.
+ if ( 'major' === $context ) {
+ $version_parts = explode( '.', $wp_version );
+ return ( $only_numeric ) ? absint( $version_parts[0] ) : $version_parts[0];
+ }
+
+ // If we got this far, we want the full monty.
+ if ( $only_numeric ) {
+ // Get the numeric part of the version without any beta, alpha etc parts.
+ if ( false !== strpos( $wp_version, '-' ) ) {
+ // We're on a dev version.
+ $version_parts = explode( '-', $wp_version );
+ return floatval( $version_parts[0] );
+ }
+ return floatval( $wp_version );
+ }
+ return $wp_version;
+ }
+}
diff --git a/functions/kirki/core/class-kirki-values.php b/functions/kirki/core/class-kirki-values.php
new file mode 100644
index 0000000..6f9d169
--- /dev/null
+++ b/functions/kirki/core/class-kirki-values.php
@@ -0,0 +1,158 @@
+get_config();
+ self::$config[ $config_args['id'] ] = $config_args;
+ }
+
+ /**
+ * Create a new panel.
+ *
+ * @static
+ * @access public
+ * @param string $id The ID for this panel.
+ * @param array $args The panel arguments.
+ */
+ public static function add_panel( $id = '', $args = array() ) {
+
+ $args['id'] = esc_attr( $id );
+ $args['description'] = ( isset( $args['description'] ) ) ? esc_textarea( $args['description'] ) : '';
+ $args['priority'] = ( isset( $args['priority'] ) ) ? esc_attr( $args['priority'] ) : 10;
+ $args['type'] = ( isset( $args['type'] ) ) ? $args['type'] : 'default';
+ $args['type'] = 'kirki-' . $args['type'];
+
+ self::$panels[ $args['id'] ] = $args;
+ }
+
+ /**
+ * Remove a panel.
+ *
+ * @static
+ * @access public
+ * @since 3.0.17
+ * @param string $id The ID for this panel.
+ */
+ public static function remove_panel( $id = '' ) {
+ if ( ! in_array( $id, self::$panels_to_remove, true ) ) {
+ self::$panels_to_remove[] = $id;
+ }
+ }
+
+ /**
+ * Create a new section.
+ *
+ * @static
+ * @access public
+ * @param string $id The ID for this section.
+ * @param array $args The section arguments.
+ */
+ public static function add_section( $id, $args ) {
+
+ $args['id'] = esc_attr( $id );
+ $args['panel'] = ( isset( $args['panel'] ) ) ? esc_attr( $args['panel'] ) : '';
+ $args['description'] = ( isset( $args['description'] ) ) ? esc_textarea( $args['description'] ) : '';
+ $args['priority'] = ( isset( $args['priority'] ) ) ? esc_attr( $args['priority'] ) : 10;
+ $args['type'] = ( isset( $args['type'] ) ) ? $args['type'] : 'default';
+ $args['type'] = 'kirki-' . $args['type'];
+
+ self::$sections[ $args['id'] ] = $args;
+ }
+
+ /**
+ * Remove a section.
+ *
+ * @static
+ * @access public
+ * @since 3.0.17
+ * @param string $id The ID for this panel.
+ */
+ public static function remove_section( $id = '' ) {
+ if ( ! in_array( $id, self::$sections_to_remove, true ) ) {
+ self::$sections_to_remove[] = $id;
+ }
+ }
+
+ /**
+ * Create a new field.
+ *
+ * @static
+ * @access public
+ * @param string $config_id The configuration ID for this field.
+ * @param array $args The field arguments.
+ */
+ public static function add_field( $config_id, $args ) {
+
+ if ( doing_action( 'customize_register' ) ) {
+ _doing_it_wrong( __METHOD__, esc_attr__( 'Kirki fields should not be added on customize_register. Please add them directly, or on init.', 'blogrow' ), '3.0.10' );
+ }
+
+ // Early exit if 'type' is not defined.
+ if ( ! isset( $args['type'] ) ) {
+ return;
+ }
+
+ $str = str_replace( array( '-', '_' ), ' ', $args['type'] );
+ $classname = 'Kirki_Field_' . str_replace( ' ', '_', ucwords( $str ) );
+ if ( class_exists( $classname ) ) {
+ new $classname( $config_id, $args );
+ return;
+ }
+ if ( false !== strpos( $classname, 'Kirki_Field_Kirki_' ) ) {
+ $classname = str_replace( 'Kirki_Field_Kirki_', 'Kirki_Field_', $classname );
+ if ( class_exists( $classname ) ) {
+ new $classname( $config_id, $args );
+ return;
+ }
+ }
+
+ new Kirki_Field( $config_id, $args );
+
+ }
+
+ /**
+ * Remove a control.
+ *
+ * @static
+ * @access public
+ * @since 3.0.17
+ * @param string $id The field ID.
+ */
+ public static function remove_control( $id ) {
+ if ( ! in_array( $id, self::$controls_to_remove, true ) ) {
+ self::$controls_to_remove[] = $id;
+ }
+ }
+
+ /**
+ * Gets a parameter for a config-id.
+ *
+ * @static
+ * @access public
+ * @since 3.0.10
+ * @param string $id The config-ID.
+ * @param string $param The parameter we want.
+ * @return string
+ */
+ public static function get_config_param( $id, $param ) {
+
+ if ( ! isset( self::$config[ $id ] ) || ! isset( self::$config[ $id ][ $param ] ) ) {
+ return '';
+ }
+ return self::$config[ $id ][ $param ];
+ }
+}
diff --git a/functions/kirki/core/deprecated.php b/functions/kirki/core/deprecated.php
new file mode 100644
index 0000000..6514049
--- /dev/null
+++ b/functions/kirki/core/deprecated.php
@@ -0,0 +1,86 @@
+toCSS( \'hex\' )' );
+ return Kirki_Color::sanitize_hex( $color );
+ }
+}
+
+if ( ! function_exists( 'kirki_get_rgb' ) ) {
+ function kirki_get_rgb( $hex, $implode = false ) {
+ _deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgb\' )' );
+ return Kirki_Color::get_rgb( $hex, $implode );
+ }
+}
+
+if ( ! function_exists( 'kirki_get_rgba' ) ) {
+ function kirki_get_rgba( $hex = '#fff', $opacity = 100 ) {
+ _deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgba\' )' );
+ return Kirki_Color::get_rgba( $hex, $opacity );
+ }
+}
+
+if ( ! function_exists( 'kirki_get_brightness' ) ) {
+ function kirki_get_brightness( $hex ) {
+ _deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->lightness' );
+ return Kirki_Color::get_brightness( $hex );
+ }
+}
+
+if ( ! function_exists( 'Kirki' ) ) {
+ function Kirki() {
+ return kirki();
+ }
+}
+
+if ( ! class_exists( 'Kirki_Active_Callback' ) ) {
+ // Removed in https://github.com/aristath/kirki/pull/1682/files
+ class Kirki_Active_Callback {
+ public static function evaluate() {
+ _deprecated_function( __METHOD__, '3.0.17', null );
+ return true;
+ }
+ private static function evaluate_requirement() {
+ _deprecated_function( __METHOD__, '3.0.17', null );
+ return true;
+ }
+ public static function compare( $value1, $value2, $operator ) {
+ _deprecated_function( __METHOD__, '3.0.17', 'Kirki_Helper::compare_values' );
+ return Kirki_Helper::compare_values( $value1, $value2, $operator );
+ }
+ }
+}
diff --git a/functions/kirki/core/dynamic-css.php b/functions/kirki/core/dynamic-css.php
new file mode 100644
index 0000000..fc277b8
--- /dev/null
+++ b/functions/kirki/core/dynamic-css.php
@@ -0,0 +1,41 @@
+ $args ) {
+ if ( true === $args['disable_output'] ) {
+ continue;
+ }
+
+ $styles = Kirki_Modules_CSS::loop_controls( $config_id );
+ $styles = apply_filters( "kirki/{$config_id}/dynamic_css", $styles );
+
+ // Some people put weird stuff in their CSS, KSES tends to be greedy.
+ $styles = str_replace( '<=', '<=', $styles );
+
+ $styles = wp_kses_post( $styles );
+
+ // @codingStandardsIgnoreStart
+
+ // Why both KSES and strip_tags? Because we just added some '>'.
+ // kses replaces lone '>' with >.
+ echo strip_tags( str_replace( '>', '>', $styles ) );
+ // @codingStandardsIgnoreStop
+}
diff --git a/functions/kirki/field/class-kirki-field-background.php b/functions/kirki/field/class-kirki-field-background.php
new file mode 100644
index 0000000..dc09742
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-background.php
@@ -0,0 +1,122 @@
+type = 'kirki-background';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * Sanitizes typography controls
+ *
+ * @since 2.2.0
+ * @param array $value The value.
+ * @return array
+ */
+ public function sanitize( $value ) {
+
+ if ( ! is_array( $value ) ) {
+ return array();
+ }
+ return array(
+ 'background-color' => ( isset( $value['background-color'] ) ) ? esc_attr( $value['background-color'] ) : '',
+ 'background-image' => ( isset( $value['background-image'] ) ) ? esc_url_raw( $value['background-image'] ) : '',
+ 'background-repeat' => ( isset( $value['background-repeat'] ) ) ? esc_attr( $value['background-repeat'] ) : '',
+ 'background-position' => ( isset( $value['background-position'] ) ) ? esc_attr( $value['background-position'] ) : '',
+ 'background-size' => ( isset( $value['background-size'] ) ) ? esc_attr( $value['background-size'] ) : '',
+ 'background-attachment' => ( isset( $value['background-attachment'] ) ) ? esc_attr( $value['background-attachment'] ) : '',
+ );
+ }
+
+ /**
+ * Sets the $js_vars
+ *
+ * @access protected
+ */
+ protected function set_js_vars() {
+
+ // Typecast to array.
+ $this->js_vars = (array) $this->js_vars;
+
+ // Check if transport is set to auto.
+ // If not, then skip the auto-calculations and exit early.
+ if ( 'auto' !== $this->transport ) {
+ return;
+ }
+
+ // Set transport to refresh initially.
+ // Serves as a fallback in case we failt to auto-calculate js_vars.
+ $this->transport = 'refresh';
+
+ $js_vars = array();
+
+ // Try to auto-generate js_vars.
+ // First we need to check if js_vars are empty, and that output is not empty.
+ if ( empty( $this->js_vars ) && ! empty( $this->output ) ) {
+
+ // Start going through each item in the $output array.
+ foreach ( $this->output as $output ) {
+
+ // If 'element' is not defined, skip this.
+ if ( ! isset( $output['element'] ) ) {
+ continue;
+ }
+ if ( is_array( $output['element'] ) ) {
+ $output['element'] = implode( ',', $output['element'] );
+ }
+
+ // If there's a sanitize_callback defined, skip this.
+ if ( isset( $output['sanitize_callback'] ) && ! empty( $output['sanitize_callback'] ) ) {
+ continue;
+ }
+
+ // If we got this far, it's safe to add this.
+ $js_vars[] = $output;
+ }
+
+ // Did we manage to get all the items from 'output'?
+ // If not, then we're missing something so don't add this.
+ if ( count( $js_vars ) !== count( $this->output ) ) {
+ return;
+ }
+ $this->js_vars = $js_vars;
+ $this->transport = 'postMessage';
+
+ }
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-checkbox.php b/functions/kirki/field/class-kirki-field-checkbox.php
new file mode 100644
index 0000000..3ed90a0
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-checkbox.php
@@ -0,0 +1,68 @@
+type = 'checkbox';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback.
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ if ( ! $this->sanitize_callback ) {
+ $this->sanitize_callback = array( $this, 'sanitize' );
+ }
+
+ }
+
+ /**
+ * Sanitizes checkbox values.
+ *
+ * @access public
+ * @param boolean|integer|string|null $value The checkbox value.
+ * @return bool
+ */
+ public function sanitize( $value = null ) {
+
+ if ( '0' === $value || 'false' === $value ) {
+ return false;
+ }
+
+ return (bool) $value;
+
+ }
+
+ /**
+ * Sets the default value.
+ *
+ * @access protected
+ */
+ protected function set_default() {
+
+ $this->default = (bool) ( 1 === $this->default || '1' === $this->default || true === $this->default || 'true' === $this->default || 'on' === $this->default );
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-code.php b/functions/kirki/field/class-kirki-field-code.php
new file mode 100644
index 0000000..76bc3da
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-code.php
@@ -0,0 +1,111 @@
+type = 'kirki-code';
+
+ }
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ // Make sure we have some defaults in case none are defined.
+ $defaults = array(
+ 'language' => 'css',
+ 'theme' => 'elegant',
+ );
+ $this->choices = wp_parse_args( $this->choices, $defaults );
+
+ // Make sure the choices are defined and set as an array.
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+
+ // An array of valid languages.
+ $valid_languages = array(
+ 'coffescript',
+ 'css',
+ 'haml',
+ 'htmlembedded',
+ 'htmlmixed',
+ 'javascript',
+ 'markdown',
+ 'php',
+ 'sass',
+ 'smarty',
+ 'sql',
+ 'stylus',
+ 'textile',
+ 'twig',
+ 'xml',
+ 'yaml',
+ );
+ // Make sure the defined language exists.
+ // If not, fallback to CSS.
+ if ( ! in_array( $this->choices['language'], $valid_languages, true ) ) {
+ $this->choices['language'] = 'css';
+ }
+ // Hack for 'html' mode.
+ if ( 'html' === $this->choices['language'] ) {
+ $this->choices['language'] = 'htmlmixed';
+ }
+
+ // Set the theme.
+ $valid_themes = array(
+ 'kirki-light' => 'elegant',
+ 'light' => 'elegant',
+ 'elegant' => 'elegant',
+ 'kirki-dark' => 'monokai',
+ 'dark' => 'monokai',
+ 'monokai' => 'monokai',
+ 'material' => 'material',
+ );
+ if ( isset( $valid_themes[ $this->choices['theme'] ] ) ) {
+ $this->choices['theme'] = $valid_themes[ $this->choices['theme'] ];
+ } else {
+ $this->choices['theme'] = 'elegant';
+ }
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ // Code fields must NOT be filtered. Their values usually contain CSS/JS.
+ // It is the responsibility of the theme/plugin that registers this field
+ // to properly apply any necessary filtering.
+ $this->sanitize_callback = array( 'Kirki_Sanitize_Values', 'unfiltered' );
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-color-alpha.php b/functions/kirki/field/class-kirki-field-color-alpha.php
new file mode 100644
index 0000000..48c4492
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-color-alpha.php
@@ -0,0 +1,30 @@
+choices ) ) {
+ $this->choices = array();
+ }
+ $this->choices['alpha'] = true;
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-color-palette.php b/functions/kirki/field/class-kirki-field-color-palette.php
new file mode 100644
index 0000000..dc8c6d2
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-color-palette.php
@@ -0,0 +1,27 @@
+type = 'kirki-color-palette';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-color.php b/functions/kirki/field/class-kirki-field-color.php
new file mode 100644
index 0000000..ae7ed65
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-color.php
@@ -0,0 +1,89 @@
+type = 'kirki-color';
+
+ }
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+ if ( true === $this->alpha ) {
+ _doing_it_wrong( 'Kirki::add_field', esc_attr__( 'Do not use "alpha" as an argument in color controls. Use "choices[alpha]" instead.', 'blogrow' ), '3.0.10' );
+ $this->choices['alpha'] = true;
+ }
+ if ( ! isset( $this->choices['alpha'] ) || true !== $this->choices['alpha'] ) {
+ $this->choices['alpha'] = true;
+ if ( property_exists( $this, 'default' ) && ! empty( $this->default ) && false === strpos( 'rgba', $this->default ) ) {
+ $this->choices['alpha'] = false;
+ }
+ }
+
+ if ( ( ! isset( $this->choices['mode'] ) ) || ( 'hex' !== $this->choices['mode'] || 'hue' !== $this->choices['mode'] ) ) {
+ $this->choices['mode'] = 'hex';
+ }
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ if ( 'hue' === $this->mode ) {
+ $this->sanitize_callback = 'absint';
+ return;
+ }
+ $this->sanitize_callback = array( 'Kirki_Sanitize_Values', 'color' );
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-custom.php b/functions/kirki/field/class-kirki-field-custom.php
new file mode 100644
index 0000000..40b7c0c
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-custom.php
@@ -0,0 +1,45 @@
+type = 'kirki-custom';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ // Custom fields don't actually save any value.
+ // just use __return_true.
+ $this->sanitize_callback = '__return_true';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-dashicons.php b/functions/kirki/field/class-kirki-field-dashicons.php
new file mode 100644
index 0000000..829d966
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-dashicons.php
@@ -0,0 +1,42 @@
+type = 'kirki-dashicons';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_attr';
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-date.php b/functions/kirki/field/class-kirki-field-date.php
new file mode 100644
index 0000000..33cf01a
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-date.php
@@ -0,0 +1,43 @@
+type = 'kirki-date';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_textarea';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-dimension.php b/functions/kirki/field/class-kirki-field-dimension.php
new file mode 100644
index 0000000..eea45e2
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-dimension.php
@@ -0,0 +1,38 @@
+type = 'kirki-dimension';
+
+ }
+
+ /**
+ * Sanitizes the value.
+ *
+ * @access public
+ * @param string $value The value.
+ * @return string
+ */
+ public function sanitize( $value ) {
+ return Kirki_Sanitize_Values::css_dimension( $value );
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-dimensions.php b/functions/kirki/field/class-kirki-field-dimensions.php
new file mode 100644
index 0000000..28fadaf
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-dimensions.php
@@ -0,0 +1,76 @@
+type = 'kirki-dimensions';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback.
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * Sanitizes the value.
+ *
+ * @access public
+ * @param array $value The value.
+ * @return array
+ */
+ public function sanitize( $value ) {
+
+ // Sanitize each sub-value separately.
+ foreach ( $value as $key => $sub_value ) {
+ $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value );
+ }
+ return $value;
+
+ }
+
+ /**
+ * Set the choices.
+ * Adds a pseudo-element "controls" that helps with the JS API.
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ $this->choices['controls'] = array();
+ if ( is_array( $this->default ) ) {
+ foreach ( $this->default as $key => $value ) {
+ $this->choices['controls'][ $key ] = true;
+ }
+ }
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-editor.php b/functions/kirki/field/class-kirki-field-editor.php
new file mode 100644
index 0000000..b62185f
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-editor.php
@@ -0,0 +1,54 @@
+= 0 ) {
+ $this->type = 'kirki-editor';
+ return;
+ }
+ // Fallback for older WordPress versions.
+ $this->type = 'kirki-generic';
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+ $this->choices['element'] = 'textarea';
+ $this->choices['rows'] = '5';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'wp_kses_post';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-fontawesome.php b/functions/kirki/field/class-kirki-field-fontawesome.php
new file mode 100644
index 0000000..06b0e75
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-fontawesome.php
@@ -0,0 +1,43 @@
+type = 'kirki-fontawesome';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_attr';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-generic.php b/functions/kirki/field/class-kirki-field-generic.php
new file mode 100644
index 0000000..9a18a24
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-generic.php
@@ -0,0 +1,15 @@
+type = 'kirki-image';
+
+ }
+
+ /**
+ * Set the choices.
+ * Adds a pseudo-element "controls" that helps with the JS API.
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = (array) $this->choices;
+ }
+ if ( ! isset( $this->choices['save_as'] ) ) {
+ $this->choices['save_as'] = 'url';
+ }
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * The sanitize method that will be used as a falback
+ *
+ * @param string|array $value The control's value.
+ */
+ public function sanitize( $value ) {
+
+ if ( isset( $this->choices['save_as'] ) && 'array' === $this->choices['save_as'] ) {
+ return array(
+ 'id' => ( isset( $value['id'] ) && '' !== $value['id'] ) ? (int) $value['id'] : '',
+ 'url' => ( isset( $value['url'] ) && '' !== $value['url'] ) ? esc_url_raw( $value['url'] ) : '',
+ 'width' => ( isset( $value['width'] ) && '' !== $value['width'] ) ? (int) $value['width'] : '',
+ 'height' => ( isset( $value['height'] ) && '' !== $value['height'] ) ? (int) $value['height'] : '',
+ );
+ }
+ if ( isset( $this->choices['save_as'] ) && 'id' === $this->choices['save_as'] ) {
+ return absint( $value );
+ }
+ if ( is_string( $value ) ) {
+ return esc_url_raw( $value );
+ }
+ return $value;
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-kirki-generic.php b/functions/kirki/field/class-kirki-field-kirki-generic.php
new file mode 100644
index 0000000..f897832
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-kirki-generic.php
@@ -0,0 +1,60 @@
+type = 'kirki-generic';
+
+ }
+
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+ if ( ! isset( $this->choices['element'] ) ) {
+ $this->choices['element'] = 'input';
+ }
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'wp_kses_post';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-link.php b/functions/kirki/field/class-kirki-field-link.php
new file mode 100644
index 0000000..6b860a4
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-link.php
@@ -0,0 +1,15 @@
+type = 'kirki-multicheck';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * The sanitize method that will be used as a falback
+ *
+ * @param string|array $value The control's value.
+ */
+ public function sanitize( $value ) {
+
+ $value = ( ! is_array( $value ) ) ? explode( ',', $value ) : $value;
+ return ( ! empty( $value ) ) ? array_map( 'sanitize_text_field', $value ) : array();
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-multicolor.php b/functions/kirki/field/class-kirki-field-multicolor.php
new file mode 100644
index 0000000..fc16eba
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-multicolor.php
@@ -0,0 +1,69 @@
+type = 'kirki-multicolor';
+
+ }
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ // Make sure choices are defined as an array.
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * The method that will be used as a `sanitize_callback`.
+ *
+ * @param array $value The value to be sanitized.
+ * @return array The value.
+ */
+ public function sanitize( $value ) {
+
+ return $value;
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-number.php b/functions/kirki/field/class-kirki-field-number.php
new file mode 100644
index 0000000..126886d
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-number.php
@@ -0,0 +1,85 @@
+type = 'kirki-number';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ $this->choices = wp_parse_args(
+ $this->choices,
+ array(
+ 'min' => -999999999,
+ 'max' => 999999999,
+ 'step' => 1,
+ )
+ );
+ // Make sure min, max & step are all numeric.
+ $this->choices['min'] = filter_var( $this->choices['min'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+ $this->choices['max'] = filter_var( $this->choices['max'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+ $this->choices['step'] = filter_var( $this->choices['step'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+ }
+
+ /**
+ * Sanitizes numeric values.
+ *
+ * @access public
+ * @param integer|string $value The checkbox value.
+ * @return bool
+ */
+ public function sanitize( $value = 0 ) {
+
+ $this->set_choices();
+
+ $value = filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+
+ // Minimum & maximum value limits.
+ if ( $value < $this->choices['min'] || $value > $this->choices['max'] ) {
+ return max( min( $value, $this->choices['max'] ), $this->choices['min'] );
+ }
+
+ // Only multiple of steps.
+ $steps = ( $value - $this->choices['min'] ) / $this->choices['step'];
+ if ( ! is_int( $steps ) ) {
+ $value = $this->choices['min'] + ( round( $steps ) * $this->choices['step'] );
+ }
+ return $value;
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-palette.php b/functions/kirki/field/class-kirki-field-palette.php
new file mode 100644
index 0000000..6874335
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-palette.php
@@ -0,0 +1,27 @@
+type = 'kirki-palette';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-preset.php b/functions/kirki/field/class-kirki-field-preset.php
new file mode 100644
index 0000000..723279d
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-preset.php
@@ -0,0 +1,38 @@
+type = 'kirki-preset';
+
+ }
+
+ /**
+ * Sets the $multiple
+ *
+ * @access protected
+ */
+ protected function set_multiple() {
+
+ $this->multiple = 1;
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-radio-buttonset.php b/functions/kirki/field/class-kirki-field-radio-buttonset.php
new file mode 100644
index 0000000..926b013
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-radio-buttonset.php
@@ -0,0 +1,27 @@
+type = 'kirki-radio-buttonset';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-radio-image.php b/functions/kirki/field/class-kirki-field-radio-image.php
new file mode 100644
index 0000000..6339426
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-radio-image.php
@@ -0,0 +1,27 @@
+type = 'kirki-radio-image';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-radio.php b/functions/kirki/field/class-kirki-field-radio.php
new file mode 100644
index 0000000..b69b82c
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-radio.php
@@ -0,0 +1,58 @@
+type = 'kirki-radio';
+ // Tweaks for backwards-compatibility:
+ // Prior to version 0.8 radio-buttonset & radio-image were part of the radio control.
+ if ( in_array( $this->mode, array( 'buttonset', 'image' ), true ) ) {
+ /* translators: %1$s represents the field ID where the error occurs. %2%s is buttonset/image. */
+ _doing_it_wrong( __METHOD__, sprintf( esc_attr__( 'Error in field %1$s. The "mode" argument has been deprecated since Kirki v0.8. Use the "radio-%2$s" type instead.', 'blogrow' ), esc_attr( $this->settings ), esc_attr( $this->mode ) ), '3.0.10' );
+ $this->type = 'radio-' . $this->mode;
+ }
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_attr';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-repeater.php b/functions/kirki/field/class-kirki-field-repeater.php
new file mode 100644
index 0000000..2a40be1
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-repeater.php
@@ -0,0 +1,175 @@
+type = 'repeater';
+
+ }
+
+ /**
+ * Sets the $transport
+ *
+ * @access protected
+ */
+ protected function set_transport() {
+
+ // Force using refresh mode.
+ // Currently the repeater control does not support postMessage.
+ $this->transport = 'refresh';
+
+ }
+
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * The sanitize method that will be used as a falback
+ *
+ * @param string|array $value The control's value.
+ */
+ public function sanitize( $value ) {
+
+ // is the value formatted as a string?
+ if ( is_string( $value ) ) {
+ $value = rawurldecode( $value );
+ $value = json_decode( $value, true );
+ }
+
+ // Nothing to sanitize if we don't have fields.
+ if ( empty( $this->fields ) ) {
+ return $value;
+ }
+
+ foreach ( $value as $row_id => $row_value ) {
+
+ // Make sure the row is formatted as an array.
+ if ( ! is_array( $row_value ) ) {
+ $value[ $row_id ] = array();
+ continue;
+ }
+ // Start parsing sub-fields in rows.
+ foreach ( $row_value as $subfield_id => $subfield_value ) {
+ // Make sure this is a valid subfield.
+ // If it's not, then unset it.
+ if ( ! isset( $this->fields[ $subfield_id ] ) ) {
+ unset( $value[ $row_id ][ $subfield_id ] );
+ }
+ // Get the subfield-type.
+ if ( ! isset( $this->fields[ $subfield_id ]['type'] ) ) {
+ continue;
+ }
+ $subfield_type = $this->fields[ $subfield_id ]['type'];
+
+ // Allow using a sanitize-callback on a per-field basis.
+ if ( isset( $this->fields[ $subfield_id ]['sanitize_callback'] ) ) {
+
+ $subfield_value = call_user_func( $this->fields[ $subfield_id ]['sanitize_callback'], $subfield_value );
+
+ } else {
+
+ switch ( $subfield_type ) {
+ case 'image':
+ case 'cropped_image':
+ case 'upload':
+ if ( ! is_numeric( $subfield_value ) && is_string( $subfield_value ) ) {
+ $subfield_value = esc_url_raw( $subfield_value );
+ }
+ break;
+ case 'dropdown-pages':
+ $subfield_value = (int) $subfield_value;
+ break;
+ case 'color':
+ // Instantiate the object.
+ $color_obj = ariColor::newColor( $subfield_value );
+ $$subfield_value = $color_obj->toCSS( $color_obj->mode );
+ break;
+ case 'text':
+ $subfield_value = sanitize_text_field( $subfield_value );
+ break;
+ case 'url':
+ case 'link':
+ $subfield_value = esc_url_raw( $subfield_value );
+ break;
+ case 'email':
+ $subfield_value = filter_var( $subfield_value, FILTER_SANITIZE_EMAIL );
+ break;
+ case 'tel':
+ $subfield_value = esc_attr( $subfield_value );
+ break;
+ case 'checkbox':
+ $subfield_value = (string) intval( $subfield_value );
+ break;
+ case 'select':
+ if ( isset( $this->fields[ $subfield_id ]['multiple'] ) ) {
+ if ( true === $this->fields[ $subfield_id ]['multiple'] ) {
+ $multiple = 2;
+ }
+ $multiple = (int) $this->fields[ $subfield_id ]['multiple'];
+ if ( 1 < $multiple ) {
+ $subfield_value = (array) $subfield_value;
+ foreach ( $subfield_value as $sub_subfield_key => $sub_subfield_value ) {
+ $subfield_value[ $sub_subfield_key ] = esc_attr( $sub_subfield_value );
+ }
+ } else {
+ $subfield_value = esc_attr( $subfield_value );
+ }
+ }
+ break;
+ case 'radio':
+ case 'radio-image':
+ $subfield_value = esc_attr( $subfield_value );
+ break;
+ case 'textarea':
+ $subfield_value = html_entity_decode( wp_kses_post( $subfield_value ) );
+
+ } // End switch().
+ } // End if().
+ $value[ $row_id ][ $subfield_id ] = $subfield_value;
+ } // End foreach().
+ } // End foreach().
+
+ return $value;
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-select.php b/functions/kirki/field/class-kirki-field-select.php
new file mode 100644
index 0000000..785f208
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-select.php
@@ -0,0 +1,101 @@
+ 1, then the maximum number of selectable options
+ * is the number defined here.
+ *
+ * @access protected
+ * @var integer
+ */
+ protected $multiple = 1;
+
+ /**
+ * Sets the control type.
+ *
+ * @access protected
+ */
+ protected function set_type() {
+
+ $this->type = 'kirki-select';
+
+ }
+
+ /**
+ * Sets the $multiple
+ *
+ * @access protected
+ */
+ protected function set_multiple() {
+
+ $this->multiple = absint( $this->multiple );
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * Sanitizes select control values.
+ *
+ * @since 2.2.8
+ * @access public
+ * @param array $value The value.
+ * @return string|array
+ */
+ public function sanitize( $value ) {
+
+ if ( is_array( $value ) ) {
+ foreach ( $value as $key => $subvalue ) {
+ if ( '' !== $subvalue || isset( $this->choices[''] ) ) {
+ $key = sanitize_key( $key );
+ $value[ $key ] = esc_attr( $subvalue );
+ }
+ }
+ return $value;
+ }
+ return esc_attr( $value );
+
+ }
+
+ /**
+ * Sets the default value.
+ *
+ * @access protected
+ * @since 3.0.0
+ */
+ protected function set_default() {
+
+ if ( 1 < $this->multiple && ! is_array( $this->default ) ) {
+ $this->default = array( $this->default );
+ }
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-select2-multiple.php b/functions/kirki/field/class-kirki-field-select2-multiple.php
new file mode 100644
index 0000000..861820c
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-select2-multiple.php
@@ -0,0 +1,29 @@
+multiple = 999;
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-select2.php b/functions/kirki/field/class-kirki-field-select2.php
new file mode 100644
index 0000000..e3a44e4
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-select2.php
@@ -0,0 +1,17 @@
+type = 'kirki-slider';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-sortable.php b/functions/kirki/field/class-kirki-field-sortable.php
new file mode 100644
index 0000000..38ff84e
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-sortable.php
@@ -0,0 +1,62 @@
+type = 'kirki-sortable';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback.
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ $this->sanitize_callback = array( $this, 'sanitize' );
+
+ }
+
+ /**
+ * Sanitizes sortable values.
+ *
+ * @access public
+ * @param array $value The checkbox value.
+ * @return array
+ */
+ public function sanitize( $value = array() ) {
+
+ if ( is_string( $value ) || is_numeric( $value ) ) {
+ return array(
+ esc_attr( $value ),
+ );
+ }
+ $sanitized_value = array();
+ foreach ( $value as $sub_value ) {
+ if ( isset( $this->choices[ $sub_value ] ) ) {
+ $sanitized_value[] = esc_attr( $sub_value );
+ }
+ }
+ return $sanitized_value;
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-spacing.php b/functions/kirki/field/class-kirki-field-spacing.php
new file mode 100644
index 0000000..086d0f2
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-spacing.php
@@ -0,0 +1,87 @@
+type = 'kirki-dimensions';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback.
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( $this, 'sanitize_value' );
+
+ }
+
+ /**
+ * Sanitizes the value.
+ *
+ * @access public
+ * @param array $value The value.
+ * @return array
+ */
+ public function sanitize_value( $value ) {
+
+ // Sanitize each sub-value separately.
+ foreach ( $value as $key => $sub_value ) {
+ $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value );
+ }
+ return $value;
+
+ }
+
+ /**
+ * Set the choices.
+ * Adds a pseudo-element "controls" that helps with the JS API.
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ $default_args = array(
+ 'controls' => array(
+ 'top' => ( isset( $this->default['top'] ) ),
+ 'bottom' => ( isset( $this->default['top'] ) ),
+ 'left' => ( isset( $this->default['top'] ) ),
+ 'right' => ( isset( $this->default['top'] ) ),
+ ),
+ 'labels' => array(
+ 'top' => esc_attr__( 'Top', 'blogrow' ),
+ 'bottom' => esc_attr__( 'Bottom', 'blogrow' ),
+ 'left' => esc_attr__( 'Left', 'blogrow' ),
+ 'right' => esc_attr__( 'Right', 'blogrow' ),
+ ),
+ );
+
+ $this->choices = wp_parse_args( $this->choices, $default_args );
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-switch.php b/functions/kirki/field/class-kirki-field-switch.php
new file mode 100644
index 0000000..6cda10f
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-switch.php
@@ -0,0 +1,48 @@
+type = 'kirki-switch';
+
+ }
+
+ /**
+ * Sets the control choices.
+ *
+ * @access protected
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+
+ $this->choices = wp_parse_args(
+ $this->choices,
+ array(
+ 'on' => esc_attr__( 'On', 'blogrow' ),
+ 'off' => esc_attr__( 'Off', 'blogrow' ),
+ 'round' => false,
+ )
+ );
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-text.php b/functions/kirki/field/class-kirki-field-text.php
new file mode 100644
index 0000000..6f030a2
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-text.php
@@ -0,0 +1,47 @@
+choices ) ) {
+ $this->choices = array();
+ }
+ $this->choices['element'] = 'input';
+ $this->choices['type'] = 'text';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_textarea';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-textarea.php b/functions/kirki/field/class-kirki-field-textarea.php
new file mode 100644
index 0000000..398d75a
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-textarea.php
@@ -0,0 +1,29 @@
+choices = array(
+ 'element' => 'textarea',
+ 'rows' => 5,
+ );
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-toggle.php b/functions/kirki/field/class-kirki-field-toggle.php
new file mode 100644
index 0000000..545ec3f
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-toggle.php
@@ -0,0 +1,27 @@
+type = 'kirki-toggle';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-typography.php b/functions/kirki/field/class-kirki-field-typography.php
new file mode 100644
index 0000000..991c7a2
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-typography.php
@@ -0,0 +1,245 @@
+type = 'kirki-typography';
+
+ }
+
+ /**
+ * The class constructor.
+ * Parses and sanitizes all field arguments.
+ * Then it adds the field to Kirki::$fields.
+ *
+ * @access public
+ * @param string $config_id The ID of the config we want to use.
+ * Defaults to "global".
+ * Configs are handled by the Kirki_Config class.
+ * @param array $args The arguments of the field.
+ */
+ public function __construct( $config_id = 'global', $args = array() ) {
+ parent::__construct( $config_id, $args );
+ $this->set_default();
+ }
+
+ /**
+ * Sets the default value.
+ *
+ * @access protected
+ */
+ protected function set_default() {
+
+ // Accomodate the use of font-weight and convert to variant.
+ if ( isset( $this->default['font-weight'] ) ) {
+ $this->default['variant'] = ( 'regular' === $this->default['font-weight'] ) ? 400 : (string) intval( $this->default['font-weight'] );
+ }
+
+ // Make sure letter-spacing has units.
+ if ( isset( $this->default['letter-spacing'] ) && is_numeric( $this->default['letter-spacing'] ) && $this->default['letter-spacing'] ) {
+ $this->default['letter-spacing'] .= 'px';
+ }
+
+ // Make sure we use "subsets" instead of "subset".
+ if ( isset( $this->default['subset'] ) && ! empty( $this->default['subset'] ) && ( ! isset( $this->default['subsets'] ) || empty( $this->default['subsets'] ) ) ) {
+ $this->default['subsets'] = $this->default['subset'];
+ }
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = array( __CLASS__, 'sanitize' );
+
+ }
+
+ /**
+ * Sets the $js_vars
+ *
+ * @access protected
+ */
+ protected function set_js_vars() {
+
+ if ( ! is_array( $this->js_vars ) ) {
+ $this->js_vars = array();
+ }
+
+ // Check if transport is set to auto.
+ // If not, then skip the auto-calculations and exit early.
+ if ( 'auto' !== $this->transport ) {
+ return;
+ }
+
+ // Set transport to refresh initially.
+ // Serves as a fallback in case we failt to auto-calculate js_vars.
+ $this->transport = 'refresh';
+
+ $js_vars = array();
+
+ // Try to auto-generate js_vars.
+ // First we need to check if js_vars are empty, and that output is not empty.
+ if ( ! empty( $this->output ) ) {
+
+ // Start going through each item in the $output array.
+ foreach ( $this->output as $output ) {
+
+ // If 'element' or 'property' are not defined, skip this.
+ if ( ! isset( $output['element'] ) ) {
+ continue;
+ }
+ if ( is_array( $output['element'] ) ) {
+ $output['element'] = implode( ',', $output['element'] );
+ }
+
+ // If we got this far, it's safe to add this.
+ $js_vars[] = $output;
+ }
+
+ // Did we manage to get all the items from 'output'?
+ // If not, then we're missing something so don't add this.
+ if ( count( $js_vars ) !== count( $this->output ) ) {
+ return;
+ }
+ $this->js_vars = $js_vars;
+ $this->transport = 'postMessage';
+
+ }
+
+ }
+
+ /**
+ * Sanitizes typography controls
+ *
+ * @static
+ * @since 2.2.0
+ * @param array $value The value.
+ * @return array
+ */
+ public static function sanitize( $value ) {
+
+ if ( ! is_array( $value ) ) {
+ return array();
+ }
+
+ foreach ( $value as $key => $val ) {
+ switch ( $key ) {
+ case 'font-family':
+ $value['font-family'] = esc_attr( $val );
+ break;
+ case 'font-weight':
+ if ( isset( $value['variant'] ) ) {
+ break;
+ }
+ $value['variant'] = $val;
+ if ( isset( $value['font-style'] ) && 'italic' === $value['font-style'] ) {
+ $value['variant'] = ( '400' !== $val || 400 !== $val ) ? $value['variant'] . 'italic' : 'italic';
+ }
+ break;
+ case 'variant':
+ // Use 'regular' instead of 400 for font-variant.
+ $value['variant'] = ( 400 === $val || '400' === $val ) ? 'regular' : $val;
+ // Get font-weight from variant.
+ $value['font-weight'] = filter_var( $value['variant'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
+ $value['font-weight'] = ( 'regular' === $value['variant'] || 'italic' === $value['variant'] ) ? 400 : absint( $value['font-weight'] );
+ // Get font-style from variant.
+ if ( ! isset( $value['font-style'] ) ) {
+ $value['font-style'] = ( false === strpos( $value['variant'], 'italic' ) ) ? 'normal' : 'italic';
+ }
+ break;
+ case 'subset':
+ // Make sure the saved value is "subsets" (plural) and not "subset".
+ // This is for compatibility with older versions.
+ if ( ! empty( $value['subset'] ) && ! isset( $value['subsets'] ) || empty( $value['subset'] ) ) {
+ $value['subsets'] = $value['subset'];
+ }
+ unset( $value['subset'] );
+ // Make sure we're using a valid subset.
+ $valid_subsets = Kirki_Fonts::get_google_font_subsets();
+ $subsets_ok = array();
+ $value['subsets'] = (array) $value['subsets'];
+ foreach ( $value['subsets'] as $subset ) {
+ if ( array_key_exists( $subset, $valid_subsets ) ) {
+ $subsets_ok[] = $subset;
+ }
+ }
+ $value['subsets'] = $subsets_ok;
+ break;
+ case 'font-size':
+ case 'letter-spacing':
+ case 'word-spacing':
+ case 'line-height':
+ $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $val );
+ break;
+ case 'text-align':
+ if ( ! in_array( $val, array( 'inherit', 'left', 'center', 'right', 'justify' ), true ) ) {
+ $value['text-align'] = 'inherit';
+ }
+ break;
+ case 'text-transform':
+ if ( ! in_array( $val, array( 'none', 'capitalize', 'uppercase', 'lowercase', 'initial', 'inherit' ), true ) ) {
+ $value['text-transform'] = 'none';
+ }
+ break;
+ case 'text-decoration':
+ if ( ! in_array( $val, array( 'none', 'underline', 'overline', 'line-through', 'initial', 'inherit' ), true ) ) {
+ $value['text-transform'] = 'none';
+ }
+ break;
+ case 'color':
+ $value['color'] = ariColor::newColor( $val )->toCSS( 'hex' );
+ break;
+ } // End switch().
+ } // End foreach().
+
+ return $value;
+ }
+
+ /**
+ * Sets the $choices
+ *
+ * @access protected
+ * @since 3.0.0
+ */
+ protected function set_choices() {
+
+ if ( ! is_array( $this->choices ) ) {
+ $this->choices = array();
+ }
+ $this->choices = wp_parse_args(
+ $this->choices, array(
+ 'variant' => array(),
+ 'fonts' => array(
+ 'standard' => array(),
+ 'google' => array(),
+ ),
+ )
+ );
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-upload.php b/functions/kirki/field/class-kirki-field-upload.php
new file mode 100644
index 0000000..ef7a590
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-upload.php
@@ -0,0 +1,43 @@
+type = 'upload';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_url_raw';
+
+ }
+}
diff --git a/functions/kirki/field/class-kirki-field-url.php b/functions/kirki/field/class-kirki-field-url.php
new file mode 100644
index 0000000..a6dcd76
--- /dev/null
+++ b/functions/kirki/field/class-kirki-field-url.php
@@ -0,0 +1,47 @@
+choices ) ) {
+ $this->choices = array();
+ }
+ $this->choices['element'] = 'input';
+ $this->choices['type'] = 'text';
+
+ }
+
+ /**
+ * Sets the $sanitize_callback
+ *
+ * @access protected
+ */
+ protected function set_sanitize_callback() {
+
+ // If a custom sanitize_callback has been defined,
+ // then we don't need to proceed any further.
+ if ( ! empty( $this->sanitize_callback ) ) {
+ return;
+ }
+ $this->sanitize_callback = 'esc_url_raw';
+
+ }
+}
diff --git a/functions/kirki/kirki.php b/functions/kirki/kirki.php
new file mode 100644
index 0000000..72a3ef1
--- /dev/null
+++ b/functions/kirki/kirki.php
@@ -0,0 +1,106 @@
+modules = new Kirki_Modules();
+
+Kirki::$url = plugins_url( '', __FILE__ );
+
+// Instantiate classes.
+new Kirki();
+new Kirki_L10n();
+
+// Include deprecated functions & methods.
+include_once wp_normalize_path( dirname( __FILE__ ) . '/core/deprecated.php' );
+
+// Include the ariColor library.
+include_once wp_normalize_path( dirname( __FILE__ ) . '/lib/class-aricolor.php' );
+
+// Add an empty config for global fields.
+Kirki::add_config( '' );
+
+$custom_config_path = dirname( __FILE__ ) . '/custom-config.php';
+$custom_config_path = wp_normalize_path( $custom_config_path );
+if ( file_exists( $custom_config_path ) ) {
+ include_once $custom_config_path;
+}
+
+// Add upgrade notifications.
+include_once wp_normalize_path( dirname( __FILE__ ) . '/upgrade-notifications.php' );
+
+/**
+ * To enable tests, add this line to your wp-config.php file (or anywhere alse):
+ * define( 'KIRKI_TEST', true );
+ *
+ * Please note that the example.php file is not included in the wordpress.org distribution
+ * and will only be included in dev versions of the plugin in the github repository.
+ */
+if ( defined( 'KIRKI_TEST' ) && true === KIRKI_TEST && file_exists( dirname( __FILE__ ) . '/example.php' ) ) {
+ include_once dirname( __FILE__ ) . '/example.php';
+}
diff --git a/functions/kirki/lib/class-aricolor.php b/functions/kirki/lib/class-aricolor.php
new file mode 100644
index 0000000..714fa57
--- /dev/null
+++ b/functions/kirki/lib/class-aricolor.php
@@ -0,0 +1,982 @@
+color = $color;
+
+ if ( is_array( $color ) && isset( $color['fallback'] ) ) {
+ $this->fallback = $color['fallback'];
+ $this->fallback_obj = self::newColor( $this->fallback );
+ }
+
+ if ( ! method_exists( $this, 'from_' . $mode ) ) {
+ $mode = $this->get_mode( $color );
+ }
+
+ $this->mode = $mode;
+
+ if ( ! $mode ) {
+ return;
+ }
+
+ $this->mode = $mode;
+ $method = 'from_' . $mode;
+ // Call the from_{$color_mode} method.
+ $this->$method();
+ }
+
+ /**
+ * Gets an instance for this color.
+ * We use a separate instance per color
+ * because there's no need to create a completely new instance each time we call this class.
+ * Instead using instances helps us improve performance & footprint.
+ *
+ * @static
+ * @access public
+ * @since 1.0.0
+ * @param string|array $color The color.
+ * @param string $mode Mode to be used.
+ * @return ariColor (object)
+ */
+ public static function newColor( $color, $mode = 'auto' ) {
+
+ // Get an md5 for this color.
+ $color_md5 = ( is_array( $color ) ) ? md5( wp_json_encode( $color ) . $mode ) : md5( $color . $mode );
+ // Set the instance if it does not already exist.
+ if ( ! isset( self::$instances[ $color_md5 ] ) ) {
+ self::$instances[ $color_md5 ] = new self( $color, $mode );
+ }
+ return self::$instances[ $color_md5 ];
+ }
+
+ /**
+ * Alias of the newColor method.
+ *
+ * @static
+ * @access public
+ * @since 1.1
+ * @param string|array $color The color.
+ * @param string $mode Mode to be used.
+ * @return ariColor (object)
+ */
+ public static function new_color( $color, $mode = 'auto' ) {
+ return self::newColor( $color, $mode );
+ }
+
+ /**
+ * Allows us to get a new instance by modifying a property of the existing one.
+ *
+ * @access public
+ * @since 1.0.0
+ * @param string $property Can be one of the following:
+ * red,
+ * green,
+ * blue,
+ * alpha,
+ * hue,
+ * saturation,
+ * lightness,
+ * brightness.
+ * @param int|float|string $value The new value.
+ * @return ariColor|null
+ */
+ public function getNew( $property = '', $value = '' ) {
+
+ if ( in_array( $property, array( 'red', 'green', 'blue', 'alpha' ), true ) ) {
+ // Check if we're changing any of the rgba values.
+ $value = max( 0, min( 255, $value ) );
+ if ( 'red' === $property ) {
+ return self::new_color( 'rgba(' . $value . ',' . $this->green . ',' . $this->blue . ',' . $this->alpha . ')', 'rgba' );
+ } elseif ( 'green' === $property ) {
+ return self::new_color( 'rgba(' . $this->red . ',' . $value . ',' . $this->blue . ',' . $this->alpha . ')', 'rgba' );
+ } elseif ( 'blue' === $property ) {
+ return self::new_color( 'rgba(' . $this->red . ',' . $this->green . ',' . $value . ',' . $this->alpha . ')', 'rgba' );
+ } elseif ( 'alpha' === $property ) {
+ return self::new_color( 'rgba(' . $this->red . ',' . $this->green . ',' . $this->blue . ',' . $value . ')', 'rgba' );
+ }
+ } elseif ( in_array( $property, array( 'hue', 'saturation', 'lightness' ), true ) ) {
+ // Check if we're changing any of the hsl values.
+ $value = ( 'hue' === $property ) ? max( 0, min( 360, $value ) ) : max( 0, min( 100, $value ) );
+
+ if ( 'hue' === $property ) {
+ return self::new_color( 'hsla(' . $value . ',' . $this->saturation . '%,' . $this->lightness . '%,' . $this->alpha . ')', 'hsla' );
+ } elseif ( 'saturation' === $property ) {
+ return self::new_color( 'hsla(' . $this->hue . ',' . $value . '%,' . $this->lightness . '%,' . $this->alpha . ')', 'hsla' );
+ } elseif ( 'lightness' === $property ) {
+ return self::new_color( 'hsla(' . $this->hue . ',' . $this->saturation . '%,' . $value . '%,' . $this->alpha . ')', 'hsla' );
+ }
+ } elseif ( 'brightness' === $property ) {
+ // Check if we're changing the brightness.
+ if ( $value < $this->brightness['total'] ) {
+ $red = max( 0, min( 255, $this->red - ( $this->brightness['total'] - $value ) ) );
+ $green = max( 0, min( 255, $this->green - ( $this->brightness['total'] - $value ) ) );
+ $blue = max( 0, min( 255, $this->blue - ( $this->brightness['total'] - $value ) ) );
+ } elseif ( $value > $this->brightness['total'] ) {
+ $red = max( 0, min( 255, $this->red + ( $value - $this->brightness['total'] ) ) );
+ $green = max( 0, min( 255, $this->green + ( $value - $this->brightness['total'] ) ) );
+ $blue = max( 0, min( 255, $this->blue + ( $value - $this->brightness['total'] ) ) );
+ } else {
+ // If it's not smaller and it's not greater, then it's equal.
+ return $this;
+ }
+ return self::new_color( 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $this->alpha . ')', 'rgba' );
+ }
+ return null;
+ }
+
+ /**
+ * Allias for the getNew method.
+ *
+ * @access public
+ * @since 1.1.0
+ * @param string $property Can be one of the following:
+ * red,
+ * green,
+ * blue,
+ * alpha,
+ * hue,
+ * saturation,
+ * lightness,
+ * brightness.
+ * @param int|float|string $value The new value.
+ * @return ariColor|null
+ */
+ public function get_new( $property = '', $value = '' ) {
+ return $this->getNew( $property, $value );
+ }
+
+ /**
+ * Figure out what mode we're using.
+ *
+ * @access public
+ * @since 1.0.0
+ * @param string|array $color The color we're querying.
+ * @return string
+ */
+ public function get_mode( $color ) {
+
+ // Check if value is an array.
+ if ( is_array( $color ) ) {
+ // Does the array have an 'rgba' key?
+ if ( isset( $color['rgba'] ) ) {
+ $this->color = $color['rgba'];
+ return 'rgba';
+ } elseif ( isset( $color['color'] ) ) {
+ // Does the array have a 'color' key?
+ $this->color = $color['color'];
+ if ( is_string( $color['color'] ) && false !== strpos( $color['color'], 'rgba' ) ) {
+ return 'rgba';
+ }
+ return 'hex';
+ }
+ // Is this a simple array with 4 items?
+ if ( 4 === count( $color ) && isset( $color[0] ) && isset( $color[1] ) && isset( $color[2] ) && isset( $color[3] ) ) {
+ $this->color = 'rgba(' . intval( $color[0] ) . ',' . intval( $color[1] ) . ',' . intval( $color[2] ) . ',' . intval( $color[3] ) . ')';
+ return 'rgba';
+ } elseif ( 3 === count( $color ) && isset( $color[0] ) && isset( $color[1] ) && isset( $color[2] ) ) {
+ // Is this a simple array with 3 items?
+ $this->color = 'rgba(' . intval( $color[0] ) . ',' . intval( $color[1] ) . ',' . intval( $color[2] ) . ',1)';
+ return 'rgba';
+ }
+
+ // Check for other keys in the array and get values from there.
+ $finders_keepers = array(
+ 'r' => 'red',
+ 'g' => 'green',
+ 'b' => 'blue',
+ 'a' => 'alpha',
+ 'red' => 'red',
+ 'green' => 'green',
+ 'blue' => 'blue',
+ 'alpha' => 'alpha',
+ 'opacity' => 'alpha',
+ );
+ $found = false;
+ foreach ( $finders_keepers as $finder => $keeper ) {
+ if ( isset( $color[ $finder ] ) ) {
+ $found = true;
+ $this->$keeper = $color[ $finder ];
+ }
+ }
+
+ // We failed, use fallback.
+ if ( ! $found ) {
+ $this->from_fallback();
+ return $this->mode;
+ }
+
+ // We did not fail, so use rgba values recovered above.
+ $this->color = 'rgba(' . $this->red . ',' . $this->green . ',' . $this->blue . ',' . $this->alpha . ')';
+ return 'rgba';
+ }
+
+ // If a string and 3 or 6 characters long, add # since it's a hex.
+ if ( 3 === strlen( $this->color ) || 6 === strlen( $this->color ) && false === strpos( $this->color, '#' ) ) {
+ $this->color = '#' . $this->color;
+ $color = $this->color;
+ }
+
+ // If we got this far, it's not an array.
+ // Check for key identifiers in the value.
+ $finders_keepers = array(
+ '#' => 'hex',
+ 'rgba' => 'rgba',
+ 'rgb' => 'rgb',
+ 'hsla' => 'hsla',
+ 'hsl' => 'hsl',
+ );
+ foreach ( $finders_keepers as $finder => $keeper ) {
+ if ( false !== strrpos( $color, $finder ) ) {
+
+ // Make sure hex colors have 6 digits and not more.
+ if ( '#' === $finder && 7 < strlen( $color ) ) {
+ $this->color = substr( $color, 0, 7 );
+ }
+
+ return $keeper;
+ }
+ }
+ // Perhaps we're using a word like "orange"?
+ $wordcolors = $this->get_word_colors();
+ if ( is_string( $color ) && array_key_exists( $color, $wordcolors ) ) {
+ $this->color = '#' . $wordcolors[ $color ];
+ return 'hex';
+ }
+ // Fallback to hex.
+
+ $this->color = $this->fallback;
+ return 'hex';
+ }
+
+ /**
+ * Starts with a HEX color and calculates all other properties.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return null
+ */
+ protected function from_hex() {
+
+ if ( ! function_exists( 'sanitize_hex_color' ) ) {
+ require_once wp_normalize_path( ABSPATH . WPINC . '/class-wp-customize-manager.php' );
+ }
+ // Is this perhaps a word-color?
+ $word_colors = $this->get_word_colors();
+ if ( array_key_exists( $this->color, $word_colors ) ) {
+ $this->color = '#' . $word_colors[ $this->color ];
+ }
+ // Sanitize color.
+ $this->hex = sanitize_hex_color( maybe_hash_hex_color( $this->color ) );
+ $hex = ltrim( $this->hex, '#' );
+
+ // Fallback if needed.
+ if ( ! $hex || 3 > strlen( $hex ) ) {
+ $this->from_fallback();
+ return;
+ }
+ // Make sure we have 6 digits for the below calculations.
+ if ( 3 === strlen( $hex ) ) {
+ $hex = ltrim( $this->hex, '#' );
+ $hex = substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 2, 1 ) . substr( $hex, 2, 1 );
+ }
+
+ // Set red, green, blue.
+ $this->red = hexdec( substr( $hex, 0, 2 ) );
+ $this->green = hexdec( substr( $hex, 2, 2 ) );
+ $this->blue = hexdec( substr( $hex, 4, 2 ) );
+ $this->alpha = 1;
+ // Set other color properties.
+ $this->set_brightness();
+ $this->set_hsl();
+ $this->set_luminance();
+
+ }
+
+ /**
+ * Starts with an RGB color and calculates all other properties.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return null
+ */
+ protected function from_rgb() {
+ $value = explode( ',', str_replace( array( ' ', 'rgb', '(', ')' ), '', $this->color ) );
+ // Set red, green, blue.
+ $this->red = ( isset( $value[0] ) ) ? intval( $value[0] ) : 255;
+ $this->green = ( isset( $value[1] ) ) ? intval( $value[1] ) : 255;
+ $this->blue = ( isset( $value[2] ) ) ? intval( $value[2] ) : 255;
+ $this->alpha = 1;
+ // Set the hex.
+ $this->hex = $this->rgb_to_hex( $this->red, $this->green, $this->blue );
+ // Set other color properties.
+ $this->set_brightness();
+ $this->set_hsl();
+ $this->set_luminance();
+ }
+
+ /**
+ * Starts with an RGBA color and calculates all other properties.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return null
+ */
+ protected function from_rgba() {
+ // Set r, g, b, a properties.
+ $value = explode( ',', str_replace( array( ' ', 'rgba', '(', ')' ), '', $this->color ) );
+ $this->red = ( isset( $value[0] ) ) ? intval( $value[0] ) : 255;
+ $this->green = ( isset( $value[1] ) ) ? intval( $value[1] ) : 255;
+ $this->blue = ( isset( $value[2] ) ) ? intval( $value[2] ) : 255;
+ $this->alpha = ( isset( $value[3] ) ) ? filter_var( $value[3], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) : 1;
+ // Limit values in the range of 0 - 255.
+ $this->red = max( 0, min( 255, $this->red ) );
+ $this->green = max( 0, min( 255, $this->green ) );
+ $this->blue = max( 0, min( 255, $this->blue ) );
+ // Limit values 0 - 1.
+ $this->alpha = max( 0, min( 1, $this->alpha ) );
+ // Set hex.
+ $this->hex = $this->rgb_to_hex( $this->red, $this->green, $this->blue );
+ // Set other color properties.
+ $this->set_brightness();
+ $this->set_hsl();
+ $this->set_luminance();
+ }
+
+ /**
+ * Starts with an HSL color and calculates all other properties.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return null
+ */
+ protected function from_hsl() {
+ $value = explode( ',', str_replace( array( ' ', 'hsl', '(', ')', '%' ), '', $this->color ) );
+ $this->hue = $value[0];
+ $this->saturation = $value[1];
+ $this->lightness = $value[2];
+ $this->from_hsl_array();
+ }
+
+ /**
+ * Starts with an HSLA color and calculates all other properties.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return null
+ */
+ protected function from_hsla() {
+ $value = explode( ',', str_replace( array( ' ', 'hsla', '(', ')', '%' ), '', $this->color ) );
+ $this->hue = $value[0];
+ $this->saturation = $value[1];
+ $this->lightness = $value[2];
+ $this->alpha = $value[3];
+ $this->from_hsl_array();
+ }
+
+ /**
+ * Generates the HEX value of a color given values for $red, $green, $blue.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @param int|string $red The red value of this color.
+ * @param int|string $green The green value of this color.
+ * @param int|string $blue The blue value of this color.
+ * @return string
+ */
+ protected function rgb_to_hex( $red, $green, $blue ) {
+ // Get hex values properly formatted.
+ $hex_red = $this->dexhex_double_digit( $red );
+ $hex_green = $this->dexhex_double_digit( $green );
+ $hex_blue = $this->dexhex_double_digit( $blue );
+ return '#' . $hex_red . $hex_green . $hex_blue;
+ }
+
+ /**
+ * Convert a decimal value to hex and make sure it's 2 characters.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @param int|string $value The value to convert.
+ * @return string
+ */
+ protected function dexhex_double_digit( $value ) {
+ $value = dechex( $value );
+ if ( 1 === strlen( $value ) ) {
+ $value = '0' . $value;
+ }
+ return $value;
+ }
+
+ /**
+ * Calculates the red, green, blue values of an HSL color.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @see https://gist.github.com/brandonheyer/5254516
+ */
+ protected function from_hsl_array() {
+ $h = $this->hue / 360;
+ $s = $this->saturation / 100;
+ $l = $this->lightness / 100;
+
+ $r = $l;
+ $g = $l;
+ $b = $l;
+ $v = ( $l <= 0.5 ) ? ( $l * ( 1.0 + $s ) ) : ( $l + $s - $l * $s );
+ if ( $v > 0 ) {
+ $m = $l + $l - $v;
+ $sv = ( $v - $m ) / $v;
+ $h *= 6.0;
+ $sextant = floor( $h );
+ $fract = $h - $sextant;
+ $vsf = $v * $sv * $fract;
+ $mid1 = $m + $vsf;
+ $mid2 = $v - $vsf;
+ switch ( $sextant ) {
+ case 0:
+ $r = $v;
+ $g = $mid1;
+ $b = $m;
+ break;
+ case 1:
+ $r = $mid2;
+ $g = $v;
+ $b = $m;
+ break;
+ case 2:
+ $r = $m;
+ $g = $v;
+ $b = $mid1;
+ break;
+ case 3:
+ $r = $m;
+ $g = $mid2;
+ $b = $v;
+ break;
+ case 4:
+ $r = $mid1;
+ $g = $m;
+ $b = $v;
+ break;
+ case 5:
+ $r = $v;
+ $g = $m;
+ $b = $mid2;
+ break;
+ }
+ }
+ $this->red = round( $r * 255, 0 );
+ $this->green = round( $g * 255, 0 );
+ $this->blue = round( $b * 255, 0 );
+
+ $this->hex = $this->rgb_to_hex( $this->red, $this->green, $this->blue );
+ $this->set_luminance();
+ }
+
+ /**
+ * Returns a CSS-formatted value for colors.
+ *
+ * @access public
+ * @since 1.0.0
+ * @param string $mode The mode we're using.
+ * @return string
+ */
+ public function toCSS( $mode = 'hex' ) {
+
+ $value = '';
+
+ switch ( $mode ) {
+ case 'hex':
+ $value = strtolower( $this->hex );
+ break;
+ case 'rgba':
+ $value = 'rgba(' . $this->red . ',' . $this->green . ',' . $this->blue . ',' . $this->alpha . ')';
+ break;
+ case 'rgb':
+ $value = 'rgb(' . $this->red . ',' . $this->green . ',' . $this->blue . ')';
+ break;
+ case 'hsl':
+ $value = 'hsl(' . $this->hue . ',' . round( $this->saturation ) . '%,' . round( $this->lightness ) . '%)';
+ break;
+ case 'hsla':
+ $value = 'hsla(' . $this->hue . ',' . round( $this->saturation ) . '%,' . round( $this->lightness ) . '%,' . $this->alpha . ')';
+ break;
+ }
+ return $value;
+ }
+
+ /**
+ * Alias for the toCSS method.
+ *
+ * @access public
+ * @since 1.1
+ * @param string $mode The mode we're using.
+ * @return string
+ */
+ public function to_css( $mode = 'hex' ) {
+ return $this->toCSS( $mode );
+ }
+
+ /**
+ * Sets the HSL values of a color based on the values of red, green, blue.
+ *
+ * @access public
+ * @since 1.0.0
+ */
+ protected function set_hsl() {
+ $red = $this->red / 255;
+ $green = $this->green / 255;
+ $blue = $this->blue / 255;
+
+ $max = max( $red, $green, $blue );
+ $min = min( $red, $green, $blue );
+
+ $lightness = ( $max + $min ) / 2;
+ $difference = $max - $min;
+
+ if ( ! $difference ) {
+ $hue = $saturation = 0; // Achromatic.
+ } else {
+ $saturation = $difference / ( 1 - abs( 2 * $lightness - 1 ) );
+ switch ( $max ) {
+ case $red:
+ $hue = 60 * fmod( ( ( $green - $blue ) / $difference ), 6 );
+ if ( $blue > $green ) {
+ $hue += 360;
+ }
+ break;
+ case $green:
+ $hue = 60 * ( ( $blue - $red ) / $difference + 2 );
+ break;
+ case $blue:
+ $hue = 60 * ( ( $red - $green ) / $difference + 4 );
+ break;
+ }
+ }
+
+ $this->hue = round( $hue );
+ $this->saturation = round( $saturation * 100 );
+ $this->lightness = round( $lightness * 100 );
+ }
+
+ /**
+ * Sets the brightness of a color based on the values of red, green, blue.
+ *
+ * @access protected
+ * @since 1.0.0
+ */
+ protected function set_brightness() {
+ $this->brightness = array(
+ 'red' => round( $this->red * .299 ),
+ 'green' => round( $this->green * .587 ),
+ 'blue' => round( $this->blue * .114 ),
+ 'total' => intval( ( $this->red * .299 ) + ( $this->green * .587 ) + ( $this->blue * .114 ) ),
+ );
+ }
+
+ /**
+ * Sets the luminance of a color (range:0-255) based on the values of red, green, blue.
+ *
+ * @access protected
+ * @since 1.0.0
+ */
+ protected function set_luminance() {
+ $lum = ( 0.2126 * $this->red ) + ( 0.7152 * $this->green ) + ( 0.0722 * $this->blue );
+ $this->luminance = round( $lum );
+ }
+
+ /**
+ * Gets an array of all the wordcolors.
+ *
+ * @access protected
+ * @since 1.0.0
+ * @return array
+ */
+ protected function get_word_colors() {
+ return array(
+ 'aliceblue' => 'F0F8FF',
+ 'antiquewhite' => 'FAEBD7',
+ 'aqua' => '00FFFF',
+ 'aquamarine' => '7FFFD4',
+ 'azure' => 'F0FFFF',
+ 'beige' => 'F5F5DC',
+ 'bisque' => 'FFE4C4',
+ 'black' => '000000',
+ 'blanchedalmond' => 'FFEBCD',
+ 'blue' => '0000FF',
+ 'blueviolet' => '8A2BE2',
+ 'brown' => 'A52A2A',
+ 'burlywood' => 'DEB887',
+ 'cadetblue' => '5F9EA0',
+ 'chartreuse' => '7FFF00',
+ 'chocolate' => 'D2691E',
+ 'coral' => 'FF7F50',
+ 'cornflowerblue' => '6495ED',
+ 'cornsilk' => 'FFF8DC',
+ 'crimson' => 'DC143C',
+ 'cyan' => '00FFFF',
+ 'darkblue' => '00008B',
+ 'darkcyan' => '008B8B',
+ 'darkgoldenrod' => 'B8860B',
+ 'darkgray' => 'A9A9A9',
+ 'darkgreen' => '006400',
+ 'darkgrey' => 'A9A9A9',
+ 'darkkhaki' => 'BDB76B',
+ 'darkmagenta' => '8B008B',
+ 'darkolivegreen' => '556B2F',
+ 'darkorange' => 'FF8C00',
+ 'darkorchid' => '9932CC',
+ 'darkred' => '8B0000',
+ 'darksalmon' => 'E9967A',
+ 'darkseagreen' => '8FBC8F',
+ 'darkslateblue' => '483D8B',
+ 'darkslategray' => '2F4F4F',
+ 'darkslategrey' => '2F4F4F',
+ 'darkturquoise' => '00CED1',
+ 'darkviolet' => '9400D3',
+ 'deeppink' => 'FF1493',
+ 'deepskyblue' => '00BFFF',
+ 'dimgray' => '696969',
+ 'dimgrey' => '696969',
+ 'dodgerblue' => '1E90FF',
+ 'firebrick' => 'B22222',
+ 'floralwhite' => 'FFFAF0',
+ 'forestgreen' => '228B22',
+ 'fuchsia' => 'FF00FF',
+ 'gainsboro' => 'DCDCDC',
+ 'ghostwhite' => 'F8F8FF',
+ 'gold' => 'FFD700',
+ 'goldenrod' => 'DAA520',
+ 'gray' => '808080',
+ 'green' => '008000',
+ 'greenyellow' => 'ADFF2F',
+ 'grey' => '808080',
+ 'honeydew' => 'F0FFF0',
+ 'hotpink' => 'FF69B4',
+ 'indianred' => 'CD5C5C',
+ 'indigo' => '4B0082',
+ 'ivory' => 'FFFFF0',
+ 'khaki' => 'F0E68C',
+ 'lavender' => 'E6E6FA',
+ 'lavenderblush' => 'FFF0F5',
+ 'lawngreen' => '7CFC00',
+ 'lemonchiffon' => 'FFFACD',
+ 'lightblue' => 'ADD8E6',
+ 'lightcoral' => 'F08080',
+ 'lightcyan' => 'E0FFFF',
+ 'lightgoldenrodyellow' => 'FAFAD2',
+ 'lightgray' => 'D3D3D3',
+ 'lightgreen' => '90EE90',
+ 'lightgrey' => 'D3D3D3',
+ 'lightpink' => 'FFB6C1',
+ 'lightsalmon' => 'FFA07A',
+ 'lightseagreen' => '20B2AA',
+ 'lightskyblue' => '87CEFA',
+ 'lightslategray' => '778899',
+ 'lightslategrey' => '778899',
+ 'lightsteelblue' => 'B0C4DE',
+ 'lightyellow' => 'FFFFE0',
+ 'lime' => '00FF00',
+ 'limegreen' => '32CD32',
+ 'linen' => 'FAF0E6',
+ 'magenta' => 'FF00FF',
+ 'maroon' => '800000',
+ 'mediumaquamarine' => '66CDAA',
+ 'mediumblue' => '0000CD',
+ 'mediumorchid' => 'BA55D3',
+ 'mediumpurple' => '9370D0',
+ 'mediumseagreen' => '3CB371',
+ 'mediumslateblue' => '7B68EE',
+ 'mediumspringgreen' => '00FA9A',
+ 'mediumturquoise' => '48D1CC',
+ 'mediumvioletred' => 'C71585',
+ 'midnightblue' => '191970',
+ 'mintcream' => 'F5FFFA',
+ 'mistyrose' => 'FFE4E1',
+ 'moccasin' => 'FFE4B5',
+ 'navajowhite' => 'FFDEAD',
+ 'navy' => '000080',
+ 'oldlace' => 'FDF5E6',
+ 'olive' => '808000',
+ 'olivedrab' => '6B8E23',
+ 'orange' => 'FFA500',
+ 'orangered' => 'FF4500',
+ 'orchid' => 'DA70D6',
+ 'palegoldenrod' => 'EEE8AA',
+ 'palegreen' => '98FB98',
+ 'paleturquoise' => 'AFEEEE',
+ 'palevioletred' => 'DB7093',
+ 'papayawhip' => 'FFEFD5',
+ 'peachpuff' => 'FFDAB9',
+ 'peru' => 'CD853F',
+ 'pink' => 'FFC0CB',
+ 'plum' => 'DDA0DD',
+ 'powderblue' => 'B0E0E6',
+ 'purple' => '800080',
+ 'red' => 'FF0000',
+ 'rosybrown' => 'BC8F8F',
+ 'royalblue' => '4169E1',
+ 'saddlebrown' => '8B4513',
+ 'salmon' => 'FA8072',
+ 'sandybrown' => 'F4A460',
+ 'seagreen' => '2E8B57',
+ 'seashell' => 'FFF5EE',
+ 'sienna' => 'A0522D',
+ 'silver' => 'C0C0C0',
+ 'skyblue' => '87CEEB',
+ 'slateblue' => '6A5ACD',
+ 'slategray' => '708090',
+ 'slategrey' => '708090',
+ 'snow' => 'FFFAFA',
+ 'springgreen' => '00FF7F',
+ 'steelblue' => '4682B4',
+ 'tan' => 'D2B48C',
+ 'teal' => '008080',
+ 'thistle' => 'D8BFD8',
+ 'tomato' => 'FF6347',
+ 'turquoise' => '40E0D0',
+ 'violet' => 'EE82EE',
+ 'wheat' => 'F5DEB3',
+ 'white' => 'FFFFFF',
+ 'whitesmoke' => 'F5F5F5',
+ 'yellow' => 'FFFF00',
+ 'yellowgreen' => '9ACD32',
+ );
+
+ }
+
+ /**
+ * Use fallback object.
+ *
+ * @access protected
+ * @since 1.2.0
+ */
+ protected function from_fallback() {
+ $this->color = $this->fallback;
+
+ if ( ! $this->fallback_obj ) {
+ $this->fallback_obj = self::newColor( $this->fallback );
+ }
+ $this->color = $this->fallback_obj->color;
+ $this->mode = $this->fallback_obj->mode;
+ $this->red = $this->fallback_obj->red;
+ $this->green = $this->fallback_obj->green;
+ $this->blue = $this->fallback_obj->blue;
+ $this->alpha = $this->fallback_obj->alpha;
+ $this->hue = $this->fallback_obj->hue;
+ $this->saturation = $this->fallback_obj->saturation;
+ $this->lightness = $this->fallback_obj->lightness;
+ $this->luminance = $this->fallback_obj->luminance;
+ $this->hex = $this->fallback_obj->hex;
+ }
+
+ /**
+ * Handle non-existing public methods.
+ *
+ * @access public
+ * @since 1.1.0
+ * @param string $name The method name.
+ * @param mixed $arguments The method arguments.
+ * @return mixed
+ */
+ public function __call( $name, $arguments ) {
+ if ( method_exists( $this, $name ) ) {
+ call_user_func( array( $this, $name ), $arguments );
+ } else {
+ return $arguments;
+ }
+ }
+
+ /**
+ * Handle non-existing public static methods.
+ *
+ * @static
+ * @access public
+ * @since 1.1.0
+ * @param string $name The method name.
+ * @param mixed $arguments The method arguments.
+ * @return mixed
+ */
+ public static function __callStatic( $name, $arguments ) {
+ if ( method_exists( __CLASS__, $name ) ) {
+ call_user_func( array( __CLASS__, $name ), $arguments );
+ } else {
+ return $arguments;
+ }
+ }
+ }
+}
diff --git a/functions/kirki/lib/class-kirki-color.php b/functions/kirki/lib/class-kirki-color.php
new file mode 100644
index 0000000..625da71
--- /dev/null
+++ b/functions/kirki/lib/class-kirki-color.php
@@ -0,0 +1,342 @@
+mode;
+ }
+ return $obj->toCSS( $mode );
+ }
+
+ /**
+ * Gets the rgb value of a color.
+ *
+ * @static
+ * @access public
+ * @param string $color The color.
+ * @param boolean $implode Whether we want to implode the values or not.
+ * @return array|string
+ */
+ public static function get_rgb( $color, $implode = false ) {
+ $obj = ariColor::newColor( $color );
+ if ( $implode ) {
+ return $obj->toCSS( 'rgb' );
+ }
+ return array( $obj->red, $obj->green, $obj->blue );
+ }
+
+ /**
+ * A proxy for the sanitize_color method.
+ *
+ * @static
+ * @access public
+ * @param string|array $color The color to convert.
+ * @return string The hex value of the color.
+ */
+ public static function rgba2hex( $color ) {
+ return self::sanitize_color( $color, 'hex' );
+ }
+
+ /**
+ * Get the alpha channel from an rgba color.
+ *
+ * @static
+ * @access public
+ * @param string $color The rgba color formatted like rgba(r,g,b,a).
+ * @return int|float The alpha value of the color.
+ */
+ public static function get_alpha_from_rgba( $color ) {
+ $obj = ariColor::newColor( $color );
+ return $obj->alpha;
+ }
+
+ /**
+ * Gets the rgba value of the $color.
+ *
+ * @static
+ * @access public
+ * @param string $color The hex value of a color.
+ * @param int|float $alpha Opacity level (0-1).
+ * @return string
+ */
+ public static function get_rgba( $color = '#fff', $alpha = 1 ) {
+ $obj = ariColor::newColor( $color );
+ if ( 1 == $alpha ) {
+ return $obj->toCSS( 'rgba' );
+ }
+ // Make sure that opacity is properly formatted.
+ // Converts 1-100 values to 0-1.
+ if ( $alpha > 1 || $alpha < -1 ) {
+ // Divide by 100.
+ $alpha /= 100;
+ }
+ // Get absolute value.
+ $alpha = abs( $alpha );
+ // Max 1.
+ if ( 1 < $alpha ) {
+ $alpha = 1;
+ }
+ $new_obj = $obj->getNew( 'alpha', $alpha );
+ return $new_obj->toCSS( 'rgba' );
+ }
+
+ /**
+ * Strips the alpha value from an RGBA color string.
+ *
+ * @static
+ * @access public
+ * @param string $color The RGBA color string.
+ * @return string The corresponding RGB string.
+ */
+ public static function rgba_to_rgb( $color ) {
+ $obj = ariColor::newColor( $color );
+ return $obj->toCSS( 'rgb' );
+ }
+
+ /**
+ * Gets the brightness of the $hex color.
+ *
+ * @static
+ * @access public
+ * @param string $hex The hex value of a color.
+ * @return int Value between 0 and 255.
+ */
+ public static function get_brightness( $hex ) {
+ $hex = self::sanitize_hex( $hex, false );
+
+ // Returns brightness value from 0 to 255.
+ return intval( ( ( hexdec( substr( $hex, 0, 2 ) ) * 299 ) + ( hexdec( substr( $hex, 2, 2 ) ) * 587 ) + ( hexdec( substr( $hex, 4, 2 ) ) * 114 ) ) / 1000 );
+ }
+
+ /**
+ * Adjusts brightness of the $hex color.
+ *
+ * @static
+ * @access public
+ * @param string $hex The hex value of a color.
+ * @param integer $steps Should be between -255 and 255. Negative = darker, positive = lighter.
+ * @return string Returns hex color.
+ */
+ public static function adjust_brightness( $hex, $steps ) {
+ $hex = self::sanitize_hex( $hex, false );
+ $steps = max( -255, min( 255, $steps ) );
+
+ // Adjust number of steps and keep it inside 0 to 255.
+ $red = max( 0, min( 255, hexdec( substr( $hex, 0, 2 ) ) + $steps ) );
+ $green = max( 0, min( 255, hexdec( substr( $hex, 2, 2 ) ) + $steps ) );
+ $blue = max( 0, min( 255, hexdec( substr( $hex, 4, 2 ) ) + $steps ) );
+
+ $red_hex = str_pad( dechex( $red ), 2, '0', STR_PAD_LEFT );
+ $green_hex = str_pad( dechex( $green ), 2, '0', STR_PAD_LEFT );
+ $blue_hex = str_pad( dechex( $blue ), 2, '0', STR_PAD_LEFT );
+ return self::sanitize_hex( $red_hex . $green_hex . $blue_hex );
+ }
+
+ /**
+ * Mixes 2 hex colors.
+ * The "percentage" variable is the percent of the first color.
+ * to be used it the mix. default is 50 (equal mix).
+ *
+ * @static
+ * @access public
+ * @param string|false $hex1 Color.
+ * @param string|false $hex2 Color.
+ * @param int $percentage A value between 0 and 100.
+ * @return string Returns hex color.
+ */
+ public static function mix_colors( $hex1, $hex2, $percentage ) {
+ $hex1 = self::sanitize_hex( $hex1, false );
+ $hex2 = self::sanitize_hex( $hex2, false );
+ $red = ( $percentage * hexdec( substr( $hex1, 0, 2 ) ) + ( 100 - $percentage ) * hexdec( substr( $hex2, 0, 2 ) ) ) / 100;
+ $green = ( $percentage * hexdec( substr( $hex1, 2, 2 ) ) + ( 100 - $percentage ) * hexdec( substr( $hex2, 2, 2 ) ) ) / 100;
+ $blue = ( $percentage * hexdec( substr( $hex1, 4, 2 ) ) + ( 100 - $percentage ) * hexdec( substr( $hex2, 4, 2 ) ) ) / 100;
+ $red_hex = str_pad( dechex( $red ), 2, '0', STR_PAD_LEFT );
+ $green_hex = str_pad( dechex( $green ), 2, '0', STR_PAD_LEFT );
+ $blue_hex = str_pad( dechex( $blue ), 2, '0', STR_PAD_LEFT );
+ return self::sanitize_hex( $red_hex . $green_hex . $blue_hex );
+ }
+
+ /**
+ * Convert hex color to hsv.
+ *
+ * @static
+ * @access public
+ * @param string $hex The hex value of color 1.
+ * @return array Returns array( 'h', 's', 'v' ).
+ */
+ public static function hex_to_hsv( $hex ) {
+ $rgb = (array) (array) self::get_rgb( self::sanitize_hex( $hex, false ) );
+ return self::rgb_to_hsv( $rgb );
+ }
+
+ /**
+ * Convert hex color to hsv.
+ *
+ * @static
+ * @access public
+ * @param string $color The rgb color to convert array( 'r', 'g', 'b' ).
+ * @return array Returns array( 'h', 's', 'v' ).
+ */
+ public static function rgb_to_hsv( $color = array() ) {
+ $var_r = ( $color[0] / 255 );
+ $var_g = ( $color[1] / 255 );
+ $var_b = ( $color[2] / 255 );
+ $var_min = min( $var_r, $var_g, $var_b );
+ $var_max = max( $var_r, $var_g, $var_b );
+ $del_max = $var_max - $var_min;
+ $h = 0;
+ $s = 0;
+ $v = $var_max;
+ if ( 0 != $del_max ) {
+ $s = $del_max / $var_max;
+ $del_r = ( ( ( $var_max - $var_r ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
+ $del_g = ( ( ( $var_max - $var_g ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
+ $del_b = ( ( ( $var_max - $var_b ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
+ if ( $var_r == $var_max ) {
+ $h = $del_b - $del_g;
+ } elseif ( $var_g == $var_max ) {
+ $h = ( 1 / 3 ) + $del_r - $del_b;
+ } elseif ( $var_b == $var_max ) {
+ $h = ( 2 / 3 ) + $del_g - $del_r;
+ }
+ if ( $h < 0 ) {
+ $h++;
+ }
+ if ( $h > 1 ) {
+ $h--;
+ }
+ }
+ return array(
+ 'h' => round( $h, 2 ),
+ 's' => round( $s, 2 ),
+ 'v' => round( $v, 2 ),
+ );
+ }
+
+ /**
+ * This is a very simple algorithm that works by summing up the differences between the three color components red, green and blue.
+ * A value higher than 500 is recommended for good readability.
+ *
+ * @static
+ * @access public
+ * @param string $color_1 The 1st color.
+ * @param string $color_2 The 2nd color.
+ * @return string
+ */
+ public static function color_difference( $color_1 = '#ffffff', $color_2 = '#000000' ) {
+ $color_1 = self::sanitize_hex( $color_1, false );
+ $color_2 = self::sanitize_hex( $color_2, false );
+ $color_1_rgb = self::get_rgb( $color_1 );
+ $color_2_rgb = self::get_rgb( $color_2 );
+ $r_diff = max( $color_1_rgb[0], $color_2_rgb[0] ) - min( $color_1_rgb[0], $color_2_rgb[0] );
+ $g_diff = max( $color_1_rgb[1], $color_2_rgb[1] ) - min( $color_1_rgb[1], $color_2_rgb[1] );
+ $b_diff = max( $color_1_rgb[2], $color_2_rgb[2] ) - min( $color_1_rgb[2], $color_2_rgb[2] );
+ $color_diff = $r_diff + $g_diff + $b_diff;
+ return $color_diff;
+ }
+
+ /**
+ * This function tries to compare the brightness of the colors.
+ * A return value of more than 125 is recommended.
+ * Combining it with the color_difference function above might make sense.
+ *
+ * @static
+ * @access public
+ * @param string $color_1 The 1st color.
+ * @param string $color_2 The 2nd color.
+ * @return string
+ */
+ public static function brightness_difference( $color_1 = '#ffffff', $color_2 = '#000000' ) {
+ $color_1 = self::sanitize_hex( $color_1, false );
+ $color_2 = self::sanitize_hex( $color_2, false );
+ $color_1_rgb = self::get_rgb( $color_1 );
+ $color_2_rgb = self::get_rgb( $color_2 );
+ $br_1 = ( 299 * $color_1_rgb[0] + 587 * $color_1_rgb[1] + 114 * $color_1_rgb[2] ) / 1000;
+ $br_2 = ( 299 * $color_2_rgb[0] + 587 * $color_2_rgb[1] + 114 * $color_2_rgb[2] ) / 1000;
+ return intval( abs( $br_1 - $br_2 ) );
+ }
+
+ /**
+ * Uses the luminosity to calculate the difference between the given colors.
+ * The returned value should be bigger than 5 for best readability.
+ *
+ * @static
+ * @access public
+ * @param string $color_1 The 1st color.
+ * @param string $color_2 The 2nd color.
+ * @return string
+ */
+ public static function lumosity_difference( $color_1 = '#ffffff', $color_2 = '#000000' ) {
+ $color_1 = self::sanitize_hex( $color_1, false );
+ $color_2 = self::sanitize_hex( $color_2, false );
+ $color_1_rgb = self::get_rgb( $color_1 );
+ $color_2_rgb = self::get_rgb( $color_2 );
+ $l1 = 0.2126 * pow( $color_1_rgb[0] / 255, 2.2 ) + 0.7152 * pow( $color_1_rgb[1] / 255, 2.2 ) + 0.0722 * pow( $color_1_rgb[2] / 255, 2.2 );
+ $l2 = 0.2126 * pow( $color_2_rgb[0] / 255, 2.2 ) + 0.7152 * pow( $color_2_rgb[1] / 255, 2.2 ) + 0.0722 * pow( $color_2_rgb[2] / 255, 2.2 );
+ $lum_diff = ( $l1 > $l2 ) ? ( $l1 + 0.05 ) / ( $l2 + 0.05 ) : ( $l2 + 0.05 ) / ( $l1 + 0.05 );
+ return round( $lum_diff, 2 );
+ }
+}
diff --git a/functions/kirki/modules/collapsible/class-kirki-modules-collapsible.php b/functions/kirki/modules/collapsible/class-kirki-modules-collapsible.php
new file mode 100644
index 0000000..4526cdd
--- /dev/null
+++ b/functions/kirki/modules/collapsible/class-kirki-modules-collapsible.php
@@ -0,0 +1,83 @@
+ ' + label + ' ' );
+
+ // Add an (x) before the field title.
+ controlTitleElement = control.find( '.customize-control-title' );
+ controlTitleElement.prepend( ' ' );
+
+ // Show/hide the field when the header is clicked.
+ jQuery( '.kirki-collapsible-header-' + setting ).click( function() {
+ if ( control.hasClass( 'kirki-collapsed-control' ) ) {
+ control.removeClass( 'kirki-collapsed-control' );
+ control.addClass( 'kirki-expanded-control' );
+ control.show();
+ jQuery( '.kirki-collapsible-header-' + setting ).hide();
+ } else {
+ control.addClass( 'kirki-collapsed-control' );
+ control.removeClass( 'kirki-expanded-control' );
+ control.hide();
+ jQuery( '.kirki-collapsible-header-' + setting ).show();
+ }
+ });
+
+ controlTitleElement.click( function() {
+ if ( control.hasClass( 'kirki-collapsed-control' ) ) {
+ control.removeClass( 'kirki-collapsed-control' );
+ control.addClass( 'kirki-expanded-control' );
+ control.show();
+ jQuery( '.kirki-collapsible-header-' + setting ).hide();
+ } else {
+ control.addClass( 'kirki-collapsed-control' );
+ control.removeClass( 'kirki-expanded-control' );
+ control.hide();
+ jQuery( '.kirki-collapsible-header-' + setting ).show();
+ }
+ });
+
+ }, 300 );
+
+ });
+
+})( jQuery );
diff --git a/functions/kirki/modules/css/class-kirki-css-to-file.php b/functions/kirki/modules/css/class-kirki-css-to-file.php
new file mode 100644
index 0000000..7bcd1fb
--- /dev/null
+++ b/functions/kirki/modules/css/class-kirki-css-to-file.php
@@ -0,0 +1,160 @@
+get_path( 'file' ) ) ) {
+ // If the file-write fails, fallback to inline
+ // and cache the failure so we don't try again immediately.
+ $this->write_file();
+ }
+ add_action( 'customize_save_after', array( $this, 'write_file' ) );
+ }
+
+ /**
+ * Gets the path of the CSS file and folder in the filesystem.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param string $context Can be "file" or "folder". If empty, returns both as array.
+ * @return string|array
+ */
+ protected function get_path( $context = '' ) {
+
+ $upload_dir = wp_upload_dir();
+
+ $paths = array(
+ 'file' => wp_normalize_path( $upload_dir['basedir'] . '/kirki-css/styles.css' ),
+ 'folder' => wp_normalize_path( $upload_dir['basedir'] . '/kirki-css' ),
+ );
+
+ if ( 'file' === $context ) {
+ return $paths['file'];
+ }
+ if ( 'folder' === $context ) {
+ return $paths['folder'];
+ }
+ return $paths;
+
+ }
+
+ /**
+ * Gets the URL of the CSS file in the filesystem.
+ *
+ * @access public
+ * @since 3.0.0
+ * @return string
+ */
+ public function get_url() {
+
+ $upload_dir = wp_upload_dir();
+ return esc_url_raw( $upload_dir['baseurl'] . '/kirki-css/styles.css' );
+
+ }
+
+ /**
+ * Gets the timestamp of the file.
+ * This will be used as "version" for cache-busting purposes.
+ *
+ * @access public
+ * @since 3.0.0
+ * @return integer|false
+ */
+ public function get_timestamp() {
+
+ if ( file_exists( $this->get_path( 'file' ) ) ) {
+ return filemtime( $this->get_path( 'file' ) );
+ }
+ return false;
+ }
+
+ /**
+ * Writes the file to disk.
+ *
+ * @access public
+ * @since 3.0.0
+ * @return bool
+ */
+ public function write_file() {
+
+ $css = array();
+ $configs = Kirki::$config;
+ foreach ( $configs as $config_id => $args ) {
+ // Get the CSS we want to write.
+ $css[ $config_id ] = apply_filters( "kirki/{$config_id}/dynamic_css", Kirki_Modules_CSS::loop_controls( $config_id ) );
+ }
+ $css = implode( $css, '' );
+
+ // Minimize the CSS a bit.
+ $css = str_replace( array( "\n", "\t", "\r\n" ), '', $css );
+ $css = str_replace( array( '{ ', '{ ', '{ ' ), '{', $css );
+ $css = str_replace( ': ', ':', $css );
+ $css = str_replace( array( '; ', '; ', '; ' ), ';', $css );
+ $css = explode( '}', $css );
+ $css = array_unique( $css );
+ $css = implode( $css, '}' );
+
+ // If the folder doesn't exist, create it.
+ if ( ! file_exists( $this->get_path( 'folder' ) ) ) {
+ wp_mkdir_p( $this->get_path( 'folder' ) );
+ }
+
+ $filesystem = $this->get_filesystem();
+ $write_file = (bool) $filesystem->put_contents( $this->get_path( 'file' ), $css );
+ if ( ! $write_file ) {
+ $this->fallback = true;
+ set_transient( 'kirki_css_write_to_file_failed', true, HOUR_IN_SECONDS );
+ }
+ return $write_file;
+
+ }
+
+ /**
+ * Gets the WP_Filesystem object.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @return object
+ */
+ protected function get_filesystem() {
+
+ // The WordPress filesystem.
+ global $wp_filesystem;
+
+ if ( empty( $wp_filesystem ) ) {
+ require_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' );
+ WP_Filesystem();
+ }
+
+ return $wp_filesystem;
+ }
+}
diff --git a/functions/kirki/modules/css/class-kirki-modules-css-generator.php b/functions/kirki/modules/css/class-kirki-modules-css-generator.php
new file mode 100644
index 0000000..7c81187
--- /dev/null
+++ b/functions/kirki/modules/css/class-kirki-modules-css-generator.php
@@ -0,0 +1,276 @@
+ self::$output,
+ 'sanitize_callback' => null,
+ ),
+ );
+ }
+
+ // Get the value of this field.
+ self::$value = Kirki_Values::get_sanitized_field_value( $field );
+
+ // Find the class that will handle the outpout for this field.
+ $classname = 'Kirki_Output';
+ $field_output_classes = apply_filters( "kirki/{$field['kirki_config']}/output/control-classnames", array(
+ 'kirki-background' => 'Kirki_Output_Field_Background',
+ 'kirki-dimensions' => 'Kirki_Output_Field_Dimensions',
+ 'kirki-image' => 'Kirki_Output_Field_Image',
+ 'kirki-typography' => 'Kirki_Output_Field_Typography',
+ 'kirki-multicolor' => 'Kirki_Output_Field_Multicolor',
+ ) );
+ if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
+ $classname = $field_output_classes[ self::$field_type ];
+ }
+ $obj = new $classname( $field['kirki_config'], self::$output, self::$value, $field );
+ return $obj->get_styles();
+
+ }
+
+ /**
+ * Gets the array of generated styles and creates the minimized, inline CSS.
+ *
+ * @static
+ * @access public
+ * @param array $css The CSS definitions array.
+ * @return string The generated CSS.
+ */
+ public static function styles_parse( $css = array() ) {
+
+ // Pass our styles from the kirki/styles_array filter.
+ $css = apply_filters( 'kirki/styles_array', $css );
+
+ // Process the array of CSS properties and produce the final CSS.
+ $final_css = '';
+ if ( ! is_array( $css ) || empty( $css ) ) {
+ return '';
+ }
+ foreach ( $css as $media_query => $styles ) {
+ $final_css .= ( 'global' !== $media_query ) ? $media_query . '{' : '';
+ foreach ( $styles as $style => $style_array ) {
+ $css_for_style = '';
+
+ foreach ( $style_array as $property => $value ) {
+ if ( is_string( $value ) && '' !== $value ) {
+ $css_for_style .= $property . ':' . $value . ';';
+ } elseif ( is_array( $value ) ) {
+ foreach ( $value as $subvalue ) {
+ if ( is_string( $subvalue ) && '' !== $subvalue ) {
+ $css_for_style .= $property . ':' . $subvalue . ';';
+ }
+ }
+ }
+ $value = ( is_string( $value ) ) ? $value : '';
+ }
+ if ( '' !== $css_for_style ) {
+ $final_css .= $style . '{' . $css_for_style . '}';
+ }
+ }
+ $final_css .= ( 'global' !== $media_query ) ? '}' : '';
+ }
+ return $final_css;
+ }
+
+ /**
+ * Add prefixes if necessary.
+ *
+ * @param array $css The CSS definitions array.
+ * @return array
+ */
+ public static function add_prefixes( $css ) {
+
+ if ( is_array( $css ) ) {
+ foreach ( $css as $media_query => $elements ) {
+ foreach ( $elements as $element => $style_array ) {
+ foreach ( $style_array as $property => $value ) {
+
+ // Add -webkit-* and -moz-*.
+ if ( is_string( $property ) && in_array( $property, array(
+ 'border-radius',
+ 'box-shadow',
+ 'box-sizing',
+ 'text-shadow',
+ 'transform',
+ 'background-size',
+ 'transition',
+ 'transition-property',
+ ), true ) ) {
+ unset( $css[ $media_query ][ $element ][ $property ] );
+ $css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
+ $css[ $media_query ][ $element ][ '-moz-' . $property ] = $value;
+ $css[ $media_query ][ $element ][ $property ] = $value;
+ }
+
+ // Add -ms-* and -o-*.
+ if ( is_string( $property ) && in_array( $property, array(
+ 'transform',
+ 'background-size',
+ 'transition',
+ 'transition-property',
+ ), true ) ) {
+ unset( $css[ $media_query ][ $element ][ $property ] );
+ $css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
+ $css[ $media_query ][ $element ][ '-o-' . $property ] = $value;
+ $css[ $media_query ][ $element ][ $property ] = $value;
+ }
+ }
+ }
+ } // End foreach().
+ } // End if().
+
+ return $css;
+
+ }
+}
diff --git a/functions/kirki/modules/css/class-kirki-modules-css.php b/functions/kirki/modules/css/class-kirki-modules-css.php
new file mode 100644
index 0000000..06d23a1
--- /dev/null
+++ b/functions/kirki/modules/css/class-kirki-modules-css.php
@@ -0,0 +1,287 @@
+ '/class-kirki-css-to-file.php',
+ 'Kirki_Modules_CSS_Generator' => '/class-kirki-modules-css-generator.php',
+ 'Kirki_Output' => '/class-kirki-output.php',
+ 'Kirki_Output_Field_Background' => '/field/class-kirki-output-field-background.php',
+ 'Kirki_Output_Field_Image' => '/field/class-kirki-output-field-image.php',
+ 'Kirki_Output_Field_Multicolor' => '/field/class-kirki-output-field-multicolor.php',
+ 'Kirki_Output_Field_Dimensions' => '/field/class-kirki-output-field-dimensions.php',
+ 'Kirki_Output_Field_Typography' => '/field/class-kirki-output-field-typography.php',
+ 'Kirki_Output_Property' => '/property/class-kirki-output-property.php',
+ 'Kirki_Output_Property_Background_Image' => '/property/class-kirki-output-property-background-image.php',
+ 'Kirki_Output_Property_Background_Position' => '/property/class-kirki-output-property-background-position.php',
+ 'Kirki_Output_Property_Font_Family' => '/property/class-kirki-output-property-font-family.php',
+ );
+
+ foreach ( $class_files as $class_name => $file ) {
+ if ( ! class_exists( $class_name ) ) {
+ include_once wp_normalize_path( dirname( __FILE__ ) . $file );
+ }
+ }
+
+ add_action( 'init', array( $this, 'init' ) );
+
+ }
+
+ /**
+ * Gets an instance of this object.
+ * Prevents duplicate instances which avoid artefacts and improves performance.
+ *
+ * @static
+ * @access public
+ * @since 3.0.0
+ * @return object
+ */
+ public static function get_instance() {
+ if ( ! self::$instance ) {
+ self::$instance = new self();
+ }
+ return self::$instance;
+ }
+
+ /**
+ * Init.
+ *
+ * @access public
+ */
+ public function init() {
+
+ Kirki_Modules_Webfonts::get_instance();
+
+ global $wp_customize;
+
+ $config = apply_filters( 'kirki/config', array() );
+ $priority = 999;
+ if ( isset( $config['styles_priority'] ) ) {
+ $priority = absint( $config['styles_priority'] );
+ }
+
+ // Allow completely disabling Kirki CSS output.
+ if ( ( defined( 'KIRKI_NO_OUTPUT' ) && true === KIRKI_NO_OUTPUT ) || ( isset( $config['disable_output'] ) && true === $config['disable_output'] ) ) {
+ return;
+ }
+
+ $method = apply_filters( 'kirki/dynamic_css/method', 'inline' );
+ if ( $wp_customize ) {
+ // If we're in the customizer, load inline no matter what.
+ add_action( 'wp_enqueue_scripts', array( $this, 'inline_dynamic_css' ), $priority );
+
+ // If we're using file method, on save write the new styles.
+ if ( 'file' === $method ) {
+ $this->css_to_file = new Kirki_CSS_To_File();
+ add_action( 'customize_save_after', array( $this->css_to_file, 'write_file' ) );
+ }
+ return;
+ }
+
+ if ( 'file' === $method ) {
+ // Attempt to write the CSS to file.
+ $this->css_to_file = new Kirki_CSS_To_File();
+ // If we succesd, load this file.
+ $failed = get_transient( 'kirki_css_write_to_file_failed' );
+ // If writing CSS to file hasn't failed, just enqueue this file.
+ if ( ! $failed ) {
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_compiled_file' ), $priority );
+ return;
+ }
+ }
+
+ // If we are in the customizer, load CSS using inline-styles.
+ // If we are in the frontend AND self::$ajax is true, then load dynamic CSS using AJAX.
+ if ( ( true === self::$ajax ) || ( isset( $config['inline_css'] ) && false === $config['inline_css'] ) ) {
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ), $priority );
+ add_action( 'wp_ajax_kirki_dynamic_css', array( $this, 'ajax_dynamic_css' ) );
+ add_action( 'wp_ajax_nopriv_kirki_dynamic_css', array( $this, 'ajax_dynamic_css' ) );
+ return;
+ }
+
+ // If we got this far then add styles inline.
+ add_action( 'wp_enqueue_scripts', array( $this, 'inline_dynamic_css' ), $priority );
+ }
+
+ /**
+ * Enqueues compiled CSS file.
+ *
+ * @access public
+ * @since 3.0.0
+ */
+ public function enqueue_compiled_file() {
+
+ wp_enqueue_style( 'kirki-styles', $this->css_to_file->get_url(), array(), $this->css_to_file->get_timestamp() );
+
+ }
+ /**
+ * Adds inline styles.
+ *
+ * @access public
+ */
+ public function inline_dynamic_css() {
+ $configs = Kirki::$config;
+ if ( ! $this->processed ) {
+ foreach ( $configs as $config_id => $args ) {
+ if ( isset( $args['disable_output'] ) && true === $args['disable_output'] ) {
+ continue;
+ }
+ $styles = self::loop_controls( $config_id );
+ $styles = apply_filters( "kirki/{$config_id}/dynamic_css", $styles );
+ if ( ! empty( $styles ) ) {
+ wp_enqueue_style( 'kirki-styles-' . $config_id, trailingslashit( Kirki::$url ) . 'assets/css/kirki-styles.css', array(), KIRKI_VERSION );
+ wp_add_inline_style( 'kirki-styles-' . $config_id, $styles );
+ }
+ }
+ $this->processed = true;
+ }
+ }
+
+ /**
+ * Get the dynamic-css.php file
+ *
+ * @access public
+ */
+ public function ajax_dynamic_css() {
+ require wp_normalize_path( Kirki::$path . '/modules/css/dynamic-css.php' );
+ exit;
+ }
+
+ /**
+ * Enqueues the ajax stylesheet.
+ *
+ * @access public
+ */
+ public function frontend_styles() {
+ wp_enqueue_style( 'kirki-styles-php', admin_url( 'admin-ajax.php' ) . '?action=kirki_dynamic_css', array(), KIRKI_VERSION );
+ }
+
+ /**
+ * Loop through all fields and create an array of style definitions.
+ *
+ * @static
+ * @access public
+ * @param string $config_id The configuration ID.
+ */
+ public static function loop_controls( $config_id ) {
+
+ // Get an instance of the Kirki_Modules_CSS_Generator class.
+ // This will make sure google fonts and backup fonts are loaded.
+ Kirki_Modules_CSS_Generator::get_instance();
+
+ $fields = Kirki::$fields;
+ $css = array();
+
+ // Early exit if no fields are found.
+ if ( empty( $fields ) ) {
+ return;
+ }
+
+ foreach ( $fields as $field ) {
+
+ // Only process fields that belong to $config_id.
+ if ( $config_id !== $field['kirki_config'] ) {
+ continue;
+ }
+
+ if ( true === apply_filters( "kirki/{$config_id}/css/skip_hidden", true ) ) {
+ // Only continue if field dependencies are met.
+ if ( ! empty( $field['required'] ) ) {
+ $valid = true;
+
+ foreach ( $field['required'] as $requirement ) {
+ if ( isset( $requirement['setting'] ) && isset( $requirement['value'] ) && isset( $requirement['operator'] ) ) {
+ $controller_value = Kirki_Values::get_value( $config_id, $requirement['setting'] );
+ if ( ! Kirki_Helper::compare_values( $controller_value, $requirement['value'], $requirement['operator'] ) ) {
+ $valid = false;
+ }
+ }
+ }
+
+ if ( ! $valid ) {
+ continue;
+ }
+ }
+ }
+
+ // Only continue if $field['output'] is set.
+ if ( isset( $field['output'] ) && ! empty( $field['output'] ) ) {
+ $css = Kirki_Helper::array_replace_recursive( $css, Kirki_Modules_CSS_Generator::css( $field ) );
+
+ // Add the globals.
+ if ( isset( self::$css_array[ $config_id ] ) && ! empty( self::$css_array[ $config_id ] ) ) {
+ Kirki_Helper::array_replace_recursive( $css, self::$css_array[ $config_id ] );
+ }
+ }
+ }
+
+ $css = apply_filters( "kirki/{$config_id}/styles", $css );
+
+ if ( is_array( $css ) ) {
+ return Kirki_Modules_CSS_Generator::styles_parse( Kirki_Modules_CSS_Generator::add_prefixes( $css ) );
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/class-kirki-output.php b/functions/kirki/modules/css/class-kirki-output.php
new file mode 100644
index 0000000..798554c
--- /dev/null
+++ b/functions/kirki/modules/css/class-kirki-output.php
@@ -0,0 +1,337 @@
+config_id = $config_id;
+ $this->value = $value;
+ $this->output = $output;
+ $this->field = $field;
+
+ $this->parse_output();
+ }
+
+ /**
+ * If we have a sanitize_callback defined, apply it to the value.
+ *
+ * @param array $output The output args.
+ * @param string|array $value The value.
+ *
+ * @return string|array
+ */
+ protected function apply_sanitize_callback( $output, $value ) {
+
+ if ( isset( $output['sanitize_callback'] ) && null !== $output['sanitize_callback'] ) {
+
+ // If the sanitize_callback is invalid, return the value.
+ if ( ! is_callable( $output['sanitize_callback'] ) ) {
+ return $value;
+ }
+ return call_user_func( $output['sanitize_callback'], $this->value );
+ }
+
+ return $value;
+
+ }
+
+ /**
+ * If we have a value_pattern defined, apply it to the value.
+ *
+ * @param array $output The output args.
+ * @param string|array $value The value.
+ * @return string|array
+ */
+ protected function apply_value_pattern( $output, $value ) {
+
+ if ( isset( $output['value_pattern'] ) && ! empty( $output['value_pattern'] ) && is_string( $output['value_pattern'] ) ) {
+ if ( ! is_array( $value ) ) {
+ $value = str_replace( '$', $value, $output['value_pattern'] );
+ }
+ if ( is_array( $value ) ) {
+ foreach ( array_keys( $value ) as $value_k ) {
+ if ( ! is_string( $value[ $value_k ] ) ) {
+ continue;
+ }
+ if ( isset( $output['choice'] ) ) {
+ if ( $output['choice'] === $value_k ) {
+ $value[ $output['choice'] ] = str_replace( '$', $value[ $output['choice'] ], $output['value_pattern'] );
+ }
+ continue;
+ }
+ $value[ $value_k ] = str_replace( '$', $value[ $value_k ], $output['value_pattern'] );
+ }
+ }
+ $value = $this->apply_pattern_replace( $output, $value );
+ } // End if().
+ return $value;
+ }
+
+ /**
+ * If we have a value_pattern defined, apply it to the value.
+ *
+ * @param array $output The output args.
+ * @param string|array $value The value.
+ * @return string|array
+ */
+ protected function apply_pattern_replace( $output, $value ) {
+ if ( isset( $output['pattern_replace'] ) && is_array( $output['pattern_replace'] ) ) {
+ $option_type = ( '' !== Kirki::get_config_param( $this->config_id, 'option_type' ) ) ? Kirki::get_config_param( $this->config_id, 'option_type' ) : 'theme_mod';
+ $option_name = Kirki::get_config_param( $this->config_id, 'option_name' );
+ $options = array();
+ if ( $option_name ) {
+ $options = ( 'site_option' === $option_type ) ? get_site_option( $option_name ) : get_option( $option_name );
+ }
+ foreach ( $output['pattern_replace'] as $search => $replace ) {
+ $replacement = '';
+ switch ( $option_type ) {
+ case 'option':
+ if ( is_array( $options ) ) {
+ if ( $option_name ) {
+ $subkey = str_replace( array( $option_name, '[', ']' ), '', $replace );
+ $replacement = ( isset( $options[ $subkey ] ) ) ? $options[ $subkey ] : '';
+ break;
+ }
+ $replacement = ( isset( $options[ $replace ] ) ) ? $options[ $replace ] : '';
+ break;
+ }
+ $replacement = get_option( $replace );
+ break;
+ case 'site_option':
+ $replacement = ( is_array( $options ) && isset( $options[ $replace ] ) ) ? $options[ $replace ] : get_site_option( $replace );
+ break;
+ case 'user_meta':
+ $user_id = get_current_user_id();
+ if ( $user_id ) {
+ // @codingStandardsIgnoreLine
+ $replacement = get_user_meta( $user_id, $replace, true );
+ }
+ break;
+ default:
+ $replacement = get_theme_mod( $replace );
+ }
+ $replacement = ( false === $replacement ) ? '' : $replacement;
+ if ( is_array( $value ) ) {
+ foreach ( $value as $k => $v ) {
+ $_val = ( isset( $value[ $v ] ) ) ? $value[ $v ] : $v;
+ $value[ $k ] = str_replace( $search, $replacement, $_val );
+ }
+ return $value;
+ }
+ $value = str_replace( $search, $replacement, $value );
+ } // End foreach().
+ } // End if().
+ return $value;
+ }
+
+ /**
+ * Parses the output arguments.
+ * Calls the process_output method for each of them.
+ *
+ * @access protected
+ */
+ protected function parse_output() {
+ foreach ( $this->output as $output ) {
+ $skip = false;
+
+ // Apply any sanitization callbacks defined.
+ $value = $this->apply_sanitize_callback( $output, $this->value );
+
+ // Skip if value is empty.
+ if ( '' === $this->value ) {
+ $skip = true;
+ }
+
+ // No need to proceed this if the current value is the same as in the "exclude" value.
+ if ( isset( $output['exclude'] ) && is_array( $output['exclude'] ) ) {
+ foreach ( $output['exclude'] as $exclude ) {
+ if ( is_array( $value ) ) {
+ if ( is_array( $exclude ) ) {
+ $diff1 = array_diff( $value, $exclude );
+ $diff2 = array_diff( $exclude, $value );
+
+ if ( empty( $diff1 ) && empty( $diff2 ) ) {
+ $skip = true;
+ }
+ }
+ // If 'choice' is defined check for sub-values too.
+ // Fixes https://github.com/aristath/kirki/issues/1416.
+ if ( isset( $output['choice'] ) && isset( $value[ $output['choice'] ] ) && $exclude == $value[ $output['choice'] ] ) {
+ $skip = true;
+ }
+ }
+ if ( $skip ) {
+ continue;
+ }
+
+ // Skip if value is defined as excluded.
+ if ( $exclude === $value || ( '' === $exclude && empty( $value ) ) ) {
+ $skip = true;
+ }
+ }
+ }
+ if ( $skip ) {
+ continue;
+ }
+
+ // Apply any value patterns defined.
+ $value = $this->apply_value_pattern( $output, $value );
+
+ if ( isset( $output['element'] ) && is_array( $output['element'] ) ) {
+ $output['element'] = array_unique( $output['element'] );
+ sort( $output['element'] );
+ $output['element'] = implode( ',', $output['element'] );
+ }
+
+ $value = $this->process_value( $value, $output );
+ $this->process_output( $output, $value );
+ } // End foreach().
+ }
+
+ /**
+ * Parses an output and creates the styles array for it.
+ *
+ * @access protected
+ * @param array $output The field output.
+ * @param string|array $value The value.
+ *
+ * @return null
+ */
+ protected function process_output( $output, $value ) {
+ if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
+ return;
+ }
+ $output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
+ $output['prefix'] = ( isset( $output['prefix'] ) ) ? $output['prefix'] : '';
+ $output['units'] = ( isset( $output['units'] ) ) ? $output['units'] : '';
+ $output['suffix'] = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
+
+ // Properties that can accept multiple values.
+ // Useful for example for gradients where all browsers use the "background-image" property
+ // and the browser prefixes go in the value_pattern arg.
+ $accepts_multiple = array(
+ 'background-image',
+ 'background',
+ );
+ if ( in_array( $output['property'], $accepts_multiple, true ) ) {
+ if ( isset( $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] ) && ! is_array( $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] ) ) {
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = (array) $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ];
+ }
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ][] = $output['prefix'] . $value . $output['units'] . $output['suffix'];
+ return;
+ }
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix'];
+ }
+
+ /**
+ * Some CSS properties are unique.
+ * We need to tweak the value to make everything works as expected.
+ *
+ * @access protected
+ * @param string $property The CSS property.
+ * @param string|array $value The value.
+ *
+ * @return array
+ */
+ protected function process_property_value( $property, $value ) {
+ $properties = apply_filters(
+ "kirki/{$this->config_id}/output/property-classnames", array(
+ 'font-family' => 'Kirki_Output_Property_Font_Family',
+ 'background-image' => 'Kirki_Output_Property_Background_Image',
+ 'background-position' => 'Kirki_Output_Property_Background_Position',
+ )
+ );
+ if ( array_key_exists( $property, $properties ) ) {
+ $classname = $properties[ $property ];
+ $obj = new $classname( $property, $value );
+ return $obj->get_value();
+ }
+ return $value;
+ }
+
+ /**
+ * Returns the value.
+ *
+ * @access protected
+ * @param string|array $value The value.
+ * @param array $output The field "output".
+ * @return string|array
+ */
+ protected function process_value( $value, $output ) {
+ if ( isset( $output['property'] ) ) {
+ return $this->process_property_value( $output['property'], $value );
+ }
+ return $value;
+ }
+
+ /**
+ * Exploses the private $styles property to the world
+ *
+ * @access protected
+ * @return array
+ */
+ public function get_styles() {
+ return $this->styles;
+ }
+}
diff --git a/functions/kirki/modules/css/field/class-kirki-output-field-background.php b/functions/kirki/modules/css/field/class-kirki-output-field-background.php
new file mode 100644
index 0000000..4d6d72b
--- /dev/null
+++ b/functions/kirki/modules/css/field/class-kirki-output-field-background.php
@@ -0,0 +1,42 @@
+ 'global',
+ 'element' => 'body',
+ 'prefix' => '',
+ 'suffix' => '',
+ )
+ );
+
+ foreach ( array( 'background-image', 'background-color', 'background-repeat', 'background-position', 'background-size', 'background-attachment' ) as $property ) {
+ if ( isset( $value[ $property ] ) && ! empty( $value[ $property ] ) ) {
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
+ }
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/field/class-kirki-output-field-dimensions.php b/functions/kirki/modules/css/field/class-kirki-output-field-dimensions.php
new file mode 100644
index 0000000..6ff8e86
--- /dev/null
+++ b/functions/kirki/modules/css/field/class-kirki-output-field-dimensions.php
@@ -0,0 +1,56 @@
+ '',
+ 'property' => '',
+ 'media_query' => 'global',
+ 'prefix' => '',
+ 'suffix' => '',
+ )
+ );
+
+ if ( ! is_array( $value ) ) {
+ return;
+ }
+
+ foreach ( $value as $key => $sub_value ) {
+
+ $property = ( empty( $output['property'] ) ) ? $key : $output['property'] . '-' . $key;
+ if ( isset( $output['choice'] ) && $output['property'] ) {
+ if ( $key === $output['choice'] ) {
+ $property = $output['property'];
+ } else {
+ continue;
+ }
+ }
+ if ( false !== strpos( $output['property'], '%%' ) ) {
+ $property = str_replace( '%%', $key, $output['property'] );
+ }
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $this->process_property_value( $property, $value[ $key ] ) . $output['suffix'];
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/field/class-kirki-output-field-image.php b/functions/kirki/modules/css/field/class-kirki-output-field-image.php
new file mode 100644
index 0000000..7cd822b
--- /dev/null
+++ b/functions/kirki/modules/css/field/class-kirki-output-field-image.php
@@ -0,0 +1,48 @@
+ 'global',
+ 'prefix' => '',
+ 'units' => '',
+ 'suffix' => '',
+ ) );
+ if ( is_array( $value ) ) {
+ if ( isset( $output['choice'] ) && $output['choice'] ) {
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix'];
+ return;
+ }
+ if ( isset( $value['url'] ) ) {
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix'];
+ return;
+ }
+ return;
+ }
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix'];
+ }
+}
diff --git a/functions/kirki/modules/css/field/class-kirki-output-field-multicolor.php b/functions/kirki/modules/css/field/class-kirki-output-field-multicolor.php
new file mode 100644
index 0000000..814409f
--- /dev/null
+++ b/functions/kirki/modules/css/field/class-kirki-output-field-multicolor.php
@@ -0,0 +1,54 @@
+ $sub_value ) {
+
+ // If "element" is not defined, there's no reason to continue.
+ if ( ! isset( $output['element'] ) ) {
+ continue;
+ }
+
+ // If the "choice" is not the same as the $key in our loop, there's no reason to proceed.
+ if ( isset( $output['choice'] ) && $key !== $output['choice'] ) {
+ continue;
+ }
+
+ // If "property" is not defined, fallback to the $key.
+ $property = ( ! isset( $output['property'] ) || empty( $output['property'] ) ) ? $key : $output['property'];
+
+ // If "media_query" is not defined, use "global".
+ if ( ! isset( $output['media_query'] ) || empty( $output['media_query'] ) ) {
+ $output['media_query'] = 'global';
+ }
+
+ // If "suffix" is defined, add it to the value.
+ $output['suffix'] = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
+
+ // Create the styles.
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $sub_value . $output['suffix'];
+
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/field/class-kirki-output-field-typography.php b/functions/kirki/modules/css/field/class-kirki-output-field-typography.php
new file mode 100644
index 0000000..ca69df6
--- /dev/null
+++ b/functions/kirki/modules/css/field/class-kirki-output-field-typography.php
@@ -0,0 +1,94 @@
+field['default'][ $property ] ) ) {
+ continue;
+ }
+
+ // Early exit if the value is not saved in the values.
+ if ( ! isset( $value[ $property ] ) || ! $value[ $property ] ) {
+ continue;
+ }
+
+ // Early exit if we use "choice" but not for this property.
+ if ( isset( $output['choice'] ) && $output['choice'] !== $property ) {
+ continue;
+ }
+
+ // Take care of variants.
+ if ( 'variant' == $property && isset( $value['variant'] ) && ! empty( $value['variant'] ) ) {
+
+ // Get the font_weight.
+ $font_weight = str_replace( 'italic', '', $value['variant'] );
+ $font_weight = ( in_array( $font_weight, array( '', 'regular' ) ) ) ? '400' : $font_weight;
+
+ // Is this italic?
+ $is_italic = ( false !== strpos( $value['variant'], 'italic' ) );
+ $this->styles[ $output['media_query'] ][ $output['element'] ]['font-weight'] = $font_weight;
+ if ( $is_italic ) {
+ $this->styles[ $output['media_query'] ][ $output['element'] ]['font-style'] = 'italic';
+ }
+ continue;
+ }
+
+ $property_value = $this->process_property_value( $property, $value[ $property ] );
+ if ( 'font-family' === $property ) {
+ $value['font-backup'] = ( isset( $value['font-backup'] ) ) ? $value['font-backup'] : '';
+ $property_value = $this->process_property_value( $property, array(
+ $value['font-family'],
+ $value['font-backup'],
+ ) );
+ }
+ $property = ( isset( $output['choice'] ) && isset( $output['property'] ) ) ? $output['property'] : $property;
+ $property_value = ( is_array( $property_value ) && isset( $property_value[0] ) ) ? $property_value[0] : $property_value;
+ $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $property_value . $output['suffix'];
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/property/class-kirki-output-property-background-image.php b/functions/kirki/modules/css/property/class-kirki-output-property-background-image.php
new file mode 100644
index 0000000..9904df1
--- /dev/null
+++ b/functions/kirki/modules/css/property/class-kirki-output-property-background-image.php
@@ -0,0 +1,40 @@
+value ) && isset( $this->value['url'] ) ) {
+ $this->value = $this->value['url'];
+ }
+
+ if ( false === strpos( $this->value, 'gradient' ) && false === strpos( $this->value, 'url(' ) ) {
+ if ( empty( $this->value ) ) {
+ return;
+ }
+
+ if ( preg_match( '/^\d+$/', $this->value ) ) {
+ $this->value = 'url("' . set_url_scheme( wp_get_attachment_url( $this->value ) ) . '")';
+ } else {
+ $this->value = 'url("' . set_url_scheme( $this->value ) . '")';
+ }
+ }
+ }
+}
diff --git a/functions/kirki/modules/css/property/class-kirki-output-property-background-position.php b/functions/kirki/modules/css/property/class-kirki-output-property-background-position.php
new file mode 100644
index 0000000..6520723
--- /dev/null
+++ b/functions/kirki/modules/css/property/class-kirki-output-property-background-position.php
@@ -0,0 +1,72 @@
+value = trim( $this->value );
+
+ // If you use calc() there, I suppose you know what you're doing.
+ // No need to process this any further, just exit.
+ if ( false !== strpos( $this->value, 'calc' ) ) {
+ return;
+ }
+
+ // If the value is initial or inherit, we don't need to do anything.
+ // Just exit.
+ if ( 'initial' === $this->value || 'inherit' === $this->value ) {
+ return;
+ }
+
+ $x_dimensions = array( 'left', 'center', 'right' );
+ $y_dimensions = array( 'top', 'center', 'bottom' );
+
+ // If there's a space, we have an X and a Y value.
+ if ( false !== strpos( $this->value, ' ' ) ) {
+ $xy = explode( ' ', $this->value );
+
+ $x = trim( $xy[0] );
+ $y = trim( $xy[1] );
+
+ // If x is not left/center/right, we need to sanitize it.
+ if ( ! in_array( $x, $x_dimensions, true ) ) {
+ $x = Kirki_Sanitize_Values::css_dimension( $x );
+ }
+ if ( ! in_array( $y, $y_dimensions, true ) ) {
+ $y = Kirki_Sanitize_Values::css_dimension( $y );
+ }
+ $this->value = $x . ' ' . $y;
+ return;
+ }
+ $x = 'center';
+ foreach ( $x_dimensions as $x_dimension ) {
+ if ( false !== strpos( $this->value, $x_dimension ) ) {
+ $x = $x_dimension;
+ }
+ }
+ $y = 'center';
+ foreach ( $y_dimensions as $y_dimension ) {
+ if ( false !== strpos( $this->value, $y_dimension ) ) {
+ $y = $y_dimension;
+ }
+ }
+ $this->value = $x . ' ' . $y;
+ }
+}
diff --git a/functions/kirki/modules/css/property/class-kirki-output-property-font-family.php b/functions/kirki/modules/css/property/class-kirki-output-property-font-family.php
new file mode 100644
index 0000000..17e097e
--- /dev/null
+++ b/functions/kirki/modules/css/property/class-kirki-output-property-font-family.php
@@ -0,0 +1,65 @@
+value;
+ $backup = '';
+ if ( is_array( $this->value ) && isset( $this->value[0] ) && isset( $this->value[1] ) ) {
+ $family = $this->value[0];
+ $backup = $this->value[1];
+ }
+
+ // Make sure the value is a string.
+ // If not, then early exit.
+ if ( ! is_string( $family ) ) {
+ return;
+ }
+
+ // Hack for standard fonts.
+ $family = str_replace( '"', '"', $family );
+
+ // Add backup font.
+ if ( Kirki_Fonts::is_google_font( $family ) ) {
+
+ if ( '' === $backup && isset( $google_fonts_array[ $family ] ) && isset( $backup_fonts[ $google_fonts_array[ $family ]['category'] ] ) ) {
+ $backup = $backup_fonts[ $google_fonts_array[ $family ]['category'] ];
+ }
+
+ // Add double quotes if needed.
+ if ( false !== strpos( $family, ' ' ) && false === strpos( $family, '"' ) ) {
+ $this->value = '"' . $family . '", ' . $backup;
+ return;
+ }
+ $this->value = $family . ', ' . $backup;
+ return;
+ }
+
+ // Add double quotes if needed.
+ if ( false !== strpos( $family, ' ' ) && false === strpos( $family, '"' ) ) {
+ $this->value = '"' . $family . '"';
+ }
+ $this->value = html_entity_decode( $family, ENT_QUOTES );
+ }
+}
diff --git a/functions/kirki/modules/css/property/class-kirki-output-property.php b/functions/kirki/modules/css/property/class-kirki-output-property.php
new file mode 100644
index 0000000..5da565f
--- /dev/null
+++ b/functions/kirki/modules/css/property/class-kirki-output-property.php
@@ -0,0 +1,64 @@
+property = $property;
+ $this->value = $value;
+ $this->process_value();
+ }
+
+ /**
+ * Modifies the value.
+ *
+ * @access protected
+ */
+ protected function process_value() {
+
+ }
+
+ /**
+ * Gets the value.
+ *
+ * @access protected
+ */
+ public function get_value() {
+ return $this->value;
+ }
+}
diff --git a/functions/kirki/modules/custom-sections/class-kirki-modules-custom-sections.php b/functions/kirki/modules/custom-sections/class-kirki-modules-custom-sections.php
new file mode 100644
index 0000000..caae260
--- /dev/null
+++ b/functions/kirki/modules/custom-sections/class-kirki-modules-custom-sections.php
@@ -0,0 +1,162 @@
+ 'Kirki_Sections_Default_Section',
+ 'kirki-expanded' => 'Kirki_Sections_Expanded_Section',
+ 'kirki-nested' => 'Kirki_Sections_Nested_Section',
+ );
+ return array_merge( $section_types, $new_types );
+
+ }
+
+ /**
+ * Add the custom panel types.
+ *
+ * @access public
+ * @since 3.0.0
+ * @param array $panel_types The registered section-types.
+ * @return array
+ */
+ public function set_panel_types( $panel_types ) {
+
+ $new_types = array(
+ 'kirki-nested' => 'Kirki_Panels_Nested_Panel',
+ );
+ return array_merge( $panel_types, $new_types );
+
+ }
+
+ /**
+ * Include the custom-section classes.
+ *
+ * @access public
+ * @since 3.0.0
+ */
+ public function include_sections_and_panels() {
+
+ // Sections.
+ $folder_path = dirname( __FILE__ ) . '/sections/';
+ $section_types = apply_filters( 'kirki/section_types', array() );
+
+ foreach ( $section_types as $id => $class ) {
+ if ( ! class_exists( $class ) ) {
+ $path = wp_normalize_path( $folder_path . 'class-kirki-sections-' . $id . '-section.php' );
+ if ( file_exists( $path ) ) {
+ include_once $path;
+ continue;
+ }
+ $path = str_replace( 'class-kirki-sections-kirki-', 'class-kirki-sections-', $path );
+ if ( file_exists( $path ) ) {
+ include_once $path;
+ }
+ }
+ }
+
+ // Panels.
+ $folder_path = dirname( __FILE__ ) . '/panels/';
+ $panel_types = apply_filters( 'kirki/panel_types', array() );
+
+ foreach ( $panel_types as $id => $class ) {
+ if ( ! class_exists( $class ) ) {
+ $path = wp_normalize_path( $folder_path . 'class-kirki-panels-' . $id . '-panel.php' );
+ if ( file_exists( $path ) ) {
+ include_once $path;
+ continue;
+ }
+ $path = str_replace( 'class-kirki-panels-kirki-', 'class-kirki-panels-', $path );
+ if ( file_exists( $path ) ) {
+ include_once $path;
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Enqueues any necessary scripts and styles.
+ *
+ * @access public
+ * @since 3.0.0
+ */
+ public function enqueue_scrips() {
+
+ wp_enqueue_style( 'kirki-custom-sections', trailingslashit( Kirki::$url ) . 'modules/custom-sections/sections.css', array(), KIRKI_VERSION );
+ wp_enqueue_script( 'kirki-custom-sections', trailingslashit( Kirki::$url ) . 'modules/custom-sections/sections.js', array( 'jquery', 'customize-base', 'customize-controls' ), KIRKI_VERSION );
+
+ }
+
+}
diff --git a/functions/kirki/modules/custom-sections/panels/class-kirki-panels-nested-panel.php b/functions/kirki/modules/custom-sections/panels/class-kirki-panels-nested-panel.php
new file mode 100644
index 0000000..980778c
--- /dev/null
+++ b/functions/kirki/modules/custom-sections/panels/class-kirki-panels-nested-panel.php
@@ -0,0 +1,59 @@
+title, ENT_QUOTES, get_bloginfo( 'charset' ) );
+ $array['content'] = $this->get_content();
+ $array['active'] = $this->active();
+ $array['instanceNumber'] = $this->instance_number;
+
+ return $array;
+ }
+}
diff --git a/functions/kirki/modules/custom-sections/sections.css b/functions/kirki/modules/custom-sections/sections.css
new file mode 100644
index 0000000..21490dc
--- /dev/null
+++ b/functions/kirki/modules/custom-sections/sections.css
@@ -0,0 +1,20 @@
+#customize-theme-controls .control-section-kirki-expanded .accordion-section-title {
+ display: none; }
+#customize-theme-controls .control-section-kirki-expanded .customize-section-back {
+ display: none; }
+#customize-theme-controls .customize-pane-child.control-section-kirki-expanded {
+ position: relative;
+ visibility: visible;
+ height: auto;
+ margin-left: -100%; }
+ #customize-theme-controls .customize-pane-child.control-section-kirki-expanded h3 .customize-action {
+ display: none; }
+
+#customize-theme-controls .customize-pane-child.current-section-parent,
+.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent {
+ transform: translateX(-100%); }
+
+.control-section-kirki-nested {
+ margin: 0 -12px; }
+
+/*# sourceMappingURL=sections.css.map */
diff --git a/functions/kirki/modules/custom-sections/sections.js b/functions/kirki/modules/custom-sections/sections.js
new file mode 100644
index 0000000..f7609ab
--- /dev/null
+++ b/functions/kirki/modules/custom-sections/sections.js
@@ -0,0 +1,256 @@
+jQuery( document ).ready( function() {
+
+ wp.customize.section.each( function( section ) {
+
+ // Get the pane element.
+ var pane = jQuery( '#sub-accordion-section-' + section.id ),
+ sectionLi = jQuery( '#accordion-section-' + section.id );
+
+ // Check if the section is expanded.
+ if ( sectionLi.hasClass( 'control-section-kirki-expanded' ) ) {
+
+ // Move element.
+ pane.appendTo( sectionLi );
+
+ }
+
+ } );
+
+} );
+
+/**
+ * @see https://wordpress.stackexchange.com/a/256103/17078
+ */
+( function() {
+
+ var _panelEmbed,
+ _panelIsContextuallyActive,
+ _panelAttachEvents,
+ _sectionEmbed,
+ _sectionIsContextuallyActive,
+ _sectionAttachEvents;
+
+ wp.customize.bind( 'pane-contents-reflowed', function() {
+
+ var panels = [],
+ sections = [];
+
+ // Reflow Sections.
+ wp.customize.section.each( function( section ) {
+
+ if ( 'kirki-nested' !== section.params.type || _.isUndefined( section.params.section ) ) {
+ return;
+ }
+ sections.push( section );
+ });
+
+ sections.sort( wp.customize.utils.prioritySort ).reverse();
+
+ jQuery.each( sections, function( i, section ) {
+ var parentContainer = jQuery( '#sub-accordion-section-' + section.params.section );
+
+ parentContainer.children( '.section-meta' ).after( section.headContainer );
+ });
+
+ // Reflow Panels.
+ wp.customize.panel.each( function( panel ) {
+ if ( 'kirki-nested' !== panel.params.type || _.isUndefined( panel.params.panel ) ) {
+ return;
+ }
+ panels.push( panel );
+ });
+
+ panels.sort( wp.customize.utils.prioritySort ).reverse();
+
+ jQuery.each( panels, function( i, panel ) {
+ var parentContainer = jQuery( '#sub-accordion-panel-' + panel.params.panel );
+
+ parentContainer.children( '.panel-meta' ).after( panel.headContainer );
+ });
+ });
+
+ // Extend Panel.
+ _panelEmbed = wp.customize.Panel.prototype.embed;
+ _panelIsContextuallyActive = wp.customize.Panel.prototype.isContextuallyActive;
+ _panelAttachEvents = wp.customize.Panel.prototype.attachEvents;
+
+ wp.customize.Panel = wp.customize.Panel.extend({
+ attachEvents: function() {
+ var panel;
+
+ if ( 'kirki-nested' !== this.params.type || _.isUndefined( this.params.panel ) ) {
+ _panelAttachEvents.call( this );
+ return;
+ }
+
+ _panelAttachEvents.call( this );
+
+ panel = this;
+
+ panel.expanded.bind( function( expanded ) {
+ var parent = wp.customize.panel( panel.params.panel );
+
+ if ( expanded ) {
+ parent.contentContainer.addClass( 'current-panel-parent' );
+ } else {
+ parent.contentContainer.removeClass( 'current-panel-parent' );
+ }
+ });
+
+ panel.container.find( '.customize-panel-back' ).off( 'click keydown' ).on( 'click keydown', function( event ) {
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+ event.preventDefault(); // Keep this AFTER the key filter above
+
+ if ( panel.expanded() ) {
+ wp.customize.panel( panel.params.panel ).expand();
+ }
+ });
+ },
+
+ embed: function() {
+
+ var panel = this,
+ parentContainer;
+ if ( 'kirki-nested' !== this.params.type || _.isUndefined( this.params.panel ) ) {
+ _panelEmbed.call( this );
+ return;
+ }
+
+ _panelEmbed.call( this );
+
+ parentContainer = jQuery( '#sub-accordion-panel-' + this.params.panel );
+
+ parentContainer.append( panel.headContainer );
+ },
+
+ isContextuallyActive: function() {
+
+ var panel = this,
+ children,
+ activeCount = 0;
+
+ if ( 'kirki-nested' !== this.params.type ) {
+ return _panelIsContextuallyActive.call( this );
+ }
+
+ children = this._children( 'panel', 'section' );
+
+ wp.customize.panel.each( function( child ) {
+ if ( ! child.params.panel ) {
+ return;
+ }
+
+ if ( child.params.panel !== panel.id ) {
+ return;
+ }
+
+ children.push( child );
+ });
+
+ children.sort( wp.customize.utils.prioritySort );
+
+ _( children ).each( function( child ) {
+ if ( child.active() && child.isContextuallyActive() ) {
+ activeCount += 1;
+ }
+ });
+ return ( 0 !== activeCount );
+ }
+ });
+
+ // Extend Section.
+ _sectionEmbed = wp.customize.Section.prototype.embed;
+ _sectionIsContextuallyActive = wp.customize.Section.prototype.isContextuallyActive;
+ _sectionAttachEvents = wp.customize.Section.prototype.attachEvents;
+
+ wp.customize.Section = wp.customize.Section.extend({
+ attachEvents: function() {
+
+ var section = this;
+
+ if ( 'kirki-nested' !== this.params.type || _.isUndefined( this.params.section ) ) {
+ _sectionAttachEvents.call( section );
+ return;
+ }
+
+ _sectionAttachEvents.call( section );
+
+ section.expanded.bind( function( expanded ) {
+ var parent = wp.customize.section( section.params.section );
+
+ if ( expanded ) {
+ parent.contentContainer.addClass( 'current-section-parent' );
+ } else {
+ parent.contentContainer.removeClass( 'current-section-parent' );
+ }
+ });
+
+ section.container.find( '.customize-section-back' ).off( 'click keydown' ).on( 'click keydown', function( event ) {
+ if ( wp.customize.utils.isKeydownButNotEnterEvent( event ) ) {
+ return;
+ }
+ event.preventDefault(); // Keep this AFTER the key filter above
+ if ( section.expanded() ) {
+ wp.customize.section( section.params.section ).expand();
+ }
+ });
+ },
+
+ embed: function() {
+
+ var section = this,
+ parentContainer;
+
+ if ( 'kirki-nested' !== this.params.type || _.isUndefined( this.params.section ) ) {
+ _sectionEmbed.call( section );
+ return;
+ }
+
+ _sectionEmbed.call( section );
+
+ parentContainer = jQuery( '#sub-accordion-section-' + this.params.section );
+
+ parentContainer.append( section.headContainer );
+ },
+
+ isContextuallyActive: function() {
+ var section = this,
+ children,
+ activeCount = 0;
+ if ( 'kirki-nested' !== this.params.type ) {
+ return _sectionIsContextuallyActive.call( this );
+ }
+
+ children = this._children( 'section', 'control' );
+
+ wp.customize.section.each( function( child ) {
+ if ( ! child.params.section ) {
+ return;
+ }
+
+ if ( child.params.section !== section.id ) {
+ return;
+ }
+ children.push( child );
+ });
+
+ children.sort( wp.customize.utils.prioritySort );
+
+ _( children ).each( function( child ) {
+ if ( 'undefined' !== typeof child.isContextuallyActive ) {
+ if ( child.active() && child.isContextuallyActive() ) {
+ activeCount += 1;
+ }
+ } else {
+ if ( child.active() ) {
+ activeCount += 1;
+ }
+ }
+ });
+
+ return ( 0 !== activeCount );
+ }
+ });
+})( jQuery );
diff --git a/functions/kirki/modules/custom-sections/sections/class-kirki-sections-default-section.php b/functions/kirki/modules/custom-sections/sections/class-kirki-sections-default-section.php
new file mode 100644
index 0000000..3bad63f
--- /dev/null
+++ b/functions/kirki/modules/custom-sections/sections/class-kirki-sections-default-section.php
@@ -0,0 +1,25 @@
+title, ENT_QUOTES, get_bloginfo( 'charset' ) );
+ $array['content'] = $this->get_content();
+ $array['active'] = $this->active();
+ $array['instanceNumber'] = $this->instance_number;
+
+ $array['customizeAction'] = esc_attr__( 'Customizing', 'blogrow' );
+ if ( $this->panel ) {
+ /* translators: The title. */
+ $array['customizeAction'] = sprintf( esc_attr__( 'Customizing ▸ %s', 'blogrow' ), esc_html( $this->manager->get_panel( $this->panel )->title ) );
+ }
+ return $array;
+ }
+}
diff --git a/functions/kirki/modules/customizer-branding/branding.js b/functions/kirki/modules/customizer-branding/branding.js
new file mode 100644
index 0000000..70254fe
--- /dev/null
+++ b/functions/kirki/modules/customizer-branding/branding.js
@@ -0,0 +1,14 @@
+/* global kirkiBranding */
+jQuery( document ).ready( function() {
+
+ 'use strict';
+
+ if ( '' !== kirkiBranding.logoImage ) {
+ jQuery( 'div#customize-info .preview-notice' ).replaceWith( ' ' );
+ }
+
+ if ( '' !== kirkiBranding.description ) {
+ jQuery( 'div#customize-info > .customize-panel-description' ).replaceWith( '' + kirkiBranding.description + '
' );
+ }
+
+});
diff --git a/functions/kirki/modules/customizer-branding/class-kirki-modules-customizer-branding.php b/functions/kirki/modules/customizer-branding/class-kirki-modules-customizer-branding.php
new file mode 100644
index 0000000..6919dda
--- /dev/null
+++ b/functions/kirki/modules/customizer-branding/class-kirki-modules-customizer-branding.php
@@ -0,0 +1,89 @@
+ '',
+ 'description' => '',
+ );
+ if ( isset( $config['logo_image'] ) && '' !== $config['logo_image'] ) {
+ $vars['logoImage'] = esc_url_raw( $config['logo_image'] );
+ }
+ if ( isset( $config['description'] ) && '' !== $config['description'] ) {
+ $vars['description'] = esc_textarea( $config['description'] );
+ }
+
+ if ( ! empty( $vars['logoImage'] ) || ! empty( $vars['description'] ) ) {
+ wp_register_script( 'kirki-branding', Kirki::$url . '/modules/customizer-branding/branding.js', array(), KIRKI_VERSION );
+ wp_localize_script( 'kirki-branding', 'kirkiBranding', $vars );
+ wp_enqueue_script( 'kirki-branding' );
+ }
+ }
+}
diff --git a/functions/kirki/modules/customizer-styling/class-kirki-modules-customizer-styling.php b/functions/kirki/modules/customizer-styling/class-kirki-modules-customizer-styling.php
new file mode 100644
index 0000000..491ca6b
--- /dev/null
+++ b/functions/kirki/modules/customizer-styling/class-kirki-modules-customizer-styling.php
@@ -0,0 +1,425 @@
+ $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness + 60 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness - 60 )->toCSS( $back_obj->mode );
+ $border_on_back = ( 80 < $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness - 13 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness + 13 )->toCSS( $back_obj->mode );
+ $back_on_back = ( 90 < $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness - 6 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness + 11 )->toCSS( $back_obj->mode );
+ $hover_on_back = ( 90 < $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness - 3 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness + 3 )->toCSS( $back_obj->mode );
+ $arrows_on_back = ( 50 > $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness + 30 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness - 30 )->toCSS( $back_obj->mode );
+ }
+ $accent = ( isset( $config['color_accent'] ) ) ? $config['color_accent'] : false;
+ if ( $accent ) {
+ $accent_obj = ariColor::newColor( $accent );
+ $text_on_accent = ( 60 > $accent_obj->lightness ) ? $accent_obj->getNew( 'lightness', $accent_obj->lightness + 60 )->toCSS( $accent_obj->mode ) : $accent_obj->getNew( 'lightness', $accent_obj->lightness - 60 )->toCSS( $accent_obj->mode );
+ $border_on_accent = ( 50 < $accent_obj->lightness ) ? $accent_obj->getNew( 'lightness', $accent_obj->lightness - 4 )->toCSS( $accent_obj->mode ) : $accent_obj->getNew( 'lightness', $accent_obj->lightness + 4 )->toCSS( $accent_obj->mode );
+ $accent_disabled_obj = ( 35 < $accent_obj->lightness ) ? $accent_obj->getNew( 'lightness', $accent_obj->lightness - 30 ) : $accent_obj->getNew( 'lightness', $accent_obj->lightness + 30 );
+ $accent_disabled = $accent_disabled_obj->toCSS( $accent_disabled_obj->mode );
+ $text_on_accent_disabled = ( 60 > $accent_disabled_obj->lightness ) ? $accent_disabled_obj->getNew( 'lightness', $accent_disabled_obj->lightness + 60 )->toCSS( $accent_disabled_obj->mode ) : $accent_disabled_obj->getNew( 'lightness', $accent_disabled_obj->lightness - 60 )->toCSS( $accent_disabled_obj->mode );
+ $border_on_accent_disabled = ( 50 < $accent_disabled_obj->lightness ) ? $accent_disabled_obj->getNew( 'lightness', $accent_disabled_obj->lightness - 4 )->toCSS( $accent_disabled_obj->mode ) : $accent_disabled_obj->getNew( 'lightness', $accent_disabled_obj->lightness + 4 )->toCSS( $accent_disabled_obj->mode );
+ }
+ ?>
+
+ =' === operator || 'greater or equal' === operator || 'equal or greater' === operator ) {
+ result = value2 >= value1;
+ } else if ( '<=' === operator || 'smaller or equal' === operator || 'equal or smaller' === operator ) {
+ result = value2 <= value1;
+ } else if ( '>' === operator || 'greater' === operator ) {
+ result = value2 > value1;
+ } else if ( '<' === operator || 'smaller' === operator ) {
+ result = value2 < value1;
+ } else if ( 'contains' === operator || 'in' === operator ) {
+ if ( _.isArray( value2 ) ) {
+ found = false;
+ _.each( value2, function( value ) {
+ if ( value == value1 ) { // jshint ignore:line
+ found = true;
+ }
+ } );
+ return found;
+ } else if ( _.isObject( value2 ) ) {
+ found = false;
+ if ( ! _.isUndefined( value2[ value1 ] ) ) {
+ found = true;
+ }
+
+ _.each( value2, function( subValue ) {
+ if ( value1 === subValue ) {
+ found = true;
+ }
+ } );
+ return found;
+ } else if ( _.isString( value2 ) ) {
+ return value1.indexOf( value2 ) > -1;
+ }
+ }
+ if ( null === result ) {
+ return true;
+ }
+ return result;
+ }
+};
+
+jQuery( document ).ready( function() {
+ kirkiDependencies.init();
+} );
diff --git a/functions/kirki/modules/icons/class-kirki-modules-icons.php b/functions/kirki/modules/icons/class-kirki-modules-icons.php
new file mode 100644
index 0000000..79de392
--- /dev/null
+++ b/functions/kirki/modules/icons/class-kirki-modules-icons.php
@@ -0,0 +1,108 @@
+add_icon( $section['id'], $section['icon'], 'section' );
+ }
+ }
+
+ // Parse panels and find ones with icons.
+ foreach ( $panels as $panel ) {
+ if ( isset( $panel['icon'] ) ) {
+ $this->add_icon( $panel['id'], $panel['icon'], 'panel' );
+ }
+ }
+
+ wp_enqueue_script( 'kirki_panel_and_section_icons', trailingslashit( Kirki::$url ) . 'modules/icons/icons.js', array( 'jquery', 'customize-base', 'customize-controls' ), KIRKI_VERSION, true );
+ wp_localize_script( 'kirki_panel_and_section_icons', 'kirkiIcons', self::$icons );
+
+ }
+}
diff --git a/functions/kirki/modules/icons/icons.js b/functions/kirki/modules/icons/icons.js
new file mode 100644
index 0000000..b19a2cc
--- /dev/null
+++ b/functions/kirki/modules/icons/icons.js
@@ -0,0 +1,30 @@
+/* global kirkiIcons */
+jQuery( document ).ready( function() {
+
+ 'use strict';
+
+ if ( ! _.isUndefined( kirkiIcons.section ) ) {
+
+ // Parse sections and add icons.
+ _.each( kirkiIcons.section, function( icon, sectionID ) {
+
+ // Add icons in list.
+ jQuery( '#accordion-section-' + sectionID + ' > h3' ).addClass( 'dashicons-before ' + icon );
+
+ // Add icons on titles when a section is open.
+ jQuery( '#sub-accordion-section-' + sectionID + ' .customize-section-title > h3' ).append( ' ' );
+ } );
+
+ }
+
+ if ( ! _.isUndefined( kirkiIcons.panel ) ) {
+
+ _.each( kirkiIcons.panel, function( icon, panelID ) {
+
+ // Add icons in lists & headers.
+ jQuery( '#accordion-panel-' + panelID + ' > h3, #sub-accordion-panel-' + panelID + ' .panel-title' ).addClass( 'dashicons-before ' + icon );
+ } );
+
+ }
+
+});
diff --git a/functions/kirki/modules/loading/class-kirki-modules-loading.php b/functions/kirki/modules/loading/class-kirki-modules-loading.php
new file mode 100644
index 0000000..8f6d6e8
--- /dev/null
+++ b/functions/kirki/modules/loading/class-kirki-modules-loading.php
@@ -0,0 +1,169 @@
+remove_default_loading_styles();
+
+ }
+
+ /**
+ * Adds a custom "loading" div $ its styles when changes are made to the customizer.
+ *
+ * @access public
+ */
+ public function add_loader_to_footer() {
+ ?>
+
+
+
+ `.
+ *
+ * @access public
+ */
+ public function add_loader_styles_to_header() {
+ ?>
+
+ meta = get_post_custom( $queried_post->id );
+ }
+ $wp_scripts->add_data( 'kirki_post_meta_previewed_preview', 'data', sprintf( 'var _customizePostPreviewedQueriedObject = %s;', wp_json_encode( $queried_post ) ) );
+ }
+}
diff --git a/functions/kirki/modules/post-meta/customize-controls.js b/functions/kirki/modules/post-meta/customize-controls.js
new file mode 100644
index 0000000..09d8797
--- /dev/null
+++ b/functions/kirki/modules/post-meta/customize-controls.js
@@ -0,0 +1,23 @@
+jQuery( document ).ready( function() {
+
+ var self;
+
+ self = {
+ queriedPost: new wp.customize.Value()
+ };
+
+ // Listen for queried-post messages from the preview.
+ wp.customize.bind( 'ready', function() {
+ wp.customize.previewer.bind( 'queried-post', function( queriedPost ) {
+ self.queriedPost.set( queriedPost || false );
+ } );
+ } );
+
+ // Listen for post
+ self.queriedPost.bind( function( newPost, oldPost ) {
+ window.kirkiPost = false;
+ if ( newPost || oldPost ) {
+ window.kirkiPost = ( newPost ) ? newPost : oldPost;
+ }
+ } );
+} );
diff --git a/functions/kirki/modules/post-meta/customize-preview.js b/functions/kirki/modules/post-meta/customize-preview.js
new file mode 100644
index 0000000..80a6bfb
--- /dev/null
+++ b/functions/kirki/modules/post-meta/customize-preview.js
@@ -0,0 +1,19 @@
+/* global wp, _customizePostPreviewedQueriedObject */
+jQuery( document ).ready( function() {
+
+ var self;
+
+ self = {
+ queriedPost: null
+ };
+ if ( ! _.isUndefined( _customizePostPreviewedQueriedObject ) ) {
+ self.queriedPost = _customizePostPreviewedQueriedObject;
+ }
+
+ // Send the queried post object to the Customizer pane when ready.
+ wp.customize.bind( 'preview-ready', function() {
+ wp.customize.preview.bind( 'active', function() {
+ wp.customize.preview.send( 'queried-post', self.queriedPost );
+ } );
+ } );
+} );
diff --git a/functions/kirki/modules/postmessage/class-kirki-modules-postmessage.php b/functions/kirki/modules/postmessage/class-kirki-modules-postmessage.php
new file mode 100644
index 0000000..ce1210c
--- /dev/null
+++ b/functions/kirki/modules/postmessage/class-kirki-modules-postmessage.php
@@ -0,0 +1,518 @@
+script .= $this->script( $field );
+ }
+ }
+ $this->script = apply_filters( 'kirki/postmessage/script', $this->script );
+ wp_add_inline_script( 'kirki_auto_postmessage', $this->script, 'after' );
+
+ }
+
+ /**
+ * Generates script for a single field.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param array $args The arguments.
+ */
+ protected function script( $args ) {
+
+ $script = 'wp.customize(\'' . $args['settings'] . '\',function(value){value.bind(function(newval){';
+
+ $add_css = false;
+ foreach ( $args['js_vars'] as $js_var ) {
+ if ( ! isset( $js_var['function'] ) || 'html' !== $js_var['function'] ) {
+ $add_css = true;
+ }
+ }
+
+ if ( $add_css ) {
+
+ // append unique style tag if not exist
+ // The style ID.
+ $style_id = 'kirki-postmessage-' . str_replace( array( '[', ']' ), '', $args['settings'] );
+ $script .= 'if(null===document.getElementById(\'' . $style_id . '\')||\'undefined\'===typeof document.getElementById(\'' . $style_id . '\')){jQuery(\'head\').append(\'\');}';
+ }
+
+ // Add anything we need before the main script.
+ $script .= $this->before_script( $args );
+
+ $field = array(
+ 'scripts' => array(),
+ );
+ // Loop through the js_vars and generate the script.
+ foreach ( $args['js_vars'] as $key => $js_var ) {
+
+ // Skip styles if "exclude" is defined and value is excluded.
+ if ( isset( $js_var['exclude'] ) ) {
+ $js_var['exclude'] = (array) $js_var['exclude'];
+ $script .= 'exclude=false;';
+ foreach ( $js_var['exclude'] as $exclussion ) {
+ $script .= "if(newval=='{$exclussion}'||(''==='{$exclussion}'&&_.isObject(newval)&&_.isEmpty(newval))){exclude=true;}";
+ }
+ }
+ if ( isset( $js_var['element'] ) ) {
+ // Array to string.
+ if ( is_array( $js_var['element'] ) ) {
+ $js_var['element'] = implode( ',', $js_var['element'] );
+ }
+ // Replace single quotes with double quotes to avoid issues with the compiled JS.
+ $js_var['element'] = str_replace( '\'', '"', $js_var['element'] );
+ }
+ if ( isset( $js_var['function'] ) && 'html' === $js_var['function'] ) {
+ $script .= $this->script_html_var( $js_var );
+ continue;
+ }
+ $js_var['index_key'] = $key;
+ $callback = $this->get_callback( $args );
+ if ( is_callable( $callback ) ) {
+ $field['scripts'][ $key ] = call_user_func_array( $callback, array( $js_var, $args ) );
+ continue;
+ }
+ $field['scripts'][ $key ] = $this->script_var( $js_var );
+ }
+ $combo_extra_script = '';
+ $combo_css_script = '';
+ foreach ( $field['scripts'] as $script_array ) {
+ $combo_extra_script .= $script_array['script'];
+ $combo_css_script .= ( 'css' !== $combo_css_script ) ? $script_array['css'] : '';
+ }
+ $text = ( 'css' === $combo_css_script ) ? 'css' : '\'' . $combo_css_script . '\'';
+
+ $script .= $combo_extra_script . "var cssContent={$text};";
+ if ( isset( $js_var['exclude'] ) ) {
+ $script .= 'if(true===exclude){cssContent="";}';
+ }
+ if ( $add_css ) {
+ $script .= "jQuery('#{$style_id}').text(cssContent);jQuery('#{$style_id}').appendTo('head');";
+ }
+ $script .= '});});';
+ return $script;
+ }
+
+ /**
+ * Generates script for a single js_var when using "html" as function.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param array $args The arguments for this js_var.
+ */
+ protected function script_html_var( $args ) {
+
+ $script = ( isset( $args['choice'] ) ) ? "newval=newval['{$args['choice']}'];" : '';
+
+ // Apply the value_pattern.
+ if ( isset( $args['value_pattern'] ) && '' !== $args['value_pattern'] ) {
+ $script .= $this->value_pattern_replacements( 'newval', $args );
+ }
+
+ if ( isset( $args['attr'] ) ) {
+ $script .= "jQuery('{$args['element']}').attr('{$args['attr']}',newval);";
+ return $script;
+ }
+ $script .= "jQuery('{$args['element']}').html(newval);";
+ return $script;
+ }
+
+ /**
+ * Generates script for a single js_var.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param array $args The arguments for this js_var.
+ */
+ protected function script_var( $args ) {
+ $script = '';
+ $property_script = '';
+
+ $value_key = 'newval' . $args['index_key'];
+ $property_script .= $value_key . '=newval;';
+
+ $args = $this->get_args( $args );
+
+ // Apply callback to the value if a callback is defined.
+ if ( ! empty( $args['js_callback'] ) && is_array( $args['js_callback'] ) && isset( $args['js_callback'][0] ) && ! empty( $args['js_callback'][0] ) ) {
+ $script .= $value_key . '=' . $args['js_callback'][0] . '(' . $value_key . ',' . $args['js_callback'][1] . ');';
+ }
+
+ // Apply the value_pattern.
+ if ( '' !== $args['value_pattern'] ) {
+ $script .= $this->value_pattern_replacements( $value_key, $args );
+ }
+
+ // Tweak to add url() for background-images.
+ if ( 'background-image' === $args['property'] && ( ! isset( $args['value_pattern'] ) || false === strpos( $args['value_pattern'], 'gradient' ) ) ) {
+ $script .= 'if(-1===' . $value_key . '.indexOf(\'url(\')){' . $value_key . '=\'url("\'+' . $value_key . '+\'")\';}';
+ }
+
+ // Apply prefix.
+ $value = $value_key;
+ if ( '' !== $args['prefix'] ) {
+ $value = "'" . $args['prefix'] . "'+" . $value_key;
+ }
+ $css = $args['element'] . '{' . $args['property'] . ':\'+' . $value . '+\'' . $args['units'] . $args['suffix'] . ';}';
+ if ( isset( $args['media_query'] ) ) {
+ $css = $args['media_query'] . '{' . $css . '}';
+ }
+ return array(
+ 'script' => $property_script . $script,
+ 'css' => $css,
+ );
+ }
+
+ /**
+ * Processes script generation for fields that save an array.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param array $args The arguments for this js_var.
+ */
+ protected function script_var_array( $args ) {
+
+ $script = ( 0 === $args['index_key'] ) ? 'css=\'\';' : '';
+ $property_script = '';
+
+ // Define choice.
+ $choice = ( isset( $args['choice'] ) && '' !== $args['choice'] ) ? $args['choice'] : '';
+
+ $value_key = 'newval' . $args['index_key'];
+ $property_script .= $value_key . '=newval;';
+
+ $args = $this->get_args( $args );
+
+ // Apply callback to the value if a callback is defined.
+ if ( ! empty( $args['js_callback'] ) && is_array( $args['js_callback'] ) && isset( $args['js_callback'][0] ) && ! empty( $args['js_callback'][0] ) ) {
+ $script .= $value_key . '=' . $args['js_callback'][0] . '(' . $value_key . ',' . $args['js_callback'][1] . ');';
+ }
+ $script .= '_.each(' . $value_key . ', function(subValue,subKey){';
+
+ // Apply the value_pattern.
+ if ( '' !== $args['value_pattern'] ) {
+ $script .= $this->value_pattern_replacements( 'subValue', $args );
+ }
+
+ // Tweak to add url() for background-images.
+ if ( '' === $choice || 'background-image' === $choice ) {
+ $script .= 'if(\'background-image\'===\'' . $args['property'] . '\'||\'background-image\'===subKey){if(-1===subValue.indexOf(\'url(\')){subValue=\'url("\'+subValue+\'")\';}}';
+ }
+
+ // Apply prefix.
+ $value = $value_key;
+ if ( '' !== $args['prefix'] ) {
+ $value = '\'' . $args['prefix'] . '\'+subValue';
+ }
+
+ // Mostly used for padding, margin & position properties.
+ $direction_script = 'if(_.contains([\'top\',\'bottom\',\'left\',\'right\'],subKey)){';
+ $direction_script .= 'css+=\'' . $args['element'] . '{' . $args['property'] . '-\'+subKey+\':\'+subValue+\'' . $args['units'] . $args['suffix'] . ';}\';}';
+ // Allows us to apply this just for a specific choice in the array of the values.
+ if ( '' !== $choice ) {
+ $choice_is_direction = ( false !== strpos( $choice, 'top' ) || false !== strpos( $choice, 'bottom' ) || false !== strpos( $choice, 'left' ) || false !== strpos( $choice, 'right' ) );
+ $script .= 'if(\'' . $choice . '\'===subKey){';
+ $script .= ( $choice_is_direction ) ? $direction_script . 'else{' : '';
+ $script .= 'css+=\'' . $args['element'] . '{' . $args['property'] . ':\'+subValue+\';}\';';
+ $script .= ( $choice_is_direction ) ? '}' : '';
+ $script .= '}';
+ } else {
+
+ // This is where most object-based fields will go.
+ $script .= $direction_script . 'else{css+=\'' . $args['element'] . '{\'+subKey+\':\'+subValue+\'' . $args['units'] . $args['suffix'] . ';}\';}';
+ }
+ $script .= '});';
+
+ if ( isset( $args['media_query'] ) ) {
+ $script .= 'css=\'' . $args['media_query'] . '{\'+css+\'}\';';
+ }
+
+ return array(
+ 'script' => $property_script . $script,
+ 'css' => 'css',
+ );
+ }
+
+ /**
+ * Processes script generation for typography fields.
+ *
+ * @access protected
+ * @since 3.0.0
+ * @param array $args The arguments for this js_var.
+ * @param array $field The field arguments.
+ */
+ protected function script_var_typography( $args, $field ) {
+
+ $args = $this->get_args( $args );
+
+ $script = '';
+ $css = '';
+
+ // Load the font using WenFontloader.
+ // This is a bit ugly because wp_add_inline_script doesn't allow adding
\ No newline at end of file
diff --git a/index.php b/index.php
index 571ce80..c9008e9 100644
--- a/index.php
+++ b/index.php
@@ -7,7 +7,7 @@
-
+
-
+
diff --git a/js/sharrre.php b/js/sharrre.php
deleted file mode 100644
index 08a915b..0000000
--- a/js/sharrre.php
+++ /dev/null
@@ -1,69 +0,0 @@
- '', 'count' => 0);
-$json['url'] = $_GET['url'];
-$url = urlencode($_GET['url']);
-$type = urlencode($_GET['type']);
-$proxy = null;
-$proxyAuth = array();
-if (filter_var($_GET['url'], FILTER_VALIDATE_URL)) {
- if ($type == 'googlePlus') { //source http://www.helmutgranda.com/2011/11/01/get-a-url-google-count-via-php/
- $contents = parse('https://plusone.google.com/u/0/_/+1/fastbutton?url=' . $url . '&count=true');
-
- preg_match('/window\.__SSR = {c: ([\d]+)/', $contents, $matches);
-
- if (isset($matches[0])) {
- $json['count'] = (int)str_replace('window.__SSR = {c: ', '', $matches[0]);
- }
- } else if ($type == 'stumbleupon') {
- $content = parse("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=$url");
-
- $result = json_decode($content);
- if (isset($result->result->views)) {
- $json['count'] = $result->result->views;
- }
-
- }
-}
-echo str_replace('\\/', '/', json_encode($json));
-
-function parse($encUrl)
-{
- global $proxy;
- global $proxyAuth;
- $options = array(
- CURLOPT_RETURNTRANSFER => true, // return web page
- CURLOPT_HEADER => false, // don't return headers
- CURLOPT_FOLLOWLOCATION => true, // follow redirects
- CURLOPT_ENCODING => "", // handle all encodings
- CURLOPT_USERAGENT => 'sharrre', // who am i
- CURLOPT_AUTOREFERER => true, // set referer on redirect
- CURLOPT_CONNECTTIMEOUT => 5, // timeout on connect
- CURLOPT_TIMEOUT => 10, // timeout on response
- CURLOPT_MAXREDIRS => 3, // stop after 10 redirects
- CURLOPT_SSL_VERIFYHOST => 0,
- CURLOPT_SSL_VERIFYPEER => false,
- );
- $ch = curl_init();
- if ($proxy != null) {
- $options[CURLOPT_PROXY] = $proxy;
- if (isset($proxyAuth['user']) && isset($proxyAuth['pwd'])) {
- $options[CURLOPT_PROXYUSERPWD] = $proxyAuth['user'] . ':' . $proxyAuth['pwd'];
- }
- }
- $options[CURLOPT_URL] = $encUrl;
- curl_setopt_array($ch, $options);
-
- $content = curl_exec($ch);
- $err = curl_errno($ch);
- $errmsg = curl_error($ch);
-
- curl_close($ch);
-
- if ($errmsg != '' || $err != '') {
- /*print_r($errmsg);
- print_r($errmsg);*/
- }
- return $content;
-}
diff --git a/option-tree/assets/css/ot-admin-rtl.css b/option-tree/assets/css/ot-admin-rtl.css
deleted file mode 100644
index 82f021d..0000000
--- a/option-tree/assets/css/ot-admin-rtl.css
+++ /dev/null
@@ -1,635 +0,0 @@
-/* --------------------------------------------------
- :: OptionTree Font
- ---------------------------------------------------*/
-.ui-tabs li > a [class^="ot-icon-"],
-.ui-tabs li > a [class*=" ot-icon-"] {
- display: block;
- height: 14px;
- float: right;
- padding: 2px 0px 0 9px;
-}
-
-/* --------------------------------------------------
- :: Messages
- ---------------------------------------------------*/
-.wrap.settings-wrap div.error,
-.wrap.settings-wrap div.updated {
- margin: 9px 2px 0px 5px !important;
-}
-
-/* --------------------------------------------------
- :: OptionTree Wrappers
- ---------------------------------------------------*/
-#option-tree-settings-api > .ui-tabs {
- margin: 0px 2px 0 5px;
- -webkit-box-shadow: inset -146px 0 0 #f1f1f1, inset -147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: inset -146px 0 0 #f1f1f1, inset -147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: inset -146px 0 0 #f1f1f1, inset -147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
-}
-
-/* --------------------------------------------------
- :: Header
- ---------------------------------------------------*/
-#option-tree-header {
- margin: 11px 2px 0 5px;
-}
-#option-tree-header li {
- float: right;
-}
-#option-tree-header #option-tree-logo a {
- border-right: 0;
- border-left: 1px solid #333;
- float: right;
- padding: 3px 13px 3px 12px;
-}
-#option-tree-header li#option-tree-logo:hover {
- -webkit-border-top-right-radius: 2px;
- -moz-border-radius-topright: 2px;
- border-top-right-radius: 2px;
-}
-#option-tree-header #option-tree-version span,
-#option-tree-header #theme-version span {
- border-left: 0;
- border-right: 1px solid #555;
- float: left;
-}
-#option-tree-header #theme-version:before {
- border-right: 0;
- border-left: 1px solid #333;
- float: right;
-}
-/* light */
-.admin-color-light #option-tree-header #option-tree-logo a,
-.admin-color-light #option-tree-header #theme-version:before {
- border-left-color: #3c3c3c;
-}
-.admin-color-light #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #3c3c3c;
-}
-.admin-color-light #option-tree-header #option-tree-version span,
-.admin-color-light #option-tree-header #theme-version span {
- border-right-color: #999;
-}
-/* blue */
-.admin-color-blue #option-tree-header #option-tree-logo a,
-.admin-color-blue #option-tree-header #theme-version:before {
- border-left-color: #002b39;
-}
-.admin-color-blue #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #002b39;
-}
-.admin-color-blue #option-tree-header #option-tree-version span,
-.admin-color-blue #option-tree-header #theme-version span {
- border-right-color: #5dc2e6;
-}
-/* coffee */
-.admin-color-coffee #option-tree-header #option-tree-logo a,
-.admin-color-coffee #option-tree-header #theme-version:before {
- border-left-color: #0f0e0d;
-}
-.admin-color-coffee #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #0f0e0d;
-}
-.admin-color-coffee #option-tree-header #option-tree-version span,
-.admin-color-coffee #option-tree-header #theme-version span {
- border-right-color: #675f58;
-}
-/* ectoplasm */
-.admin-color-ectoplasm #option-tree-header #option-tree-logo a,
-.admin-color-ectoplasm #option-tree-header #theme-version:before {
- border-left-color: #181220;
-}
-.admin-color-ectoplasm #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #181220;
-}
-.admin-color-ectoplasm #option-tree-header #option-tree-version span,
-.admin-color-ectoplasm #option-tree-header #theme-version span {
- border-right-color: #644d85;
-}
-/* midnight */
-.admin-color-midnight #option-tree-header #option-tree-logo a,
-.admin-color-midnight #option-tree-header #theme-version:before {
- border-left-color: #090a0b;
-}
-.admin-color-midnight #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #090a0b;
-}
-.admin-color-midnight #option-tree-header #option-tree-version span,
-.admin-color-midnight #option-tree-header #theme-version span {
- border-right-color: #4c5359;
-}
-/* ocean */
-.admin-color-ocean #option-tree-header #option-tree-logo a,
-.admin-color-ocean #option-tree-header #theme-version:before {
- border-left-color: #39464a;
-}
-.admin-color-ocean #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #39464a;
-}
-.admin-color-ocean #option-tree-header #option-tree-version span,
-.admin-color-ocean #option-tree-header #theme-version span {
- border-right-color: #87a6af;
-}
-/* sunrise */
-.admin-color-sunrise #option-tree-header #option-tree-logo a,
-.admin-color-sunrise #option-tree-header #theme-version:before {
- border-left-color: #8a322a;
-}
-.admin-color-sunrise #option-tree-header li#option-tree-logo:hover a {
- border-left-color: #8a322a;
-}
-.admin-color-sunrise #option-tree-header #option-tree-version span,
-.admin-color-sunrise #option-tree-header #theme-version span {
- border-right-color: #e75546;
-}
-
-/* --------------------------------------------------
- :: Sub Header
- ---------------------------------------------------*/
-#option-tree-sub-header {
- margin: 0 2px 0 5px;
-}
-
-/* --------------------------------------------------
- :: Tabs
- ---------------------------------------------------*/
-.wrap.settings-wrap .ui-tabs-nav {
- float: right;
- margin: 0 -4px 0 0;
-}
-.wrap.settings-wrap .ui-tabs-nav li {
- border-left-width: 0;
- border-right-width: 1px;
- -webkit-border-radius: 0 2px 2px 0;
- -moz-border-radius: 0 2px 2px 0;
- border-radius: 0 2px 2px 0;
-}
-.wrap.settings-wrap .ui-tabs-nav li a {
- padding: 5px 12px 5px 5px;
-}
-
-/* --------------------------------------------------
- :: Format Setting
- ---------------------------------------------------*/
-.format-setting .format-setting-inner {
- float: right;
-}
-.format-setting .description {
- float: left;
-}
-#post .format-setting-inner p {
- float: right;
-}
-.docs-ul li {
- margin-left: 0;
- margin-right: 20px;
-}
-#contextual-help-setting {
- float: right;
-}
-#contextual-help-label {
- float: right;
-}
-#option_tree_settings_help {
- float: right;
-}
-#option-tree-settings-api blockquote {
- padding-left: 0;
- padding-right: 15px;
-}
-#option-tree-settings-api blockquote:before {
- left: auto;
- right: -10px;
- top: 10px;
-}
-
-/* --------------------------------------------------
- :: Input & Upload
- ---------------------------------------------------*/
-input.option-tree-ui-upload-input,
-input.option-tree-ui-input {
- -moz-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- -webkit-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
-}
-.option-tree-sortable input.option-tree-ui-upload-input,
-.option-tree-sortable input.option-tree-ui-input {
- width: 99.9%; /* fixes a strange bug with input with */
-}
-
-/* --------------------------------------------------
- :: Upload
- ---------------------------------------------------*/
-div.option-tree-ui-media-wrap {
- margin: 5px 0 0 55px;
-}
-.option-tree-ui-media-wrap img {
- float: right;
-}
-.option-tree-ui-upload-parent {
- margin-right: 0;
- margin-left: 45px;
-}
-.format-setting .ot_upload_media {
- right: auto;
- left: -45px;
-}
-.option-tree-ui-media-wrap a.option-tree-ui-remove-media {
- right: auto;
- left: -55px;
-}
-
-/* --------------------------------------------------
- :: Setting Item with Drag & Drop
- ---------------------------------------------------*/
-.option-tree-setting .open {
- padding: 10px 10px 10px 100px;
-}
-.option-tree-setting .open:hover:before {
- left: auto;
- right: 4px;
-}
-.button-section {
- right: auto;
- left: 0px;
-}
-
-/* --------------------------------------------------
- :: Layouts
- ---------------------------------------------------*/
-#option-tree-options-layouts-form {
- left: auto;
- right: 13px;
-}
-.option-tree-save-layout {
- float: right;
-}
-.option-tree-save-layout.active-layout {
- border-left: 0;
- border-right: 1px solid #fff;
- padding-left: 0;
- padding-right: 9px;
-}
-.option-tree-save-layout .widefat {
- float: right;
-}
-.option-tree-save-layout button.blue {
- margin: 0 10px 0 0;
-}
-.option-tree-active-layout {
- border-right: 0;
- border-left: 1px solid #ccc;
- float: right;
- padding: 10px 0 10px 10px;
-}
-.button.save-layout {
- margin: 0 10px 0 0 !important;
-}
-
-/* --------------------------------------------------
- :: Option Group
- ---------------------------------------------------*/
-.ot-option-group {
- float: right;
- padding-right: 0px;
- padding-left: 5px;
-}
-.ot-option-group--is-last {
- padding-left: 0;
-}
-.ot-option-group--icon {
- border-left: 1px solid #ccc;
- border-right: 0px;
- left: auto;
- right: 1px;
-}
-.ot-option-group--icon + input.option-tree-ui-input {
- padding-left: 5px !important;
- padding-right: 34px !important;
- margin-left: 5px;
- margin-right: 0px;
-}
-.ot-option-group--checkbox {
- float: right;
- padding-right: 0px;
- padding-left: 10px;
-}
-#post-body .ot-option-group--checkbox p {
- float: right;
-}
-
-/* --------------------------------------------------
- :: Select
- ---------------------------------------------------*/
-.select-wrapper {
- background: #fff url(../images/ot-select-rtl.png) no-repeat left center;
- float: right;
- margin: 0 0 5px 5px;
- -moz-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- -webkit-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
-}
-.select-wrapper:hover {
- background-image: url(../images/ot-select-hover-rtl.png);
-}
-.select-wrapper span {
- padding-left: 27px;
- padding-right: 7px;
-}
-.type-measurement .select-wrapper {
- margin-left: 0;
- right: auto;
- left: 0px;
-}
-/* FireFox */
-@-moz-document url-prefix() {
- #option-tree-options-layouts-form .select-wrapper {
- left: auto;
- right: 250px;
- };
-}
-
-/* --------------------------------------------------
- :: Measurement
- ---------------------------------------------------*/
-.option-tree-ui-measurement-input-wrap {
- margin-right: 0;
- margin-left: 80px;
-}
-
-/* --------------------------------------------------
- :: Checkbox & Radio
- ---------------------------------------------------*/
-.format-setting.type-checkbox input,
-.format-setting.type-radio input {
- float: right;
- margin: 2px 1px 0 5px;
-}
-.format-setting.type-checkbox label,
-.format-setting.type-radio label {
- float: right;
-}
-#option-tree-settings-api .format-setting.type-checkbox p,
-#option-tree-settings-api .format-setting.type-radio p {
- float: right;
-}
-
-/* --------------------------------------------------
- :: Radio Images
- ---------------------------------------------------*/
-.type-radio-image .option-tree-ui-radio-images {
- float: right;
- margin: 0 0px 10px 10px;
-}
-
-/* --------------------------------------------------
- :: Numeric Slider
- ---------------------------------------------------*/
-.ot-numeric-slider-wrap {
- margin: 0 0 0 96px;
-}
-.ot-numeric-slider-wrap .ot-numeric-slider-helper-input {
- right: auto;
- left: 5px;
-}
-.ot-numeric-slider.ui-slider {
- -webkit-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
-}
-
-/* --------------------------------------------------
- :: Colorpicker
- ---------------------------------------------------*/
-.option-tree-ui-colorpicker-input-wrap {
- float: right;
-}
-.option-tree-ui-colorpicker-input-wrap .option-tree-ui-colorpicker-label {
- margin-left: 10px;
- margin-right: 0px;
-}
-.type-link-color .option-tree-ui-colorpicker-input-wrap {
- margin-left: 20px;
- margin-right: 0px;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-color-result {
- margin: 0px 0px 5px 5px;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-picker-container .iris-picker {
- margin: 0px 0px 5px 5px;
-}
-
-/* --------------------------------------------------
- :: Google Font
- ---------------------------------------------------*/
-.js-remove-google-font.option-tree-ui-button.button {
- margin-left: 5px;
- margin-right: 0;
- margin-top: 0;
-}
-
-/* --------------------------------------------------
- :: OptionTree UI Buttons
- ---------------------------------------------------*/
-.option-tree-ui-button {
- float: right !important;
-}
-.option-tree-ui-button.right {
- float: left !important;
-}
-.option-tree-ui-button.hug-left {
- margin-right: 0px;
-}
-.option-tree-ui-button.hug-right {
- margin-left: 0px;
-}
-.option-tree-ui-button.left-item {
- float: right !important;
- margin: 5px 5px 5px 0;
- -webkit-border-radius: 0px 2px 2px 0px;
- -moz-border-radius: 0px 2px 2px 0px;
- border-radius: 0px 2px 2px 0px;
-}
-.option-tree-ui-button.center-item {
- margin: 5px -1px 5px 0;
-}
-.option-tree-ui-button.right-item {
- float: left !important;
- margin: 5px -1px 5px 5px;
- -webkit-border-radius: 2px 0px 0px 2px;
- -moz-border-radius: 2px 0px 0px 2px;
- border-radius: 2px 0px 0px 2px;
-}
-.option-tree-ui-buttons {
- margin: 11px 2px 0 5px;
-}
-button.reset-settings {
- left: auto;
- right: 8px;
-}
-
-/* --------------------------------------------------
- :: OptionTree UI Button Icons
- ---------------------------------------------------*/
-.option-tree-ui-button .icon {
- float: right;
- text-indent: 0;
-}
-.option-tree-ui-button .icon.left-label {
- margin-left: 10px;
- float: left;
-}
-
-/* --------------------------------------------------
- :: Gallery
- ---------------------------------------------------*/
-ul.ot-gallery-list {
- float: right;
-}
-ul.ot-gallery-list li {
- float: right;
- margin: 0px 0 10px 10px;
-}
-.ot-gallery-buttons {
- float: right;
-}
-
-/* --------------------------------------------------
- :: Google Fonts
- ---------------------------------------------------*/
-.option-tree-google-font-family,
-.option-tree-google-font-variants,
-.option-tree-google-font-subsets,
-#option-tree-settings-api p.checkbox-wrap,
-#post-body .ot-metabox-panels p.checkbox-wrap {
- float: right;
-}
-
-/* --------------------------------------------------
- :: On/Off Switch
- ---------------------------------------------------*/
-@media only screen {
- .on-off-switch {
- -webkit-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.05);
- }
- .on-off-switch label {
- float: right;
- }
- .on-off-switch .slide-button {
- left: auto;
- right: -1px;
- }
- .on-off-switch input:last-of-type:checked ~ .slide-button {
- left: auto;
- right: 50%;
- }
-}
-
-/* --------------------------------------------------
- :: Date Picker
- ---------------------------------------------------*/
-.ui-datepicker {
- direction: rtl;
-}
-.ui-datepicker .ui-widget-header {
- left: auto;
- right: -1px;
-}
-.ui-datepicker-prev:before {
- border-right: 0px;
- border-left: 1px solid #555;
- content: "\f105";
- float: left;
- width: 31px;
- height: 30px;
-}
-.ui-datepicker-prev {
- border-right: 0px;
- border-left: 1px solid #333;
- float: right;
- width: 31px;
-}
-.ui-datepicker-next:before {
- border-left: 0px;
- border-right: 1px solid #333;
- content: "\f104";
- float: right;
- width: 30px;
- height: 30px;
-}
-.ui-datepicker-next {
- border-left: 0px;
- border-right: 1px solid #555;
- float: left;
- width: 30px;
-}
-.ui-datepicker thead th:last-child {
- border-left: 1px solid #ccc;
-}
-.ui-datepicker tbody td {
- border-left: 1px solid #ccc;
-}
-.ui-datepicker tbody td:first-child {
- border-left: 0px;
-}
-.ui-datepicker .ui-datepicker-buttonpane button {
- float: left;
-}
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
- float: right;
-}
-@-moz-document url-prefix() {
- .ui-datepicker-calendar {
- position: relative;
- right: -1px;
- }
- .ui-datepicker-calendar thead {
- border-right: 1px solid #ccc;
- }
-}
-
-/* --------------------------------------------------
- :: Time Picker
- ---------------------------------------------------*/
-.ui-timepicker-div {
- direction: rtl;
-}
-.ui-timepicker-div dl {
- text-align: right;
- padding: 0 5px 0 0;
-}
-.ui-timepicker-div dl dt {
- float: right;
- clear: right;
-}
-.ui-timepicker-div dl dd {
- margin: 0 45% 10px 10px;
-}
-
-/* --------------------------------------------------
- :: Meta Box Tabs
- ---------------------------------------------------*/
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- float: right;
- margin: 0 0 0 -1px;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li {
- border-width: 1px 1px 1px 0px;
- -webkit-border-radius: 0 0 2px 2px;
- -moz-border-radius: 0 0 2px 2px;
- border-radius: 0 0 2px 2px;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a {
- padding: 5px 12px 5px 5px;
-}
-
-/* --------------------------------------------------
- :: Theme Option & Side Metabox Tabs
- ---------------------------------------------------*/
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li.ui-state-default,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-default {
- float: right;
- margin: 0 3px 0 0 !important;
-}
\ No newline at end of file
diff --git a/option-tree/assets/css/ot-admin.css b/option-tree/assets/css/ot-admin.css
deleted file mode 100644
index 591b136..0000000
--- a/option-tree/assets/css/ot-admin.css
+++ /dev/null
@@ -1,3973 +0,0 @@
-/* --------------------------------------------------
- :: OptionTree Font
- ---------------------------------------------------*/
-@font-face {
- font-family: "option-tree-font";
- src:url("../fonts/option-tree-font.eot");
- src:url("../fonts/option-tree-font.eot?#iefix") format("embedded-opentype"),
- url("../fonts/option-tree-font.woff") format("woff"),
- url("../fonts/option-tree-font.ttf") format("truetype"),
- url("../fonts/option-tree-font.svg#option-tree-font") format("svg");
- font-weight: normal;
- font-style: normal;
-}
-
-[class^="ot-icon-"],
-[class*=" ot-icon-"] {
- font-family: "option-tree-font";
- speak: none;
- font-style: normal;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.ui-tabs li > a [class^="ot-icon-"],
-.ui-tabs li > a [class*=" ot-icon-"] {
- padding-right: 5px;
- line-height: 18px;
- vertical-align: middle;
-}
-
-.ot-icon-option-tree:before {
- content: "\e785";
-}
-.ot-icon-glass:before {
- content: "\f000";
-}
-.ot-icon-music:before {
- content: "\f001";
-}
-.ot-icon-search:before {
- content: "\f002";
-}
-.ot-icon-envelope-o:before {
- content: "\f003";
-}
-.ot-icon-heart:before {
- content: "\f004";
-}
-.ot-icon-star:before {
- content: "\f005";
-}
-.ot-icon-star-o:before {
- content: "\f006";
-}
-.ot-icon-user:before {
- content: "\f007";
-}
-.ot-icon-film:before {
- content: "\f008";
-}
-.ot-icon-th-large:before {
- content: "\f009";
-}
-.ot-icon-th:before {
- content: "\f00a";
-}
-.ot-icon-th-list:before {
- content: "\f00b";
-}
-.ot-icon-check:before {
- content: "\f00c";
-}
-.ot-icon-times:before {
- content: "\f00d";
-}
-.ot-icon-search-plus:before {
- content: "\f00e";
-}
-.ot-icon-search-minus:before {
- content: "\f010";
-}
-.ot-icon-power-off:before {
- content: "\f011";
-}
-.ot-icon-signal:before {
- content: "\f012";
-}
-.ot-icon-gear:before {
- content: "\f013";
-}
-.ot-icon-trash-o:before {
- content: "\f014";
-}
-.ot-icon-home:before {
- content: "\f015";
-}
-.ot-icon-file-o:before {
- content: "\f016";
-}
-.ot-icon-clock-o:before {
- content: "\f017";
-}
-.ot-icon-road:before {
- content: "\f018";
-}
-.ot-icon-download:before {
- content: "\f019";
-}
-.ot-icon-arrow-circle-o-down:before {
- content: "\f01a";
-}
-.ot-icon-arrow-circle-o-up:before {
- content: "\f01b";
-}
-.ot-icon-inbox:before {
- content: "\f01c";
-}
-.ot-icon-play-circle-o:before {
- content: "\f01d";
-}
-.ot-icon-rotate-right:before {
- content: "\f01e";
-}
-.ot-icon-refresh:before {
- content: "\f021";
-}
-.ot-icon-list-alt:before {
- content: "\f022";
-}
-.ot-icon-lock:before {
- content: "\f023";
-}
-.ot-icon-flag:before {
- content: "\f024";
-}
-.ot-icon-headphones:before {
- content: "\f025";
-}
-.ot-icon-volume-off:before {
- content: "\f026";
-}
-.ot-icon-volume-down:before {
- content: "\f027";
-}
-.ot-icon-volume-up:before {
- content: "\f028";
-}
-.ot-icon-qrcode:before {
- content: "\f029";
-}
-.ot-icon-barcode:before {
- content: "\f02a";
-}
-.ot-icon-tag:before {
- content: "\f02b";
-}
-.ot-icon-tags:before {
- content: "\f02c";
-}
-.ot-icon-book:before {
- content: "\f02d";
-}
-.ot-icon-bookmark:before {
- content: "\f02e";
-}
-.ot-icon-print:before {
- content: "\f02f";
-}
-.ot-icon-camera:before {
- content: "\f030";
-}
-.ot-icon-font:before {
- content: "\f031";
-}
-.ot-icon-bold:before {
- content: "\f032";
-}
-.ot-icon-italic:before {
- content: "\f033";
-}
-.ot-icon-text-height:before {
- content: "\f034";
-}
-.ot-icon-text-width:before {
- content: "\f035";
-}
-.ot-icon-align-left:before {
- content: "\f036";
-}
-.ot-icon-align-center:before {
- content: "\f037";
-}
-.ot-icon-align-right:before {
- content: "\f038";
-}
-.ot-icon-align-justify:before {
- content: "\f039";
-}
-.ot-icon-list:before {
- content: "\f03a";
-}
-.ot-icon-dedent:before {
- content: "\f03b";
-}
-.ot-icon-indent:before {
- content: "\f03c";
-}
-.ot-icon-video-camera:before {
- content: "\f03d";
-}
-.ot-icon-picture-o:before {
- content: "\f03e";
-}
-.ot-icon-pencil:before {
- content: "\f040";
-}
-.ot-icon-map-marker:before {
- content: "\f041";
-}
-.ot-icon-adjust:before {
- content: "\f042";
-}
-.ot-icon-tint:before {
- content: "\f043";
-}
-.ot-icon-edit:before {
- content: "\f044";
-}
-.ot-icon-share-square-o:before {
- content: "\f045";
-}
-.ot-icon-check-square-o:before {
- content: "\f046";
-}
-.ot-icon-arrows:before {
- content: "\f047";
-}
-.ot-icon-step-backward:before {
- content: "\f048";
-}
-.ot-icon-fast-backward:before {
- content: "\f049";
-}
-.ot-icon-backward:before {
- content: "\f04a";
-}
-.ot-icon-play:before {
- content: "\f04b";
-}
-.ot-icon-pause:before {
- content: "\f04c";
-}
-.ot-icon-stop:before {
- content: "\f04d";
-}
-.ot-icon-forward:before {
- content: "\f04e";
-}
-.ot-icon-fast-forward:before {
- content: "\f050";
-}
-.ot-icon-step-forward:before {
- content: "\f051";
-}
-.ot-icon-eject:before {
- content: "\f052";
-}
-.ot-icon-chevron-left:before {
- content: "\f053";
-}
-.ot-icon-chevron-right:before {
- content: "\f054";
-}
-.ot-icon-plus-circle:before {
- content: "\f055";
-}
-.ot-icon-minus-circle:before {
- content: "\f056";
-}
-.ot-icon-times-circle:before {
- content: "\f057";
-}
-.ot-icon-check-circle:before {
- content: "\f058";
-}
-.ot-icon-question-circle:before {
- content: "\f059";
-}
-.ot-icon-info-circle:before {
- content: "\f05a";
-}
-.ot-icon-crosshairs:before {
- content: "\f05b";
-}
-.ot-icon-times-circle-o:before {
- content: "\f05c";
-}
-.ot-icon-check-circle-o:before {
- content: "\f05d";
-}
-.ot-icon-ban:before {
- content: "\f05e";
-}
-.ot-icon-arrow-left:before {
- content: "\f060";
-}
-.ot-icon-arrow-right:before {
- content: "\f061";
-}
-.ot-icon-arrow-up:before {
- content: "\f062";
-}
-.ot-icon-arrow-down:before {
- content: "\f063";
-}
-.ot-icon-mail-forward:before {
- content: "\f064";
-}
-.ot-icon-expand:before {
- content: "\f065";
-}
-.ot-icon-compress:before {
- content: "\f066";
-}
-.ot-icon-plus:before {
- content: "\f067";
-}
-.ot-icon-minus:before {
- content: "\f068";
-}
-.ot-icon-asterisk:before {
- content: "\f069";
-}
-.ot-icon-exclamation-circle:before {
- content: "\f06a";
-}
-.ot-icon-gift:before {
- content: "\f06b";
-}
-.ot-icon-leaf:before {
- content: "\f06c";
-}
-.ot-icon-fire:before {
- content: "\f06d";
-}
-.ot-icon-eye:before {
- content: "\f06e";
-}
-.ot-icon-eye-slash:before {
- content: "\f070";
-}
-.ot-icon-warning:before {
- content: "\f071";
-}
-.ot-icon-plane:before {
- content: "\f072";
-}
-.ot-icon-calendar:before {
- content: "\f073";
-}
-.ot-icon-random:before {
- content: "\f074";
-}
-.ot-icon-comment:before {
- content: "\f075";
-}
-.ot-icon-magnet:before {
- content: "\f076";
-}
-.ot-icon-chevron-up:before {
- content: "\f077";
-}
-.ot-icon-chevron-down:before {
- content: "\f078";
-}
-.ot-icon-retweet:before {
- content: "\f079";
-}
-.ot-icon-shopping-cart:before {
- content: "\f07a";
-}
-.ot-icon-folder:before {
- content: "\f07b";
-}
-.ot-icon-folder-open:before {
- content: "\f07c";
-}
-.ot-icon-arrows-v:before {
- content: "\f07d";
-}
-.ot-icon-arrows-h:before {
- content: "\f07e";
-}
-.ot-icon-bar-chart-o:before {
- content: "\f080";
-}
-.ot-icon-twitter-square:before {
- content: "\f081";
-}
-.ot-icon-facebook-square:before {
- content: "\f082";
-}
-.ot-icon-camera-retro:before {
- content: "\f083";
-}
-.ot-icon-key:before {
- content: "\f084";
-}
-.ot-icon-gears:before {
- content: "\f085";
-}
-.ot-icon-comments:before {
- content: "\f086";
-}
-.ot-icon-thumbs-o-up:before {
- content: "\f087";
-}
-.ot-icon-thumbs-o-down:before {
- content: "\f088";
-}
-.ot-icon-star-half:before {
- content: "\f089";
-}
-.ot-icon-heart-o:before {
- content: "\f08a";
-}
-.ot-icon-sign-out:before {
- content: "\f08b";
-}
-.ot-icon-linkedin-square:before {
- content: "\f08c";
-}
-.ot-icon-thumb-tack:before {
- content: "\f08d";
-}
-.ot-icon-external-link:before {
- content: "\f08e";
-}
-.ot-icon-sign-in:before {
- content: "\f090";
-}
-.ot-icon-trophy:before {
- content: "\f091";
-}
-.ot-icon-github-square:before {
- content: "\f092";
-}
-.ot-icon-upload:before {
- content: "\f093";
-}
-.ot-icon-lemon-o:before {
- content: "\f094";
-}
-.ot-icon-phone:before {
- content: "\f095";
-}
-.ot-icon-square-o:before {
- content: "\f096";
-}
-.ot-icon-bookmark-o:before {
- content: "\f097";
-}
-.ot-icon-phone-square:before {
- content: "\f098";
-}
-.ot-icon-twitter:before {
- content: "\f099";
-}
-.ot-icon-facebook:before {
- content: "\f09a";
-}
-.ot-icon-github:before {
- content: "\f09b";
-}
-.ot-icon-unlock:before {
- content: "\f09c";
-}
-.ot-icon-credit-card:before {
- content: "\f09d";
-}
-.ot-icon-rss:before {
- content: "\f09e";
-}
-.ot-icon-hdd-o:before {
- content: "\f0a0";
-}
-.ot-icon-bullhorn:before {
- content: "\f0a1";
-}
-.ot-icon-bell:before {
- content: "\f0a2";
-}
-.ot-icon-certificate:before {
- content: "\f0a3";
-}
-.ot-icon-hand-o-right:before {
- content: "\f0a4";
-}
-.ot-icon-hand-o-left:before {
- content: "\f0a5";
-}
-.ot-icon-hand-o-up:before {
- content: "\f0a6";
-}
-.ot-icon-hand-o-down:before {
- content: "\f0a7";
-}
-.ot-icon-arrow-circle-left:before {
- content: "\f0a8";
-}
-.ot-icon-arrow-circle-right:before {
- content: "\f0a9";
-}
-.ot-icon-arrow-circle-up:before {
- content: "\f0aa";
-}
-.ot-icon-arrow-circle-down:before {
- content: "\f0ab";
-}
-.ot-icon-globe:before {
- content: "\f0ac";
-}
-.ot-icon-wrench:before {
- content: "\f0ad";
-}
-.ot-icon-tasks:before {
- content: "\f0ae";
-}
-.ot-icon-filter:before {
- content: "\f0b0";
-}
-.ot-icon-briefcase:before {
- content: "\f0b1";
-}
-.ot-icon-arrows-alt:before {
- content: "\f0b2";
-}
-.ot-icon-group:before {
- content: "\f0c0";
-}
-.ot-icon-chain:before {
- content: "\f0c1";
-}
-.ot-icon-cloud:before {
- content: "\f0c2";
-}
-.ot-icon-flask:before {
- content: "\f0c3";
-}
-.ot-icon-cut:before {
- content: "\f0c4";
-}
-.ot-icon-copy:before {
- content: "\f0c5";
-}
-.ot-icon-paperclip:before {
- content: "\f0c6";
-}
-.ot-icon-save:before {
- content: "\f0c7";
-}
-.ot-icon-square:before {
- content: "\f0c8";
-}
-.ot-icon-bars:before {
- content: "\f0c9";
-}
-.ot-icon-list-ul:before {
- content: "\f0ca";
-}
-.ot-icon-list-ol:before {
- content: "\f0cb";
-}
-.ot-icon-strikethrough:before {
- content: "\f0cc";
-}
-.ot-icon-underline:before {
- content: "\f0cd";
-}
-.ot-icon-table:before {
- content: "\f0ce";
-}
-.ot-icon-magic:before {
- content: "\f0d0";
-}
-.ot-icon-truck:before {
- content: "\f0d1";
-}
-.ot-icon-pinterest:before {
- content: "\f0d2";
-}
-.ot-icon-pinterest-square:before {
- content: "\f0d3";
-}
-.ot-icon-google-plus-square:before {
- content: "\f0d4";
-}
-.ot-icon-google-plus:before {
- content: "\f0d5";
-}
-.ot-icon-money:before {
- content: "\f0d6";
-}
-.ot-icon-caret-down:before {
- content: "\f0d7";
-}
-.ot-icon-caret-up:before {
- content: "\f0d8";
-}
-.ot-icon-caret-left:before {
- content: "\f0d9";
-}
-.ot-icon-caret-right:before {
- content: "\f0da";
-}
-.ot-icon-columns:before {
- content: "\f0db";
-}
-.ot-icon-unsorted:before {
- content: "\f0dc";
-}
-.ot-icon-sort-down:before {
- content: "\f0dd";
-}
-.ot-icon-sort-up:before {
- content: "\f0de";
-}
-.ot-icon-envelope:before {
- content: "\f0e0";
-}
-.ot-icon-linkedin:before {
- content: "\f0e1";
-}
-.ot-icon-rotate-left:before {
- content: "\f0e2";
-}
-.ot-icon-legal:before {
- content: "\f0e3";
-}
-.ot-icon-dashboard:before {
- content: "\f0e4";
-}
-.ot-icon-comment-o:before {
- content: "\f0e5";
-}
-.ot-icon-comments-o:before {
- content: "\f0e6";
-}
-.ot-icon-flash:before {
- content: "\f0e7";
-}
-.ot-icon-sitemap:before {
- content: "\f0e8";
-}
-.ot-icon-umbrella:before {
- content: "\f0e9";
-}
-.ot-icon-paste:before {
- content: "\f0ea";
-}
-.ot-icon-lightbulb-o:before {
- content: "\f0eb";
-}
-.ot-icon-exchange:before {
- content: "\f0ec";
-}
-.ot-icon-cloud-download:before {
- content: "\f0ed";
-}
-.ot-icon-cloud-upload:before {
- content: "\f0ee";
-}
-.ot-icon-user-md:before {
- content: "\f0f0";
-}
-.ot-icon-stethoscope:before {
- content: "\f0f1";
-}
-.ot-icon-suitcase:before {
- content: "\f0f2";
-}
-.ot-icon-bell-o:before {
- content: "\f0f3";
-}
-.ot-icon-coffee:before {
- content: "\f0f4";
-}
-.ot-icon-cutlery:before {
- content: "\f0f5";
-}
-.ot-icon-file-text-o:before {
- content: "\f0f6";
-}
-.ot-icon-building-o:before {
- content: "\f0f7";
-}
-.ot-icon-hospital-o:before {
- content: "\f0f8";
-}
-.ot-icon-ambulance:before {
- content: "\f0f9";
-}
-.ot-icon-medkit:before {
- content: "\f0fa";
-}
-.ot-icon-fighter-jet:before {
- content: "\f0fb";
-}
-.ot-icon-beer:before {
- content: "\f0fc";
-}
-.ot-icon-h-square:before {
- content: "\f0fd";
-}
-.ot-icon-plus-square:before {
- content: "\f0fe";
-}
-.ot-icon-angle-double-left:before {
- content: "\f100";
-}
-.ot-icon-angle-double-right:before {
- content: "\f101";
-}
-.ot-icon-angle-double-up:before {
- content: "\f102";
-}
-.ot-icon-angle-double-down:before {
- content: "\f103";
-}
-.ot-icon-angle-left:before {
- content: "\f104";
-}
-.ot-icon-angle-right:before {
- content: "\f105";
-}
-.ot-icon-angle-up:before {
- content: "\f106";
-}
-.ot-icon-angle-down:before {
- content: "\f107";
-}
-.ot-icon-desktop:before {
- content: "\f108";
-}
-.ot-icon-laptop:before {
- content: "\f109";
-}
-.ot-icon-tablet:before {
- content: "\f10a";
-}
-.ot-icon-mobile-phone:before {
- content: "\f10b";
-}
-.ot-icon-circle-o:before {
- content: "\f10c";
-}
-.ot-icon-quote-left:before {
- content: "\f10d";
-}
-.ot-icon-quote-right:before {
- content: "\f10e";
-}
-.ot-icon-spinner:before {
- content: "\f110";
-}
-.ot-icon-circle:before {
- content: "\f111";
-}
-.ot-icon-mail-reply:before {
- content: "\f112";
-}
-.ot-icon-github-alt:before {
- content: "\f113";
-}
-.ot-icon-folder-o:before {
- content: "\f114";
-}
-.ot-icon-folder-open-o:before {
- content: "\f115";
-}
-.ot-icon-smile-o:before {
- content: "\f118";
-}
-.ot-icon-frown-o:before {
- content: "\f119";
-}
-.ot-icon-meh-o:before {
- content: "\f11a";
-}
-.ot-icon-gamepad:before {
- content: "\f11b";
-}
-.ot-icon-keyboard-o:before {
- content: "\f11c";
-}
-.ot-icon-flag-o:before {
- content: "\f11d";
-}
-.ot-icon-flag-checkered:before {
- content: "\f11e";
-}
-.ot-icon-terminal:before {
- content: "\f120";
-}
-.ot-icon-code:before {
- content: "\f121";
-}
-.ot-icon-reply-all:before {
- content: "\f122";
-}
-.ot-icon-star-half-empty:before {
- content: "\f123";
-}
-.ot-icon-location-arrow:before {
- content: "\f124";
-}
-.ot-icon-crop:before {
- content: "\f125";
-}
-.ot-icon-code-fork:before {
- content: "\f126";
-}
-.ot-icon-unlink:before {
- content: "\f127";
-}
-.ot-icon-question:before {
- content: "\f128";
-}
-.ot-icon-info:before {
- content: "\f129";
-}
-.ot-icon-exclamation:before {
- content: "\f12a";
-}
-.ot-icon-superscript:before {
- content: "\f12b";
-}
-.ot-icon-subscript:before {
- content: "\f12c";
-}
-.ot-icon-eraser:before {
- content: "\f12d";
-}
-.ot-icon-puzzle-piece:before {
- content: "\f12e";
-}
-.ot-icon-microphone:before {
- content: "\f130";
-}
-.ot-icon-microphone-slash:before {
- content: "\f131";
-}
-.ot-icon-shield:before {
- content: "\f132";
-}
-.ot-icon-calendar-o:before {
- content: "\f133";
-}
-.ot-icon-fire-extinguisher:before {
- content: "\f134";
-}
-.ot-icon-rocket:before {
- content: "\f135";
-}
-.ot-icon-maxcdn:before {
- content: "\f136";
-}
-.ot-icon-chevron-circle-left:before {
- content: "\f137";
-}
-.ot-icon-chevron-circle-right:before {
- content: "\f138";
-}
-.ot-icon-chevron-circle-up:before {
- content: "\f139";
-}
-.ot-icon-chevron-circle-down:before {
- content: "\f13a";
-}
-.ot-icon-html5:before {
- content: "\f13b";
-}
-.ot-icon-css3:before {
- content: "\f13c";
-}
-.ot-icon-anchor:before {
- content: "\f13d";
-}
-.ot-icon-unlock-alt:before {
- content: "\f13e";
-}
-.ot-icon-bullseye:before {
- content: "\f140";
-}
-.ot-icon-ellipsis-h:before {
- content: "\f141";
-}
-.ot-icon-ellipsis-v:before {
- content: "\f142";
-}
-.ot-icon-rss-square:before {
- content: "\f143";
-}
-.ot-icon-play-circle:before {
- content: "\f144";
-}
-.ot-icon-ticket:before {
- content: "\f145";
-}
-.ot-icon-minus-square:before {
- content: "\f146";
-}
-.ot-icon-minus-square-o:before {
- content: "\f147";
-}
-.ot-icon-level-up:before {
- content: "\f148";
-}
-.ot-icon-level-down:before {
- content: "\f149";
-}
-.ot-icon-check-square:before {
- content: "\f14a";
-}
-.ot-icon-pencil-square:before {
- content: "\f14b";
-}
-.ot-icon-external-link-square:before {
- content: "\f14c";
-}
-.ot-icon-share-square:before {
- content: "\f14d";
-}
-.ot-icon-compass:before {
- content: "\f14e";
-}
-.ot-icon-toggle-down:before {
- content: "\f150";
-}
-.ot-icon-toggle-up:before {
- content: "\f151";
-}
-.ot-icon-toggle-right:before {
- content: "\f152";
-}
-.ot-icon-euro:before {
- content: "\f153";
-}
-.ot-icon-gbp:before {
- content: "\f154";
-}
-.ot-icon-dollar:before {
- content: "\f155";
-}
-.ot-icon-rupee:before {
- content: "\f156";
-}
-.ot-icon-cny:before {
- content: "\f157";
-}
-.ot-icon-ruble:before {
- content: "\f158";
-}
-.ot-icon-won:before {
- content: "\f159";
-}
-.ot-icon-bitcoin:before {
- content: "\f15a";
-}
-.ot-icon-file:before {
- content: "\f15b";
-}
-.ot-icon-file-text:before {
- content: "\f15c";
-}
-.ot-icon-sort-alpha-asc:before {
- content: "\f15d";
-}
-.ot-icon-sort-alpha-desc:before {
- content: "\f15e";
-}
-.ot-icon-sort-amount-asc:before {
- content: "\f160";
-}
-.ot-icon-sort-amount-desc:before {
- content: "\f161";
-}
-.ot-icon-sort-numeric-asc:before {
- content: "\f162";
-}
-.ot-icon-sort-numeric-desc:before {
- content: "\f163";
-}
-.ot-icon-thumbs-up:before {
- content: "\f164";
-}
-.ot-icon-thumbs-down:before {
- content: "\f165";
-}
-.ot-icon-youtube-square:before {
- content: "\f166";
-}
-.ot-icon-youtube:before {
- content: "\f167";
-}
-.ot-icon-xing:before {
- content: "\f168";
-}
-.ot-icon-xing-square:before {
- content: "\f169";
-}
-.ot-icon-youtube-play:before {
- content: "\f16a";
-}
-.ot-icon-dropbox:before {
- content: "\f16b";
-}
-.ot-icon-stack-overflow:before {
- content: "\f16c";
-}
-.ot-icon-instagram:before {
- content: "\f16d";
-}
-.ot-icon-flickr:before {
- content: "\f16e";
-}
-.ot-icon-adn:before {
- content: "\f170";
-}
-.ot-icon-bitbucket:before {
- content: "\f171";
-}
-.ot-icon-bitbucket-square:before {
- content: "\f172";
-}
-.ot-icon-tumblr:before {
- content: "\f173";
-}
-.ot-icon-tumblr-square:before {
- content: "\f174";
-}
-.ot-icon-long-arrow-down:before {
- content: "\f175";
-}
-.ot-icon-long-arrow-up:before {
- content: "\f176";
-}
-.ot-icon-long-arrow-left:before {
- content: "\f177";
-}
-.ot-icon-long-arrow-right:before {
- content: "\f178";
-}
-.ot-icon-apple:before {
- content: "\f179";
-}
-.ot-icon-windows:before {
- content: "\f17a";
-}
-.ot-icon-android:before {
- content: "\f17b";
-}
-.ot-icon-linux:before {
- content: "\f17c";
-}
-.ot-icon-dribbble:before {
- content: "\f17d";
-}
-.ot-icon-skype:before {
- content: "\f17e";
-}
-.ot-icon-foursquare:before {
- content: "\f180";
-}
-.ot-icon-trello:before {
- content: "\f181";
-}
-.ot-icon-female:before {
- content: "\f182";
-}
-.ot-icon-male:before {
- content: "\f183";
-}
-.ot-icon-gittip:before {
- content: "\f184";
-}
-.ot-icon-sun-o:before {
- content: "\f185";
-}
-.ot-icon-moon-o:before {
- content: "\f186";
-}
-.ot-icon-archive:before {
- content: "\f187";
-}
-.ot-icon-bug:before {
- content: "\f188";
-}
-.ot-icon-vk:before {
- content: "\f189";
-}
-.ot-icon-weibo:before {
- content: "\f18a";
-}
-.ot-icon-renren:before {
- content: "\f18b";
-}
-.ot-icon-pagelines:before {
- content: "\f18c";
-}
-.ot-icon-stack-exchange:before {
- content: "\f18d";
-}
-.ot-icon-arrow-circle-o-right:before {
- content: "\f18e";
-}
-.ot-icon-arrow-circle-o-left:before {
- content: "\f190";
-}
-.ot-icon-toggle-left:before {
- content: "\f191";
-}
-.ot-icon-dot-circle-o:before {
- content: "\f192";
-}
-.ot-icon-wheelchair:before {
- content: "\f193";
-}
-.ot-icon-vimeo-square:before {
- content: "\f194";
-}
-.ot-icon-turkish-lira:before {
- content: "\f195";
-}
-.ot-icon-plus-square-o:before {
- content: "\f196";
-}
-
-/* --------------------------------------------------
- :: Screen Meta & Menu Icon
- ---------------------------------------------------*/
-.appearance_page_ot-theme-options #screen-meta {
- margin-right: 20px;
- margin-left: 2px;
- min-width: 533px;
-}
-
-/* --------------------------------------------------
- :: Messages
- ---------------------------------------------------*/
-.wrap.settings-wrap div.error,
-.wrap.settings-wrap div.updated {
- margin: 9px 5px 0px 2px !important;
-}
-
-/* --------------------------------------------------
- :: OptionTree Wrappers
- ---------------------------------------------------*/
-#option-tree-settings-api .metabox-holder {
- overflow: hidden;
-}
-#option-tree-settings-api .postbox {
- background: #fff;
- border: none;
- margin: 0 20px;
-}
-#option-tree-settings-api .inside {
- margin: 0px !important;
- padding: 0px !important;
-}
-#option-tree-settings-api > .ui-tabs {
- background: #fff;
- border: 1px solid #ccc;
- border-top: none;
- margin: 0px 5px 0 2px;
- min-width: 533px;
- padding-bottom: 5px;
- position: relative;
- -webkit-box-shadow: inset 146px 0 0 #f1f1f1, inset 147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: inset 146px 0 0 #f1f1f1, inset 147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: inset 146px 0 0 #f1f1f1, inset 147px 0 0 #ccc, 0 1px 3px rgba(0,0,0,0.05);
- -webkit-border-radius: 0 0 2px 2px;
- -moz-border-radius: 0 0 2px 2px;
- border-radius: 0 0 2px 2px;
-}
-
-/* --------------------------------------------------
- :: Header
- ---------------------------------------------------*/
-#option-tree-header-wrap {
- position: relative;
-}
-#option-tree-header {
- background: #333;
- color: #bbb;
- display: block;
- margin: 11px 5px 0 2px;
- min-width: 535px;
- overflow: hidden;
- position: relative;
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
-}
-#option-tree-header li {
- display: block;
- float: left;
- margin: 0px;
- padding: 0px;
-}
-#option-tree-header li a {
- color: #999;
- text-decoration: none;
- -webkit-transition: none;
- -moz-transition: none;
- transition: none;
-}
-#option-tree-header li a:hover {
- color: #0074a2;
-}
-#option-tree-header #option-tree-logo a {
- border-right: 1px solid #000;
- float: left;
- height: 24px;
- padding: 3px 12px 3px 13px;
- width: 20px;
-}
-#option-tree-header #option-tree-logo a:before {
- content: "\e785";
- font: normal 20px/1 "option-tree-font" !important;
- speak: none;
- padding: 2px 0;
- height: 24px;
- width: 20px;
- display: inline-block;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-transition: all .1s ease-in-out;
- -moz-transition: all .1s ease-in-out;
- transition: all .1s ease-in-out;
-}
-#option-tree-header li#option-tree-logo:hover {
- background-color: #222;
- color: #0074a2;
- -webkit-border-top-left-radius: 2px;
- -moz-border-radius-topleft: 2px;
- border-top-left-radius: 2px;
-}
-#option-tree-header li#option-tree-logo:hover a {
- border-right-color: #000;
-}
-#option-tree-header #option-tree-version span,
-#option-tree-header #theme-version span {
- border-left: 1px solid #444;
- display: block;
- float: left;
- height: 24px;
- line-height: 24px;
- padding: 3px 12px 3px 12px;
-}
-#option-tree-header #theme-version:before {
- border-right: 1px solid #000;
- content: "";
- display: block;
- float: left;
- height: 30px;
-}
-/* light */
-.admin-color-light #option-tree-header {
- background: #888;
- color: #fff;
-}
-.admin-color-light #option-tree-header li a {
- color: #ccc;
-}
-.admin-color-light #option-tree-header li a:hover {
- color: #eee;
-}
-.admin-color-light #option-tree-header #option-tree-logo a,
-.admin-color-light #option-tree-header #theme-version:before {
- border-right-color: #3c3c3c;
-}
-.admin-color-light #option-tree-header li#option-tree-logo:hover {
- background-color: #777;
-}
-.admin-color-light #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #3c3c3c;
-}
-.admin-color-light #option-tree-header #option-tree-version span,
-.admin-color-light #option-tree-header #theme-version span {
- border-left-color: #999;
-}
-/* blue */
-.admin-color-blue #option-tree-header {
- background: #52accc;
- color: #fff;
-}
-.admin-color-blue #option-tree-header li a {
- color: #e2f8ff;
-}
-.admin-color-blue #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-blue #option-tree-header #option-tree-logo a,
-.admin-color-blue #option-tree-header #theme-version:before {
- border-right-color: #002b39;
-}
-.admin-color-blue #option-tree-header li#option-tree-logo:hover {
- background-color: #006484;
-}
-.admin-color-blue #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #002b39;
-}
-.admin-color-blue #option-tree-header #option-tree-version span,
-.admin-color-blue #option-tree-header #theme-version span {
- border-left-color: #5dc2e6;
-}
-/* coffee */
-.admin-color-coffee #option-tree-header {
- background: #59524c;
- color: #c7cbc9;
-}
-.admin-color-coffee #option-tree-header li a {
- color: #f3f2f1;
-}
-.admin-color-coffee #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-coffee #option-tree-header #option-tree-logo a,
-.admin-color-coffee #option-tree-header #theme-version:before {
- border-right-color: #0f0e0d;
-}
-.admin-color-coffee #option-tree-header li#option-tree-logo:hover {
- background-color: #cca588;
-}
-.admin-color-coffee #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #0f0e0d;
-}
-.admin-color-coffee #option-tree-header #option-tree-version span,
-.admin-color-coffee #option-tree-header #theme-version span {
- border-left-color: #675f58;
-}
-/* ectoplasm */
-.admin-color-ectoplasm #option-tree-header {
- background: #523f6d;
- color: #c6c6d3;
-}
-.admin-color-ectoplasm #option-tree-header li a {
- color: #f3f2f1;
-}
-.admin-color-ectoplasm #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-ectoplasm #option-tree-header #option-tree-logo a,
-.admin-color-ectoplasm #option-tree-header #theme-version:before {
- border-right-color: #181220;
-}
-.admin-color-ectoplasm #option-tree-header li#option-tree-logo:hover {
- background-color: #a3b542;
-}
-.admin-color-ectoplasm #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #181220;
-}
-.admin-color-ectoplasm #option-tree-header #option-tree-version span,
-.admin-color-ectoplasm #option-tree-header #theme-version span {
- border-left-color: #644d85;
-}
-/* midnight */
-.admin-color-midnight #option-tree-header {
- background: #363b3f;
- color: #f1f2f3;
-}
-.admin-color-midnight #option-tree-header li a {
- color: #f1f2f3;
-}
-.admin-color-midnight #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-midnight #option-tree-header #option-tree-logo a,
-.admin-color-midnight #option-tree-header #theme-version:before {
- border-right-color: #090a0b;
-}
-.admin-color-midnight #option-tree-header li#option-tree-logo:hover {
- background-color: #ed543f;
-}
-.admin-color-midnight #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #090a0b;
-}
-.admin-color-midnight #option-tree-header #option-tree-version span,
-.admin-color-midnight #option-tree-header #theme-version span {
- border-left-color: #4c5359;
-}
-/* ocean */
-.admin-color-ocean #option-tree-header {
- background: #738e96;
- color: #f1fcff;
-}
-.admin-color-ocean #option-tree-header li a {
- color: #f1fcff;
-}
-.admin-color-ocean #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-ocean #option-tree-header #option-tree-logo a,
-.admin-color-ocean #option-tree-header #theme-version:before {
- border-right-color: #39464a;
-}
-.admin-color-ocean #option-tree-header li#option-tree-logo:hover {
- background-color: #9ab8a0;
-}
-.admin-color-ocean #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #39464a;
-}
-.admin-color-ocean #option-tree-header #option-tree-version span,
-.admin-color-ocean #option-tree-header #theme-version span {
- border-left-color: #87a6af;
-}
-/* sunrise */
-.admin-color-sunrise #option-tree-header {
- background: #da4f41;
- color: #fff;
-}
-.admin-color-sunrise #option-tree-header li a {
- color: #f3f1f1;
-}
-.admin-color-sunrise #option-tree-header li a:hover {
- color: #fff;
-}
-.admin-color-sunrise #option-tree-header #option-tree-logo a,
-.admin-color-sunrise #option-tree-header #theme-version:before {
- border-right-color: #8a322a;
-}
-.admin-color-sunrise #option-tree-header li#option-tree-logo:hover {
- background-color: #e88436;
-}
-.admin-color-sunrise #option-tree-header li#option-tree-logo:hover a {
- border-right-color: #8a322a;
-}
-.admin-color-sunrise #option-tree-header #option-tree-version span,
-.admin-color-sunrise #option-tree-header #theme-version span {
- border-left-color: #e75546;
-}
-
-/* --------------------------------------------------
- :: Sub Header
- ---------------------------------------------------*/
-#option-tree-sub-header {
- background: #fafafa;
- border: 1px solid #ccc;
- border-top: none;
- display: block;
- margin: 0 5px 0 2px;
- min-width: 523px;
- overflow: hidden;
- padding: 5px;
- position: relative;
- -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0,0,0,0.05);
-}
-
-/* --------------------------------------------------
- :: Tabs
- ---------------------------------------------------*/
-.wrap.settings-wrap .ui-tabs-nav {
- float: left;
- list-style: none;
- margin: 0 0 0 -4px;
- padding: 1em 0;
- width: 151px;
-}
-.wrap.settings-wrap .ui-tabs-nav li {
- border: 1px solid transparent;
- border-right-width: 0px;
- display: block; margin: 0;
- -webkit-border-radius: 2px 0 0 2px;
- -moz-border-radius: 2px 0 0 2px;
- border-radius: 2px 0 0 2px;
-}
-.wrap.settings-wrap .ui-tabs-nav li.ui-state-active {
- background: #fff;
- border-color: #ccc;
- color: #000;
-}
-.wrap.settings-wrap .ui-tabs-nav li a {
- color: #21759b;
- display: block;
- line-height: 18px;
- padding: 5px 5px 5px 12px;
- text-decoration: none;
-}
-.wrap.settings-wrap .ui-tabs-nav li a:hover,
-.wrap.settings-wrap .ui-tabs-nav li.ui-state-active a {
- color: #000;
- outline: none;
-}
-.wrap.settings-wrap .ui-tabs-panel {
- clear: both;
-}
-
-/* --------------------------------------------------
- :: Format Settings
- ---------------------------------------------------*/
-.format-settings {
- position: relative;
- width: 100%;
-}
-.format-setting-wrap,
-.option-tree-sortable .format-settings {
- padding: 10px 0 20px 0;
-}
-
-/* --------------------------------------------------
- :: Format Setting Label
- ---------------------------------------------------*/
-.format-setting-label {
- border-bottom: 1px dashed #ccc;
- margin: 0 0 20px 0;
- padding: 5px 0px 1px 0px;
- width: 100%;
-}
-#option-tree-settings-api .description h3,
-#option-tree-settings-api .format-setting-label .label,
-#poststuff .format-setting-label .label {
- background: none;
- border: none;
- color: #222;
- cursor: text;
- display: block;
- font-size: 1.3em;
- font-weight: 500;
- line-height: 1.6em;
- letter-spacing: 0;
- padding: 0 0 9px 0;
- -webkit-user-select: text;
- text-shadow: none;
-}
-
-/* --------------------------------------------------
- :: Format Setting
- ---------------------------------------------------*/
-.format-setting {
- overflow: hidden;
- position: relative;
- width: 100%;
-}
-.format-setting .format-setting-inner {
- float: left;
- position: relative;
- width: 63%;
-}
-.format-setting.no-desc > .format-setting-inner,
-.format-setting.wide-desc .format-setting-inner {
- width: 100%;
-}
-.format-setting .description {
- float: right;
- padding: 5px 0;
- width: 35%;
-}
-.format-setting.no-desc > .description,
-.format-setting.wide-desc .description {
- float: none;
- width: 100%;
-}
-.list-item-description {
- padding-top: 10px;
-}
-#option-tree-settings-api h4 {
- color: #333;
- font-size: 1.2em;
- font-weight: 500;
- line-height: 1.5em;
- margin: 1em 0 0.5em 0;
- padding: 0;
-}
-#option-tree-settings-api h5 {
- color: #444;
- font-size: 1em;
- font-weight: 700;
- line-height: 1.2em;
- margin: 1em 0 0.5em 0;
- padding: 0;
-}
-#option-tree-settings-api p {
- margin: 0 0 1.5em 0 !important;
-}
-#post .format-setting-inner p {
- float: left;
- width: 100%;
- margin: 0 0 1.05em 0 !important;
-}
-.aside {
- border-bottom: 1px solid #eee;
- padding-bottom: 15px;
- margin-bottom: 15px;
-}
-.deprecated {
- border-bottom: 1px solid #eee;
- color: #b94029;
- padding-bottom: 15px;
- margin-bottom: 15px;
-}
-.warning {
- color: #b94029;
-}
-.docs-ul {
- line-height: 1.3em;
- margin: 0;
- padding: 0 0 1em 0;
-}
-.docs-ul li {
- list-style-type: square;
- margin-left: 20px;
-}
-#contextual-help-setting {
- float: left;
- padding: 10px 0 5px 0;
- width: 100%;
-}
-#contextual-help-label {
- float: left;
- padding-top: 20px;
- width: 100%;
-}
-#option_tree_settings_help {
- float: left;
- width: 100%;
-}
-#option-tree-settings-api blockquote {
- font-style: italic;
- padding-left: 15px;
- position: relative;
-}
-#option-tree-settings-api blockquote:before {
- color: #ccc;
- content: "\201C";
- display: block;
- font-size: 400%;
- font-style: normal;
- left: -10px;
- position: absolute;
- top: 10px;
-}
-@media only screen and (max-width: 1020px) {
- .format-setting .description,
- .format-setting .format-setting-inner {
- width: 100%;
- }
- .format-setting .description {
- padding-top: 0px;
- padding-bottom: 20px;
- }
-}
-.ot-background-group {
- overflow: hidden;
- width: auto;
-}
-.ot-background-size-input {
- max-width: 110px;
-}
-.option-tree-setting-edit,
-.option-tree-setting-remove {
- text-indent: -9999px;
-}
-
-/* --------------------------------------------------
- :: Code formatting
- ---------------------------------------------------*/
-#option-tree-settings-api code,
-.ot-metabox-wrapper code {
- background-color: #f1f1f1;
- color: #333;
- font-size: 12px;
-}
-#option-tree-settings-api pre {
- font-size: 13px;
- padding: 0;
- margin: 1.5em 0;
- line-height: 18px;
- overflow: auto;
- overflow-Y: hidden;
- padding-top: 18px;
- background: #f1f1f1;
- border-bottom: 1px solid #f1f1f1;
- margin-bottom: 20px;
- color: #000;
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-#option-tree-settings-api pre code {
- padding: 0 18px 18px 18px;
- display: block;
- background: url(../images/ot-pre-bg.gif) repeat left top;
-}
-
-/* --------------------------------------------------
- :: Input & Upload
- ---------------------------------------------------*/
-input.option-tree-ui-upload-input,
-input.option-tree-ui-input {
- background: #fff;
- border: 1px solid #ccc !important;
- line-height: 17px;
- font-size: 12px;
- margin-bottom: 5px !important;
- padding: 7px 6px;
- position: relative;
- width: 100% !important;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
-}
-input:hover.option-tree-ui-upload-input,
-input:hover.option-tree-ui-input {
- border-color: #bbb !important;
- -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
-}
-input:focus.option-tree-ui-upload-input,
-input:focus.option-tree-ui-input {
- border-color: #999 !important;
-}
-
-@media screen and (-webkit-min-device-pixel-ratio:0) {
- .option-tree-ui-input,
- .option-tree-ui-upload-input {
- padding: 5px 6px !important;
- }
-}
-
-/* --------------------------------------------------
- :: Upload
- ---------------------------------------------------*/
-div.option-tree-ui-media-wrap {
- margin: 0 55px 0 0;
- min-height: 35px;
- position: relative;
-}
-.option-tree-ui-media-wrap img {
- background: #fafafa;
- border: 1px solid #ccc;
- padding: 4px;
- display: block;
- float: left;
- max-width: 100%;
- height: auto;
- -ms-interpolation-mode: bicubic;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.option-tree-ui-upload-parent {
- width: auto !important;
- margin-right: 45px;
- padding: 0px;
- position: relative;
-}
-.ot_upload_media {
- top: 0px;
- margin: 0px !important;
- position: absolute;
- right: -45px;
- text-indent: -9999px;
-}
-.option-tree-ui-media-wrap a.option-tree-ui-remove-media {
- float: none !important;
- margin: 0px !important;
- position: absolute !important;
- right: -55px;
- text-indent: -9999px;
- top: 1px;
-}
-
-/* --------------------------------------------------
- :: Textarea
- ---------------------------------------------------*/
-.fill-area .description,
-.fill-area .format-setting-inner {
- width: 100% !important;
-}
-.wp-editor-area {
- display: block;
-}
-.textarea,
-.ot-metabox-wrapper textarea {
- width: 99.9%;
- border: 1px solid #ccc;
- font-family: Consolas, Monaco, monospace;
- line-height: 150%;
- outline: 0;
- padding: 10px;
- resize: vertical;
-}
-#contextual-help-setting .textarea {
- width: 99.75%;
-}
-.ot-metabox-wrapper .wp-editor-container {
- border: none;
-}
-.textarea:hover,
-.ot-metabox-wrapper textarea:hover {
- border-color: #bbb !important;
- -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
-}
-.textarea:focus,
-.ot-metabox-wrapper textarea:focus {
- border-color: #999 !important;
-}
-
-@media only screen and (max-width: 1105px) {
- .type-textarea .description, .type-textarea .format-setting-inner {
- width: 100%;
- }
-}
-
-/* --------------------------------------------------
- :: Setting Item with Drag & Drop
- ---------------------------------------------------*/
-.option-tree-setting-wrap {
- margin-top: 0px;
-}
-.option-tree-setting-wrap li {
- margin: 5px 0px;
-}
-.option-tree-setting {
- border: 1px solid #ccc;
- overflow: hidden;
- position: relative;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.option-tree-setting:hover {
- border-color: #999;
- -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
-}
-.option-tree-setting a {
- text-decoration: none;
-}
-.option-tree-setting .open {
- background: #fafafa;
- line-height: 21px;
- height: 21px;
- padding: 10px 100px 10px 10px;
- display: block;
-}
-.option-tree-sortable .open {
- cursor: move;
-}
-.ui-state-disabled .option-tree-setting .open {
- cursor: default;
-}
-.option-tree-setting .open:hover {
- background: #fafafa;
-}
-.option-tree-setting .open:hover:before {
- color: #999;
- content: "\f142";
- left: 4px;
- font-family: "option-tree-font";
- speak: none;
- font-size: 14px;
- font-style: normal;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
- line-height: 1;
- position: absolute;
- top: 14px;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.option-tree-setting.is-section .open:hover:before {
- color: #000;
-}
-.button-section {
- position: absolute;
- right: 0px;
- top: 1px;
-}
-.option-tree-setting.is-section {
- border: 1px solid #000;
-}
-.option-tree-setting.is-section .option-tree-setting-body,
-.option-tree-setting.is-section .option-tree-ui-button {
- border-right-color: #000 !important;
-}
-.option-tree-setting.is-section .open {
- background: #333;
- color: #bbb;
-}
-.format-setting .ui-sortable-helper .option-tree-setting .open {
- background: #fff;
-}
-.option-tree-setting.is-section .open:hover,
-.format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #333;
-}
-/* light */
-.admin-color-light .option-tree-setting.is-section,
-.admin-color-light .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-light .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #3c3c3c !important;
-}
-.admin-color-light .option-tree-setting.is-section .open:hover:before {
- color: #3c3c3c;
-}
-.admin-color-light .option-tree-setting.is-section .open {
- background: #888;
- color: #fff;
-}
-.admin-color-light .option-tree-setting.is-section .open:hover,
-.admin-color-light .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #888;
-}
-/* blue */
-.admin-color-blue .option-tree-setting.is-section,
-.admin-color-blue .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-blue .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #002b39 !important;
-}
-.admin-color-blue .option-tree-setting.is-section .open:hover:before {
- color: #002b39;
-}
-.admin-color-blue .option-tree-setting.is-section .open {
- background: #52accc;
- color: #fff;
-}
-.admin-color-blue .option-tree-setting.is-section .open:hover,
-.admin-color-blue .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #52accc;
-}
-/* coffee */
-.admin-color-coffee .option-tree-setting.is-section,
-.admin-color-coffee .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-coffee .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #0f0e0d !important;
-}
-.admin-color-coffee .option-tree-setting.is-section .open:hover:before {
- color: #0f0e0d;
-}
-.admin-color-coffee .option-tree-setting.is-section .open {
- background: #59524c;
- color: #c7cbc9;
-}
-.admin-color-coffee .option-tree-setting.is-section .open:hover,
-.admin-color-coffee .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #59524c;
-}
-/* ectoplasm */
-.admin-color-ectoplasm .option-tree-setting.is-section,
-.admin-color-ectoplasm .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-ectoplasm .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #181220 !important;
-}
-.admin-color-ectoplasm .option-tree-setting.is-section .open:hover:before {
- color: #181220;
-}
-.admin-color-ectoplasm .option-tree-setting.is-section .open {
- background: #523f6d;
- color: #c6c6d3;
-}
-.admin-color-ectoplasm .option-tree-setting.is-section .open:hover,
-.admin-color-ectoplasm .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #523f6d;
-}
-/* midnight */
-.admin-color-midnight .option-tree-setting.is-section,
-.admin-color-midnight .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-midnight .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #090a0b !important;
-}
-.admin-color-midnight .option-tree-setting.is-section .open:hover:before {
- color: #090a0b;
-}
-.admin-color-midnight .option-tree-setting.is-section .open {
- background: #363b3f;
- color: #f1f2f3;
-}
-.admin-color-midnight .option-tree-setting.is-section .open:hover,
-.admin-color-midnight .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #363b3f;
-}
-/* ocean */
-.admin-color-ocean .option-tree-setting.is-section,
-.admin-color-ocean .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-ocean .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #39464a !important;
-}
-.admin-color-ocean .option-tree-setting.is-section .open:hover:before {
- color: #39464a;
-}
-.admin-color-ocean .option-tree-setting.is-section .open {
- background: #738e96;
- color: #f1fcff;
-}
-.admin-color-ocean .option-tree-setting.is-section .open:hover,
-.admin-color-ocean .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #738e96;
-}
-/* sunrise */
-.admin-color-sunrise .option-tree-setting.is-section,
-.admin-color-sunrise .option-tree-setting.is-section .option-tree-setting-body,
-.admin-color-sunrise .option-tree-setting.is-section .option-tree-ui-button {
- border-color: #8a322a !important;
-}
-.admin-color-sunrise .option-tree-setting.is-section .open:hover:before {
- color: #8a322a;
-}
-.admin-color-sunrise .option-tree-setting.is-section .open {
- background: #da4f41;
- color: #fff;
-}
-.admin-color-sunrise .option-tree-setting.is-section .open:hover,
-.admin-color-sunrise .format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
- background: #da4f41;
-}
-.ui-state-highlight {
- border: 1px dashed #ccc;
- display: block;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.option-tree-setting-body {
- background: #fff;
- border-top: 1px solid #ccc;
- display: none;
- padding: 10px;
- -webkit-border-bottom-right-radius: 2px;
- -webkit-border-bottom-left-radius: 2px;
- -moz-border-radius-bottomright: 2px;
- -moz-border-radius-bottomleft: 2px;
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-li ul .format-setting-wrap {
- padding: 0 0 10px 0;
-}
-li ul .format-setting-label {
- border: none;
- padding: 0px;
- margin: 0px;
-}
-
-/* --------------------------------------------------
- :: Layouts
- ---------------------------------------------------*/
-#option_tree_layouts {
- display: none;
- padding-top: 12px;
-}
-#option-tree-options-layouts-form {
- left: 13px;
- position: absolute;
- top: 30px;
- z-index: 10;
-}
-.option-tree-save-layout {
- float: left;
- padding: 10px 0;
-}
-.option-tree-save-layout.active-layout {
- padding-left: 10px;
-}
-.option-tree-save-layout .widefat {
- float: left;
- width: 128px !important;
- margin: 0;
-}
-.option-tree-active-layout {
- border-right: 1px solid #ccc;
- float: left;
- padding: 10px 10px 10px 0;
- min-width: 126px;
-}
-.button.save-layout {
- margin: 0 0 0 10px !important;
-}
-.option-tree-layout-activate {
- text-indent: -9999px;
-}
-.option-tree-layout-activate .icon:before {
- content: "\f096";
- position: relative;
- top: 1px;
-}
-.option-tree-layout-activate.active .icon:before {
- content: "\f046";
- padding-left: 1px;
-}
-
-/* --------------------------------------------------
- :: Option Group
- ---------------------------------------------------*/
-.ot-option-group {
- float: left;
- padding-right: 5px;
- position: relative;
- width: 20%;
- box-sizing: border-box;
-}
-.ot-option-group--three-fourths {
- width: 75%;
-}
-.ot-option-group--two-thirds {
- width: 66.6%;
-}
-.ot-option-group--one-half {
- width: 50%;
-}
-.ot-option-group--one-third {
- width: 33.3%;
-}
-.ot-option-group--one-fourth {
- width: 25%;
-}
-.ot-option-group--one-fifth {
- width: 20%;
-}
-.ot-option-group--one-sixth {
- width: 16.6%;
-}
-.ot-option-group--one-eighth {
- width: 12.5%;
-}
-.ot-option-group--is-last {
- padding-right: 0;
-}
-.ot-option-group--icon {
- background: #fafafa;
- border-right: 1px solid #ccc;
- display: inline-block;
- font-size: 14px;
- line-height: 14px;
- padding: 6px 6px 7px;
- position: absolute;
- text-align: center;
- top: 1px;
- left: 1px;
- width: 14px;
- z-index: 10;
-}
-.ot-icon-circle.ot-option-group--icon:before {
- left: 1px;
- position: relative;
- -webkit-filter: blur(1px);
- -moz-filter: blur(1px);
- -ms-filter: blur(1px);
- -o-filter: blur(1px);
- filter: blur(1px);
-}
-.ot-option-group--icon + input.option-tree-ui-input {
- padding-left: 34px !important;
- margin-right: 5px;
-}
-.ot-option-group--checkbox {
- float: left;
- padding-top: 2px;
- padding-right: 10px;
- width: auto;
-}
-#post-body .ot-option-group--checkbox p {
- color: #a9a9a9;
- float: left;
- margin: 1px 0 0.3em 0 !important;
-}
-@media screen and ( min-width: 783px ) {
- #post-body .ot-option-group--checkbox p input {
- margin-top: 0px !important;
- }
-}
-@media screen and ( max-width: 1020px ) {
- .ot-option-group--one-fourth,
- .ot-option-group--one-fifth,
- .ot-option-group--one-sixth,
- .ot-option-group--one-eighth {
- width: 33.3%;
- }
- .ot-option-group--checkbox {
- width: 100%;
- }
-}
-@media screen and ( max-width: 782px ) {
- .ot-option-group {
- width: 50%;
- }
- .ot-option-group--three-fourths,
- .ot-option-group--two-thirds,
- .ot-option-group--one-half {
- width: 100%;
- }
- .ot-option-group--checkbox {
- padding-top: 0.3em;
- }
-}
-.ot-option-group .select-wrapper {
- width: 100%;
-}
-
-/* --------------------------------------------------
- :: Select
- ---------------------------------------------------*/
-.select-wrapper {
- background: #fff url(../images/ot-select.png) no-repeat right center;
- border: 1px solid #ccc;
- display: block;
- float: left;
- font-size: 12px;
- height: 29px;
- margin: 0 5px 5px 0;
- max-width: 100%;
- width: auto;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.select-wrapper:hover {
- background-image: url(../images/ot-select-hover.png);
- border-color: #999;
-}
-select.option-tree-ui-select {
- cursor: pointer;
- filter: alpha(opacity: 0);
- font-size: 14px;
- height: 29px;
- margin: 0;
- max-width: 100%;
- -moz-opacity: 0;
- opacity: 0;
- padding: 0 !important;
- position: relative;
- width: inherit;
- z-index: 4;
- min-width: 118px;
-}
-
-select.option-tree-ui-select option {
- padding: 3px 15px !important;
-}
-.select-wrapper span {
- height: 27px;
- line-height: 27px;
- overflow: hidden;
- padding-left: 7px;
- padding-right: 27px;
- position: absolute;
- z-index: 2;
-}
-#option-tree-options-layouts-form .select-wrapper {
- margin: 0px;
-}
-#option-tree-options-layouts-form select.option-tree-ui-select {
- min-width: 124px;
-}
-.type-measurement select.option-tree-ui-select {
- min-width: 73px !important;
-}
-.type-measurement .select-wrapper {
- margin-right: 0;
- position: absolute;
- right: 0px;
- top: 0px;
-}
-
-/* FireFox */
-@-moz-document url-prefix() {
- #option-tree-options-layouts-form .select-wrapper {
- left: 250px;
- }
-}
-
-/* --------------------------------------------------
- :: Measurement
- ---------------------------------------------------*/
-.option-tree-ui-measurement-input-wrap {
- margin-right: 80px;
-}
-
-/* --------------------------------------------------
- :: Checkbox & Radio
- ---------------------------------------------------*/
-.format-setting.type-checkbox input,
-.format-setting.type-radio input {
- float: left;
- margin: 2px 5px 0 1px;
-}
-.format-setting.type-checkbox label,
-.format-setting.type-radio label {
- float: left;
- max-width: 90%;
- padding: 0px;
-}
-#option-tree-settings-api .format-setting.type-checkbox p,
-#option-tree-settings-api .format-setting.type-radio p {
- float: left;
- margin: 0.5em 0 !important;
- width: 100%;
-}
-@media screen and ( max-width: 782px ) {
- .format-setting.type-checkbox,
- .format-setting.type-radio {
- padding-top: 0.3em;
- }
-}
-
-/* --------------------------------------------------
- :: Radio Images
- ---------------------------------------------------*/
-.type-radio-image .option-tree-ui-radio-images {
- float: left;
- margin: 0 10px 10px 0px;
-}
-.type-radio-image .option-tree-ui-radio-images img {
- background: #fff;
- border: 1px solid #ccc;
- cursor: pointer;
- opacity: 0.8;
- padding: 5px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.type-radio-image .option-tree-ui-radio-images img.option-tree-ui-radio-image-selected,
-.type-radio-image .option-tree-ui-radio-images img:hover {
- border-color: #464646;
- opacity: 1;
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: 0 1px 3px rgba(0,0,0,0.05);
-}
-
-/* --------------------------------------------------
- :: Social Links
- ---------------------------------------------------*/
-.type-social-links input.option-tree-ui-input {
- margin-top: 5px;
-}
-
-/* --------------------------------------------------
- :: Numeric Slider
- ---------------------------------------------------*/
-.type-numeric-slider .format-setting-inner {
- background: #fcfcfc;
- border: 1px solid #ccc;
- min-height: 41px;
- padding: 5px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ot-numeric-slider-wrap {
- margin: 0 96px 0 0;
-}
-.ot-numeric-slider-wrap .ot-numeric-slider-helper-input {
- position: absolute;
- right: 5px;
- text-align: center;
- top: 5px;
- width: 90px !important;
-}
-.ot-numeric-slider.ui-slider {
- background: #fff;
- border: 1px solid #ccc;
- margin: 8px 8px 0 8px;
- position: relative;
- -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ot-numeric-slider.ui-slider-horizontal {
- height: 11px;
-}
-.ot-numeric-slider.ui-slider .ui-slider-handle {
- border: 1px solid #000;
- color: #555;
- cursor: pointer;
- display: block;
- height: 27px;
- margin: -9px -8px;
- outline: 0;
- position: absolute;
- width: 16px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-/* default */
-.ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #333;
- border-color: #000;
-}
-.ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #444;
- border-color: #111;
-}
-/* light */
-.admin-color-light .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #888;
- border-color: #3c3c3c;
-}
-.admin-color-light .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-light .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #999;
- border-color: #777;
-}
-/* blue */
-.admin-color-blue .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #52accc;
- border-color: #002b39;
-}
-.admin-color-blue .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-blue .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #5dc2e6;
- border-color: #006484;
-}
-/* coffee */
-.admin-color-coffee .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #59524c;
- border-color: #0f0e0d;
-}
-.admin-color-coffee .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-coffee .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #cca588;
- border-color: #675f58;
-}
-/* ectoplasm */
-.admin-color-ectoplasm .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #523f6d;
- border-color: #181220;
-}
-.admin-color-ectoplasm .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-ectoplasm .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #a3b542;
- border-color: #644d85;
-}
-/* midnight */
-.admin-color-midnight .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #363b3f;
- border-color: #090a0b;
-}
-.admin-color-midnight .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-midnight .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #ed543f;
- border-color: #a0382a;
-}
-/* ocean */
-.admin-color-ocean .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #738e96;
- border-color: #39464a;
-}
-.admin-color-ocean .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-ocean .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #9ab8a0;
- border-color: #5a6c5e;
-}
-/* sunrise */
-.admin-color-sunrise .ot-numeric-slider.ui-slider .ui-slider-handle {
- background: #da4f41;
- border-color: #8a322a;
-}
-.admin-color-sunrise .ot-numeric-slider.ui-slider .ui-slider-handle:hover,
-.admin-color-sunrise .ot-numeric-slider.ui-slider .ui-slider-handle.ui-state-active {
- background: #e88436;
- border-color: #e75546;
-}
-
-/* --------------------------------------------------
- :: Colorpicker
- ---------------------------------------------------*/
-.option-tree-ui-colorpicker-input-wrap {
- float: left;
-}
-.hide-color-picker {
- display: none;
-}
-.option-tree-ui-colorpicker-input-wrap .option-tree-ui-colorpicker-label {
- height: 30px;
- line-height: 30px;
- margin-right: 10px;
- display: block;
-}
-.type-link-color .option-tree-ui-colorpicker-input-wrap {
- margin-right: 20px;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-color-picker,
-.option-tree-ui-colorpicker-input-wrap .wp-picker-default,
-.option-tree-ui-colorpicker-input-wrap .wp-picker-clear {
- border-color: #ccc;
- font-size: 12px !important;
- height: 29px !important;
- line-height: 27px !important;
- margin-top: 0px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-color-picker {
- margin: 0 0 5px 0 !important;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-color-result {
- height: 27px;
- outline: 0;
- margin: 0 5px 5px 0px;
- top: 0px;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-color-result:after {
- line-height: 27px;
-}
-.option-tree-ui-colorpicker-input-wrap .wp-picker-container .iris-picker {
- border-color: #ccc;
- margin: 0px 5px 5px 0;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-@media screen and ( max-width: 782px ) {
- .option-tree-ui-colorpicker-input-wrap .wp-color-picker {
- padding: 3px 5px !important;
- }
- .option-tree-ui-colorpicker-input-wrap .wp-picker-clear,
- .option-tree-ui-colorpicker-input-wrap .wp-picker-default {
- margin-top: 4px;
- padding: 0 8px 1px !important;
- }
-}
-
-/* --------------------------------------------------
- :: Colorpicker Opacity (Derivative work of the Codestar WP Color Picker.)
- ---------------------------------------------------*/
-.option-tree-opacity-wrap {
- background-color: #fff;
- border: 1px solid #ccc;
- border-top: none;
- border-radius: 0 0 2px 2px;
- direction: ltr;
- display: none;
- padding: 10px;
- position: relative;
- top: -6px;
- width: 235px;
-}
-.option-tree-opacity-slider {
- left: 10px;
- position: absolute;
- width: 171px;
- margin-left: 3px;
- height: 28px;
-}
-.option-tree-opacity-slider .ui-slider-handle {
- position: absolute;
- top: -3px;
- bottom: -3px;
- z-index: 5;
- border-color: #aaa;
- border-style: solid;
- border-width: 4px 3px;
- width: 6px;
- height: 26px;
- margin: 0 -3px;
- background: none;
- cursor: ew-resize;
- opacity: 0.9;
- border-radius: 4px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-}
-.option-tree-opacity-slider .ui-slider-handle:before {
- content: " ";
- position: absolute;
- left: -2px;
- right: -2px;
- top: -3px;
- bottom: -3px;
- border: 2px solid #fff;
- border-radius: 3px;
-}
-.option-tree-opacity-slider-offset {
- height: 28px;
- width: 183px;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAASCAYAAAAe/ZHXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkNEQUQ0ODM4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkNEQUQ0ODQ4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Q0RBRDQ4MThFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Q0RBRDQ4MjhFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/r/N8AAAWYSURBVHjarFvvR3VBEN45JZGIPkREHyIiIhJJf3qUSERE9CGiDxERkcg9z9u92uucvTszz5z7xnHPj93Z2d359cxscn5+jpTS+EoiMr3/+51cZ2dn4+e29i2/u7y8RKf/pO3vc+o+n5ycoNK31+f6+jrfZ37yuG2mf3R01H3fa5N/b29vU6dP5qft0G4PDg5MGuPr/v4+jz1t27mfvN/b21P75+fHx8eZfiV/Ozs7rUJnSu/5+RlFv+m6ZJpbW1s1PnrvXl9fZ/qX89zY2LB4mfy+v7/nsdV1XltbK/dr5vnz87OcV5bJabuVlRVLBifjfX9/l/xkGtM+S0tLNXnu0szfU/P3IMn/k0678h6ddqjQFGccVL6hoCsVfsq+NZ5QtCv5rfFS41sq37W+UPhMyhxEWTetvce3NR8oewqD39qalXuGAK/WPltjajIC4x2c9Ye1f43SGcqGwRBeTZjhMNntL4pCWZMQYhE05RVl02EovRgC4RkCbUNSQAGhGB/GsKG4h6FQoigDa2i8fRBy3uLMXYIG3Vr3aZvRaCRdBYlYIMZywhBGCVhgzzOlgRuUSOvC0GMEWxOM/+EtQFh1OIIXtfwg1tRaayGjg5px0jyZKEaTle3e+AsLCygVRAh3FlEgKbReE3oYGj9EgIR00QiEgKw3ZBQbRGjBeAMtDETQmHiKDsezJNLgCTFGItZXlAgCSiQggblP+9c8SDI0lXWlFv5g3K63KZ51FOcZzthQ3LomoNHwJmKIQISI3vqzSpwIQ8liSjGMFQjDpoVgaQ6cWgvLhOC7qiAwiHrWbEg4JMSmeUrBuHoYwioOQNXmhmAcrs096s1gJCGi3hSEVU8DQxYElYHhKwUUGAa+NqOBMsSSAQJuhQhCAH4vxozExsxiihPuaIrjCVYKWlYEsjSM52G8Kxxryngl5j0j+EyGTIiED4s1Itm0ZGWxMFCLJaBAcEI6OBkmFgNBoc8Cait2ZnENE/6wQN8LJSJeSMNAjKVm+LUMAIt3PR5AQgIGp1Z5zxhE8PtXUYReYeXi4mKmOPNXBMzt2tPT07LIUtJqr66uusXEbkFnWiQ6Pj72ikrtzc1NKopuvbbj58PDwxqNHp27u7tuYWumUDV+v7+/Xyu6pc59+/DwUCsC9ujt7u6qRbt8//T01C3elbyN70fb29uZ/1FSincvLy/lPGb42tzc9IqJeHt7q61Pr2C6vr7u7tfHx8fMPhV0sLq6WhZtU0n36+uru8elPE7aLi8v1wqJPXn++fmZKYgX8ozFxcXJb0NaQTHClZT8+gBjsYdaFc+zWcUkGTCWENY66ta92oSVzo3WI6IZKGtukeyfBLFKBNAj6bUOBgaoe9wE4n04IBNkLMoC7+Skj630ZlTJMYdyMsU2T8AwpzALkVFilZgJcT2l9PCWDDSAMBSjVlJgZNk0lE1AIby0qCiCnBQNj6aBGQslZIZJ5hB6D/AzQHto5Z9Nk8tARdN4q2ExBnsyIJ311EymShyjan2rKk0zh1Ay1oQVWAZQRnkUA8RFw7TahjBnmNgMVMQrsCGZJezRtGlU0cUZ1zuaxGZPpbhApM+ZpFQqQ6xadoMtBrEKpBVo4GRXvNSxpaRixKiR+TChCYhsDwZkfFj8IkErjAHejcUI0XQrgwehhNSMHAz21E0wZ23FcCAmj8Sd/PXy2xLYLAuwRw4IMsqjFaWYOpMEhDySAPFCWyFkgAHrEcA+BNeJ4UE8HCzJPpCrerUmQIx1pWJkjqxJD8EikUo2c5aI8ZYgsAkM4WQtnHd0ns0ORgVTBghy5ISy928SGsbTMqYg523RUY8oNYG4FIYiyRyZCnFCJC87IoRAIMVOqQ7BKexxCS2hYVl9JhvlpYjnAe4MhmRPMWhhvLfXINaI9WKM0Zu0+SfAAFLE1EgfVSv7AAAAAElFTkSuQmCC);
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
- border-radius: 2px;
-}
-.option-tree-opacity-text {
- position: absolute;
- top: 15px;
- left: 215px;
- width: 30px;
- font-size: 12px;
- text-align: center;
-}
-
-/* --------------------------------------------------
- :: Google Font
- ---------------------------------------------------*/
-.type-google-font {
-
-}
-.type-google-font-group-clone {
- display: none;
-}
-.type-google-font-group {
- float: left;
- margin-bottom: 20px;
- width: 100%;
-}
-.js-remove-google-font.option-tree-ui-button.button {
- margin-left: 0;
- margin-top: 0;
-}
-
-/* --------------------------------------------------
- :: OptionTree UI Buttons
- ---------------------------------------------------*/
-.option-tree-ui-button.button {
- float: left;
- font-size: 12px !important;
- line-height: 27px !important;
- height: 29px !important;
- margin: 5px;
- min-width: 40px;
- padding: 0 10px 1px !important;
-}
-.option-tree-ui-button:active,
-.option-tree-ui-button:hover,
-.option-tree-ui-button:focus {
- outline: 0;
-}
-.option-tree-ui-button.hidden {
- display: none;
-}
-.option-tree-ui-button.button-secondary {
- background: #b73b27;
- border-color: #7f291b;
- color: #fff;
- text-shadow: none;
- -webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.5), 0 1px 0 rgba(0,0,0,.15);
- -moz-box-shadow: inset 0 1px 0 rgba(229,134,119,0.5), 0 1px 0 rgba(0,0,0,.15);
- box-shadow: inset 0 1px 0 rgba(229,134,119,0.5), 0 1px 0 rgba(0,0,0,.15);
-}
-.option-tree-ui-button.button-secondary.hover,
-.option-tree-ui-button.button-secondary:hover,
-.option-tree-ui-button.button-secondary.focus,
-.option-tree-ui-button.button-secondary:focus {
- background: #9b3221;
- border-color: #7f291b;
- color: #fff;
- -webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6);
- -moz-box-shadow: inset 0 1px 0 rgba(229,134,119,0.5), 0 1px 0 rgba(0,0,0,.15);
- box-shadow: inset 0 1px 0 rgba(229,134,119,0.6);
-}
-.option-tree-ui-button.button-secondary.focus,
-.option-tree-ui-button.button-secondary:focus {
- border-color: #4f160d;
- -webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 1px 1px 2px rgba(0,0,0,0.4);
- -moz-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 1px 1px 2px rgba(0,0,0,0.4);
- box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 1px 1px 2px rgba(0,0,0,0.4);
-}
-.option-tree-ui-button.button-secondary.active,
-.option-tree-ui-button.button-secondary.active:hover,
-.option-tree-ui-button.button-secondary.active:focus,
-.option-tree-ui-button.button-secondary:active {
- background: #b73b27;
- border-color: #7f291b;
- color: rgba(255,255,255,0.95);
- -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
- -moz-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
- box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
- vertical-align: top;
-}
-.option-tree-ui-button.right {
- float: right;
-}
-.option-tree-ui-button.hug-left {
- margin-left: 0px;
-}
-.option-tree-ui-button.hug-right {
- margin-right: 0px;
-}
-.option-tree-ui-button.pad {
- padding: 0px 21px;
-}
-.option-tree-ui-button.left-item {
- margin: 5px 0 5px 5px;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0px;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0px;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
-}
-.option-tree-ui-button.center-item {
- margin: 5px 0 5px -1px;
- -webkit-border-radius: 0px;
- -moz-border-radius: 0px;
- border-radius: 0px;
-}
-.option-tree-ui-button.right-item {
- margin: 5px 5px 5px -1px;
- -webkit-border-top-left-radius: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -moz-border-radius-topleft: 0px;
- -moz-border-radius-bottomleft: 0px;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
-}
-.option-tree-ui-buttons {
- background: #fff;
- border: 1px solid #ccc;
- margin: 11px 5px 0 2px;
- min-width: 523px;
- overflow: hidden;
- padding: 5px;
- position: relative;
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.option-tree-ui-buttons.alt {
- background: #f5f5f5;
- border-color: #dfdfdf;
-}
-.option-tree-ui-buttons:before,
-.option-tree-ui-buttons:after {
- content: "\0020";
- display: block;
- height: 0;
- visibility: hidden;
-}
-.option-tree-ui-buttons:after {
- clear: both;
-}
-.option-tree-ui-buttons {
- zoom: 1;
-}
-button.reset-settings {
- position: relative;
- top: -45px;
- left: 8px;
-}
-
-/* --------------------------------------------------
- :: OptionTree UI Button Icons
- ---------------------------------------------------*/
-.option-tree-ui-button .icon {
- color: #3a3a3a;
- display: inline-block;
- float: left;
- font-size: 20px;
- height: 20px;
- margin-top: 3px;
- opacity: 0.9;
- overflow: hidden;
- text-align: center;
- text-indent: 0;
- width: 18px;
-}
-button.option-tree-ui-button .icon {
- margin-top: -3px;
-}
-.option-tree-ui-button.light .icon {
- color: #fff;
- opacity: 0.9;
-}
-.option-tree-ui-button.active .icon,
-.option-tree-ui-button:hover .icon {
- opacity: 1;
-}
-.option-tree-ui-button .icon.right-label {
- margin-right: 10px;
-}
-.option-tree-ui-button .icon.left-label {
- margin-left: 10px;
- float: right;
-}
-.option-tree-ui-button .upload {
- background-position: -0px -0px;
-}
-.option-tree-ui-button .trash-can {
- background-position: -18px -0px;
-}
-.option-tree-ui-button .pencil,
-.option-tree-ui-button .check {
- background-position: -36px -0px;
-}
-.option-tree-ui-button:hover .pencil,
-.option-tree-ui-button:hover .check,
-.option-tree-ui-button.active .pencil,
-.option-tree-ui-button.active .check {
- background-position: -54px -0px;
-}
-
-/* --------------------------------------------------
- :: WP 3.8 Fixes (via Github @AlxMedia)
- ---------------------------------------------------*/
-#option-tree-settings-api #poststuff,
-#option-tree-settings-api #post-body-content {
- min-width: 0;
-}
-#option-tree-settings-api #poststuff h3 {
- font-family: inherit !important;
-}
-#option-tree-settings-api .postbox {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-#option-tree-settings-api p input[type="checkbox"],
-#option-tree-settings-api p input[type="radio"] {
- margin-top: 2px;
-}
-#option-tree-settings-api .format-setting.type-checkbox p,
-#option-tree-settings-api .format-setting.type-radio p {
- margin: 0.3em 0 !important;
-}
-input.option-tree-ui-upload-input,
-input.option-tree-ui-input {
- padding-top: 5px;
- padding-bottom: 5px;
-}
-@media screen and ( max-width: 782px ) {
- #option-tree-settings-api p input[type="checkbox"],
- #option-tree-settings-api p input[type="radio"] {
- margin-top: -3px;
- }
-}
-
-/* --------------------------------------------------
- :: Gallery
- ---------------------------------------------------*/
-ul.ot-gallery-list {
- float: left;
- margin: 0;
- width: 100%;
-}
-ul.ot-gallery-list li {
- background: none repeat scroll 0 0 white;
- border: 1px solid #bbb;
- float: left;
- margin: 0px 10px 10px 0;
- padding: 4px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-ul.ot-gallery-list li img {
- display: block;
- margin: 0;
-}
-
-.ot-gallery-buttons {
- float: left;
- width: 100%;
-}
-.ot-gallery-buttons a.option-tree-ui-button {
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-/* --------------------------------------------------
- :: Google Fonts
- ---------------------------------------------------*/
-.option-tree-google-font-family,
-.option-tree-google-font-variants,
-.option-tree-google-font-subsets {
- float: left;
- width: 20%;
-}
-.option-tree-google-font-family {
- width: 100%;
-}
-#option-tree-settings-api p.checkbox-wrap,
-#post-body .ot-metabox-panels p.checkbox-wrap {
- display: block;
- float: left;
- margin: 0.3em 0 !important;
- width: 100%;
-}
-@media screen and ( max-width: 1020px ) {
- .option-tree-google-font-variants,
- .option-tree-google-font-subsets {
- width: 33%;
- }
-}
-@media screen and ( max-width: 782px ) {
- .option-tree-google-font-variants,
- .option-tree-google-font-subsets {
- width: 50%;
- }
-}
-
-/* --------------------------------------------------
- :: On/Off Switch
- ---------------------------------------------------*/
-.on-off-switch .slide-button {
- display: none;
-}
-@media only screen {
- .on-off-switch {
- background-color: #fff;
- border: 1px solid #ccc;
- color: #333;
- display: block;
- font-size: 12px;
- font-weight: normal;
- height: 27px;
- margin: 2px 1px;
- position: relative;
- padding: 0;
- text-align: center;
- text-transform: uppercase;
- width: 100px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
- }
- .on-off-switch * {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .on-off-switch input {
- position: absolute;
- opacity: 0;
- }
- .on-off-switch label {
- cursor: pointer;
- float: left;
- height: 27px;
- line-height: 27px;
- margin: 0;
- position: relative;
- text-align: center;
- vertical-align: middle;
- width: 50%;
- z-index: 2;
- }
- .on-off-switch input:last-of-type + label {
- color: #333;
- }
- .on-off-switch input:checked + label {
- color: #333;
- }
- .on-off-switch input:last-of-type:checked + label {
- color: #fff;
- }
- .on-off-switch input:focus + label {
- outline: none;
- }
- .on-off-switch .slide-button {
- background: #b2d27e;
- border: 1px solid #7c9258;
- display: block;
- height: 29px;
- left: -1px;
- padding: 0;
- position: absolute;
- text-decoration: none;
- top: -1px;
- width: 51%;
- z-index: 1;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- -webkit-box-shadow: inset 0 1px 0 #c8eb8e, 0 1px 0 rgba(0,0,0,.08);
- -moz-box-shadow: inset 0 1px 0 #c8eb8e, 0 1px 0 rgba(0,0,0,.08);
- box-shadow: inset 0 1px 0 #c8eb8e, 0 1px 0 rgba(0,0,0,.08);
- -webkit-transition: all 0.2s ease-out;
- -moz-transition: all 0.2s ease-out;
- transition: all 0.2s ease-out;
- }
- .on-off-switch input:last-of-type:checked ~ .slide-button {
- background: #b73b27;
- border-color: #7f291b;
- color: #fff;
- left: 50%;
- -webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 0 1px 0 rgba(0,0,0,.15);
- -moz-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 0 1px 0 rgba(0,0,0,.15);
- box-shadow: inset 0 1px 0 rgba(229,134,119,0.6), 0 1px 0 rgba(0,0,0,.15);
- }
-}
-@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 1280px) {
- .on-off-switch {
- -webkit-animation: webkitSiblingBugfix infinite 1s;
- }
-}
-@-webkit-keyframes webkitSiblingBugfix {
- from {
- -webkit-transform: translate3d(0, 0, 0);
- }
- to {
- -webkit-transform: translate3d(0, 0, 0);
- }
-}
-
-/* --------------------------------------------------
- :: Simple Input Append & Prepend
- ---------------------------------------------------*/
-.ot-input-append,
-.ot-input-prepend {
- display: inline-block;
- vertical-align: middle;
- font-size: 0;
- white-space: nowrap;
-}
-.ot-input-append input {
- position: relative;
- margin-bottom: 0;
- *margin-left: 0;
- vertical-align: top;
- -webkit-border-radius: 0 2px 2px 0;
- -moz-border-radius: 0 2px 2px 0;
- border-radius: 0 2px 2px 0;
-}
-.ot-input-append input:focus,
-.ot-input-prepend input:focus {
- z-index: 2;
-}
-.ot-input-append .ot-add-on,
-.ot-input-prepend .ot-add-on {
- display: inline-block;
- width: auto;
- height: 27px;
- line-height: 28px;
- min-width: 16px;
- padding: 0 6px;
- font-size: 16px;
- font-weight: normal;
- text-align: center;
- text-shadow: 0 1px 0 white;
- background-color: #f7f7f7;
- border: 1px solid #ccc;
-}
-.ot-input-prepend input {
- border-left: 0 !important;
-}
-.ot-input-prepend .ot-add-on:first-child {
- -webkit-border-radius: 2px 0 0 2px;
- -moz-border-radius: 2px 0 0 2px;
- border-radius: 2px 0 0 2px;
-}
-.ot-input-append input {
- border-right: 0 !important;
- -webkit-border-radius: 2px 0 0 2px;
- -moz-border-radius: 2px 0 0 2px;
- border-radius: 2px 0 0 2px;
-}
-.ot-input-append input + .btn-group .btn:first-child {
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topleft: 0;
- border-top-left-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -moz-border-radius-bottomleft: 0;
- border-bottom-left-radius: 0;
-}
-.ot-input-append .ot-add-on:last-child {
- -webkit-border-radius: 0 2px 2px 0;
- -moz-border-radius: 0 2px 2px 0;
- border-radius: 0 2px 2px 0;
-}
-.ot-input-prepend.ot-input-append input {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-.ot-input-prepend.ot-input-append .ot-add-on:first-child {
- -webkit-border-radius: 2px 0 0 2px;
- -moz-border-radius: 2px 0 0 2px;
- border-radius: 2px 0 0 2px;
-}
-.ot-input-prepend.ot-input-append .ot-add-on:last-child {
- -webkit-border-radius: 0 2px 2px 0;
- -moz-border-radius: 0 2px 2px 0;
- border-radius: 0 2px 2px 0;
-}
-
-/* --------------------------------------------------
- :: CSS Editor
- ---------------------------------------------------*/
-#option-tree-settings-api pre.ot-css-editor,
-#poststuff .type-css pre.ot-css-editor,
-#option-tree-settings-api pre.ot-javascript-editor,
-#poststuff .type-javascript pre.ot-javascript-editor {
- bottom: 0;
- height: 280px;
- left: 0;
- margin: 0 !important;
- right: 0;
- top: 0;
-}
-#option-tree-settings-api pre.ace-chrome,
-#poststuff .type-css pre.ace-chrome,
-#poststuff .type-javascript pre.ace-chrome {
- background-color: #fff !important;
- border: 1px solid #ccc;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-#option-tree-settings-api pre.ace-chrome:hover,
-#poststuff .type-css pre.ace-chrome:hover,
-#poststuff .type-javascript pre.ace-chrome:hover {
- border-color: #bbb !important;
- -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
-}
-#option-tree-settings-api pre.ace-chrome.ace_focus,
-#poststuff .type-css pre.ace-chrome.ace_focus,
-#poststuff .type-javascript pre.ace-chrome.ace_focus {
- border-color: #999 !important;
- -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.0980392);
-}
-
-/* --------------------------------------------------
- :: Date Picker
- ---------------------------------------------------*/
-.ui-datepicker {
- background: #fff;
- border: 1px solid #ccc;
- height: auto;
- margin: 5px auto 0;
- width: 216px;
- z-index: 101 !important;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ui-datepicker a {
- text-decoration: none;
-}
-.ui-datepicker table {
- border-collapse: collapse;
- border-spacing: 0;
- width: 100%;
-}
-.ui-datepicker .ui-widget-header {
- left: -1px;
- line-height: 30px;
- position: relative;
- top: -1px;
- width: 218px;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
-}
-.ui-datepicker .ui-datepicker-title {
- text-align: center;
-}
-.ui-datepicker-prev,
-.ui-datepicker-next {
- color: #ccc;
- display: inline-block;
- font-family: "option-tree-font";
- font-size: 16px;
- width: 30px;
- height: 30px;
- text-align: center;
- cursor: pointer;
- -webkit-border-radius: 2px 0 0 0;
- -moz-border-radius: 2px 0 0 0;
- border-radius: 2px 0 0 0;
-}
-.ui-datepicker-next {
- -webkit-border-radius: 0 2px 0 0;
- -moz-border-radius: 0 2px 0 0;
- border-radius: 0 2px 0 0;
-}
-.ui-datepicker-prev span,
-.ui-datepicker-next span {
- display: none;
-}
-.ui-datepicker-prev:hover,
-.ui-datepicker-next:hover {
- color: #fff;
-}
-.ui-datepicker-prev:before {
- border-right: 1px solid #555;
- content: "\f104";
- display: block;
- float: left;
- width: 31px;
- height: 30px;
-}
-.ui-datepicker-prev {
- border-right: 1px solid #333;
- float: left;
-}
-.ui-datepicker-next:before {
- border-left: 1px solid #555;
- content: "\f105";
- display: block;
- float: right;
- width: 30px;
- height: 30px;
-}
-.ui-datepicker-next {
- border-left: 1px solid #333;
- float: right;
- width: 31px;
-}
-a.ui-datepicker-prev,
-a.ui-datepicker-next {
- outline: 0;
-}
-.ui-datepicker thead {
- background-color: #fafafa;
- border-bottom: 1px solid #ccc;
-}
-.ui-datepicker th {
- text-transform: uppercase;
- font-size: 9px;
- padding: 5px 0;
- color: #555;
- text-shadow: 1px 0px 0px rgba(255,255,255,0.5);
-}
-.ui-datepicker tbody td {
- border-right: 1px solid #ccc;
- padding: 0;
-}
-.ui-datepicker tbody td:last-child {
- border-right: 0px;
-}
-.ui-datepicker tbody tr {
- border-bottom: 1px solid #ccc;
-}
-.ui-datepicker tbody tr:last-child {
- border-bottom: 0px;
-}
-.ui-datepicker td span,
-.ui-datepicker td a {
- display: inline-block;
- font-size: 11px;
- text-align: center;
- width: 30px;
- height: 29px;
- line-height: 30px;
- color: #555;
- text-shadow: 1px 0px 0px rgba(255,255,255,0.5);
-}
-.ui-datepicker-calendar .ui-state-default {
- background-color: #f1f1f1;
-}
-.ui-datepicker-calendar .ui-state-highlight {
- border-radius: 0px;
- border: none;
- color: #0074a2;
-}
-.ui-datepicker-calendar .ui-state-hover {
- background: #fff;
-}
-.ui-datepicker-calendar .ui-state-active {
- background-color: #0074a2;
- color: #fff !important;
- text-shadow: 0px 1px 0px rgba(0,0,0,0.25);
- position: relative;
-}
-.ui-datepicker-unselectable .ui-state-default {
- background: #fff;
- color: #aaa;
-}
-.ui-datepicker-calendar td:first-child .ui-state-active {
- margin-left: 0;
- width: 30px;
-}
-.ui-datepicker-calendar td:last-child .ui-state-active {
- margin-right: 0;
- width: 30px;
-}
-.ui-datepicker-calendar tr:last-child .ui-state-active {
- height: 30px;
- margin-bottom: 0;
-}
-.ui-datepicker .ui-datepicker-buttonpane {
- background-image: none;
- border-left: 0;
- border-right: 0;
- border-bottom: 0;
- margin: 0;
- padding: 0 .7em;
-}
-.ui-datepicker .ui-datepicker-buttonpane button {
- background: #f7f7f7;
- border: 1px solid #ccc;
- color: #555;
- cursor: pointer;
- float: right;
- height: auto;
- margin: .7em 0;
- padding: 5px 14px;
- width: auto;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
- -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
- box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
-}
-.ui-datepicker .ui-datepicker-buttonpane button::-moz-focus-inner {
- border-width: 1px 0;
- border-style: solid none;
- border-color: transparent;
- padding: 0;
-}
-.ui-datepicker .ui-datepicker-buttonpane button:hover,
-.ui-datepicker .ui-datepicker-buttonpane button:focus {
- background: #fafafa;
- border-color: #999;
- color: #222;
- outline: 0;
-}
-.ui-datepicker .ui-datepicker-buttonpane button:focus {
- -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
- -moz-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
- box-shadow: 1px 1px 1px rgba(0,0,0,.2);
-}
-.ui-datepicker .ui-datepicker-buttonpane button:active {
- background: #eee;
- border-color: #999;
- color: #333;
- outline: 0;
- -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
- -moz-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
- box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
-}
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
- float: left;
-}
-.ui-datepicker-calendar + .ui-datepicker-buttonpane {
- border-bottom: 1px solid #ccc;
-}
-.ui-datepicker-multi-2 {
- width: 432px !important;
-}
-.ui-datepicker-multi-3 {
- width: 648px !important;
-}
-.ui-datepicker-multi-4 {
- width: 864px !important;
-}
-.ui-datepicker-group {
- float: left;
- width: 216px !important;
-}
-.ui-datepicker-row-break {
- clear: both;
- width: 100%;
- font-size: 0;
-}
-.ui-datepicker-multi .ui-datepicker-buttonpane {
- border-top: 1px solid #ccc !important;
-}
-
-/* default color scheme */
-.ui-datepicker .ui-widget-header {
- background: #333;
- color: #bbb;
-}
-.ui-datepicker .ui-widget-header a {
- color: #999;
-}
-.ui-datepicker-prev,
-.ui-datepicker-next:before {
- border-color: #000;
-}
-.ui-datepicker-next,
-.ui-datepicker-prev:before {
- border-color: #444;
-}
-.ui-datepicker-prev:hover,
-.ui-datepicker-next:hover {
- background: #222;
- color: #0074a2 !important;
-}
-/* light */
-.admin-color-light .ui-datepicker .ui-widget-header {
- background: #888;
- color: #fff;
-}
-.admin-color-light .ui-datepicker .ui-widget-header a {
- color: #ccc;
-}
-.admin-color-light .ui-datepicker-prev,
-.admin-color-light .ui-datepicker-next:before {
- border-color: #3c3c3c;
-}
-.admin-color-light .ui-datepicker-next,
-.admin-color-light .ui-datepicker-prev:before {
- border-color: #999;
-}
-.admin-color-light .ui-datepicker-prev:hover,
-.admin-color-light .ui-datepicker-next:hover {
- background: #777;
- color: #eee !important;
-}
-/* blue */
-.admin-color-blue .ui-datepicker .ui-widget-header {
- background: #52accc;
- color: #fff;
-}
-.admin-color-blue .ui-datepicker .ui-widget-header a {
- color: #e2f8ff;
-}
-.admin-color-blue .ui-datepicker-prev,
-.admin-color-blue .ui-datepicker-next:before {
- border-color: #002b39;
-}
-.admin-color-blue .ui-datepicker-next,
-.admin-color-blue .ui-datepicker-prev:before {
- border-color: #5dc2e6;
-}
-.admin-color-blue .ui-datepicker-prev:hover,
-.admin-color-blue .ui-datepicker-next:hover {
- background: #006484;
- color: #fff !important;
-}
-/* coffee */
-.admin-color-coffee .ui-datepicker .ui-widget-header {
- background: #59524c;
- color: #c7cbc9;
-}
-.admin-color-coffee .ui-datepicker .ui-widget-header a {
- color: #f3f2f1;
-}
-.admin-color-coffee .ui-datepicker-prev,
-.admin-color-coffee .ui-datepicker-next:before {
- border-color: #0f0e0d;
-}
-.admin-color-coffee .ui-datepicker-next,
-.admin-color-coffee .ui-datepicker-prev:before {
- border-color: #675f58;
-}
-.admin-color-coffee .ui-datepicker-prev:hover,
-.admin-color-coffee .ui-datepicker-next:hover {
- background: #cca588;
- color: #fff !important;
-}
-/* ectoplasm */
-.admin-color-ectoplasm .ui-datepicker .ui-widget-header {
- background: #523f6d;
- color: #c6c6d3;
-}
-.admin-color-ectoplasm .ui-datepicker .ui-widget-header a {
- color: #f3f2f1;
-}
-.admin-color-ectoplasm .ui-datepicker-prev,
-.admin-color-ectoplasm .ui-datepicker-next:before {
- border-color: #181220;
-}
-.admin-color-ectoplasm .ui-datepicker-next,
-.admin-color-ectoplasm .ui-datepicker-prev:before {
- border-color: #644d85;
-}
-.admin-color-ectoplasm .ui-datepicker-prev:hover,
-.admin-color-ectoplasm .ui-datepicker-next:hover {
- background: #a3b542;
- color: #fff !important;
-}
-/* midnight */
-.admin-color-midnight .ui-datepicker .ui-widget-header {
- background: #363b3f;
- color: #f1f2f3;
-}
-.admin-color-midnight .ui-datepicker .ui-widget-header a {
- color: #f1f2f3;
-}
-.admin-color-midnight .ui-datepicker-prev,
-.admin-color-midnight .ui-datepicker-next:before {
- border-color: #090a0b;
-}
-.admin-color-midnight .ui-datepicker-next,
-.admin-color-midnight .ui-datepicker-prev:before {
- border-color: #4c5359;
-}
-.admin-color-midnight .ui-datepicker-prev:hover,
-.admin-color-midnight .ui-datepicker-next:hover {
- background: #ed543f;
- color: #fff !important;
-}
-/* ocean */
-.admin-color-ocean .ui-datepicker .ui-widget-header {
- background: #738e96;
- color: #f1fcff;
-}
-.admin-color-ocean .ui-datepicker .ui-widget-header a {
- color: #f1fcff;
-}
-.admin-color-ocean .ui-datepicker-prev,
-.admin-color-ocean .ui-datepicker-next:before {
- border-color: #39464a;
-}
-.admin-color-ocean .ui-datepicker-next,
-.admin-color-ocean .ui-datepicker-prev:before {
- border-color: #87a6af;
-}
-.admin-color-ocean .ui-datepicker-prev:hover,
-.admin-color-ocean .ui-datepicker-next:hover {
- background: #9ab8a0;
- color: #fff !important;
-}
-/* sunrise */
-.admin-color-sunrise .ui-datepicker .ui-widget-header {
- background: #da4f41;
- color: #fff;
-}
-.admin-color-sunrise .ui-datepicker .ui-widget-header a {
- color: #f3f1f1;
-}
-.admin-color-sunrise .ui-datepicker-prev,
-.admin-color-sunrise .ui-datepicker-next:before {
- border-color: #8a322a;
-}
-.admin-color-sunrise .ui-datepicker-next,
-.admin-color-sunrise .ui-datepicker-prev:before {
- border-color: #e75546;
-}
-.admin-color-sunrise .ui-datepicker-prev:hover,
-.admin-color-sunrise .ui-datepicker-next:hover {
- background: #e88436;
- color: #fff !important;
-}
-
-/* --------------------------------------------------
- :: Time Picker
- ---------------------------------------------------*/
-.ui-timepicker-div {
- border-top: 1px solid #ccc;
- padding: 0 .4em;
-}
-.ui-timepicker-div .ui-widget-content {
- border: 1px solid #aaa;
- background: #fff;
- font-weight: normal;
- color: #212121;
-}
-.ui-timepicker-div .ui-slider {
- position: relative;
- text-align: left;
-}
-.ui-timepicker-div .ui-slider-horizontal {
- height: .8em;
- bottom: -.3em;
- position: relative;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #f7f7f7;
- border: 1px solid #ccc;
- color: #555;
- cursor: pointer;
- display: block;
- height: 1.3em;
- margin-left: -.5em;
- outline: 0;
- position: absolute;
- top: -.325em;
- width: .8em;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0,0,0,.08);
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover {
- background: #fafafa;
- border-color: #999;
- color: #222;
-}
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #eee;
- border-color: #999;
- color: #333;
- outline: none;
-}
-.ui-datepicker-prev,
-.ui-datepicker-next:before {
- border-color: #000;
-}
-.ui-datepicker-next,
-.ui-datepicker-prev:before {
- border-color: #444;
-}
-.ui-datepicker-prev:hover,
-.ui-datepicker-next:hover {
- background: #222;
- color: #0074a2 !important;
-}
-
-.ui-timepicker-div dl {
- text-align: left;
-}
-.ui-timepicker-div dl dt {
- float: left;
- clear: left;
- padding: 0 0 0 5px;
-}
-.ui-timepicker-div dl dd {
- margin: 0 10px 10px 45%;
-}
-.ui-timepicker-div td {
- font-size: 90%;
-}
-.ui-tpicker-grid-label {
- background: none;
- border: none;
- margin: 0;
- padding: 0;
-}
-/* default */
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #333;
- border-color: #000;
-}
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #444;
- border-color: #111;
-}
-/* light */
-.admin-color-light .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #888;
- border-color: #3c3c3c;
-}
-.admin-color-light .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-light .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #999;
- border-color: #777;
-}
-/* blue */
-.admin-color-blue .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #52accc;
- border-color: #002b39;
-}
-.admin-color-blue .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-blue .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #5dc2e6;
- border-color: #006484;
-}
-/* coffee */
-.admin-color-coffee .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #59524c;
- border-color: #0f0e0d;
-}
-.admin-color-coffee .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-coffee .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #cca588;
- border-color: #675f58;
-}
-/* ectoplasm */
-.admin-color-ectoplasm .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #523f6d;
- border-color: #181220;
-}
-.admin-color-ectoplasm .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-ectoplasm .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #a3b542;
- border-color: #644d85;
-}
-/* midnight */
-.admin-color-midnight .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #363b3f;
- border-color: #090a0b;
-}
-.admin-color-midnight .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-midnight .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #ed543f;
- border-color: #a0382a;
-}
-/* ocean */
-.admin-color-ocean .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #738e96;
- border-color: #39464a;
-}
-.admin-color-ocean .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-ocean .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #9ab8a0;
- border-color: #5a6c5e;
-}
-/* sunrise */
-.admin-color-sunrise .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle {
- background: #da4f41;
- border-color: #8a322a;
-}
-.admin-color-sunrise .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle:hover,
-.admin-color-sunrise .ui-timepicker-div .ui-slider-horizontal .ui-slider-handle.ui-state-active {
- background: #e88436;
- border-color: #e75546;
-}
-
-/* --------------------------------------------------
- :: Meta Box Tabs
- ---------------------------------------------------*/
-.ot-metabox-tabs.ui-tabs {
- overflow: hidden;
- position: relative;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-wrapper {
- overflow: hidden;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-panels {
- background: white;
- border: 1px solid #ccc;
- margin: 7px 0 1px 0;
- min-height: 140px;
- overflow: hidden;
- padding: 12px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- float: left;
- list-style: none;
- margin: 0 -1px 0 0;
- padding: 18px 0 12px 0;
- width: 151px;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li,
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-focus {
- background: none;
- border: 1px solid transparent;
- border-right-width: 0px;
- display: block;
- margin: 0;
- outline: 0;
- padding: 1px 0;
- width: 150px;
- -webkit-border-radius: 2px 0 0 2px;
- -moz-border-radius: 2px 0 0 2px;
- border-radius: 2px 0 0 2px;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active {
- background: white;
- border-color: #ccc;
- color: black;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a {
- color: #21759b;
- display: block;
- line-height: 18px;
- outline: 0;
- padding: 5px 5px 5px 12px;
- text-decoration: none;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a:hover {
- color: black;
- outline: none;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active a {
- color: black;
- outline: none;
-}
-.ot-metabox-tabs.ui-tabs .ot-metabox-panel {
- clear: both;
-}
-
-/* --------------------------------------------------
- :: Theme Option & Side Metabox Tabs
- ---------------------------------------------------*/
-.ot-theme-option-tabs.ui-tabs
-#side-sortables .ot-metabox-tabs.ui-tabs {
- position: relative;
-}
-.ot-theme-option-tabs.ui-tabs .inside,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-wrapper {
- overflow: hidden;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-panels,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-panels {
- border: 0;
- margin: 0;
- overflow: hidden;
- padding: 0;
- width: 100%;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- border-bottom: 1px solid #ccc;
- float: none;
- font-size: 12px !important;
- height: 30px;
- list-style: none;
- margin: 2px 0 0 0;
- padding: 0;
- width: 100%;
-}
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- margin-top: 10px;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li.ui-state-default,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-default {
- background: #fafafa;
- border: 1px solid #ccc;
- border-width: 1px 1px 0px 1px;
- display: block;
- float: left;
- margin: 0 0 0 3px;
- padding: 0;
- outline: 0;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li:hover,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li:hover {
- background: #f1f1f1;
- border: 1px solid #ccc;
- border-width: 1px 1px 0px 1px;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li.ui-state-active,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active {
- background: white;
- border-color: #ccc;
- border-width: 1px 1px 0px 1px;
- color: black;
- padding: 0;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li a,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a {
- color: #21759b;
- display: block;
- line-height: 18px;
- outline: 0;
- padding: 6px 12px 5px 12px !important;
- text-decoration: none;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li a:hover,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a:hover {
- color: black;
- outline: none;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-nav.ui-tabs-nav li.ui-state-active a,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active a {
- color: black;
- outline: none;
- padding: 6px 12px 6px 12px !important;
-}
-.ot-theme-option-tabs.ui-tabs .ot-theme-option-panel,
-#side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-panel {
- clear: both;
-}
-#side-sortables .ot-metabox-tabs.ui-tabs .format-setting .description,
-#side-sortables .ot-metabox-tabs.ui-tabs .format-setting .format-setting-inner {
- width: 100%;
-}
-
-/* --------------------------------------------------
- :: Metabox Tabs for Small Screens & Mobile Devices
- ---------------------------------------------------*/
-@media screen and ( max-width: 1020px ) {
- .ot-metabox-tabs.ui-tabs {
- position: relative;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-wrapper {
- overflow: hidden;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-panels {
- border: 0;
- margin: 0;
- overflow: hidden;
- padding: 0;
- width: 100%;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- border-bottom: 1px solid #ccc;
- float: none;
- font-size: 12px !important;
- height: 30px;
- list-style: none;
- margin: 2px 0 0 0;
- padding: 0;
- width: 100%;
- }
- #side-sortables .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav {
- margin-top: 10px;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li {
- background: #fafafa;
- border: 1px solid #ccc !important;
- border-width: 1px 1px 0px 1px !important;
- display: inline-block !important;
- margin: 0 0 0 3px !important;
- padding: 0 !important;
- outline: 0 !important;
- width: auto !important;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li:hover {
- background: #f1f1f1;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active {
- background: white;
- color: black;
- padding: 0;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a {
- color: #21759b;
- display: block;
- line-height: 18px;
- outline: 0;
- padding: 6px 12px 5px 12px !important;
- text-decoration: none;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li a:hover {
- color: black;
- outline: none;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-nav.ui-tabs-nav li.ui-state-active a {
- color: black;
- outline: none;
- padding: 6px 12px 6px 12px !important;
- }
- .ot-metabox-tabs.ui-tabs .ot-metabox-panel {
- clear: both;
- }
-}
\ No newline at end of file
diff --git a/option-tree/assets/fonts/option-tree-font.eot b/option-tree/assets/fonts/option-tree-font.eot
deleted file mode 100644
index b3dcf0a..0000000
Binary files a/option-tree/assets/fonts/option-tree-font.eot and /dev/null differ
diff --git a/option-tree/assets/fonts/option-tree-font.svg b/option-tree/assets/fonts/option-tree-font.svg
deleted file mode 100644
index 0bdfce2..0000000
--- a/option-tree/assets/fonts/option-tree-font.svg
+++ /dev/null
@@ -1,379 +0,0 @@
-
-
-
-Generated by IcoMoon
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/option-tree/assets/fonts/option-tree-font.ttf b/option-tree/assets/fonts/option-tree-font.ttf
deleted file mode 100644
index 713b6ad..0000000
Binary files a/option-tree/assets/fonts/option-tree-font.ttf and /dev/null differ
diff --git a/option-tree/assets/fonts/option-tree-font.woff b/option-tree/assets/fonts/option-tree-font.woff
deleted file mode 100644
index e62de51..0000000
Binary files a/option-tree/assets/fonts/option-tree-font.woff and /dev/null differ
diff --git a/option-tree/assets/images/layout/dual-sidebar.png b/option-tree/assets/images/layout/dual-sidebar.png
deleted file mode 100644
index e3e5a77..0000000
Binary files a/option-tree/assets/images/layout/dual-sidebar.png and /dev/null differ
diff --git a/option-tree/assets/images/layout/full-width.png b/option-tree/assets/images/layout/full-width.png
deleted file mode 100644
index 1be1821..0000000
Binary files a/option-tree/assets/images/layout/full-width.png and /dev/null differ
diff --git a/option-tree/assets/images/layout/left-dual-sidebar.png b/option-tree/assets/images/layout/left-dual-sidebar.png
deleted file mode 100644
index 81c3a94..0000000
Binary files a/option-tree/assets/images/layout/left-dual-sidebar.png and /dev/null differ
diff --git a/option-tree/assets/images/layout/left-sidebar.png b/option-tree/assets/images/layout/left-sidebar.png
deleted file mode 100644
index a561345..0000000
Binary files a/option-tree/assets/images/layout/left-sidebar.png and /dev/null differ
diff --git a/option-tree/assets/images/layout/right-dual-sidebar.png b/option-tree/assets/images/layout/right-dual-sidebar.png
deleted file mode 100644
index 8f0d207..0000000
Binary files a/option-tree/assets/images/layout/right-dual-sidebar.png and /dev/null differ
diff --git a/option-tree/assets/images/layout/right-sidebar.png b/option-tree/assets/images/layout/right-sidebar.png
deleted file mode 100644
index dee99e5..0000000
Binary files a/option-tree/assets/images/layout/right-sidebar.png and /dev/null differ
diff --git a/option-tree/assets/images/ot-pre-bg.gif b/option-tree/assets/images/ot-pre-bg.gif
deleted file mode 100644
index 9eb28f3..0000000
Binary files a/option-tree/assets/images/ot-pre-bg.gif and /dev/null differ
diff --git a/option-tree/assets/images/ot-select-hover-rtl.png b/option-tree/assets/images/ot-select-hover-rtl.png
deleted file mode 100644
index 0af6fa9..0000000
Binary files a/option-tree/assets/images/ot-select-hover-rtl.png and /dev/null differ
diff --git a/option-tree/assets/images/ot-select-hover.png b/option-tree/assets/images/ot-select-hover.png
deleted file mode 100644
index 776b521..0000000
Binary files a/option-tree/assets/images/ot-select-hover.png and /dev/null differ
diff --git a/option-tree/assets/images/ot-select-rtl.png b/option-tree/assets/images/ot-select-rtl.png
deleted file mode 100644
index 68cc5c0..0000000
Binary files a/option-tree/assets/images/ot-select-rtl.png and /dev/null differ
diff --git a/option-tree/assets/images/ot-select.png b/option-tree/assets/images/ot-select.png
deleted file mode 100644
index 5b335f4..0000000
Binary files a/option-tree/assets/images/ot-select.png and /dev/null differ
diff --git a/option-tree/assets/js/ot-admin.js b/option-tree/assets/js/ot-admin.js
deleted file mode 100644
index d15bc73..0000000
--- a/option-tree/assets/js/ot-admin.js
+++ /dev/null
@@ -1,1293 +0,0 @@
-/**
- * Option Tree UI
- *
- * Dependencies: jQuery, jQuery UI, ColorPicker
- *
- * @author Derek Herman (derek@valendesigns.com)
- */
-;(function($) {
- OT_UI = {
- processing: false,
- init: function() {
- this.init_hide_body();
- this.init_sortable();
- this.init_add();
- this.init_edit();
- this.init_remove();
- this.init_edit_title();
- this.init_edit_id();
- this.init_activate_layout();
- this.init_conditions();
- this.init_upload();
- this.init_upload_remove();
- this.init_numeric_slider();
- this.init_tabs();
- this.init_radio_image_select();
- this.init_select_wrapper();
- this.bind_select_wrapper();
- this.init_google_fonts();
- this.fix_upload_parent();
- this.fix_textarea();
- this.replicate_ajax();
- this.reset_settings();
- this.css_editor_mode();
- this.javascript_editor_mode();
- },
- init_hide_body: function(elm,type) {
- var css = '.option-tree-setting-body';
- if ( type == 'parent' ) {
- $(css).not( elm.parent().parent().children(css) ).hide();
- } else if ( type == 'child' ) {
- elm.closest('ul').find(css).not( elm.parent().parent().children(css) ).hide();
- } else if ( type == 'child-add' ) {
- elm.children().find(css).hide();
- } else if ( type == 'toggle' ) {
- elm.parent().parent().children(css).toggle();
- } else {
- $(css).hide();
- }
- },
- init_remove_active: function(elm,type) {
- var css = '.option-tree-setting-edit';
- if ( type == 'parent' ) {
- $(css).not(elm).removeClass('active');
- } else if ( type == 'child' ) {
- elm.closest('ul').find(css).not(elm).removeClass('active');
- } else if ( type == 'child-add' ) {
- elm.children().find(css).removeClass('active');
- } else {
- $(css).removeClass('active');
- }
- },
- init_sortable: function(scope) {
- scope = scope || document;
- $('.option-tree-sortable', scope).each( function() {
- if ( $(this).children('li').length ) {
- var elm = $(this);
- elm.show();
- elm.sortable({
- items: 'li:not(.ui-state-disabled)',
- handle: 'div.open',
- placeholder: 'ui-state-highlight',
- start: function (event, ui) {
- ui.placeholder.height(ui.item.height()-2);
- },
- stop: function(evt, ui) {
- setTimeout(
- function(){
- OT_UI.update_ids(elm);
- },
- 200
- )
- }
- });
- }
- });
- },
- init_add: function() {
- $(document).on('click', '.option-tree-section-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'section');
- });
- $(document).on('click', '.option-tree-setting-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'setting');
- });
- $(document).on('click', '.option-tree-help-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'the_contextual_help');
- });
- $(document).on('click', '.option-tree-choice-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'choice');
- });
- $(document).on('click', '.option-tree-list-item-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'list_item');
- });
- $(document).on('click', '.option-tree-social-links-add', function(e) {
- e.preventDefault();
- OT_UI.add(this,'social_links');
- });
- $(document).on('click', '.option-tree-list-item-setting-add', function(e) {
- e.preventDefault();
- if ( $(this).parents('ul').parents('ul').hasClass('ui-sortable') ) {
- alert(option_tree.setting_limit);
- return false;
- }
- OT_UI.add(this,'list_item_setting');
- });
- },
- init_edit: function() {
- $(document).on('click', '.option-tree-setting-edit', function(e) {
- e.preventDefault();
- if ( $(this).parents().hasClass('option-tree-setting-body') ) {
- OT_UI.init_remove_active($(this),'child');
- OT_UI.init_hide_body($(this),'child');
- } else {
- OT_UI.init_remove_active($(this),'parent');
- OT_UI.init_hide_body($(this), 'parent');
- }
- $(this).toggleClass('active');
- OT_UI.init_hide_body($(this), 'toggle');
- });
- },
- init_remove: function() {
- $(document).on('click', '.option-tree-setting-remove', function(event) {
- event.preventDefault();
- if ( $(this).parents('li').hasClass('ui-state-disabled') ) {
- alert(option_tree.remove_no);
- return false;
- }
- var agree = confirm(option_tree.remove_agree);
- if (agree) {
- var list = $(this).parents('ul');
- OT_UI.remove(this);
- setTimeout( function() {
- OT_UI.update_ids(list);
- }, 200 );
- }
- return false;
- });
- },
- init_edit_title: function() {
- $(document).on('keyup', '.option-tree-setting-title', function() {
- OT_UI.edit_title(this);
- });
- // Automatically fill option IDs with clean versions of their respective option labels
- $(document).on('blur', '.option-tree-setting-title', function() {
- var optionId = $(this).parents('.option-tree-setting-body').find('[type="text"][name$="id]"]')
- if ( optionId.val() === '' ) {
- optionId.val($(this).val().replace(/[^a-z0-9]/gi,'_').toLowerCase());
- }
- });
- },
- init_edit_id: function() {
- $(document).on('keyup', '.section-id', function(){
- OT_UI.update_id(this);
- });
- },
- init_activate_layout: function() {
- $(document).on('click', '.option-tree-layout-activate', function() {
- var active = $(this).parents('.option-tree-setting').find('.open').text();
- $('.option-tree-layout-activate').removeClass('active');
- $(this).toggleClass('active');
- $('.active-layout-input').attr({'value':active});
- });
- $(document).on('change', '#option-tree-options-layouts-form select', function() {
- var agree = confirm(option_tree.activate_layout_agree);
- if (agree) {
- $('#option-tree-options-layouts-form').submit();
- } else {
- var active = $('#the_current_layout').attr('value');
- $('#option-tree-options-layouts-form select option[value="' + active + '"]').attr({'selected':'selected'});
- $('#option-tree-options-layouts-form select').prev('span').replaceWith('
' + active + ' ');
- }
- });
- },
- add: function(elm,type) {
- var self = this,
- list = '',
- list_class = '',
- name = '',
- post_id = 0,
- get_option = '',
- settings = '';
- if ( type == 'the_contextual_help' ) {
- list = $(elm).parent().find('ul:last');
- list_class = 'list-contextual-help';
- } else if ( type == 'choice' ) {
- list = $(elm).parent().children('ul');
- list_class = 'list-choice';
- } else if ( type == 'list_item' ) {
- list = $(elm).parent().children('ul');
- list_class = 'list-sub-setting';
- } else if ( type == 'list_item_setting' ) {
- list = $(elm).parent().children('ul');
- list_class = 'list-sub-setting';
- } else if ( type == 'social_links' ) {
- list = $(elm).parent().children('ul');
- list_class = 'list-sub-setting';
- } else {
- list = $(elm).parent().find('ul:first');
- list_class = ( type == 'section' ) ? 'list-section' : 'list-setting';
- }
- name = list.data('name');
- post_id = list.data('id');
- get_option = list.data('getOption');
- settings = $('#'+name+'_settings_array').val();
- if ( this.processing === false ) {
- this.processing = true;
- var count = parseInt(list.children('li').length);
- if ( type == 'list_item' || type == 'social_links' ) {
- list.find('li input.option-tree-setting-title', self).each(function(){
- var setting = $(this).attr('name'),
- regex = /\[([0-9]+)\]/,
- matches = setting.match(regex),
- id = null != matches ? parseInt(matches[1]) : 0;
- id++;
- if ( id > count) {
- count = id;
- }
- });
- }
- $.ajax({
- url: option_tree.ajax,
- type: 'post',
- data: {
- action: 'add_' + type,
- count: count,
- name: name,
- post_id: post_id,
- get_option: get_option,
- settings: settings,
- type: type,
- nonce: option_tree.nonce
- },
- complete: function( data ) {
- if ( type == 'choice' || type == 'list_item_setting' ) {
- OT_UI.init_remove_active(list,'child-add');
- OT_UI.init_hide_body(list,'child-add');
- } else {
- OT_UI.init_remove_active();
- OT_UI.init_hide_body();
- }
- var listItem = $('
' + data.responseText + ' ');
- list.append(listItem);
- list.children().last().find('.option-tree-setting-edit').toggleClass('active');
- list.children().last().find('.option-tree-setting-body').toggle();
- list.children().last().find('.option-tree-setting-title').focus();
- if ( type != 'the_contextual_help' ) {
- OT_UI.update_ids(list);
- }
- OT_UI.init_sortable(listItem);
- OT_UI.init_select_wrapper(listItem);
- OT_UI.init_numeric_slider(listItem);
- OT_UI.parse_condition();
- self.processing = false;
- }
- });
- }
- },
- remove: function(e) {
- $(e).parent().parent().parent('li').remove();
- },
- edit_title: function(e) {
- if ( this.timer ) {
- clearTimeout(e.timer);
- }
- this.timer = setTimeout( function() {
- $(e).parent().parent().parent().parent().parent().children('.open').text(e.value);
- }, 100);
- return true;
- },
- update_id: function(e) {
- if ( this.timer ) {
- clearTimeout(e.timer);
- }
- this.timer = setTimeout( function() {
- OT_UI.update_ids($(e).parents('ul'));
- }, 100);
- return true;
- },
- update_ids: function(list) {
- var last_section, section, list_items = list.children('li');
- list_items.each(function(index) {
- if ( $(this).hasClass('list-section') ) {
- section = $(this).find('.section-id').val().trim().toLowerCase().replace(/[^a-z0-9]/gi,'_');
- if (!section) {
- section = $(this).find('.section-title').val().trim().toLowerCase().replace(/[^a-z0-9]/gi,'_');
- }
- if (!section) {
- section = last_section;
- }
- }
- if ($(this).hasClass('list-setting') ) {
- $(this).find('.hidden-section').attr({'value':section});
- }
- last_section = section;
- });
- },
- condition_objects: function() {
- return 'select, input[type="radio"]:checked, input[type="text"], input[type="hidden"], input.ot-numeric-slider-hidden-input';
- },
- match_conditions: function(condition) {
- var match;
- var regex = /(.+?):(is|not|contains|less_than|less_than_or_equal_to|greater_than|greater_than_or_equal_to)\((.*?)\),?/g;
- var conditions = [];
-
- while( match = regex.exec( condition ) ) {
- conditions.push({
- 'check': match[1],
- 'rule': match[2],
- 'value': match[3] || ''
- });
- }
-
- return conditions;
- },
- parse_condition: function() {
- $( '.format-settings[id^="setting_"][data-condition]' ).each(function() {
-
- var passed;
- var conditions = OT_UI.match_conditions( $( this ).data( 'condition' ) );
- var operator = ( $( this ).data( 'operator' ) || 'and' ).toLowerCase();
-
- $.each( conditions, function( index, condition ) {
-
- var target = $( '#setting_' + condition.check );
- var targetEl = !! target.length && target.find( OT_UI.condition_objects() ).first();
-
- if ( ! target.length || ( ! targetEl.length && condition.value.toString() != '' ) ) {
- return;
- }
-
- var v1 = targetEl.length ? targetEl.val().toString() : '';
- var v2 = condition.value.toString();
- var result;
-
- switch ( condition.rule ) {
- case 'less_than':
- result = ( parseInt( v1 ) < parseInt( v2 ) );
- break;
- case 'less_than_or_equal_to':
- result = ( parseInt( v1 ) <= parseInt( v2 ) );
- break;
- case 'greater_than':
- result = ( parseInt( v1 ) > parseInt( v2 ) );
- break;
- case 'greater_than_or_equal_to':
- result = ( parseInt( v1 ) >= parseInt( v2 ) );
- break;
- case 'contains':
- result = ( v1.indexOf(v2) !== -1 ? true : false );
- break;
- case 'is':
- result = ( v1 == v2 );
- break;
- case 'not':
- result = ( v1 != v2 );
- break;
- }
-
- if ( 'undefined' == typeof passed ) {
- passed = result;
- }
-
- switch ( operator ) {
- case 'or':
- passed = ( passed || result );
- break;
- case 'and':
- default:
- passed = ( passed && result );
- break;
- }
-
- });
-
- if ( passed ) {
- $(this).animate({opacity: 'show' , height: 'show'}, 200);
- } else {
- $(this).animate({opacity: 'hide' , height: 'hide'}, 200);
- }
-
- delete passed;
-
- });
- },
- init_conditions: function() {
- var delay = (function() {
- var timer = 0;
- return function(callback, ms) {
- clearTimeout(timer);
- timer = setTimeout(callback, ms);
- };
- })();
-
- $('.format-settings[id^="setting_"]').on( 'change.conditionals, keyup.conditionals', OT_UI.condition_objects(), function(e) {
- if (e.type === 'keyup') {
- // handle keyup event only once every 500ms
- delay(function() {
- OT_UI.parse_condition();
- }, 500);
- } else {
- OT_UI.parse_condition();
- }
- OT_UI.load_editors();
- });
- OT_UI.parse_condition();
- },
- init_upload: function() {
- $(document).on('click', '.ot_upload_media', function() {
- var field_id = $(this).parent('.option-tree-ui-upload-parent').find('input').attr('id'),
- post_id = $(this).attr('rel'),
- save_attachment_id = $('#'+field_id).hasClass('ot-upload-attachment-id'),
- btnContent = '';
- if ( window.wp && wp.media ) {
- window.ot_media_frame = window.ot_media_frame || new wp.media.view.MediaFrame.Select({
- title: $(this).attr('title'),
- button: {
- text: option_tree.upload_text
- },
- multiple: false
- });
- window.ot_media_frame.on('select', function() {
- var attachment = window.ot_media_frame.state().get('selection').first(),
- href = attachment.attributes.url,
- attachment_id = attachment.attributes.id,
- mime = attachment.attributes.mime,
- regex = /^image\/(?:jpe?g|png|gif|x-icon)$/i;
- if ( mime.match(regex) ) {
- btnContent += '
';
- }
- btnContent += '
'+option_tree.remove_media_text+'';
- $('#'+field_id).val( ( save_attachment_id ? attachment_id : href ) );
- $('#'+field_id+'_media').remove();
- $('#'+field_id).parent().parent('div').append('
');
- $('#'+field_id+'_media').append(btnContent).slideDown();
- window.ot_media_frame.off('select');
- }).open();
- } else {
- var backup = window.send_to_editor,
- intval = window.setInterval(
- function() {
- if ( $('#TB_iframeContent').length > 0 && $('#TB_iframeContent').attr('src').indexOf( "&field_id=" ) !== -1 ) {
- $('#TB_iframeContent').contents().find('#tab-type_url').hide();
- }
- $('#TB_iframeContent').contents().find('.savesend .button').val(option_tree.upload_text);
- }, 50);
- tb_show('', 'media-upload.php?post_id='+post_id+'&field_id='+field_id+'&type=image&TB_iframe=1');
- window.send_to_editor = function(html) {
- var href = $(html).find('img').attr('src');
- if ( typeof href == 'undefined') {
- href = $(html).attr('src');
- }
- if ( typeof href == 'undefined') {
- href = $(html).attr('href');
- }
- var image = /\.(?:jpe?g|png|gif|ico)$/i;
- if (href.match(image) && OT_UI.url_exists(href)) {
- btnContent += '
';
- }
- btnContent += '
'+option_tree.remove_media_text+'';
- $('#'+field_id).val(href);
- $('#'+field_id+'_media').remove();
- $('#'+field_id).parent().parent('div').append('
');
- $('#'+field_id+'_media').append(btnContent).slideDown();
- OT_UI.fix_upload_parent();
- tb_remove();
- window.clearInterval(intval);
- window.send_to_editor = backup;
- };
- }
- return false;
- });
- },
- init_upload_remove: function() {
- $(document).on('click', '.option-tree-ui-remove-media', function(event) {
- event.preventDefault();
- var agree = confirm(option_tree.remove_agree);
- if (agree) {
- OT_UI.remove_image(this);
- return false;
- }
- return false;
- });
- },
- init_upload_fix: function(elm) {
- var id = $(elm).attr('id'),
- val = $(elm).val(),
- img = $(elm).parent().next('.option-tree-ui-media-wrap').find('img'),
- src = img.attr('src'),
- btnContent = '';
- if ( val == src ) {
- return;
- }
- if ( val != src ) {
- img.attr('src', val);
- }
- if ( val !== '' && ( typeof src == 'undefined' || src == false ) && OT_UI.url_exists(val) ) {
- var image = /\.(?:jpe?g|png|gif|ico)$/i;
- if (val.match(image)) {
- btnContent += '
';
- }
- btnContent += '
'+option_tree.remove_media_text+' ';
- $('#'+id).val(val);
- $('#'+id+'_media').remove();
- $('#'+id).parent().parent('div').append('
');
- $('#'+id+'_media').append(btnContent).slideDown();
- } else if ( val == '' || ! OT_UI.url_exists(val) ) {
- $(elm).parent().next('.option-tree-ui-media-wrap').remove();
- }
- },
- init_numeric_slider: function(scope) {
- scope = scope || document;
- $(".ot-numeric-slider-wrap", scope).each(function() {
- var hidden = $(".ot-numeric-slider-hidden-input", this),
- value = hidden.val(),
- helper = $(".ot-numeric-slider-helper-input", this);
- if ( ! value ) {
- value = hidden.data("min");
- helper.val(value)
- }
- $(".ot-numeric-slider", this).slider({
- min: hidden.data("min"),
- max: hidden.data("max"),
- step: hidden.data("step"),
- value: value,
- slide: function(event, ui) {
- hidden.add(helper).val(ui.value).trigger('change');
- },
- create: function() {
- hidden.val($(this).slider('value'));
- },
- change: function() {
- OT_UI.parse_condition();
- }
- });
- });
- },
- init_tabs: function() {
- $(".wrap.settings-wrap .ui-tabs").tabs({
- fx: {
- opacity: "toggle",
- duration: "fast"
- }
- });
- $(".wrap.settings-wrap .ui-tabs a.ui-tabs-anchor").on("click", function(event, ui) {
- var obj = "input[name='_wp_http_referer']";
- if ( $(obj).length > 0 ) {
- var url = $(obj).val(),
- hash = $(this).attr('href');
- if ( url.indexOf("#") != -1 ) {
- var o = url.split("#")[1],
- n = hash.split("#")[1];
- url = url.replace(o, n);
- } else {
- url = url + hash;
- }
- $(obj).val(url);
- }
- });
- },
- init_radio_image_select: function() {
- $(document).on('click', '.option-tree-ui-radio-image', function() {
- $(this).closest('.type-radio-image').find('.option-tree-ui-radio-image').removeClass('option-tree-ui-radio-image-selected');
- $(this).toggleClass('option-tree-ui-radio-image-selected');
- $(this).parent().find('.option-tree-ui-radio').prop('checked', true).trigger('change');
- });
- },
- init_select_wrapper: function(scope) {
- scope = scope || document;
- $('.option-tree-ui-select', scope).each(function () {
- if ( ! $(this).parent().hasClass('select-wrapper') ) {
- $(this).wrap('
');
- $(this).parent('.select-wrapper').prepend('
' + $(this).find('option:selected').text() + ' ');
- }
- });
- },
- bind_select_wrapper: function() {
- $(document).on('change', '.option-tree-ui-select', function () {
- $(this).prev('span').replaceWith('
' + $(this).find('option:selected').text() + ' ');
- });
- },
- init_google_fonts: function() {
- var update_items = function(input, items, element) {
- var itemsUI = input.closest('.type-google-font-group').find(element);
- if ( itemsUI.length ) {
- itemsUI.empty();
- itemsUI.append($.map(items, function(item) {
- var input = document.createElement('input'),
- label = document.createElement('label');
- input.type = 'checkbox';
- input.id = ( itemsUI.data('field-id-prefix') || '' ) + item;
- input.name = ( itemsUI.data('field-name') || '' ) + '[]';
- input.value = item;
- label.innerHTML = item;
- $( label ).attr( 'for', input.id );
- return $( document.createElement('p') ).addClass('checkbox-wrap').append([input, label]);
- }));
- }
- };
- $(document).on('change', '.option-tree-google-font-family select', function() {
- var input = $(this);
- $.ajax({
- url: option_tree.ajax,
- type: 'POST',
- dataType: 'json',
- data: {
- action: 'ot_google_font',
- family: input.val(),
- field_id: input.attr('id')
- }
- }).done(function(response) {
- if ( response.hasOwnProperty('variants') ) {
- update_items( input, response.variants, '.option-tree-google-font-variants' );
- }
- if ( response.hasOwnProperty('subsets') ) {
- update_items( input, response.subsets, '.option-tree-google-font-subsets' );
- }
- });
- });
- $('.js-add-google-font').on('click', function (event) {
- var $group = $(this).parent('.format-setting-inner').find('.type-google-font-group'),
- $el_clone = $(this).prev('.type-google-font-group-clone'),
- $clone = $el_clone.clone(true),
- $count = $group.length ? $group.length : 0;
- $clone.attr('class', 'type-google-font-group');
- var replacer = function(index, elm) {
- return elm.replace('%key%', $count);
- }
- $('select', $clone).each( function() {
- $(this).attr('id', replacer ).attr('name', replacer );
- });
- $('.option-tree-google-font-variants', $clone).each( function() {
- $(this).attr('data-field-id-prefix', replacer ).attr('data-field-name', replacer );
- });
- $('.option-tree-google-font-subsets', $clone).each( function() {
- $(this).attr('data-field-id-prefix', replacer ).attr('data-field-name', replacer );
- });
- $el_clone.before($clone)
- event.preventDefault()
- });
- $('.js-remove-google-font').on('click', function (event) {
- $(this).parents('.type-google-font-group').remove();
- event.preventDefault();
- });
- },
- bind_colorpicker: function(field_id) {
- $('#'+field_id).wpColorPicker({
- change: function() {
- OT_UI.parse_condition();
- },
- clear: function() {
- OT_UI.parse_condition();
- }
- });
- },
- bind_date_picker: function(field_id, date_format) {
- $('#'+field_id).datepicker({
- showOtherMonths: true,
- showButtonPanel: true,
- currentText: option_tree.date_current,
- closeText: option_tree.date_close,
- dateFormat: date_format
- });
- },
- bind_date_time_picker: function(field_id, date_format) {
- $('#'+field_id).datetimepicker({
- showOtherMonths: true,
- closeText: option_tree.date_close,
- dateFormat: date_format
- });
- },
- fix_upload_parent: function() {
- $('.option-tree-ui-upload-input').not('.ot-upload-attachment-id').on('focus blur', function(){
- $(this).parent('.option-tree-ui-upload-parent').toggleClass('focus');
- OT_UI.init_upload_fix(this);
- });
- },
- remove_image: function(e) {
- $(e).parent().parent().find('.option-tree-ui-upload-input').attr('value','');
- $(e).parent('.option-tree-ui-media-wrap').remove();
- },
- fix_textarea: function() {
- $('.wp-editor-area').focus( function(){
- $(this).parent('div').css({borderColor:'#bbb'});
- }).blur( function(){
- $(this).parent('div').css({borderColor:'#ccc'});
- });
- },
- replicate_ajax: function() {
- if (location.href.indexOf("#") != -1) {
- var url = $("input[name=\'_wp_http_referer\']").val(),
- hash = location.href.substr(location.href.indexOf("#"));
- $("input[name=\'_wp_http_referer\']").val( url + hash );
- this.scroll_to_top();
- }
- setTimeout( function() {
- $(".wrap.settings-wrap .fade").fadeOut("fast");
- }, 3000 );
- },
- reset_settings: function() {
- $(document).on("click", ".reset-settings", function(event){
- var agree = confirm(option_tree.reset_agree);
- if (agree) {
- return true;
- } else {
- return false;
- }
- event.preventDefault();
- });
- },
- css_editor_mode: function() {
- $('.ot-css-editor').each(function() {
- var editor = ace.edit($(this).attr('id'));
- var this_textarea = $('#textarea_' + $(this).attr('id'));
- editor.setTheme("ace/theme/chrome");
- editor.getSession().setMode("ace/mode/css");
- editor.setShowPrintMargin( false );
-
- editor.getSession().setValue(this_textarea.val());
- editor.getSession().on('change', function(){
- this_textarea.val(editor.getSession().getValue());
- });
- this_textarea.on('change', function(){
- editor.getSession().setValue(this_textarea.val());
- });
- });
- },
- javascript_editor_mode: function() {
- $('.ot-javascript-editor').each(function() {
- var editor = ace.edit($(this).attr('id'));
- var this_textarea = $('#textarea_' + $(this).attr('id'));
- editor.setTheme("ace/theme/chrome");
- editor.getSession().setMode("ace/mode/javascript");
- editor.setShowPrintMargin( false );
-
- editor.getSession().setValue(this_textarea.val());
- editor.getSession().on('change', function(){
- this_textarea.val(editor.getSession().getValue());
- });
- this_textarea.on('change', function(){
- editor.getSession().setValue(this_textarea.val());
- });
- });
- },
- load_editors: function() {
- OT_UI.css_editor_mode();
- OT_UI.javascript_editor_mode();
- },
- url_exists: function(url) {
- var link = document.createElement('a')
- link.href = url
- if ( link.hostname != window.location.hostname ) {
- return true; // Stop the code from checking across domains.
- }
- var http = new XMLHttpRequest();
- http.open('HEAD', url, false);
- http.send();
- return http.status!=404;
- },
- scroll_to_top: function() {
- setTimeout( function() {
- $(this).scrollTop(0);
- }, 50 );
- }
- };
- $(document).ready( function() {
- OT_UI.init();
- });
-})(jQuery);
-
-/* Gallery */
-!function ($) {
-
- ot_gallery = {
-
- frame: function (elm) {
-
- var selection = this.select(elm)
-
- this._frame = wp.media({
- id: 'ot-gallery-frame'
- , frame: 'post'
- , state: 'gallery-edit'
- , title: wp.media.view.l10n.editGalleryTitle
- , editing: true
- , multiple: true
- , selection: selection
- })
-
- this._frame.on('update', function () {
- var controller = ot_gallery._frame.states.get('gallery-edit')
- , library = controller.get('library')
- , ids = library.pluck('id')
- , parent = $(elm).parents('.format-setting-inner')
- , input = parent.children('.ot-gallery-value')
- , shortcode = wp.media.gallery.shortcode( selection ).string().replace(/\"/g,"'")
-
- input.attr('value', ids)
-
- if ( parent.children('.ot-gallery-list').length <= 0 )
- input.after('
')
-
- $.ajax({
- type: 'POST',
- url: ajaxurl,
- dataType: 'html',
- data: {
- action: 'gallery_update'
- , ids: ids
- },
- success: function(res) {
- parent.children('.ot-gallery-list').html(res);
- if ( input.hasClass('ot-gallery-shortcode') ) {
- input.val(shortcode);
- }
- if ( $(elm).parent().children('.ot-gallery-delete').length <= 0 ) {
- $(elm).parent().append('
' + option_tree.delete + ' ');
- }
- $(elm).text(option_tree.edit);
- OT_UI.parse_condition();
- }
- })
- })
-
- return this._frame
-
- }
-
- , select: function (elm) {
- var input = $(elm).parents('.format-setting-inner').children('.ot-gallery-value')
- , ids = input.attr('value')
- , _shortcode = input.hasClass('ot-gallery-shortcode') ? ids : '[gallery ids=\'' + ids + '\]'
- , shortcode = wp.shortcode.next('gallery', ( ids ? _shortcode : wp.media.view.settings.ot_gallery.shortcode ) )
- , defaultPostId = wp.media.gallery.defaults.id
- , attachments
- , selection
-
- // Bail if we didn't match the shortcode or all of the content.
- if ( ! shortcode )
- return
-
- // Ignore the rest of the match object.
- shortcode = shortcode.shortcode
-
- if ( _.isUndefined( shortcode.get('id') ) && ! _.isUndefined( defaultPostId ) )
- shortcode.set( 'id', defaultPostId )
-
- if ( _.isUndefined( shortcode.get('ids') ) && ! input.hasClass('ot-gallery-shortcode') && ids )
- shortcode.set( 'ids', ids )
-
- if ( _.isUndefined( shortcode.get('ids') ) )
- shortcode.set( 'ids', '0' )
-
- attachments = wp.media.gallery.attachments( shortcode )
-
- selection = new wp.media.model.Selection( attachments.models, {
- props: attachments.props.toJSON()
- , multiple: true
- })
-
- selection.gallery = attachments.gallery
-
- // Fetch the query's attachments, and then break ties from the query to allow for sorting.
- selection.more().done( function () {
- selection.props.set({ query: false })
- selection.unmirror()
- selection.props.unset('orderby')
- })
-
- return selection
-
- }
-
- , open: function (elm) {
-
- ot_gallery.frame(elm).open()
-
- }
-
- , remove: function (elm) {
-
- if ( confirm( option_tree.confirm ) ) {
-
- $(elm).parents('.format-setting-inner').children('.ot-gallery-value').attr('value', '');
- $(elm).parents('.format-setting-inner').children('.ot-gallery-list').remove();
- $(elm).next('.ot-gallery-edit').text( option_tree.create );
- $(elm).remove();
- OT_UI.parse_condition();
-
- }
-
- }
-
- }
-
- // Gallery delete
- $(document).on('click.ot_gallery.data-api', '.ot-gallery-delete', function (e) {
- e.preventDefault()
- ot_gallery.remove($(this))
- })
-
- // Gallery edit
- $(document).on('click.ot_gallery.data-api', '.ot-gallery-edit', function (e) {
- e.preventDefault()
- ot_gallery.open($(this))
- })
-
-}(window.jQuery);
-
-/*!
- * Adds metabox tabs
- */
-!function ($) {
-
- $(document).on('ready', function () {
-
- // Loop over the metaboxes
- $('.ot-metabox-wrapper').each( function() {
-
- // Only if there is a tab option
- if ( $(this).find('.type-tab').length ) {
-
- // Add .ot-metabox-panels
- $(this).find('.type-tab').parents('.ot-metabox-wrapper').wrapInner('
')
-
- // Wrapp with .ot-metabox-tabs & add .ot-metabox-nav before .ot-metabox-panels
- $(this).find('.ot-metabox-panels').wrap('
').before('
')
-
- // Loop over settings and build the tabs nav
- $(this).find('.format-settings').each( function() {
-
- if ( $(this).find('.type-tab').length > 0 ) {
- var title = $(this).find('.type-tab').prev().find('label').text()
- , id = $(this).attr('id')
-
- // Add a class, hide & append nav item
- $(this).addClass('is-panel').hide()
- $(this).parents('.ot-metabox-panels').prev('.ot-metabox-nav').append('
' + title + ' ')
-
- }
-
- })
-
- // Loop over the panels and wrap and ID them.
- $(this).find('.is-panel').each( function() {
- var id = $(this).attr('id')
-
- $(this).add( $(this).nextUntil('.is-panel') ).wrapAll('
')
-
- })
-
- // Create the tabs
- $(this).find('.ot-metabox-tabs').tabs({
- activate: function( event, ui ) {
- var parent = $(this).outerHeight(),
- child = $(this).find('.ot-metabox-panels').outerHeight() + 8,
- minHeight = parent - 34
- if ( $(this).find('.ot-metabox-panels').css('padding') == '12px' && child < parent ) {
- $(this).find('.ot-metabox-panels').css({ minHeight: minHeight })
- }
- OT_UI.load_editors();
- }
- })
-
- // Move the orphaned settings to the top
- $(this).find('.ot-metabox-panels > .format-settings').prependTo($(this))
-
- // Remove a bunch of classes to stop style conflicts.
- $(this).find('.ot-metabox-tabs').removeClass('ui-widget ui-widget-content ui-corner-all')
- $(this).find('.ot-metabox-nav').removeClass('ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all')
- $(this).find('.ot-metabox-nav li').removeClass('ui-state-default ui-corner-top ui-tabs-active ui-tabs-active')
- $(this).find('.ot-metabox-nav li').on('mouseenter mouseleave', function() { $(this).removeClass('ui-state-hover') })
-
- }
-
- })
-
- })
-
-}(window.jQuery);
-
-/*!
- * Adds theme option tabs
- */
-!function ($) {
-
- $(document).on('ready', function () {
-
- // Loop over the theme options
- $('#option-tree-settings-api .inside').each( function() {
-
- // Only if there is a tab option
- if ( $(this).find('.type-tab').length ) {
-
- // Add .ot-theme-option-panels
- $(this).find('.type-tab').parents('.inside').wrapInner('
')
-
- // Wrap with .ot-theme-option-tabs & add .ot-theme-option-nav before .ot-theme-option-panels
- $(this).find('.ot-theme-option-panels').wrap('
').before('
')
-
- // Loop over settings and build the tabs nav
- $(this).find('.format-settings').each( function() {
-
- if ( $(this).find('.type-tab').length > 0 ) {
- var title = $(this).find('.type-tab').prev().find('.label').text()
- , id = $(this).attr('id')
-
- // Add a class, hide & append nav item
- $(this).addClass('is-panel').hide()
- $(this).parents('.ot-theme-option-panels').prev('.ot-theme-option-nav').append('
' + title + ' ')
-
- } else {
-
- }
-
- })
-
- // Loop over the panels and wrap and ID them.
- $(this).find('.is-panel').each( function() {
- var id = $(this).attr('id')
-
- $(this).add( $(this).nextUntil('.is-panel') ).wrapAll('
')
-
- })
-
- // Create the tabs
- $(this).find('.ot-theme-option-tabs').tabs({
- activate: function( event, ui ) {
- OT_UI.load_editors();
- }
- })
-
- // Move the orphaned settings to the top
- $(this).find('.ot-theme-option-panels > .format-settings').prependTo($(this).find('.ot-theme-option-tabs'))
-
- }
-
- })
-
- })
-
-}(window.jQuery);
-
-/*!
- * Fixes the state of metabox radio buttons after a Drag & Drop event.
- */
-!function ($) {
-
- $(document).on('ready', function () {
-
- // detect mousedown and store all checked radio buttons
- $('.hndle').on('mousedown', function () {
-
- // get parent element of .hndle selected.
- // We only need to monitor radios insde the object that is being moved.
- var parent_id = $(this).closest('div').attr('id')
-
- // set live event listener for mouse up on the content .wrap
- // then give the dragged div time to settle before firing the reclick function
- $('.wrap').on('mouseup', function () {
-
- var ot_checked_radios = {}
-
- // loop over all checked radio buttons inside of parent element
- $('#' + parent_id + ' input[type="radio"]').each( function () {
-
- // stores checked radio buttons
- if ( $(this).is(':checked') ) {
-
- ot_checked_radios[$(this).attr('name')] = $(this).val()
-
- }
-
- // write to the object
- $(document).data('ot_checked_radios', ot_checked_radios)
-
- })
-
- // restore all checked radio buttons
- setTimeout( function () {
-
- // get object of checked radio button names and values
- var checked = $(document).data('ot_checked_radios')
-
- // step thru each object element and trigger a click on it's corresponding radio button
- for ( key in checked ) {
-
- $('input[name="' + key + '"]').filter('[value="' + checked[key] + '"]').trigger('click')
-
- }
-
- $('.wrap').unbind('mouseup')
-
- }, 50 )
-
- })
-
- })
-
- })
-
-}(window.jQuery);
-
-/*!
- * Adds opacity to the default colorpicker
- *
- * Derivative work of the Codestar WP Color Picker.
- */
-;(function ( $, window, document, undefined ) {
- 'use strict';
-
- // adding alpha support for Automattic Color.js toString function.
- if( typeof Color.fn.toString !== undefined ) {
-
- Color.fn.toString = function () {
-
- // check for alpha
- if ( this._alpha < 1 ) {
- return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
- }
-
- var hex = parseInt( this._color, 10 ).toString( 16 );
-
- if ( this.error ) { return ''; }
-
- // maybe left pad it
- if ( hex.length < 6 ) {
- for (var i = 6 - hex.length - 1; i >= 0; i--) {
- hex = '0' + hex;
- }
- }
-
- return '#' + hex;
-
- };
-
- }
-
- $.ot_ParseColorValue = function( val ) {
-
- var value = val.replace(/\s+/g, ''),
- alpha = ( value.indexOf('rgba') !== -1 ) ? parseFloat( value.replace(/^.*,(.+)\)/, '$1') * 100 ) : 100,
- rgba = ( alpha < 100 ) ? true : false;
-
- return { value: value, alpha: alpha, rgba: rgba };
-
- };
-
- $.fn.ot_wpColorPicker = function() {
-
- return this.each(function() {
-
- var $this = $(this);
-
- // check for rgba enabled/disable
- if( $this.data('rgba') !== false ) {
-
- // parse value
- var picker = $.ot_ParseColorValue( $this.val() );
-
- // wpColorPicker core
- $this.wpColorPicker({
-
- // wpColorPicker: change
- change: function( event, ui ) {
-
- // update checkerboard background color
- $this.closest('.wp-picker-container').find('.option-tree-opacity-slider-offset').css('background-color', ui.color.toString());
- $this.trigger('keyup');
-
- },
-
- // wpColorPicker: create
- create: function( event, ui ) {
-
- // set variables for alpha slider
- var a8cIris = $this.data('a8cIris'),
- $container = $this.closest('.wp-picker-container'),
-
- // appending alpha wrapper
- $alpha_wrap = $('
' +
- '
' +
- '
' +
- '
' +
- '
').appendTo( $container.find('.wp-picker-holder') ),
-
- $alpha_slider = $alpha_wrap.find('.option-tree-opacity-slider'),
- $alpha_text = $alpha_wrap.find('.option-tree-opacity-text'),
- $alpha_offset = $alpha_wrap.find('.option-tree-opacity-slider-offset');
-
- // alpha slider
- $alpha_slider.slider({
-
- // slider: slide
- slide: function( event, ui ) {
-
- var slide_value = parseFloat( ui.value / 100 );
-
- // update iris data alpha && wpColorPicker color option && alpha text
- a8cIris._color._alpha = slide_value;
- $this.wpColorPicker( 'color', a8cIris._color.toString() );
- $alpha_text.text( ( slide_value < 1 ? slide_value : '' ) );
-
- },
-
- // slider: create
- create: function() {
-
- var slide_value = parseFloat( picker.alpha / 100 ),
- alpha_text_value = slide_value < 1 ? slide_value : '';
-
- // update alpha text && checkerboard background color
- $alpha_text.text(alpha_text_value);
- $alpha_offset.css('background-color', picker.value);
-
- // wpColorPicker clear button for update iris data alpha && alpha text && slider color option
- $container.on('click', '.wp-picker-clear', function() {
-
- a8cIris._color._alpha = 1;
- $alpha_text.text('');
- $alpha_slider.slider('option', 'value', 100).trigger('slide');
-
- });
-
- // wpColorPicker default button for update iris data alpha && alpha text && slider color option
- $container.on('click', '.wp-picker-default', function() {
-
- var default_picker = $.ot_ParseColorValue( $this.data('default-color') ),
- default_value = parseFloat( default_picker.alpha / 100 ),
- default_text = default_value < 1 ? default_value : '';
-
- a8cIris._color._alpha = default_value;
- $alpha_text.text(default_text);
- $alpha_slider.slider('option', 'value', default_picker.alpha).trigger('slide');
-
- });
-
- // show alpha wrapper on click color picker button
- $container.on('click', '.wp-color-result', function() {
- $alpha_wrap.toggle();
- });
-
- // hide alpha wrapper on click body
- $('body').on( 'click.wpcolorpicker', function() {
- $alpha_wrap.hide();
- });
-
- },
-
- // slider: options
- value: picker.alpha,
- step: 1,
- min: 1,
- max: 100
-
- });
- }
-
- });
-
- } else {
-
- // wpColorPicker default picker
- $this.wpColorPicker({
- change: function() {
- $this.trigger('keyup');
- }
- });
-
- }
-
- });
-
- };
-
- $(document).ready( function(){
- $('.hide-color-picker.ot-colorpicker-opacity').ot_wpColorPicker();
- });
-
-})( jQuery, window, document );
\ No newline at end of file
diff --git a/option-tree/assets/js/ot-postformats.js b/option-tree/assets/js/ot-postformats.js
deleted file mode 100644
index 260b6ba..0000000
--- a/option-tree/assets/js/ot-postformats.js
+++ /dev/null
@@ -1,119 +0,0 @@
-/*!
- * postformats.js v1.0.1
- */
-!function ($) {
-
- "use strict"; // jshint ;_;
-
- /* POSTFORMATS CLASS DEFINITION
- * ====================== */
- var formats = "input.post-format"
- , metaboxes = [
- '#ot-post-format-aside'
- , '#ot-post-format-audio'
- , '#ot-post-format-chat'
- , '#ot-post-format-gallery'
- , '#ot-post-format-image'
- , '#ot-post-format-link'
- , '#ot-post-format-quote'
- , '#ot-post-format-status'
- , '#ot-post-format-video'
- ]
- , ids = metaboxes.join(',')
- , insertAfter = '#titlediv'
- , imageBox = '#postimagediv'
- , placeholder = 'postimagediv-placeholder'
- , Postformats = function (element, options) {
- this.$element = $(element)
- .on('click.postformats.data-api', $.proxy(this.toggle, this))
- this.$id = this.$element.attr('id')
- this.init()
- }
-
- Postformats.prototype = {
-
- constructor: Postformats
-
- , init: function () {
-
- // Moves the metaboxes into place
- $( '#ot-' + this.$id ).insertAfter( $( insertAfter ) ).hide()
-
- // Show the checked metabox
- if ( this.$element.is(':checked') ) {
-
- this.show()
-
- }
-
- }
-
- , toggle: function () {
-
- // Hides all the post format metaboxes
- $(ids).each(function() {
-
- $(this).hide()
-
- })
-
- // Shows the clicked post format metabox
- this.show()
-
- }
-
- , show: function () {
-
- // Featured image is never really hidden so it requires different code
- if ( this.$id == 'post-format-image' ) {
-
- if ( $( '#' + placeholder ).length == 0 )
- $( imageBox ).after( '
' ).insertAfter( insertAfter ).css({'marginTop':'20px','marginBottom':'0px'}).find('h3 span').text(option_tree.with)
-
- // Revert image
- } else {
-
- $( '#' + placeholder ).replaceWith( $( imageBox ).css({'marginTop':'0px','marginBottom':'20px'}) )
- $( imageBox ).find('h3 span').text(option_tree.replace)
-
- }
-
- // Show the metabox
- $( '#ot-' + this.$id ).css({'marginTop':'20px','marginBottom':'0px'}).show()
-
- }
-
- }
-
- /* POSTFORMATS PLUGIN DEFINITION
- * ======================= */
- var old = $.fn.postformats
-
- $.fn.postformats = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('postformats')
- , options = typeof option == 'object' && option
- if (!data) $this.data('postformats', (data = new Postformats(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.postformats.Constructor = Postformats
-
- /* POSTFORMATS NO CONFLICT
- * ================= */
- $.fn.postformats.noConflict = function () {
- $.fn.postformats = old
- return this
- }
-
- /* POSTFORMATS DATA-API
- * ============== */
- $(document).on('ready.postformats.data-api', function () {
- $(formats).each(function () {
- $(this).postformats()
- })
- })
-
-}(window.jQuery);
\ No newline at end of file
diff --git a/option-tree/assets/js/vendor/jquery/jquery-ui-timepicker.js b/option-tree/assets/js/vendor/jquery/jquery-ui-timepicker.js
deleted file mode 100644
index 872ec09..0000000
--- a/option-tree/assets/js/vendor/jquery/jquery-ui-timepicker.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30
-* http://trentrichardson.com/examples/timepicker
-* Copyright (c) 2013 Trent Richardson; Licensed MIT */
-(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.4.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour
tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minutetp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.secondtp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisectp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsectp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=' style="display:none;"',d=''+'"+t.timeText+" "+' ";for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='"+t[s+"Text"]+" "+'
",n&&t[s+"Grid"]>0){if(d+='',"hour"===s)for(var p=t[s+"Min"];r[s]>=p;p+=parseInt(t[s+"Grid"],10)){l[s]++;var h=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},t);d+=''+h+" "}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+=''+(10>_?"0":"")+_+" ";d+="
"}d+=" "}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='"+t.timezoneText+" ",d+=' ",d+=" ";var g=$(d);for(t.timeOnly===!0&&(g.prepend('"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append(" ").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $(" ").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(void 0!==t&&t===!0){var o=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),c=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),u=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),m=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),d=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:o}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:c}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:u}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:m}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:d}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&(this._updateDateTime(),this.$input.focus())}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0?r=this.formattedTime:this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+=" ";return l+=" ",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min||r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i=this._getInst($(e)[0]),s=this._get(i,"timepicker");s?(s._limitMinMaxDateTime(i,!0),i.inline=i.stay_open=!0,this._base_selectDate(e,t),i.inline=i.stay_open=!1,this._notifyChange(i),this._updateDatepicker(i)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(n)}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]),i=t.dpDiv;this._base_gotoToday(e);var s=this._get(t,"timepicker");selectLocalTimezone(s);var a=new Date;this._setTime(t,a),$(".ui-datepicker-today",i).click()},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e);if(i){"string"==typeof t&&(t=new Date(t),t.getTime()||$.timepicker.log("Error creating Date object from string."));var s,a=this._get(i,"timepicker");t instanceof Date?(s=new Date(t.getTime()),s.setMicroseconds(t.getMicroseconds())):s=t,a&&s&&(a.support.timezone||null!==a._defaults.timezone||(a.timezone=-1*s.getTimezoneOffset()),t=$.timepicker.timezoneAdjust(t,a.timezone),s=$.timepicker.timezoneAdjust(s,a.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,s,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i);return a&&s._parseTime($(e).val(),s.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a
-}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l=null,o=null,c=null,u=n._defaults.evnts,m={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)l=i;else if("maxDate"===t||"maxDateTime"===t)o=i;else if("onSelect"===t)c=i;else if(u.hasOwnProperty(t)){if(i===void 0)return u[t];m[t]=i,s={}}}else if("object"==typeof t){t.minDate?l=t.minDate:t.minDateTime?l=t.minDateTime:t.maxDate?o=t.maxDate:t.maxDateTime&&(o=t.maxDateTime);for(r in u)u.hasOwnProperty(r)&&t[r]&&(m[r]=t[r])}for(r in m)m.hasOwnProperty(r)&&(u[r]=m[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;l?(l=0===l?new Date:new Date(l),n._defaults.minDate=l,n._defaults.minDateTime=l):o?(o=0===o?new Date:new Date(o),n._defaults.maxDate=o,n._defaults.maxDateTime=o):c&&(n._defaults.onSelect=c)}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}return s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s),$.fn[e].call(t,$.extend({onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(e){window.console&&window.console.log(e)},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.4.3"}})(jQuery);
\ No newline at end of file
diff --git a/option-tree/composer.json b/option-tree/composer.json
deleted file mode 100644
index 1c0825d..0000000
--- a/option-tree/composer.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "valendesigns/option-tree",
- "description": "Theme Options UI Builder for WordPress.",
- "homepage": "https://github.com/valendesigns/option-tree",
- "license": "GPLv3",
- "authors": [
- {
- "name": "Derek Herman",
- "email": "derek@valendesigns.com",
- "homepage": "http://valendesigns.com",
- "role": "Developer"
- }
- ],
- "require": {
- },
- "autoload": {
- "files": ["ot-loader.php"]
- }
-}
\ No newline at end of file
diff --git a/option-tree/includes/ot-cleanup-api.php b/option-tree/includes/ot-cleanup-api.php
deleted file mode 100644
index eb734aa..0000000
--- a/option-tree/includes/ot-cleanup-api.php
+++ /dev/null
@@ -1,295 +0,0 @@
-
- * @copyright Copyright (c) 2014, Derek Herman
- */
-if ( ! class_exists( 'OT_Cleanup' ) ) {
-
- class OT_Cleanup {
-
- /**
- * PHP5 constructor method.
- *
- * This method adds other methods of the class to specific hooks within WordPress.
- *
- * @uses add_action()
- *
- * @return void
- *
- * @access public
- * @since 2.4.6
- */
- function __construct() {
- if ( ! is_admin() )
- return;
-
- // Load styles
- add_action( 'admin_head', array( $this, 'styles' ), 1 );
-
- // Maybe Clean up OptionTree
- add_action( 'admin_menu', array( $this, 'maybe_cleanup' ), 100 );
-
- // Increase timeout if allowed
- add_action( 'ot_pre_consolidate_posts', array( $this, 'increase_timeout' ) );
-
- }
-
- /**
- * Adds the cleanup styles to the admin head
- *
- * @return string
- *
- * @access public
- * @since 2.5.0
- */
- function styles() {
-
- echo '';
-
- }
-
- /**
- * Check if OptionTree needs to be cleaned up from a previous install.
- *
- * @return void
- *
- * @access public
- * @since 2.4.6
- */
- public function maybe_cleanup() {
- global $wpdb, $ot_maybe_cleanup_posts, $ot_maybe_cleanup_table;
-
- $table_name = $wpdb->prefix . 'option_tree';
- $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
- $ot_maybe_cleanup_posts = count( $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_type = 'option-tree' LIMIT 2" ) ) > 1;
- $ot_maybe_cleanup_table = $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $table_name ) ) == $table_name;
-
- if ( ! $ot_maybe_cleanup_posts && ! $ot_maybe_cleanup_table && $page == 'ot-cleanup' ) {
- wp_redirect( apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) );
- exit;
- }
-
- if ( $ot_maybe_cleanup_posts || $ot_maybe_cleanup_table ) {
-
- if ( $page != 'ot-cleanup' )
- add_action( 'admin_notices', array( $this, 'cleanup_notice' ) );
-
- $theme_check_bs = 'add_menu_' . 'page';
-
- $theme_check_bs( apply_filters( 'ot_cleanup_page_title', __( 'OptionTree Cleanup', 'option-tree' ) ), apply_filters( 'ot_cleanup_menu_title', __( 'OptionTree Cleanup', 'option-tree' ) ), 'edit_theme_options', 'ot-cleanup', array( $this, 'options_page' ) );
-
- }
-
- }
-
- /**
- * Adds an admin nag.
- *
- * @return string
- *
- * @access public
- * @since 2.4.6
- */
- public function cleanup_notice() {
-
- if ( get_current_screen()->id != 'appearance_page_ot-cleanup' )
- echo '' . sprintf( __( 'OptionTree has outdated data that should be removed. Please go to %s for more information.', 'option-tree' ), sprintf( '
%s ', admin_url( 'themes.php?page=ot-cleanup' ), apply_filters( 'ot_cleanup_menu_title', __( 'OptionTree Cleanup', 'option-tree' ) ) ) ) . '
';
-
- }
-
- /**
- * Adds a Tools sub page to clean up the database with.
- *
- * @return string
- *
- * @access public
- * @since 2.4.6
- */
- public function options_page() {
- global $wpdb, $ot_maybe_cleanup_posts, $ot_maybe_cleanup_table;
-
- // Option ID
- $option_id = 'ot_media_post_ID';
-
- // Get the media post ID
- $post_ID = get_option( $option_id, false );
-
- // Zero loop count
- $count = 0;
-
- // Check for safe mode
- $safe_mode = ini_get( 'safe_mode' );
-
- echo '';
-
- echo '
' . apply_filters( 'ot_cleanup_page_title', __( 'OptionTree Cleanup', 'option-tree' ) ) . ' ';
-
- if ( $ot_maybe_cleanup_posts ) {
-
- $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_type = 'option-tree'" );
-
- echo '
' . __( 'Multiple Media Posts', 'option-tree' ) . ' ';
-
- echo '
' . sprintf( __( 'There are currently %s OptionTree media posts in your database. At some point in the past, a version of OptionTree added multiple %s media post objects cluttering up your %s table. There is no associated risk or harm that these posts have caused other than to add size to your overall database. Thankfully, there is a way to remove all these orphaned media posts and get your database cleaned up.', 'option-tree' ), '' . number_format( count( $posts ) ) . '
', 'option-tree ', '' . $wpdb->posts . ' ' ) . '
';
-
- echo '
' . sprintf( __( 'By clicking the button below, OptionTree will delete %s records and consolidate them into one single OptionTree media post for uploading attachments to. Additionally, the attachments will have their parent ID updated to the correct media post.', 'option-tree' ), '' . number_format( count( $posts ) - 1 ) . '
' ) . '
';
-
- echo '
' . __( 'This could take a while to fully process depending on how many records you have in your database, so please be patient and wait for the script to finish.', 'option-tree' ) . '
';
-
- echo $safe_mode ? '
' . sprintf( __( '%s Your server is running in safe mode. Which means this page will automatically reload after deleting %s posts, you can filter this number using %s if your server is having trouble processing that many at one time.', 'option-tree' ), 'Note :', apply_filters( 'ot_consolidate_posts_reload', 500 ), 'ot_consolidate_posts_reload ' ) . '
' : '';
-
- echo '
' . __( 'Consolidate Posts', 'option-tree' ) . '
';
-
- if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'consolidate-posts' ) ) {
-
- if ( $post_ID === false || empty( $post_ID ) ) {
- $post_ID = isset( $posts[0]->ID ) ? $posts[0]->ID : null;
-
- // Add to the DB
- if ( $post_ID !== null )
- update_option( $option_id, $post_ID );
-
- }
-
- // Do pre consolidation action to increase timeout.
- do_action( 'ot_pre_consolidate_posts' );
-
- // Loop over posts
- foreach( $posts as $post ) {
-
- // Don't destroy the correct post.
- if ( $post_ID == $post->ID )
- continue;
-
- // Update count
- $count++;
-
- // Reload script in safe mode
- if ( $safe_mode && $count > apply_filters( 'ot_consolidate_posts_reload', 500 ) ) {
- echo '
' . __( 'Reloading...', 'option-tree' );
- echo '
- ';
- break;
- }
-
- // Get the attachements
- $attachments = get_children( 'post_type=attachment&post_parent=' . $post->ID );
-
- // Update the attachments parent ID
- if ( ! empty( $attachments ) ) {
-
- echo 'Updating Attachments parent ID for
option-tree post
#' . $post->ID . ' .
';
-
- foreach( $attachments as $attachment_id => $attachment ) {
- wp_update_post(
- array(
- 'ID' => $attachment_id,
- 'post_parent' => $post_ID
- )
- );
- }
-
- }
-
- // Delete post
- echo 'Deleting
option-tree post
#' . $post->ID . ' ';
- wp_delete_post( $post->ID, true );
-
- }
-
- echo '
' . __( 'Clean up script has completed, the page will now reload...', 'option-tree' );
-
- echo '
- ';
-
- }
-
- }
-
- if ( $ot_maybe_cleanup_table ) {
-
- $table_name = $wpdb->prefix . 'option_tree';
-
- echo $ot_maybe_cleanup_posts ? '
' : '';
-
- echo '
' . __( 'Outdated Table', 'option-tree' ) . ' ';
-
- echo '
' . sprintf( __( 'If you have upgraded from an old 1.x version of OptionTree at some point, you have an extra %s table in your database that can be removed. It\'s not hurting anything, but does not need to be there. If you want to remove it. Click the button below.', 'option-tree' ), '' . $table_name . ' ' ) . '
';
-
- echo '
' . __( 'Drop Table', 'option-tree' ) . '
';
-
- if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'drop-table' ) ) {
-
- echo '
' . sprintf( __( 'Deleting the outdated and unused %s table...', 'option-tree' ), '' . $table_name . ' ' ) . '
';
-
- $wpdb->query( "DROP TABLE IF EXISTS $table_name" );
-
- if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $table_name ) ) != $table_name ) {
-
- echo '
' . sprintf( __( 'The %s table has been successfully deleted. The page will now reload...', 'option-tree' ), '' . $table_name . ' ' ) . '
';
-
- echo '
- ';
-
- } else {
-
- echo '
' . sprintf( __( 'Something went wrong. The %s table was not deleted.', 'option-tree' ), '' . $table_name . ' ' ) . '
';
-
- }
-
- }
-
- }
-
- echo '
';
-
- }
-
- /**
- * Increase PHP timeout.
- *
- * This is to prevent bulk operations from timing out
- *
- * @return void
- *
- * @access public
- * @since 2.4.6
- */
- public function increase_timeout() {
-
- if ( ! ini_get( 'safe_mode' ) ) {
-
- @set_time_limit( 0 );
-
- }
-
- }
-
- }
-
-}
-
-new OT_Cleanup();
-
-/* End of file ot-cleanup-api.php */
-/* Location: ./includes/ot-cleanup-api.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions-admin.php b/option-tree/includes/ot-functions-admin.php
deleted file mode 100644
index db90647..0000000
--- a/option-tree/includes/ot-functions-admin.php
+++ /dev/null
@@ -1,6124 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Registers the Theme Option page
- *
- * @uses ot_register_settings()
- *
- * @return void
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_register_theme_options_page' ) ) {
-
- function ot_register_theme_options_page() {
-
- /* get the settings array */
- $get_settings = get_option( ot_settings_id() );
-
- /* sections array */
- $sections = isset( $get_settings['sections'] ) ? $get_settings['sections'] : array();
-
- /* settings array */
- $settings = isset( $get_settings['settings'] ) ? $get_settings['settings'] : array();
-
- /* contexual_help array */
- $contextual_help = isset( $get_settings['contextual_help'] ) ? $get_settings['contextual_help'] : array();
-
- /* build the Theme Options */
- if ( function_exists( 'ot_register_settings' ) && OT_USE_THEME_OPTIONS ) {
-
- ot_register_settings( array(
- array(
- 'id' => ot_options_id(),
- 'pages' => array(
- array(
- 'id' => 'ot_theme_options',
- 'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ),
- 'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
- 'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
- 'capability' => $caps = apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
- 'menu_slug' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
- 'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ),
- 'position' => apply_filters( 'ot_theme_options_position', null ),
- 'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
- 'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
- 'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
- 'contextual_help' => apply_filters( 'ot_theme_options_contextual_help', $contextual_help ),
- 'sections' => apply_filters( 'ot_theme_options_sections', $sections ),
- 'settings' => apply_filters( 'ot_theme_options_settings', $settings )
- )
- )
- )
- )
- );
-
- // Filters the options.php to add the minimum user capabilities.
- add_filter( 'option_page_capability_' . ot_options_id(), create_function( '$caps', "return '$caps';" ), 999 );
-
- }
-
- }
-
-}
-
-/**
- * Registers the Settings page
- *
- * @uses ot_register_settings()
- *
- * @return void
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_register_settings_page' ) ) {
-
- function ot_register_settings_page() {
- global $ot_has_custom_theme_options;
-
- // Display UI Builder admin notice
- if ( OT_SHOW_OPTIONS_UI == true && isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'ot-settings' && ( $ot_has_custom_theme_options == true || has_action( 'admin_init', 'custom_theme_options' ) || has_action( 'init', 'custom_theme_options' ) ) ) {
-
- function ot_has_custom_theme_options() {
-
- echo '' . __( 'The Theme Options UI Builder is being overridden by a custom file in your theme. Any changes you make via the UI Builder will not be saved.', 'option-tree' ) . '
';
-
- }
-
- add_action( 'admin_notices', 'ot_has_custom_theme_options' );
-
- }
-
- // Create the filterable pages array
- $ot_register_pages_array = array(
- array(
- 'id' => 'ot',
- 'page_title' => __( 'OptionTree', 'option-tree' ),
- 'menu_title' => __( 'OptionTree', 'option-tree' ),
- 'capability' => 'edit_theme_options',
- 'menu_slug' => 'ot-settings',
- 'icon_url' => null,
- 'position' => 61,
- 'hidden_page' => true
- ),
- array(
- 'id' => 'settings',
- 'parent_slug' => 'ot-settings',
- 'page_title' => __( 'Settings', 'option-tree' ),
- 'menu_title' => __( 'Settings', 'option-tree' ),
- 'capability' => 'edit_theme_options',
- 'menu_slug' => 'ot-settings',
- 'icon_url' => null,
- 'position' => null,
- 'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
- 'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
- 'button_text' => __( 'Save Settings', 'option-tree' ),
- 'show_buttons' => false,
- 'sections' => array(
- array(
- 'id' => 'create_setting',
- 'title' => __( 'Theme Options UI', 'option-tree' )
- ),
- array(
- 'id' => 'import',
- 'title' => __( 'Import', 'option-tree' )
- ),
- array(
- 'id' => 'export',
- 'title' => __( 'Export', 'option-tree' )
- ),
- array(
- 'id' => 'layouts',
- 'title' => __( 'Layouts', 'option-tree' )
- )
- ),
- 'settings' => array(
- array(
- 'id' => 'theme_options_ui_text',
- 'label' => __( 'Theme Options UI Builder', 'option-tree' ),
- 'type' => 'theme_options_ui',
- 'section' => 'create_setting'
- ),
- array(
- 'id' => 'import_xml_text',
- 'label' => __( 'Settings XML', 'option-tree' ),
- 'type' => 'import-xml',
- 'section' => 'import'
- ),
- array(
- 'id' => 'import_settings_text',
- 'label' => __( 'Settings', 'option-tree' ),
- 'type' => 'import-settings',
- 'section' => 'import'
- ),
- array(
- 'id' => 'import_data_text',
- 'label' => __( 'Theme Options', 'option-tree' ),
- 'type' => 'import-data',
- 'section' => 'import'
- ),
- array(
- 'id' => 'import_layouts_text',
- 'label' => __( 'Layouts', 'option-tree' ),
- 'type' => 'import-layouts',
- 'section' => 'import'
- ),
- array(
- 'id' => 'export_settings_file_text',
- 'label' => __( 'Settings PHP File', 'option-tree' ),
- 'type' => 'export-settings-file',
- 'section' => 'export'
- ),
- array(
- 'id' => 'export_settings_text',
- 'label' => __( 'Settings', 'option-tree' ),
- 'type' => 'export-settings',
- 'section' => 'export'
- ),
- array(
- 'id' => 'export_data_text',
- 'label' => __( 'Theme Options', 'option-tree' ),
- 'type' => 'export-data',
- 'section' => 'export'
- ),
- array(
- 'id' => 'export_layout_text',
- 'label' => __( 'Layouts', 'option-tree' ),
- 'type' => 'export-layouts',
- 'section' => 'export'
- ),
- array(
- 'id' => 'modify_layouts_text',
- 'label' => __( 'Layout Management', 'option-tree' ),
- 'type' => 'modify-layouts',
- 'section' => 'layouts'
- )
- )
- ),
- array(
- 'id' => 'documentation',
- 'parent_slug' => 'ot-settings',
- 'page_title' => __( 'Documentation', 'option-tree' ),
- 'menu_title' => __( 'Documentation', 'option-tree' ),
- 'capability' => 'edit_theme_options',
- 'menu_slug' => 'ot-documentation',
- 'icon_url' => null,
- 'position' => null,
- 'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
- 'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
- 'button_text' => __( 'Save Settings', 'option-tree' ),
- 'show_buttons' => false,
- 'sections' => array(
- array(
- 'id' => 'creating_options',
- 'title' => __( 'Creating Options', 'option-tree' )
- ),
- array(
- 'id' => 'option_types',
- 'title' => __( 'Option Types', 'option-tree' )
- ),
- array(
- 'id' => 'functions',
- 'title' => __( 'Function References', 'option-tree' )
- ),
- array(
- 'id' => 'theme_mode',
- 'title' => __( 'Theme Mode', 'option-tree' )
- ),
- array(
- 'id' => 'meta_boxes',
- 'title' => __( 'Meta Boxes', 'option-tree' )
- ),
- array(
- 'id' => 'examples',
- 'title' => __( 'Code Examples', 'option-tree' )
- ),
- array(
- 'id' => 'layouts_overview',
- 'title' => __( 'Layouts Overview', 'option-tree' )
- )
- ),
- 'settings' => array(
- array(
- 'id' => 'creating_options_text',
- 'label' => __( 'Overview of available Theme Option fields.', 'option-tree' ),
- 'type' => 'creating-options',
- 'section' => 'creating_options'
- ),
- array(
- 'id' => 'option_types_text',
- 'label' => __( 'Option types in alphabetical order & hooks to filter them.', 'option-tree' ),
- 'type' => 'option-types',
- 'section' => 'option_types'
- ),
- array(
- 'id' => 'functions_ot_get_option',
- 'label' => __( 'Function Reference:ot_get_option()', 'option-tree' ),
- 'type' => 'ot-get-option',
- 'section' => 'functions'
- ),
- array(
- 'id' => 'functions_get_option_tree',
- 'label' => __( 'Function Reference:get_option_tree()', 'option-tree' ),
- 'type' => 'get-option-tree',
- 'section' => 'functions'
- ),
- array(
- 'id' => 'theme_mode_text',
- 'label' => __( 'Theme Mode', 'option-tree' ),
- 'type' => 'theme-mode',
- 'section' => 'theme_mode'
- ),
- array(
- 'id' => 'meta_boxes_text',
- 'label' => __( 'Meta Boxes', 'option-tree' ),
- 'type' => 'meta-boxes',
- 'section' => 'meta_boxes'
- ),
- array(
- 'id' => 'example_text',
- 'label' => __( 'Code examples for front-end development.', 'option-tree' ),
- 'type' => 'examples',
- 'section' => 'examples'
- ),
- array(
- 'id' => 'layouts_overview_text',
- 'label' => __( 'What\'s a layout anyhow?', 'option-tree' ),
- 'type' => 'layouts-overview',
- 'section' => 'layouts_overview'
- )
- )
- )
- );
-
- // Loop over the settings and remove as needed.
- foreach( $ot_register_pages_array as $key => $page ) {
-
- // Remove various options from the Settings UI.
- if ( $page['id'] == 'settings' ) {
-
- // Remove the Theme Options UI
- if ( OT_SHOW_OPTIONS_UI == false ) {
-
- foreach( $page['sections'] as $section_key => $section ) {
- if ( $section['id'] == 'create_setting' ) {
- unset($ot_register_pages_array[$key]['sections'][$section_key]);
- }
- }
-
- foreach( $page['settings'] as $setting_key => $setting ) {
- if ( $setting['section'] == 'create_setting' ) {
- unset($ot_register_pages_array[$key]['settings'][$setting_key]);
- }
- }
-
- }
-
- // Remove parts of the Imports UI
- if ( OT_SHOW_SETTINGS_IMPORT == false ) {
-
- foreach( $page['settings'] as $setting_key => $setting ) {
- if ( $setting['section'] == 'import' && in_array( $setting['id'], array('import_xml_text', 'import_settings_text' ) ) ) {
- unset($ot_register_pages_array[$key]['settings'][$setting_key]);
- }
- }
-
- }
-
- // Remove parts of the Export UI
- if ( OT_SHOW_SETTINGS_EXPORT == false ) {
-
- foreach( $page['settings'] as $setting_key => $setting ) {
- if ( $setting['section'] == 'export' && in_array( $setting['id'], array('export_settings_file_text', 'export_settings_text' ) ) ) {
- unset($ot_register_pages_array[$key]['settings'][$setting_key]);
- }
- }
-
- }
-
- // Remove the Layouts UI
- if ( OT_SHOW_NEW_LAYOUT == false ) {
-
- foreach( $page['sections'] as $section_key => $section ) {
- if ( $section['id'] == 'layouts' ) {
- unset($ot_register_pages_array[$key]['sections'][$section_key]);
- }
- }
-
- foreach( $page['settings'] as $setting_key => $setting ) {
- if ( $setting['section'] == 'layouts' ) {
- unset($ot_register_pages_array[$key]['settings'][$setting_key]);
- }
- }
-
- }
-
- }
-
- // Remove the Documentation UI.
- if ( OT_SHOW_DOCS == false && $page['id'] == 'documentation' ) {
-
- unset( $ot_register_pages_array[$key] );
-
- }
-
- }
-
- $ot_register_pages_array = apply_filters( 'ot_register_pages_array', $ot_register_pages_array );
-
- // Register the pages.
- ot_register_settings( array(
- array(
- 'id' => ot_settings_id(),
- 'pages' => $ot_register_pages_array
- )
- )
- );
-
- }
-
-}
-
-/**
- * Runs directly after the Theme Options are save.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_after_theme_options_save' ) ) {
-
- function ot_after_theme_options_save() {
-
- $page = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : '';
- $updated = isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ? true : false;
-
- /* only execute after the theme options are saved */
- if ( apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) == $page && $updated ) {
-
- /* grab a copy of the theme options */
- $options = get_option( ot_options_id() );
-
- /* execute the action hook and pass the theme options to it */
- do_action( 'ot_after_theme_options_save', $options );
-
- }
-
- }
-
-}
-
-/**
- * Validate the options by type before saving.
- *
- * This function will run on only some of the option types
- * as all of them don't need to be validated, just the
- * ones users are going to input data into; because they
- * can't be trusted.
- *
- * @param mixed Setting value
- * @param string Setting type
- * @param string Setting field ID
- * @param string WPML field ID
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_validate_setting' ) ) {
-
- function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) {
-
- /* exit early if missing data */
- if ( ! $input || ! $type || ! $field_id )
- return $input;
-
- $input = apply_filters( 'ot_validate_setting', $input, $type, $field_id );
-
- /* WPML Register and Unregister strings */
- if ( ! empty( $wmpl_id ) ) {
-
- /* Allow filtering on the WPML option types */
- $single_string_types = apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) );
-
- if ( in_array( $type, $single_string_types ) ) {
-
- if ( ! empty( $input ) ) {
-
- ot_wpml_register_string( $wmpl_id, $input );
-
- } else {
-
- ot_wpml_unregister_string( $wmpl_id );
-
- }
-
- }
-
- }
-
- if ( 'background' == $type ) {
-
- $input['background-color'] = ot_validate_setting( $input['background-color'], 'colorpicker', $field_id );
-
- $input['background-image'] = ot_validate_setting( $input['background-image'], 'upload', $field_id );
-
- // Loop over array and check for values
- foreach( (array) $input as $key => $value ) {
- if ( ! empty( $value ) ) {
- $has_value = true;
- }
- }
-
- // No value; set to empty
- if ( ! isset( $has_value ) ) {
- $input = '';
- }
-
- } else if ( 'border' == $type ) {
-
- // Loop over array and set errors or unset key from array.
- foreach( $input as $key => $value ) {
-
- // Validate width
- if ( $key == 'width' && ! empty( $value ) && ! is_numeric( $value ) ) {
-
- $input[$key] = '0';
-
- add_settings_error( 'option-tree', 'invalid_border_width', sprintf( __( 'The %s input field for %s only allows numeric values.', 'option-tree' ), 'width
', '' . $field_id . '
' ), 'error' );
-
- }
-
- // Validate color
- if ( $key == 'color' && ! empty( $value ) ) {
-
- $input[$key] = ot_validate_setting( $value, 'colorpicker', $field_id );
-
- }
-
- // Unset keys with empty values.
- if ( empty( $value ) && strlen( $value ) == 0 ) {
- unset( $input[$key] );
- }
-
- }
-
- if ( empty( $input ) ) {
- $input = '';
- }
-
- } else if ( 'box-shadow' == $type ) {
-
- // Validate inset
- $input['inset'] = isset( $input['inset'] ) ? 'inset' : '';
-
- // Validate offset-x
- $input['offset-x'] = ot_validate_setting( $input['offset-x'], 'text', $field_id );
-
- // Validate offset-y
- $input['offset-y'] = ot_validate_setting( $input['offset-y'], 'text', $field_id );
-
- // Validate blur-radius
- $input['blur-radius'] = ot_validate_setting( $input['blur-radius'], 'text', $field_id );
-
- // Validate spread-radius
- $input['spread-radius'] = ot_validate_setting( $input['spread-radius'], 'text', $field_id );
-
- // Validate color
- $input['color'] = ot_validate_setting( $input['color'], 'colorpicker', $field_id );
-
- // Unset keys with empty values.
- foreach( $input as $key => $value ) {
- if ( empty( $value ) && strlen( $value ) == 0 ) {
- unset( $input[$key] );
- }
- }
-
- // Set empty array to empty string.
- if ( empty( $input ) ) {
- $input = '';
- }
-
- } else if ( 'colorpicker' == $type ) {
-
- /* return empty & set error */
- if ( 0 === preg_match( '/^#([a-f0-9]{6}|[a-f0-9]{3})$/i', $input ) && 0 === preg_match( '/^rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]{1,4})\s*\)/i', $input ) ) {
-
- $input = '';
-
- add_settings_error( 'option-tree', 'invalid_hex', sprintf( __( 'The %s Colorpicker only allows valid hexadecimal or rgba values.', 'option-tree' ), '' . $field_id . '
' ), 'error' );
-
- }
-
- } else if ( 'colorpicker-opacity' == $type ) {
-
- // Not allowed
- if ( is_array( $input ) ) {
- $input = '';
- }
-
- // Validate color
- $input = ot_validate_setting( $input, 'colorpicker', $field_id );
-
- } else if ( in_array( $type, array( 'css', 'javascript', 'text', 'textarea', 'textarea-simple' ) ) ) {
-
- if ( ! current_user_can( 'unfiltered_html' ) && OT_ALLOW_UNFILTERED_HTML == false ) {
-
- $input = wp_kses_post( $input );
-
- }
-
- } else if ( 'dimension' == $type ) {
-
- // Loop over array and set error keys or unset key from array.
- foreach( $input as $key => $value ) {
- if ( ! empty( $value ) && ! is_numeric( $value ) && $key !== 'unit' ) {
- $errors[] = $key;
- }
- if ( empty( $value ) && strlen( $value ) == 0 ) {
- unset( $input[$key] );
- }
- }
-
- /* return 0 & set error */
- if ( isset( $errors ) ) {
-
- foreach( $errors as $error ) {
-
- $input[$error] = '0';
-
- add_settings_error( 'option-tree', 'invalid_dimension_' . $error, sprintf( __( 'The %s input field for %s only allows numeric values.', 'option-tree' ), '' . $error . '
', '' . $field_id . '
' ), 'error' );
-
- }
-
- }
-
- if ( empty( $input ) ) {
- $input = '';
- }
-
- } else if ( 'google-fonts' == $type ) {
-
- unset($input['%key%']);
-
- // Loop over array and check for values
- if ( is_array( $input ) && ! empty( $input ) ) {
- $input = array_values( $input );
- }
-
- // No value; set to empty
- if ( empty( $input ) ) {
- $input = '';
- }
-
- } else if ( 'link-color' == $type ) {
-
- // Loop over array and check for values
- if ( is_array( $input ) && ! empty( $input ) ) {
- foreach( $input as $key => $value ) {
- if ( ! empty( $value ) ) {
- $input[$key] = ot_validate_setting( $input[$key], 'colorpicker', $field_id . '-' . $key );
- $has_value = true;
- }
- }
- }
-
- // No value; set to empty
- if ( ! isset( $has_value ) ) {
- $input = '';
- }
-
- } else if ( 'measurement' == $type ) {
-
- $input[0] = sanitize_text_field( $input[0] );
-
- // No value; set to empty
- if ( empty( $input[0] ) && strlen( $input[0] ) == 0 && empty( $input[1] ) ) {
- $input = '';
- }
-
- } else if ( 'spacing' == $type ) {
-
- // Loop over array and set error keys or unset key from array.
- foreach( $input as $key => $value ) {
- if ( ! empty( $value ) && ! is_numeric( $value ) && $key !== 'unit' ) {
- $errors[] = $key;
- }
- if ( empty( $value ) && strlen( $value ) == 0 ) {
- unset( $input[$key] );
- }
- }
-
- /* return 0 & set error */
- if ( isset( $errors ) ) {
-
- foreach( $errors as $error ) {
-
- $input[$error] = '0';
-
- add_settings_error( 'option-tree', 'invalid_spacing_' . $error, sprintf( __( 'The %s input field for %s only allows numeric values.', 'option-tree' ), '' . $error . '
', '' . $field_id . '
' ), 'error' );
-
- }
-
- }
-
- if ( empty( $input ) ) {
- $input = '';
- }
-
- } else if ( 'typography' == $type && isset( $input['font-color'] ) ) {
-
- $input['font-color'] = ot_validate_setting( $input['font-color'], 'colorpicker', $field_id );
-
- // Loop over array and check for values
- foreach( $input as $key => $value ) {
- if ( ! empty( $value ) ) {
- $has_value = true;
- }
- }
-
- // No value; set to empty
- if ( ! isset( $has_value ) ) {
- $input = '';
- }
-
- } else if ( 'upload' == $type ) {
-
- if( filter_var( $input, FILTER_VALIDATE_INT ) === FALSE ) {
- $input = esc_url_raw( $input );
- }
-
- } else if ( 'gallery' == $type ) {
-
- $input = trim( $input );
-
- } else if ( 'social-links' == $type ) {
-
- // Loop over array and check for values, plus sanitize the text field
- foreach( (array) $input as $key => $value ) {
- if ( ! empty( $value ) && is_array( $value ) ) {
- foreach( (array) $value as $item_key => $item_value ) {
- if ( ! empty( $item_value ) ) {
- $has_value = true;
- $input[$key][$item_key] = sanitize_text_field( $item_value );
- }
- }
- }
- }
-
- // No value; set to empty
- if ( ! isset( $has_value ) ) {
- $input = '';
- }
-
- }
-
- $input = apply_filters( 'ot_after_validate_setting', $input, $type, $field_id );
-
- return $input;
-
- }
-
-}
-
-/**
- * Setup the default admin styles
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_admin_styles' ) ) {
-
- function ot_admin_styles() {
- global $wp_styles, $post;
-
- /* execute styles before actions */
- do_action( 'ot_admin_styles_before' );
-
- /* load WP colorpicker */
- wp_enqueue_style( 'wp-color-picker' );
-
- /* load admin styles */
- wp_enqueue_style( 'ot-admin-css', OT_URL . 'assets/css/ot-admin.css', false, OT_VERSION );
-
- /* load the RTL stylesheet */
- $wp_styles->add_data( 'ot-admin-css','rtl', true );
-
- /* Remove styles added by the Easy Digital Downloads plugin */
- if ( isset( $post->post_type ) && $post->post_type == 'post' )
- wp_dequeue_style( 'jquery-ui-css' );
-
- /**
- * Filter the screen IDs used to dequeue `jquery-ui-css`.
- *
- * @since 2.5.0
- *
- * @param array $screen_ids An array of screen IDs.
- */
- $screen_ids = apply_filters( 'ot_dequeue_jquery_ui_css_screen_ids', array(
- 'toplevel_page_ot-settings',
- 'optiontree_page_ot-documentation',
- 'appearance_page_ot-theme-options'
- ) );
-
- /* Remove styles added by the WP Review plugin and any custom pages added through filtering */
- if ( in_array( get_current_screen()->id, $screen_ids ) ) {
- wp_dequeue_style( 'plugin_name-admin-ui-css' );
- wp_dequeue_style( 'jquery-ui-css' );
- }
-
- /* execute styles after actions */
- do_action( 'ot_admin_styles_after' );
-
- }
-
-}
-
-/**
- * Setup the default admin scripts
- *
- * @uses add_thickbox() Include Thickbox for file uploads
- * @uses wp_enqueue_script() Add OptionTree scripts
- * @uses wp_localize_script() Used to include arbitrary Javascript data
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_admin_scripts' ) ) {
-
- function ot_admin_scripts() {
-
- /* execute scripts before actions */
- do_action( 'ot_admin_scripts_before' );
-
- if ( function_exists( 'wp_enqueue_media' ) ) {
- /* WP 3.5 Media Uploader */
- wp_enqueue_media();
- } else {
- /* Legacy Thickbox */
- add_thickbox();
- }
-
- /* load jQuery-ui slider */
- wp_enqueue_script( 'jquery-ui-slider' );
-
- /* load jQuery-ui datepicker */
- wp_enqueue_script( 'jquery-ui-datepicker' );
-
- /* load WP colorpicker */
- wp_enqueue_script( 'wp-color-picker' );
-
- /* load Ace Editor for CSS Editing */
- wp_enqueue_script( 'ace-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js', null, '1.1.3' );
-
- /* load jQuery UI timepicker addon */
- wp_enqueue_script( 'jquery-ui-timepicker', OT_URL . 'assets/js/vendor/jquery/jquery-ui-timepicker.js', array( 'jquery', 'jquery-ui-slider', 'jquery-ui-datepicker' ), '1.4.3' );
-
- /* load the post formats */
- if ( OT_META_BOXES == true && OT_POST_FORMATS == true ) {
- wp_enqueue_script( 'ot-postformats', OT_URL . 'assets/js/ot-postformats.js', array( 'jquery' ), '1.0.1' );
- }
-
- /* load all the required scripts */
- wp_enqueue_script( 'ot-admin-js', OT_URL . 'assets/js/ot-admin.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-sortable', 'jquery-ui-slider', 'wp-color-picker', 'ace-editor', 'jquery-ui-datepicker', 'jquery-ui-timepicker' ), OT_VERSION );
-
- /* create localized JS array */
- $localized_array = array(
- 'ajax' => admin_url( 'admin-ajax.php' ),
- 'nonce' => wp_create_nonce( 'option_tree' ),
- 'upload_text' => apply_filters( 'ot_upload_text', __( 'Send to OptionTree', 'option-tree' ) ),
- 'remove_media_text' => __( 'Remove Media', 'option-tree' ),
- 'reset_agree' => __( 'Are you sure you want to reset back to the defaults?', 'option-tree' ),
- 'remove_no' => __( 'You can\'t remove this! But you can edit the values.', 'option-tree' ),
- 'remove_agree' => __( 'Are you sure you want to remove this?', 'option-tree' ),
- 'activate_layout_agree' => __( 'Are you sure you want to activate this layout?', 'option-tree' ),
- 'setting_limit' => __( 'Sorry, you can\'t have settings three levels deep.', 'option-tree' ),
- 'delete' => __( 'Delete Gallery', 'option-tree' ),
- 'edit' => __( 'Edit Gallery', 'option-tree' ),
- 'create' => __( 'Create Gallery', 'option-tree' ),
- 'confirm' => __( 'Are you sure you want to delete this Gallery?', 'option-tree' ),
- 'date_current' => __( 'Today', 'option-tree' ),
- 'date_time_current' => __( 'Now', 'option-tree' ),
- 'date_close' => __( 'Close', 'option-tree' ),
- 'replace' => __( 'Featured Image', 'option-tree' ),
- 'with' => __( 'Image', 'option-tree' )
- );
-
- /* localized script attached to 'option_tree' */
- wp_localize_script( 'ot-admin-js', 'option_tree', $localized_array );
-
- /* execute scripts after actions */
- do_action( 'ot_admin_scripts_after' );
-
- }
-
-}
-
-/**
- * Returns the ID of a custom post type by post_title.
- *
- * @uses get_results()
- *
- * @return int
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_get_media_post_ID' ) ) {
-
- function ot_get_media_post_ID() {
-
- // Option ID
- $option_id = 'ot_media_post_ID';
-
- // Get the media post ID
- $post_ID = get_option( $option_id, false );
-
- // Add $post_ID to the DB
- if ( $post_ID === false || empty( $post_ID ) ) {
- global $wpdb;
-
- // Get the media post ID
- $post_ID = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE `post_title` = 'Media' AND `post_type` = 'option-tree' AND `post_status` = 'private'" );
-
- // Add to the DB
- if ( $post_ID !== null )
- update_option( $option_id, $post_ID );
-
- }
-
- return $post_ID;
-
- }
-
-}
-
-/**
- * Register custom post type & create the media post used to attach images.
- *
- * @uses get_results()
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_create_media_post' ) ) {
-
- function ot_create_media_post() {
-
- $regsiter_post_type = 'register_' . 'post_type';
- $regsiter_post_type( 'option-tree', array(
- 'labels' => array( 'name' => __( 'Option Tree', 'option-tree' ) ),
- 'public' => false,
- 'show_ui' => false,
- 'capability_type' => 'post',
- 'exclude_from_search' => true,
- 'hierarchical' => false,
- 'rewrite' => false,
- 'supports' => array( 'title', 'editor' ),
- 'can_export' => false,
- 'show_in_nav_menus' => false
- ) );
-
- /* look for custom page */
- $post_id = ot_get_media_post_ID();
-
- /* no post exists */
- if ( $post_id == 0 ) {
-
- /* create post object */
- $_p = array();
- $_p['post_title'] = 'Media';
- $_p['post_name'] = 'media';
- $_p['post_status'] = 'private';
- $_p['post_type'] = 'option-tree';
- $_p['comment_status'] = 'closed';
- $_p['ping_status'] = 'closed';
-
- /* insert the post into the database */
- wp_insert_post( $_p );
-
- }
-
- }
-
-}
-
-/**
- * Setup default settings array.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_default_settings' ) ) {
-
- function ot_default_settings() {
- global $wpdb;
-
- if ( ! get_option( ot_settings_id() ) ) {
-
- $section_count = 0;
- $settings_count = 0;
- $settings = array();
- $table_name = $wpdb->prefix . 'option_tree';
-
- if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $table_name ) ) == $table_name && $old_settings = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY item_sort ASC" ) ) {
-
- foreach ( $old_settings as $setting ) {
-
- /* heading is a section now */
- if ( $setting->item_type == 'heading' ) {
-
- /* add section to the sections array */
- $settings['sections'][$section_count]['id'] = $setting->item_id;
- $settings['sections'][$section_count]['title'] = $setting->item_title;
-
- /* save the last section id to use in creating settings */
- $section = $setting->item_id;
-
- /* increment the section count */
- $section_count++;
-
- } else {
-
- /* add setting to the settings array */
- $settings['settings'][$settings_count]['id'] = $setting->item_id;
- $settings['settings'][$settings_count]['label'] = $setting->item_title;
- $settings['settings'][$settings_count]['desc'] = $setting->item_desc;
- $settings['settings'][$settings_count]['section'] = $section;
- $settings['settings'][$settings_count]['type'] = ot_map_old_option_types( $setting->item_type );
- $settings['settings'][$settings_count]['std'] = '';
- $settings['settings'][$settings_count]['class'] = '';
-
- /* textarea rows */
- $rows = '';
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'css', 'javascript', 'textarea' ) ) ) {
- if ( (int) $setting->item_options > 0 ) {
- $rows = (int) $setting->item_options;
- } else {
- $rows = 15;
- }
- }
- $settings['settings'][$settings_count]['rows'] = $rows;
-
- /* post type */
- $post_type = '';
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'custom-post-type-select', 'custom-post-type-checkbox' ) ) ) {
- if ( '' != $setting->item_options ) {
- $post_type = $setting->item_options;
- } else {
- $post_type = 'post';
- }
- }
- $settings['settings'][$settings_count]['post_type'] = $post_type;
-
- /* choices */
- $choices = array();
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'checkbox', 'radio', 'select' ) ) ) {
- if ( '' != $setting->item_options ) {
- $choices = ot_convert_string_to_array( $setting->item_options );
- }
- }
- $settings['settings'][$settings_count]['choices'] = $choices;
-
- $settings_count++;
- }
-
- }
-
- /* make sure each setting has a section just incase */
- if ( isset( $settings['sections'] ) && isset( $settings['settings'] ) ) {
- foreach( $settings['settings'] as $k => $setting ) {
- if ( '' == $setting['section'] ) {
- $settings['settings'][$k]['section'] = $settings['sections'][0]['id'];
- }
- }
- }
-
- }
-
- /* if array if not properly formed create fallback settings array */
- if ( ! isset( $settings['sections'] ) || ! isset( $settings['settings'] ) ) {
-
- $settings = array(
- 'sections' => array(
- array(
- 'id' => 'general',
- 'title' => __( 'General', 'option-tree' )
- )
- ),
- 'settings' => array(
- array(
- 'id' => 'sample_text',
- 'label' => __( 'Sample Text Field Label', 'option-tree' ),
- 'desc' => __( 'Description for the sample text field.', 'option-tree' ),
- 'section' => 'general',
- 'type' => 'text',
- 'std' => '',
- 'class' => '',
- 'rows' => '',
- 'post_type' => '',
- 'choices' => array()
- )
- )
- );
-
- }
-
- /* update the settings array */
- update_option( ot_settings_id(), $settings );
-
- /* get option tree array */
- $options = get_option( ot_options_id() );
-
- /* validate options */
- if ( is_array( $options ) ) {
-
- foreach( $settings['settings'] as $setting ) {
-
- if ( isset( $options[$setting['id']] ) ) {
-
- $content = ot_stripslashes( $options[$setting['id']] );
-
- $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] );
-
- }
-
- }
-
- /* execute the action hook and pass the theme options to it */
- do_action( 'ot_before_theme_options_save', $options );
-
- /* update the option tree array */
- update_option( ot_options_id(), $options );
-
- }
-
- }
-
- }
-
-}
-
-/**
- * Helper function to update the CSS option type after save.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_save_css' ) ) {
-
- function ot_save_css( $options ) {
-
- /* grab a copy of the settings */
- $settings = get_option( ot_settings_id() );
-
- /* has settings */
- if ( isset( $settings['settings'] ) ) {
-
- /* loop through sections and insert CSS when needed */
- foreach( $settings['settings'] as $k => $setting ) {
-
- /* is the CSS option type */
- if ( isset( $setting['type'] ) && 'css' == $setting['type'] ) {
-
- /* insert CSS into dynamic.css */
- if ( isset( $options[$setting['id']] ) && '' !== $options[$setting['id']] ) {
-
- ot_insert_css_with_markers( $setting['id'], $options[$setting['id']] );
-
- /* remove old CSS from dynamic.css */
- } else {
-
- ot_remove_old_css( $setting['id'] );
-
- }
-
- }
-
- }
-
- }
-
- }
-
-}
-
-/**
- * Helper function to load filters for XML mime type.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_add_xml_to_upload_filetypes' ) ) {
-
- function ot_add_xml_to_upload_filetypes() {
-
- add_filter( 'upload_mimes', 'ot_upload_mimes' );
- add_filter( 'wp_mime_type_icon', 'ot_xml_mime_type_icon', 10, 2 );
-
- }
-
-}
-
-/**
- * Filter 'upload_mimes' and add xml.
- *
- * @param array $mimes An array of valid upload mime types
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_upload_mimes' ) ) {
-
- function ot_upload_mimes( $mimes ) {
-
- $mimes['xml'] = 'application/xml';
-
- return $mimes;
-
- }
-
-}
-
-/**
- * Filters 'wp_mime_type_icon' and have xml display as a document.
- *
- * @param string $icon The mime icon
- * @param string $mime The mime type
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_xml_mime_type_icon' ) ) {
-
- function ot_xml_mime_type_icon( $icon, $mime ) {
-
- if ( $mime == 'application/xml' || $mime == 'text/xml' )
- return wp_mime_type_icon( 'document' );
-
- return $icon;
-
- }
-
-}
-
-/**
- * Import before the screen is displayed.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_import' ) ) {
-
- function ot_import() {
-
- /* check and verify import xml nonce */
- if ( isset( $_POST['import_xml_nonce'] ) && wp_verify_nonce( $_POST['import_xml_nonce'], 'import_xml_form' ) ) {
-
- /* import input value */
- $file = isset( $_POST['import_xml'] ) ? esc_url( $_POST['import_xml'] ) : '';
-
- /* validate xml file */
- if ( preg_match( "/(.xml)$/i", $file ) && class_exists( 'SimpleXMLElement' ) ) {
-
- $settings = ot_import_xml( $file );
-
- }
-
- /* default message */
- $message = 'failed';
-
- /* cleanup, save, & show success message */
- if ( isset( $settings ) && ! empty( $settings ) ) {
-
- /* delete file */
- if ( $file ) {
- global $wpdb;
- $attachmentid = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE guid='$file'" );
- wp_delete_attachment( $attachmentid, true );
- }
-
- /* update settings */
- update_option( ot_settings_id(), $settings );
-
- /* set message */
- $message = 'success';
-
- }
-
- /* redirect */
- wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-xml', 'message' => $message ), $_POST['_wp_http_referer'] ) ) );
- exit;
-
- }
-
- /* check and verify import settings nonce */
- if ( isset( $_POST['import_settings_nonce'] ) && wp_verify_nonce( $_POST['import_settings_nonce'], 'import_settings_form' ) ) {
-
- /* textarea value */
- $textarea = isset( $_POST['import_settings'] ) ? unserialize( ot_decode( $_POST['import_settings'] ) ) : '';
-
- /* default message */
- $message = 'failed';
-
- /* is array: save & show success message */
- if ( is_array( $textarea ) ) {
- update_option( ot_settings_id(), $textarea );
- $message = 'success';
- }
-
- /* redirect */
- wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-settings', 'message' => $message ), $_POST['_wp_http_referer'] ) ) );
- exit;
-
- }
-
- /* check and verify import theme options data nonce */
- if ( isset( $_POST['import_data_nonce'] ) && wp_verify_nonce( $_POST['import_data_nonce'], 'import_data_form' ) ) {
-
- /* default message */
- $message = 'failed';
-
- /* textarea value */
- $options = isset( $_POST['import_data'] ) ? unserialize( ot_decode( $_POST['import_data'] ) ) : '';
-
- /* get settings array */
- $settings = get_option( ot_settings_id() );
-
- /* has options */
- if ( is_array( $options ) ) {
-
- /* validate options */
- if ( is_array( $settings ) ) {
-
- foreach( $settings['settings'] as $setting ) {
-
- if ( isset( $options[$setting['id']] ) ) {
-
- $content = ot_stripslashes( $options[$setting['id']] );
-
- $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] );
-
- }
-
- }
-
- }
-
- /* execute the action hook and pass the theme options to it */
- do_action( 'ot_before_theme_options_save', $options );
-
- /* update the option tree array */
- update_option( ot_options_id(), $options );
-
- $message = 'success';
-
- }
-
- /* redirect accordingly */
- wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-data', 'message' => $message ), $_POST['_wp_http_referer'] ) ) );
- exit;
-
- }
-
- /* check and verify import layouts nonce */
- if ( isset( $_POST['import_layouts_nonce'] ) && wp_verify_nonce( $_POST['import_layouts_nonce'], 'import_layouts_form' ) ) {
-
- /* default message */
- $message = 'failed';
-
- /* textarea value */
- $layouts = isset( $_POST['import_layouts'] ) ? unserialize( ot_decode( $_POST['import_layouts'] ) ) : '';
-
- /* get settings array */
- $settings = get_option( ot_settings_id() );
-
- /* has layouts */
- if ( is_array( $layouts ) ) {
-
- /* validate options */
- if ( is_array( $settings ) ) {
-
- foreach( $layouts as $key => $value ) {
-
- if ( $key == 'active_layout' )
- continue;
-
- $options = unserialize( ot_decode( $value ) );
-
- foreach( $settings['settings'] as $setting ) {
-
- if ( isset( $options[$setting['id']] ) ) {
-
- $content = ot_stripslashes( $options[$setting['id']] );
-
- $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] );
-
- }
-
- }
-
- $layouts[$key] = ot_encode( serialize( $options ) );
-
- }
-
- }
-
- /* update the option tree array */
- if ( isset( $layouts['active_layout'] ) ) {
-
- $new_options = unserialize( ot_decode( $layouts[$layouts['active_layout']] ) );
-
- /* execute the action hook and pass the theme options to it */
- do_action( 'ot_before_theme_options_save', $new_options );
-
- update_option( ot_options_id(), $new_options );
-
- }
-
- /* update the option tree layouts array */
- update_option( ot_layouts_id(), $layouts );
-
- $message = 'success';
-
- }
-
- /* redirect accordingly */
- wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) ) );
- exit;
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Export before the screen is displayed.
- *
- * @return void
- *
- * @access public
- * @since 2.0.8
- */
-if ( ! function_exists( 'ot_export' ) ) {
-
- function ot_export() {
-
- /* check and verify export settings file nonce */
- if ( isset( $_POST['export_settings_file_nonce'] ) && wp_verify_nonce( $_POST['export_settings_file_nonce'], 'export_settings_file_form' ) ) {
-
- ot_export_php_settings_array();
-
- }
-
- }
-
-}
-
-/**
- * Reusable XMl import helper function.
- *
- * @param string $file The path to the file.
- * @return mixed False or an array of settings.
- *
- * @access public
- * @since 2.0.8
- */
-if ( ! function_exists( 'ot_import_xml' ) ) {
-
- function ot_import_xml( $file ) {
-
- $get_data = wp_remote_get( $file );
-
- if ( is_wp_error( $get_data ) )
- return false;
-
- $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : false;
-
- if ( $rawdata ) {
-
- $section_count = 0;
- $settings_count = 0;
-
- $section = '';
-
- $settings = array();
- $xml = new SimpleXMLElement( $rawdata );
-
- foreach ( $xml->row as $value ) {
-
- /* heading is a section now */
- if ( $value->item_type == 'heading' ) {
-
- /* add section to the sections array */
- $settings['sections'][$section_count]['id'] = (string) $value->item_id;
- $settings['sections'][$section_count]['title'] = (string) $value->item_title;
-
- /* save the last section id to use in creating settings */
- $section = (string) $value->item_id;
-
- /* increment the section count */
- $section_count++;
-
- } else {
-
- /* add setting to the settings array */
- $settings['settings'][$settings_count]['id'] = (string) $value->item_id;
- $settings['settings'][$settings_count]['label'] = (string) $value->item_title;
- $settings['settings'][$settings_count]['desc'] = (string) $value->item_desc;
- $settings['settings'][$settings_count]['section'] = $section;
- $settings['settings'][$settings_count]['type'] = ot_map_old_option_types( (string) $value->item_type );
- $settings['settings'][$settings_count]['std'] = '';
- $settings['settings'][$settings_count]['class'] = '';
-
- /* textarea rows */
- $rows = '';
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'css', 'javascript', 'textarea' ) ) ) {
- if ( (int) $value->item_options > 0 ) {
- $rows = (int) $value->item_options;
- } else {
- $rows = 15;
- }
- }
- $settings['settings'][$settings_count]['rows'] = $rows;
-
- /* post type */
- $post_type = '';
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'custom-post-type-select', 'custom-post-type-checkbox' ) ) ) {
- if ( '' != (string) $value->item_options ) {
- $post_type = (string) $value->item_options;
- } else {
- $post_type = 'post';
- }
- }
- $settings['settings'][$settings_count]['post_type'] = $post_type;
-
- /* choices */
- $choices = array();
- if ( in_array( $settings['settings'][$settings_count]['type'], array( 'checkbox', 'radio', 'select' ) ) ) {
- if ( '' != (string) $value->item_options ) {
- $choices = ot_convert_string_to_array( (string) $value->item_options );
- }
- }
- $settings['settings'][$settings_count]['choices'] = $choices;
-
- $settings_count++;
- }
-
- }
-
- /* make sure each setting has a section just incase */
- if ( isset( $settings['sections'] ) && isset( $settings['settings'] ) ) {
- foreach( $settings['settings'] as $k => $setting ) {
- if ( '' == $setting['section'] ) {
- $settings['settings'][$k]['section'] = $settings['sections'][0]['id'];
- }
- }
- }
-
- return $settings;
-
- }
-
- return false;
- }
-
-}
-
-/**
- * Export the Theme Mode theme-options.php
- *
- * @return attachment
- *
- * @access public
- * @since 2.0.8
- */
-if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
-
- function ot_export_php_settings_array() {
-
- $content = '';
- $build_settings = '';
- $contextual_help = '';
- $sections = '';
- $settings = '';
- $option_tree_settings = get_option( ot_settings_id(), array() );
-
- // Domain string helper
- function ot_I18n_string( $string ) {
- if ( ! empty( $string ) && isset( $_POST['domain'] ) && ! empty( $_POST['domain'] ) ) {
- $domain = str_replace( ' ', '-', trim( $_POST['domain'] ) );
- return "__( '$string', '$domain' )";
- }
- return "'$string'";
- }
-
- header( "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
- header( "Pragma: no-cache ");
- header( "Content-Description: File Transfer" );
- header( 'Content-Disposition: attachment; filename="theme-options.php"');
- header( "Content-Type: application/octet-stream");
- header( "Content-Transfer-Encoding: binary" );
-
- /* build contextual help content */
- if ( isset( $option_tree_settings['contextual_help']['content'] ) ) {
- $help = '';
- foreach( $option_tree_settings['contextual_help']['content'] as $value ) {
- $_id = isset( $value['id'] ) ? $value['id'] : '';
- $_title = ot_I18n_string( isset( $value['title'] ) ? str_replace( "'", "\'", $value['title'] ) : '' );
- $_content = ot_I18n_string( isset( $value['content'] ) ? html_entity_decode( str_replace( "'", "\'", $value['content'] ) ) : '' );
- $help.= "
- array(
- 'id' => '$_id',
- 'title' => $_title,
- 'content' => $_content
- ),";
- }
- $help = substr_replace( $help, '' , -1 );
- $contextual_help = "
- 'content' => array( $help
- ),";
- }
-
- /* build contextual help sidebar */
- if ( isset( $option_tree_settings['contextual_help']['sidebar'] ) ) {
- $contextual_help.= "
- 'sidebar' => " . ot_I18n_string( html_entity_decode( str_replace( "'", "\'", $option_tree_settings['contextual_help']['sidebar'] ) ) );
- }
-
- /* check that $contexual_help has a value and add to $build_settings */
- if ( '' != $contextual_help ) {
- $build_settings.= "
- 'contextual_help' => array( $contextual_help
- ),";
- }
-
- /* build sections */
- if ( isset( $option_tree_settings['sections'] ) ) {
- foreach( $option_tree_settings['sections'] as $value ) {
- $_id = isset( $value['id'] ) ? $value['id'] : '';
- $_title = ot_I18n_string( isset( $value['title'] ) ? str_replace( "'", "\'", $value['title'] ) : '' );
- $sections.= "
- array(
- 'id' => '$_id',
- 'title' => $_title
- ),";
- }
- $sections = substr_replace( $sections, '' , -1 );
- }
-
- /* check that $sections has a value and add to $build_settings */
- if ( '' != $sections ) {
- $build_settings.= "
- 'sections' => array( $sections
- )";
- }
-
- /* build settings */
- if ( isset( $option_tree_settings['settings'] ) ) {
- foreach( $option_tree_settings['settings'] as $value ) {
- $_id = isset( $value['id'] ) ? $value['id'] : '';
- $_label = ot_I18n_string( isset( $value['label'] ) ? str_replace( "'", "\'", $value['label'] ) : '' );
- $_desc = ot_I18n_string( isset( $value['desc'] ) ? str_replace( "'", "\'", $value['desc'] ) : '' );
- $_std = isset( $value['std'] ) ? str_replace( "'", "\'", $value['std'] ) : '';
- $_type = isset( $value['type'] ) ? $value['type'] : '';
- $_section = isset( $value['section'] ) ? $value['section'] : '';
- $_rows = isset( $value['rows'] ) ? $value['rows'] : '';
- $_post_type = isset( $value['post_type'] ) ? $value['post_type'] : '';
- $_taxonomy = isset( $value['taxonomy'] ) ? $value['taxonomy'] : '';
- $_min_max_step = isset( $value['min_max_step'] ) ? $value['min_max_step'] : '';
- $_class = isset( $value['class'] ) ? $value['class'] : '';
- $_condition = isset( $value['condition'] ) ? $value['condition'] : '';
- $_operator = isset( $value['operator'] ) ? $value['operator'] : '';
-
- $choices = '';
- if ( isset( $value['choices'] ) && ! empty( $value['choices'] ) ) {
- foreach( $value['choices'] as $choice ) {
- $_choice_value = isset( $choice['value'] ) ? str_replace( "'", "\'", $choice['value'] ) : '';
- $_choice_label = ot_I18n_string( isset( $choice['label'] ) ? str_replace( "'", "\'", $choice['label'] ) : '' );
- $_choice_src = isset( $choice['src'] ) ? str_replace( "'", "\'", $choice['src'] ) : '';
- $choices.= "
- array(
- 'value' => '$_choice_value',
- 'label' => $_choice_label,
- 'src' => '$_choice_src'
- ),";
- }
- $choices = substr_replace( $choices, '' , -1 );
- $choices = ",
- 'choices' => array( $choices
- )";
- }
-
- $std = "'$_std'";
- if ( is_array( $_std ) ) {
- $std_array = array();
- foreach( $_std as $_sk => $_sv ) {
- $std_array[] = "'$_sk' => '$_sv'";
- }
- $std = 'array(
-' . implode( ",\n", $std_array ) . '
- )';
- }
-
- $setting_settings = '';
- if ( isset( $value['settings'] ) && ! empty( $value['settings'] ) ) {
- foreach( $value['settings'] as $setting ) {
- $_setting_id = isset( $setting['id'] ) ? $setting['id'] : '';
- $_setting_label = ot_I18n_string( isset( $setting['label'] ) ? str_replace( "'", "\'", $setting['label'] ) : '' );
- $_setting_desc = ot_I18n_string( isset( $setting['desc'] ) ? str_replace( "'", "\'", $setting['desc'] ) : '' );
- $_setting_std = isset( $setting['std'] ) ? $setting['std'] : '';
- $_setting_type = isset( $setting['type'] ) ? $setting['type'] : '';
- $_setting_rows = isset( $setting['rows'] ) ? $setting['rows'] : '';
- $_setting_post_type = isset( $setting['post_type'] ) ? $setting['post_type'] : '';
- $_setting_taxonomy = isset( $setting['taxonomy'] ) ? $setting['taxonomy'] : '';
- $_setting_min_max_step = isset( $setting['min_max_step'] ) ? $setting['min_max_step'] : '';
- $_setting_class = isset( $setting['class'] ) ? $setting['class'] : '';
- $_setting_condition = isset( $setting['condition'] ) ? $setting['condition'] : '';
- $_setting_operator = isset( $setting['operator'] ) ? $setting['operator'] : '';
-
- $setting_choices = '';
- if ( isset( $setting['choices'] ) && ! empty( $setting['choices'] ) ) {
- foreach( $setting['choices'] as $setting_choice ) {
- $_setting_choice_value = isset( $setting_choice['value'] ) ? $setting_choice['value'] : '';
- $_setting_choice_label = ot_I18n_string( isset( $setting_choice['label'] ) ? str_replace( "'", "\'", $setting_choice['label'] ) : '' );
- $_setting_choice_src = isset( $setting_choice['src'] ) ? str_replace( "'", "\'", $setting_choice['src'] ) : '';
- $setting_choices.= "
- array(
- 'value' => '$_setting_choice_value',
- 'label' => $_setting_choice_label,
- 'src' => '$_setting_choice_src'
- ),";
- }
- $setting_choices = substr_replace( $setting_choices, '' , -1 );
- $setting_choices = ",
- 'choices' => array( $setting_choices
- )";
- }
-
- $setting_std = "'$_setting_std'";
- if ( is_array( $_setting_std ) ) {
- $setting_std_array = array();
- foreach( $_setting_std as $_ssk => $_ssv ) {
- $setting_std_array[] = "'$_ssk' => '$_ssv'";
- }
- $setting_std = 'array(
-' . implode( ",\n", $setting_std_array ) . '
- )';
- }
-
- $setting_settings.= "
- array(
- 'id' => '$_setting_id',
- 'label' => $_setting_label,
- 'desc' => $_setting_desc,
- 'std' => $setting_std,
- 'type' => '$_setting_type',
- 'rows' => '$_setting_rows',
- 'post_type' => '$_setting_post_type',
- 'taxonomy' => '$_setting_taxonomy',
- 'min_max_step'=> '$_setting_min_max_step',
- 'class' => '$_setting_class',
- 'condition' => '$_setting_condition',
- 'operator' => '$_setting_operator'$setting_choices
- ),";
- }
- $setting_settings = substr_replace( $setting_settings, '' , -1 );
- $setting_settings = ",
- 'settings' => array( $setting_settings
- )";
- }
-
- $settings.= "
- array(
- 'id' => '$_id',
- 'label' => $_label,
- 'desc' => $_desc,
- 'std' => $std,
- 'type' => '$_type',
- 'section' => '$_section',
- 'rows' => '$_rows',
- 'post_type' => '$_post_type',
- 'taxonomy' => '$_taxonomy',
- 'min_max_step'=> '$_min_max_step',
- 'class' => '$_class',
- 'condition' => '$_condition',
- 'operator' => '$_operator'$choices$setting_settings
- ),";
- }
- $settings = substr_replace( $settings, '' , -1 );
- }
-
- /* check that $sections has a value and add to $build_settings */
- if ( '' != $settings ) {
- $build_settings.= ",
- 'settings' => array( $settings
- )";
- }
-
- $content.= " $section ) {
-
- /* remove from array if missing values */
- if ( ( ! isset( $section['title'] ) && ! isset( $section['id'] ) ) || ( '' == $section['title'] && '' == $section['id'] ) ) {
-
- unset( $settings['sections'][$k] );
-
- } else {
-
- /* validate label */
- if ( '' != $section['title'] ) {
-
- $settings['sections'][$k]['title'] = wp_kses_post( $section['title'] );
-
- }
-
- /* missing title set to unfiltered ID */
- if ( ! isset( $section['title'] ) || '' == $section['title'] ) {
-
- $settings['sections'][$k]['title'] = wp_kses_post( $section['id'] );
-
- /* missing ID set to title */
- } else if ( ! isset( $section['id'] ) || '' == $section['id'] ) {
-
- $section['id'] = wp_kses_post( $section['title'] );
-
- }
-
- /* sanitize ID once everything has been checked first */
- $settings['sections'][$k]['id'] = ot_sanitize_option_id( wp_kses_post( $section['id'] ) );
-
- }
-
- }
-
- $settings['sections'] = ot_stripslashes( $settings['sections'] );
-
- }
-
- /* validate settings by looping over array as many times as it takes */
- if ( isset( $settings['settings'] ) ) {
-
- $settings['settings'] = ot_validate_settings_array( $settings['settings'] );
-
- }
-
- /* validate contextual_help */
- if ( isset( $settings['contextual_help']['content'] ) ) {
-
- /* fix numeric keys since drag & drop will change them */
- $settings['contextual_help']['content'] = array_values( $settings['contextual_help']['content'] );
-
- /* loop through content */
- foreach( $settings['contextual_help']['content'] as $k => $content ) {
-
- /* remove from array if missing values */
- if ( ( ! isset( $content['title'] ) && ! isset( $content['id'] ) ) || ( '' == $content['title'] && '' == $content['id'] ) ) {
-
- unset( $settings['contextual_help']['content'][$k] );
-
- } else {
-
- /* validate label */
- if ( '' != $content['title'] ) {
-
- $settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['title'] );
-
- }
-
- /* missing title set to unfiltered ID */
- if ( ! isset( $content['title'] ) || '' == $content['title'] ) {
-
- $settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['id'] );
-
- /* missing ID set to title */
- } else if ( ! isset( $content['id'] ) || '' == $content['id'] ) {
-
- $content['id'] = wp_kses_post( $content['title'] );
-
- }
-
- /* sanitize ID once everything has been checked first */
- $settings['contextual_help']['content'][$k]['id'] = ot_sanitize_option_id( wp_kses_post( $content['id'] ) );
-
- }
-
- /* validate textarea description */
- if ( isset( $content['content'] ) ) {
-
- $settings['contextual_help']['content'][$k]['content'] = wp_kses_post( $content['content'] );
-
- }
-
- }
-
- }
-
- /* validate contextual_help sidebar */
- if ( isset( $settings['contextual_help']['sidebar'] ) ) {
-
- $settings['contextual_help']['sidebar'] = wp_kses_post( $settings['contextual_help']['sidebar'] );
-
- }
-
- $settings['contextual_help'] = ot_stripslashes( $settings['contextual_help'] );
-
- /* default message */
- $message = 'failed';
-
- /* is array: save & show success message */
- if ( is_array( $settings ) ) {
-
- /* WPML unregister ID's that have been removed */
- if ( function_exists( 'icl_unregister_string' ) ) {
-
- $current = get_option( ot_settings_id() );
- $options = get_option( ot_options_id() );
-
- if ( isset( $current['settings'] ) ) {
-
- /* Empty ID array */
- $new_ids = array();
-
- /* Build the WPML IDs array */
- foreach( $settings['settings'] as $setting ) {
-
- if ( $setting['id'] ) {
-
- $new_ids[] = $setting['id'];
-
- }
-
- }
-
- /* Remove missing IDs from WPML */
- foreach( $current['settings'] as $current_setting ) {
-
- if ( ! in_array( $current_setting['id'], $new_ids ) ) {
-
- if ( ! empty( $options[$current_setting['id']] ) && in_array( $current_setting['type'], array( 'list-item', 'slider' ) ) ) {
-
- foreach( $options[$current_setting['id']] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- ot_wpml_unregister_string( $current_setting['id'] . '_' . $ckey . '_' . $key );
-
- }
-
- }
-
- } else if ( ! empty( $options[$current_setting['id']] ) && $current_setting['type'] == 'social-icons' ) {
-
- foreach( $options[$current_setting['id']] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- ot_wpml_unregister_string( $current_setting['id'] . '_' . $ckey . '_' . $key );
-
- }
-
- }
-
- } else {
-
- ot_wpml_unregister_string( $current_setting['id'] );
-
- }
-
- }
-
- }
-
- }
-
- }
-
- update_option( ot_settings_id(), $settings );
- $message = 'success';
-
- }
-
- /* redirect */
- wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'save-settings', 'message' => $message ), $_POST['_wp_http_referer'] ) ) );
- exit;
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Validate the settings array before save.
- *
- * This function will loop over the settings array as many
- * times as it takes to validate every sub setting.
- *
- * @param array $settings The array of settings.
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_validate_settings_array' ) ) {
-
- function ot_validate_settings_array( $settings = array() ) {
-
- /* validate settings */
- if ( count( $settings ) > 0 ) {
-
- /* fix numeric keys since drag & drop will change them */
- $settings = array_values( $settings );
-
- /* loop through settings */
- foreach( $settings as $k => $setting ) {
-
-
- /* remove from array if missing values */
- if ( ( ! isset( $setting['label'] ) && ! isset( $setting['id'] ) ) || ( '' == $setting['label'] && '' == $setting['id'] ) ) {
-
- unset( $settings[$k] );
-
- } else {
-
- /* validate label */
- if ( '' != $setting['label'] ) {
-
- $settings[$k]['label'] = wp_kses_post( $setting['label'] );
-
- }
-
- /* missing label set to unfiltered ID */
- if ( ! isset( $setting['label'] ) || '' == $setting['label'] ) {
-
- $settings[$k]['label'] = $setting['id'];
-
- /* missing ID set to label */
- } else if ( ! isset( $setting['id'] ) || '' == $setting['id'] ) {
-
- $setting['id'] = wp_kses_post( $setting['label'] );
-
- }
-
- /* sanitize ID once everything has been checked first */
- $settings[$k]['id'] = ot_sanitize_option_id( wp_kses_post( $setting['id'] ) );
-
- }
-
- /* validate description */
- if ( '' != $setting['desc'] ) {
-
- $settings[$k]['desc'] = wp_kses_post( $setting['desc'] );
-
- }
-
- /* validate choices */
- if ( isset( $setting['choices'] ) ) {
-
- /* loop through choices */
- foreach( $setting['choices'] as $ck => $choice ) {
-
- /* remove from array if missing values */
- if ( ( ! isset( $choice['label'] ) && ! isset( $choice['value'] ) ) || ( '' == $choice['label'] && '' == $choice['value'] ) ) {
-
- unset( $setting['choices'][$ck] );
-
- } else {
-
- /* missing label set to unfiltered ID */
- if ( ! isset( $choice['label'] ) || '' == $choice['label'] ) {
-
- $setting['choices'][$ck]['label'] = wp_kses_post( $choice['value'] );
-
- /* missing value set to label */
- } else if ( ! isset( $choice['value'] ) || '' == $choice['value'] ) {
-
- $setting['choices'][$ck]['value'] = ot_sanitize_option_id( wp_kses_post( $choice['label'] ) );
-
- }
-
- }
-
- }
-
- /* update keys and push new array values */
- $settings[$k]['choices'] = array_values( $setting['choices'] );
-
- }
-
- /* validate sub settings */
- if ( isset( $setting['settings'] ) ) {
-
- $settings[$k]['settings'] = ot_validate_settings_array( $setting['settings'] );
-
- }
-
- }
-
- }
-
- /* return array but strip those damn slashes out first!!! */
- return ot_stripslashes( $settings );
-
- }
-
-}
-
-/**
- * Save layouts array before the screen is displayed.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_modify_layouts' ) ) {
-
- function ot_modify_layouts() {
-
- /* check and verify modify layouts nonce */
- if ( isset( $_POST['option_tree_modify_layouts_nonce'] ) && wp_verify_nonce( $_POST['option_tree_modify_layouts_nonce'], 'option_tree_modify_layouts_form' ) ) {
-
- /* previous layouts value */
- $option_tree_layouts = get_option( ot_layouts_id() );
-
- /* new layouts value */
- $layouts = isset( $_POST[ot_layouts_id()] ) ? $_POST[ot_layouts_id()] : '';
-
- /* rebuild layout array */
- $rebuild = array();
-
- /* validate layouts */
- if ( is_array( $layouts ) && ! empty( $layouts ) ) {
-
- /* setup active layout */
- if ( isset( $layouts['active_layout'] ) && ! empty( $layouts['active_layout'] ) ) {
- $rebuild['active_layout'] = $layouts['active_layout'];
- }
-
- /* add new and overwrite active layout */
- if ( isset( $layouts['_add_new_layout_'] ) && ! empty( $layouts['_add_new_layout_'] ) ) {
- $rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] );
- $rebuild[$rebuild['active_layout']] = ot_encode( serialize( get_option( ot_options_id() ) ) );
- }
-
- $first_layout = '';
-
- /* loop through layouts */
- foreach( $layouts as $key => $layout ) {
-
- /* skip over active layout key */
- if ( $key == 'active_layout' )
- continue;
-
- /* check if the key exists then set value */
- if ( isset( $option_tree_layouts[$key] ) && ! empty( $option_tree_layouts[$key] ) ) {
- $rebuild[$key] = $option_tree_layouts[$key];
- if ( '' == $first_layout ) {
- $first_layout = $key;
- }
- }
-
- }
-
- if ( isset( $rebuild['active_layout'] ) && ! isset( $rebuild[$rebuild['active_layout']] ) && ! empty( $first_layout ) ) {
- $rebuild['active_layout'] = $first_layout;
- }
-
- }
-
- /* default message */
- $message = 'failed';
-
- /* is array: save & show success message */
- if ( count( $rebuild ) > 1 ) {
-
- /* rebuild the theme options */
- $rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
- if ( is_array( $rebuild_option_tree ) ) {
-
- /* execute the action hook and pass the theme options to it */
- do_action( 'ot_before_theme_options_save', $rebuild_option_tree );
-
- update_option( ot_options_id(), $rebuild_option_tree );
-
- }
-
- /* rebuild the layouts */
- update_option( ot_layouts_id(), $rebuild );
-
- /* change message */
- $message = 'success';
-
- } else if ( count( $rebuild ) <= 1 ) {
-
- /* delete layouts option */
- delete_option( ot_layouts_id() );
-
- /* change message */
- $message = 'deleted';
-
- }
-
- /* redirect */
- if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) {
- $query_args = esc_url_raw( add_query_arg( array( 'settings-updated' => 'layout' ), remove_query_arg( array( 'action', 'message' ), $_POST['_wp_http_referer'] ) ) );
- } else {
- $query_args = esc_url_raw( add_query_arg( array( 'action' => 'save-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) );
- }
- wp_redirect( $query_args );
- exit;
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Helper function to display alert messages.
- *
- * @param array Page array
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_alert_message' ) ) {
-
- function ot_alert_message( $page = array() ) {
-
- if ( empty( $page ) )
- return false;
-
- $before = apply_filters( 'ot_before_page_messages', '', $page );
-
- if ( $before ) {
- return $before;
- }
-
- $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
- $message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : '';
- $updated = isset( $_REQUEST['settings-updated'] ) ? $_REQUEST['settings-updated'] : '';
-
- if ( $action == 'save-settings' ) {
-
- if ( $message == 'success' ) {
-
- return '' . __( 'Settings updated.', 'option-tree' ) . '
';
-
- } else if ( $message == 'failed' ) {
-
- return '' . __( 'Settings could not be saved.', 'option-tree' ) . '
';
-
- }
-
- } else if ( $action == 'import-xml' || $action == 'import-settings' ) {
-
- if ( $message == 'success' ) {
-
- return '' . __( 'Settings Imported.', 'option-tree' ) . '
';
-
- } else if ( $message == 'failed' ) {
-
- return '' . __( 'Settings could not be imported.', 'option-tree' ) . '
';
-
- }
- } else if ( $action == 'import-data' ) {
-
- if ( $message == 'success' ) {
-
- return '' . __( 'Data Imported.', 'option-tree' ) . '
';
-
- } else if ( $message == 'failed' ) {
-
- return '' . __( 'Data could not be imported.', 'option-tree' ) . '
';
-
- }
-
- } else if ( $action == 'import-layouts' ) {
-
- if ( $message == 'success' ) {
-
- return '' . __( 'Layouts Imported.', 'option-tree' ) . '
';
-
- } else if ( $message == 'failed' ) {
-
- return '' . __( 'Layouts could not be imported.', 'option-tree' ) . '
';
-
- }
-
- } else if ( $action == 'save-layouts' ) {
-
- if ( $message == 'success' ) {
-
- return '' . __( 'Layouts Updated.', 'option-tree' ) . '
';
-
- } else if ( $message == 'failed' ) {
-
- return '' . __( 'Layouts could not be updated.', 'option-tree' ) . '
';
-
- } else if ( $message == 'deleted' ) {
-
- return '' . __( 'Layouts have been deleted.', 'option-tree' ) . '
';
-
- }
-
- } else if ( $updated == 'layout' ) {
-
- return '' . __( 'Layout activated.', 'option-tree' ) . '
';
-
- } else if ( $action == 'reset' ) {
-
- return '' . $page['reset_message'] . '
';
-
- }
-
- do_action( 'ot_custom_page_messages', $page );
-
- if ( $updated == 'true' ) {
-
- return '' . $page['updated_message'] . '
';
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Setup the default option types.
- *
- * The returned option types are filterable so you can add your own.
- * This is not a task for a beginner as you'll need to add the function
- * that displays the option to the user and validate the saved data.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_option_types_array' ) ) {
-
- function ot_option_types_array() {
-
- return apply_filters( 'ot_option_types_array', array(
- 'background' => __('Background', 'option-tree'),
- 'border' => __('Border', 'option-tree'),
- 'box-shadow' => __('Box Shadow', 'option-tree'),
- 'category-checkbox' => __('Category Checkbox', 'option-tree'),
- 'category-select' => __('Category Select', 'option-tree'),
- 'checkbox' => __('Checkbox', 'option-tree'),
- 'colorpicker' => __('Colorpicker', 'option-tree'),
- 'colorpicker-opacity' => __('Colorpicker Opacity', 'option-tree'),
- 'css' => __('CSS', 'option-tree'),
- 'custom-post-type-checkbox' => __('Custom Post Type Checkbox', 'option-tree'),
- 'custom-post-type-select' => __('Custom Post Type Select', 'option-tree'),
- 'date-picker' => __('Date Picker', 'option-tree'),
- 'date-time-picker' => __('Date Time Picker', 'option-tree'),
- 'dimension' => __('Dimension', 'option-tree'),
- 'gallery' => __('Gallery', 'option-tree'),
- 'google-fonts' => __('Google Fonts', 'option-tree'),
- 'javascript' => __('JavaScript', 'option-tree'),
- 'link-color' => __('Link Color', 'option-tree'),
- 'list-item' => __('List Item', 'option-tree'),
- 'measurement' => __('Measurement', 'option-tree'),
- 'numeric-slider' => __('Numeric Slider', 'option-tree'),
- 'on-off' => __('On/Off', 'option-tree'),
- 'page-checkbox' => __('Page Checkbox', 'option-tree'),
- 'page-select' => __('Page Select', 'option-tree'),
- 'post-checkbox' => __('Post Checkbox', 'option-tree'),
- 'post-select' => __('Post Select', 'option-tree'),
- 'radio' => __('Radio', 'option-tree'),
- 'radio-image' => __('Radio Image', 'option-tree'),
- 'select' => __('Select', 'option-tree'),
- 'sidebar-select' => __('Sidebar Select', 'option-tree'),
- 'slider' => __('Slider', 'option-tree'),
- 'social-links' => __('Social Links', 'option-tree'),
- 'spacing' => __('Spacing', 'option-tree'),
- 'tab' => __('Tab', 'option-tree'),
- 'tag-checkbox' => __('Tag Checkbox', 'option-tree'),
- 'tag-select' => __('Tag Select', 'option-tree'),
- 'taxonomy-checkbox' => __('Taxonomy Checkbox', 'option-tree'),
- 'taxonomy-select' => __('Taxonomy Select', 'option-tree'),
- 'text' => __('Text', 'option-tree'),
- 'textarea' => __('Textarea', 'option-tree'),
- 'textarea-simple' => __('Textarea Simple', 'option-tree'),
- 'textblock' => __('Textblock', 'option-tree'),
- 'textblock-titled' => __('Textblock Titled', 'option-tree'),
- 'typography' => __('Typography', 'option-tree'),
- 'upload' => __('Upload', 'option-tree')
- ) );
-
- }
-}
-
-/**
- * Map old option types for rebuilding XML and Table data.
- *
- * @param string $type The old option type
- * @return string The new option type
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_map_old_option_types' ) ) {
-
- function ot_map_old_option_types( $type = '' ) {
-
- if ( ! $type )
- return 'text';
-
- $types = array(
- 'background' => 'background',
- 'category' => 'category-select',
- 'categories' => 'category-checkbox',
- 'checkbox' => 'checkbox',
- 'colorpicker' => 'colorpicker',
- 'css' => 'css',
- 'custom_post' => 'custom-post-type-select',
- 'custom_posts' => 'custom-post-type-checkbox',
- 'input' => 'text',
- 'image' => 'upload',
- 'measurement' => 'measurement',
- 'page' => 'page-select',
- 'pages' => 'page-checkbox',
- 'post' => 'post-select',
- 'posts' => 'post-checkbox',
- 'radio' => 'radio',
- 'select' => 'select',
- 'slider' => 'slider',
- 'tag' => 'tag-select',
- 'tags' => 'tag-checkbox',
- 'textarea' => 'textarea',
- 'textblock' => 'textblock',
- 'typography' => 'typography',
- 'upload' => 'upload'
- );
-
- if ( isset( $types[$type] ) )
- return $types[$type];
-
- return false;
-
- }
-}
-
-/**
- * Filters the typography font-family to add Google fonts dynamically.
- *
- * @param array $families An array of all recognized font families.
- * @param string $field_id ID of the feild being filtered.
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-function ot_google_font_stack( $families, $field_id ) {
-
- $ot_google_fonts = get_theme_mod( 'ot_google_fonts', array() );
- $ot_set_google_fonts = get_theme_mod( 'ot_set_google_fonts', array() );
-
- if ( ! empty( $ot_set_google_fonts ) ) {
- foreach( $ot_set_google_fonts as $id => $sets ) {
- foreach( $sets as $value ) {
- $family = isset( $value['family'] ) ? $value['family'] : '';
- if ( $family && isset( $ot_google_fonts[$family] ) ) {
- $spaces = explode(' ', $ot_google_fonts[$family]['family'] );
- $font_stack = count( $spaces ) > 1 ? '"' . $ot_google_fonts[$family]['family'] . '"': $ot_google_fonts[$family]['family'];
- $families[$family] = apply_filters( 'ot_google_font_stack', $font_stack, $family, $field_id );
- }
- }
- }
- }
-
- return $families;
-}
-add_filter( 'ot_recognized_font_families', 'ot_google_font_stack', 1, 2 );
-
-/**
- * Recognized font families
- *
- * Returns an array of all recognized font families.
- * Keys are intended to be stored in the database
- * while values are ready for display in html.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_font_families' ) ) {
-
- function ot_recognized_font_families( $field_id = '' ) {
-
- $families = array(
- 'arial' => 'Arial',
- 'georgia' => 'Georgia',
- 'helvetica' => 'Helvetica',
- 'palatino' => 'Palatino',
- 'tahoma' => 'Tahoma',
- 'times' => '"Times New Roman", sans-serif',
- 'trebuchet' => 'Trebuchet',
- 'verdana' => 'Verdana'
- );
-
- return apply_filters( 'ot_recognized_font_families', $families, $field_id );
-
- }
-
-}
-
-/**
- * Recognized font sizes
- *
- * Returns an array of all recognized font sizes.
- *
- * @uses apply_filters()
- *
- * @param string $field_id ID that's passed to the filters.
- * @return array
- *
- * @access public
- * @since 2.0.12
- */
-if ( ! function_exists( 'ot_recognized_font_sizes' ) ) {
-
- function ot_recognized_font_sizes( $field_id ) {
-
- $range = ot_range(
- apply_filters( 'ot_font_size_low_range', 0, $field_id ),
- apply_filters( 'ot_font_size_high_range', 150, $field_id ),
- apply_filters( 'ot_font_size_range_interval', 1, $field_id )
- );
-
- $unit = apply_filters( 'ot_font_size_unit_type', 'px', $field_id );
-
- foreach( $range as $k => $v ) {
- $range[$k] = $v . $unit;
- }
-
- return apply_filters( 'ot_recognized_font_sizes', $range, $field_id );
- }
-
-}
-
-/**
- * Recognized font styles
- *
- * Returns an array of all recognized font styles.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_font_styles' ) ) {
-
- function ot_recognized_font_styles( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_font_styles', array(
- 'normal' => 'Normal',
- 'italic' => 'Italic',
- 'oblique' => 'Oblique',
- 'inherit' => 'Inherit'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized font variants
- *
- * Returns an array of all recognized font variants.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_font_variants' ) ) {
-
- function ot_recognized_font_variants( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_font_variants', array(
- 'normal' => 'Normal',
- 'small-caps' => 'Small Caps',
- 'inherit' => 'Inherit'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized font weights
- *
- * Returns an array of all recognized font weights.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_font_weights' ) ) {
-
- function ot_recognized_font_weights( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_font_weights', array(
- 'normal' => 'Normal',
- 'bold' => 'Bold',
- 'bolder' => 'Bolder',
- 'lighter' => 'Lighter',
- '100' => '100',
- '200' => '200',
- '300' => '300',
- '400' => '400',
- '500' => '500',
- '600' => '600',
- '700' => '700',
- '800' => '800',
- '900' => '900',
- 'inherit' => 'Inherit'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized letter spacing
- *
- * Returns an array of all recognized line heights.
- *
- * @uses apply_filters()
- *
- * @param string $field_id ID that's passed to the filters.
- * @return array
- *
- * @access public
- * @since 2.0.12
- */
-if ( ! function_exists( 'ot_recognized_letter_spacing' ) ) {
-
- function ot_recognized_letter_spacing( $field_id ) {
-
- $range = ot_range(
- apply_filters( 'ot_letter_spacing_low_range', -0.1, $field_id ),
- apply_filters( 'ot_letter_spacing_high_range', 0.1, $field_id ),
- apply_filters( 'ot_letter_spacing_range_interval', 0.01, $field_id )
- );
-
- $unit = apply_filters( 'ot_letter_spacing_unit_type', 'em', $field_id );
-
- foreach( $range as $k => $v ) {
- $range[$k] = $v . $unit;
- }
-
- return apply_filters( 'ot_recognized_letter_spacing', $range, $field_id );
- }
-
-}
-
-/**
- * Recognized line heights
- *
- * Returns an array of all recognized line heights.
- *
- * @uses apply_filters()
- *
- * @param string $field_id ID that's passed to the filters.
- * @return array
- *
- * @access public
- * @since 2.0.12
- */
-if ( ! function_exists( 'ot_recognized_line_heights' ) ) {
-
- function ot_recognized_line_heights( $field_id ) {
-
- $range = ot_range(
- apply_filters( 'ot_line_height_low_range', 0, $field_id ),
- apply_filters( 'ot_line_height_high_range', 150, $field_id ),
- apply_filters( 'ot_line_height_range_interval', 1, $field_id )
- );
-
- $unit = apply_filters( 'ot_line_height_unit_type', 'px', $field_id );
-
- foreach( $range as $k => $v ) {
- $range[$k] = $v . $unit;
- }
-
- return apply_filters( 'ot_recognized_line_heights', $range, $field_id );
- }
-
-}
-
-/**
- * Recognized text decorations
- *
- * Returns an array of all recognized text decorations.
- * Keys are intended to be stored in the database
- * while values are ready for display in html.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.0.10
- */
-if ( ! function_exists( 'ot_recognized_text_decorations' ) ) {
-
- function ot_recognized_text_decorations( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_text_decorations', array(
- 'blink' => 'Blink',
- 'inherit' => 'Inherit',
- 'line-through' => 'Line Through',
- 'none' => 'None',
- 'overline' => 'Overline',
- 'underline' => 'Underline'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized text transformations
- *
- * Returns an array of all recognized text transformations.
- * Keys are intended to be stored in the database
- * while values are ready for display in html.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.0.10
- */
-if ( ! function_exists( 'ot_recognized_text_transformations' ) ) {
-
- function ot_recognized_text_transformations( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_text_transformations', array(
- 'capitalize' => 'Capitalize',
- 'inherit' => 'Inherit',
- 'lowercase' => 'Lowercase',
- 'none' => 'None',
- 'uppercase' => 'Uppercase'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized background repeat
- *
- * Returns an array of all recognized background repeat values.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_background_repeat' ) ) {
-
- function ot_recognized_background_repeat( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_background_repeat', array(
- 'no-repeat' => 'No Repeat',
- 'repeat' => 'Repeat All',
- 'repeat-x' => 'Repeat Horizontally',
- 'repeat-y' => 'Repeat Vertically',
- 'inherit' => 'Inherit'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized background attachment
- *
- * Returns an array of all recognized background attachment values.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_background_attachment' ) ) {
-
- function ot_recognized_background_attachment( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_background_attachment', array(
- "fixed" => "Fixed",
- "scroll" => "Scroll",
- "inherit" => "Inherit"
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized background position
- *
- * Returns an array of all recognized background position values.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_recognized_background_position' ) ) {
-
- function ot_recognized_background_position( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_background_position', array(
- "left top" => "Left Top",
- "left center" => "Left Center",
- "left bottom" => "Left Bottom",
- "center top" => "Center Top",
- "center center" => "Center Center",
- "center bottom" => "Center Bottom",
- "right top" => "Right Top",
- "right center" => "Right Center",
- "right bottom" => "Right Bottom"
- ), $field_id );
-
- }
-
-}
-
-/**
- * Border Styles
- *
- * Returns an array of all available style types.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_border_style_types' ) ) {
-
- function ot_recognized_border_style_types( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_border_style_types', array(
- 'hidden' => 'Hidden',
- 'dashed' => 'Dashed',
- 'solid' => 'Solid',
- 'double' => 'Double',
- 'groove' => 'Groove',
- 'ridge' => 'Ridge',
- 'inset' => 'Inset',
- 'outset' => 'Outset',
- ), $field_id );
-
- }
-
-}
-
-/**
- * Border Units
- *
- * Returns an array of all available unit types.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_border_unit_types' ) ) {
-
- function ot_recognized_border_unit_types( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_border_unit_types', array(
- 'px' => 'px',
- '%' => '%',
- 'em' => 'em',
- 'pt' => 'pt'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Dimension Units
- *
- * Returns an array of all available unit types.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_dimension_unit_types' ) ) {
-
- function ot_recognized_dimension_unit_types( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_dimension_unit_types', array(
- 'px' => 'px',
- '%' => '%',
- 'em' => 'em',
- 'pt' => 'pt'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Spacing Units
- *
- * Returns an array of all available unit types.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_spacing_unit_types' ) ) {
-
- function ot_recognized_spacing_unit_types( $field_id = '' ) {
-
- return apply_filters( 'ot_recognized_spacing_unit_types', array(
- 'px' => 'px',
- '%' => '%',
- 'em' => 'em',
- 'pt' => 'pt'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Recognized Google font families
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_google_font_families' ) ) {
-
- function ot_recognized_google_font_families( $field_id ) {
-
- $families = array();
- $ot_google_fonts = get_theme_mod( 'ot_google_fonts', array() );
-
- // Forces an array rebuild when we sitch themes
- if ( empty( $ot_google_fonts ) ) {
- $ot_google_fonts = ot_fetch_google_fonts( true, true );
- }
-
- foreach( (array) $ot_google_fonts as $key => $item ) {
-
- if ( isset( $item['family'] ) ) {
-
- $families[ $key ] = $item['family'];
-
- }
-
- }
-
- return apply_filters( 'ot_recognized_google_font_families', $families, $field_id );
-
- }
-
-}
-
-/**
- * Recognized Google font variants
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_google_font_variants' ) ) {
-
- function ot_recognized_google_font_variants( $field_id, $family ) {
-
- $variants = array();
- $ot_google_fonts = get_theme_mod( 'ot_google_fonts', array() );
-
- if ( isset( $ot_google_fonts[ $family ]['variants'] ) ) {
-
- $variants = $ot_google_fonts[ $family ]['variants'];
-
- }
-
- return apply_filters( 'ot_recognized_google_font_variants', $variants, $field_id, $family );
-
- }
-
-}
-
-/**
- * Recognized Google font subsets
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_recognized_google_font_subsets' ) ) {
-
- function ot_recognized_google_font_subsets( $field_id, $family ) {
-
- $subsets = array();
- $ot_google_fonts = get_theme_mod( 'ot_google_fonts', array() );
-
- if ( isset( $ot_google_fonts[ $family ]['subsets'] ) ) {
-
- $subsets = $ot_google_fonts[ $family ]['subsets'];
-
- }
-
- return apply_filters( 'ot_recognized_google_font_subsets', $subsets, $field_id, $family );
-
- }
-
-}
-
-/**
- * Measurement Units
- *
- * Returns an array of all available unit types.
- * Renamed in version 2.0 to avoid name collisions.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_measurement_unit_types' ) ) {
-
- function ot_measurement_unit_types( $field_id = '' ) {
-
- return apply_filters( 'ot_measurement_unit_types', array(
- 'px' => 'px',
- '%' => '%',
- 'em' => 'em',
- 'pt' => 'pt'
- ), $field_id );
-
- }
-
-}
-
-/**
- * Radio Images default array.
- *
- * Returns an array of all available radio images.
- * You can filter this function to change the images
- * on a per option basis.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_radio_images' ) ) {
-
- function ot_radio_images( $field_id = '' ) {
-
- return apply_filters( 'ot_radio_images', array(
- array(
- 'value' => 'left-sidebar',
- 'label' => __( 'Left Sidebar', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/left-sidebar.png'
- ),
- array(
- 'value' => 'right-sidebar',
- 'label' => __( 'Right Sidebar', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/right-sidebar.png'
- ),
- array(
- 'value' => 'full-width',
- 'label' => __( 'Full Width (no sidebar)', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/full-width.png'
- ),
- array(
- 'value' => 'dual-sidebar',
- 'label' => __( 'Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/dual-sidebar.png'
- ),
- array(
- 'value' => 'left-dual-sidebar',
- 'label' => __( 'Left Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/left-dual-sidebar.png'
- ),
- array(
- 'value' => 'right-dual-sidebar',
- 'label' => __( 'Right Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . 'assets/images/layout/right-dual-sidebar.png'
- )
- ), $field_id );
-
- }
-
-}
-
-/**
- * Default List Item Settings array.
- *
- * Returns an array of the default list item settings.
- * You can filter this function to change the settings
- * on a per option basis.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_list_item_settings' ) ) {
-
- function ot_list_item_settings( $id ) {
-
- $settings = apply_filters( 'ot_list_item_settings', array(
- array(
- 'id' => 'image',
- 'label' => __( 'Image', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'upload',
- 'rows' => '',
- 'class' => '',
- 'post_type' => '',
- 'choices' => array()
- ),
- array(
- 'id' => 'link',
- 'label' => __( 'Link', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'text',
- 'rows' => '',
- 'class' => '',
- 'post_type' => '',
- 'choices' => array()
- ),
- array(
- 'id' => 'description',
- 'label' => __( 'Description', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'textarea-simple',
- 'rows' => 10,
- 'class' => '',
- 'post_type' => '',
- 'choices' => array()
- )
- ), $id );
-
- return $settings;
-
- }
-
-}
-
-/**
- * Default Slider Settings array.
- *
- * Returns an array of the default slider settings.
- * You can filter this function to change the settings
- * on a per option basis.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_slider_settings' ) ) {
-
- function ot_slider_settings( $id ) {
-
- $settings = apply_filters( 'image_slider_fields', array(
- array(
- 'name' => 'image',
- 'type' => 'image',
- 'label' => __( 'Image', 'option-tree' ),
- 'class' => ''
- ),
- array(
- 'name' => 'link',
- 'type' => 'text',
- 'label' => __( 'Link', 'option-tree' ),
- 'class' => ''
- ),
- array(
- 'name' => 'description',
- 'type' => 'textarea',
- 'label' => __( 'Description', 'option-tree' ),
- 'class' => ''
- )
- ), $id );
-
- /* fix the array keys, values, and just get it 2.0 ready */
- foreach( $settings as $_k => $setting ) {
-
- foreach( $setting as $s_key => $s_value ) {
-
- if ( 'name' == $s_key ) {
-
- $settings[$_k]['id'] = $s_value;
- unset($settings[$_k]['name']);
-
- } else if ( 'type' == $s_key ) {
-
- if ( 'input' == $s_value ) {
-
- $settings[$_k]['type'] = 'text';
-
- } else if ( 'textarea' == $s_value ) {
-
- $settings[$_k]['type'] = 'textarea-simple';
-
- } else if ( 'image' == $s_value ) {
-
- $settings[$_k]['type'] = 'upload';
-
- }
-
- }
-
- }
-
- }
-
- return $settings;
-
- }
-
-}
-
-/**
- * Default Social Links Settings array.
- *
- * Returns an array of the default social links settings.
- * You can filter this function to change the settings
- * on a per option basis.
- *
- * @uses apply_filters()
- *
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-if ( ! function_exists( 'ot_social_links_settings' ) ) {
-
- function ot_social_links_settings( $id ) {
-
- $settings = apply_filters( 'ot_social_links_settings', array(
- array(
- 'id' => 'name',
- 'label' => __( 'Name', 'option-tree' ),
- 'desc' => __( 'Enter the name of the social website.', 'option-tree' ),
- 'std' => '',
- 'type' => 'text',
- 'class' => 'option-tree-setting-title'
- ),
- array(
- 'id' => 'title',
- 'label' => 'Title',
- 'desc' => __( 'Enter the text shown in the title attribute of the link.', 'option-tree' ),
- 'type' => 'text'
- ),
- array(
- 'id' => 'href',
- 'label' => 'Link',
- 'desc' => sprintf( __( 'Enter a link to the profile or page on the social website. Remember to add the %s part to the front of the link.', 'option-tree' ), 'http://
' ),
- 'type' => 'text',
- )
- ), $id );
-
- return $settings;
-
- }
-
-}
-
-/**
- * Inserts CSS with field_id markers.
- *
- * Inserts CSS into a dynamic.css file, placing it between
- * BEGIN and END field_id markers. Replaces existing marked info,
- * but still retains surrounding data.
- *
- * @param string $field_id The CSS option field ID.
- * @param array $options The current option_tree array.
- * @return bool True on write success, false on failure.
- *
- * @access public
- * @since 1.1.8
- * @updated 2.5.3
- */
-if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
-
- function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = false ) {
-
- /* missing $field_id or $insertion exit early */
- if ( '' == $field_id || '' == $insertion )
- return;
-
- /* path to the dynamic.css file */
- $filepath = get_stylesheet_directory() . '/dynamic.css';
- if ( is_multisite() ) {
- $multisite_filepath = get_stylesheet_directory() . '/dynamic-' . get_current_blog_id() . '.css';
- if ( file_exists( $multisite_filepath ) ) {
- $filepath = $multisite_filepath;
- }
- }
-
- /* allow filter on path */
- $filepath = apply_filters( 'css_option_file_path', $filepath, $field_id );
-
- /* grab a copy of the paths array */
- $ot_css_file_paths = get_option( 'ot_css_file_paths', array() );
- if ( is_multisite() ) {
- $ot_css_file_paths = get_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths );
- }
-
- /* set the path for this field */
- $ot_css_file_paths[$field_id] = $filepath;
-
- /* update the paths */
- if ( is_multisite() ) {
- update_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths );
- } else {
- update_option( 'ot_css_file_paths', $ot_css_file_paths );
- }
-
- /* insert CSS into file */
- if ( file_exists( $filepath ) ) {
-
- $insertion = ot_normalize_css( $insertion );
- $regex = "/{{([a-zA-Z0-9\_\-\#\|\=]+)}}/";
- $marker = $field_id;
-
- /* Match custom CSS */
- preg_match_all( $regex, $insertion, $matches );
-
- /* Loop through CSS */
- foreach( $matches[0] as $option ) {
-
- $value = '';
- $option_array = explode( '|', str_replace( array( '{{', '}}' ), '', $option ) );
- $option_id = isset( $option_array[0] ) ? $option_array[0] : '';
- $option_key = isset( $option_array[1] ) ? $option_array[1] : '';
- $option_type = ot_get_option_type_by_id( $option_id );
- $fallback = '';
-
- // Get the meta array value
- if ( $meta ) {
- global $post;
-
- $value = get_post_meta( $post->ID, $option_id, true );
-
- // Get the options array value
- } else {
-
- $options = get_option( ot_options_id() );
-
- if ( isset( $options[$option_id] ) ) {
-
- $value = $options[$option_id];
-
- }
-
- }
-
- // This in an array of values
- if ( is_array( $value ) ) {
-
- if ( empty( $option_key ) ) {
-
- // Measurement
- if ( $option_type == 'measurement' ) {
- $unit = ! empty( $value[1] ) ? $value[1] : 'px';
-
- // Set $value with measurement properties
- if ( isset( $value[0] ) && strlen( $value[0] ) > 0 )
- $value = $value[0].$unit;
-
- // Border
- } else if ( $option_type == 'border' ) {
- $border = array();
-
- $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px';
-
- if ( isset( $value['width'] ) && strlen( $value['width'] ) > 0 )
- $border[] = $value['width'].$unit;
-
- if ( ! empty( $value['style'] ) )
- $border[] = $value['style'];
-
- if ( ! empty( $value['color'] ) )
- $border[] = $value['color'];
-
- /* set $value with border properties or empty string */
- $value = ! empty( $border ) ? implode( ' ', $border ) : '';
-
- // Box Shadow
- } else if ( $option_type == 'box-shadow' ) {
-
- /* set $value with box-shadow properties or empty string */
- $value = ! empty( $value ) ? implode( ' ', $value ) : '';
-
- // Dimension
- } else if ( $option_type == 'dimension' ) {
- $dimension = array();
-
- $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px';
-
- if ( isset( $value['width'] ) && strlen( $value['width'] ) > 0 )
- $dimension[] = $value['width'].$unit;
-
- if ( isset( $value['height'] ) && strlen( $value['height'] ) > 0 )
- $dimension[] = $value['height'].$unit;
-
- // Set $value with dimension properties or empty string
- $value = ! empty( $dimension ) ? implode( ' ', $dimension ) : '';
-
- // Spacing
- } else if ( $option_type == 'spacing' ) {
- $spacing = array();
-
- $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px';
-
- if ( isset( $value['top'] ) && strlen( $value['top'] ) > 0 )
- $spacing[] = $value['top'].$unit;
-
- if ( isset( $value['right'] ) && strlen( $value['right'] ) > 0 )
- $spacing[] = $value['right'].$unit;
-
- if ( isset( $value['bottom'] ) && strlen( $value['bottom'] ) > 0 )
- $spacing[] = $value['bottom'].$unit;
-
- if ( isset( $value['left'] ) && strlen( $value['left'] ) > 0 )
- $spacing[] = $value['left'].$unit;
-
- // Set $value with spacing properties or empty string
- $value = ! empty( $spacing ) ? implode( ' ', $spacing ) : '';
-
- // Typography
- } else if ( $option_type == 'typography' ) {
- $font = array();
-
- if ( ! empty( $value['font-color'] ) )
- $font[] = "color: " . $value['font-color'] . ";";
-
- if ( ! empty( $value['font-family'] ) ) {
- foreach ( ot_recognized_font_families( $marker ) as $key => $v ) {
- if ( $key == $value['font-family'] ) {
- $font[] = "font-family: " . $v . ";";
- }
- }
- }
-
- if ( ! empty( $value['font-size'] ) )
- $font[] = "font-size: " . $value['font-size'] . ";";
-
- if ( ! empty( $value['font-style'] ) )
- $font[] = "font-style: " . $value['font-style'] . ";";
-
- if ( ! empty( $value['font-variant'] ) )
- $font[] = "font-variant: " . $value['font-variant'] . ";";
-
- if ( ! empty( $value['font-weight'] ) )
- $font[] = "font-weight: " . $value['font-weight'] . ";";
-
- if ( ! empty( $value['letter-spacing'] ) )
- $font[] = "letter-spacing: " . $value['letter-spacing'] . ";";
-
- if ( ! empty( $value['line-height'] ) )
- $font[] = "line-height: " . $value['line-height'] . ";";
-
- if ( ! empty( $value['text-decoration'] ) )
- $font[] = "text-decoration: " . $value['text-decoration'] . ";";
-
- if ( ! empty( $value['text-transform'] ) )
- $font[] = "text-transform: " . $value['text-transform'] . ";";
-
- // Set $value with font properties or empty string
- $value = ! empty( $font ) ? implode( "\n", $font ) : '';
-
- // Background
- } else if ( $option_type == 'background' ) {
- $bg = array();
-
- if ( ! empty( $value['background-color'] ) )
- $bg[] = $value['background-color'];
-
- if ( ! empty( $value['background-image'] ) ) {
-
- // If an attachment ID is stored here fetch its URL and replace the value
- if ( wp_attachment_is_image( $value['background-image'] ) ) {
-
- $attachment_data = wp_get_attachment_image_src( $value['background-image'], 'original' );
-
- // Check for attachment data
- if ( $attachment_data ) {
-
- $value['background-image'] = $attachment_data[0];
-
- }
-
- }
-
- $bg[] = 'url("' . $value['background-image'] . '")';
-
- }
-
- if ( ! empty( $value['background-repeat'] ) )
- $bg[] = $value['background-repeat'];
-
- if ( ! empty( $value['background-attachment'] ) )
- $bg[] = $value['background-attachment'];
-
- if ( ! empty( $value['background-position'] ) )
- $bg[] = $value['background-position'];
-
- if ( ! empty( $value['background-size'] ) )
- $size = $value['background-size'];
-
- // Set $value with background properties or empty string
- $value = ! empty( $bg ) ? 'background: ' . implode( " ", $bg ) . ';' : '';
-
- if ( isset( $size ) ) {
- if ( ! empty( $bg ) ) {
- $value.= apply_filters( 'ot_insert_css_with_markers_bg_size_white_space', "\n\x20\x20", $option_id );
- }
- $value.= "background-size: $size;";
- }
-
- }
-
- } else {
-
- $value = $value[$option_key];
-
- }
-
- }
-
- // If an attachment ID is stored here fetch its URL and replace the value
- if ( $option_type == 'upload' && wp_attachment_is_image( $value ) ) {
-
- $attachment_data = wp_get_attachment_image_src( $value, 'original' );
-
- // Check for attachment data
- if ( $attachment_data ) {
-
- $value = $attachment_data[0];
-
- }
-
- }
-
- // Attempt to fallback when `$value` is empty
- if ( empty( $value ) ) {
-
- // We're trying to access a single array key
- if ( ! empty( $option_key ) ) {
-
- // Link Color `inherit`
- if ( $option_type == 'link-color' ) {
- $fallback = 'inherit';
- }
-
- } else {
-
- // Border
- if ( $option_type == 'border' ) {
- $fallback = 'inherit';
- }
-
- // Box Shadow
- if ( $option_type == 'box-shadow' ) {
- $fallback = 'none';
- }
-
- // Colorpicker
- if ( $option_type == 'colorpicker' ) {
- $fallback = 'inherit';
- }
-
- // Colorpicker Opacity
- if ( $option_type == 'colorpicker-opacity' ) {
- $fallback = 'inherit';
- }
-
- }
-
- /**
- * Filter the `dynamic.css` fallback value.
- *
- * @since 2.5.3
- *
- * @param string $fallback The default CSS fallback value.
- * @param string $option_id The option ID.
- * @param string $option_type The option type.
- * @param string $option_key The option array key.
- */
- $fallback = apply_filters( 'ot_insert_css_with_markers_fallback', $fallback, $option_id, $option_type, $option_key );
-
- }
-
- // Let's fallback!
- if ( ! empty( $fallback ) ) {
- $value = $fallback;
- }
-
- // Filter the CSS
- $value = apply_filters( 'ot_insert_css_with_markers_value', $value, $option_id );
-
- // Insert CSS, even if the value is empty
- $insertion = stripslashes( str_replace( $option, $value, $insertion ) );
-
- }
-
- // Can't write to the file so we error out
- if ( ! is_writable( $filepath ) ) {
- add_settings_error( 'option-tree', 'dynamic_css', sprintf( __( 'Unable to write to file %s.', 'option-tree' ), '' . $filepath . '
' ), 'error' );
- return false;
- }
-
- // Create array from the lines of code
- $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
-
- // Can't write to the file return false
- if ( ! $f = ot_file_open( $filepath, 'w' ) ) {
- return false;
- }
-
- $searching = true;
- $foundit = false;
-
- // Has array of lines
- if ( ! empty( $markerdata ) ) {
-
- // Foreach line of code
- foreach( $markerdata as $n => $markerline ) {
-
- // Found begining of marker, set $searching to false
- if ( $markerline == "/* BEGIN {$marker} */" )
- $searching = false;
-
- // Keep searching each line of CSS
- if ( $searching == true ) {
- if ( $n + 1 < count( $markerdata ) )
- ot_file_write( $f, "{$markerline}\n" );
- else
- ot_file_write( $f, "{$markerline}" );
- }
-
- // Found end marker write code
- if ( $markerline == "/* END {$marker} */" ) {
- ot_file_write( $f, "/* BEGIN {$marker} */\n" );
- ot_file_write( $f, "{$insertion}\n" );
- ot_file_write( $f, "/* END {$marker} */\n" );
- $searching = true;
- $foundit = true;
- }
-
- }
-
- }
-
- // Nothing inserted, write code. DO IT, DO IT!
- if ( ! $foundit ) {
- ot_file_write( $f, "/* BEGIN {$marker} */\n" );
- ot_file_write( $f, "{$insertion}\n" );
- ot_file_write( $f, "/* END {$marker} */\n" );
- }
-
- // Close file
- ot_file_close( $f );
- return true;
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Remove old CSS.
- *
- * Removes CSS when the textarea is empty, but still retains surrounding styles.
- *
- * @param string $field_id The CSS option field ID.
- * @return bool True on write success, false on failure.
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_remove_old_css' ) ) {
-
- function ot_remove_old_css( $field_id = '' ) {
-
- /* missing $field_id string */
- if ( '' == $field_id )
- return false;
-
- /* path to the dynamic.css file */
- $filepath = get_stylesheet_directory() . '/dynamic.css';
-
- /* allow filter on path */
- $filepath = apply_filters( 'css_option_file_path', $filepath, $field_id );
-
- /* remove CSS from file */
- if ( is_writeable( $filepath ) ) {
-
- /* get each line in the file */
- $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
-
- /* can't write to the file return false */
- if ( ! $f = ot_file_open( $filepath, 'w' ) )
- return false;
-
- $searching = true;
-
- /* has array of lines */
- if ( ! empty( $markerdata ) ) {
-
- /* foreach line of code */
- foreach ( $markerdata as $n => $markerline ) {
-
- /* found begining of marker, set $searching to false */
- if ( $markerline == "/* BEGIN {$field_id} */" )
- $searching = false;
-
- /* $searching is true, keep rewrite each line of CSS */
- if ( $searching == true ) {
- if ( $n + 1 < count( $markerdata ) )
- ot_file_write( $f, "{$markerline}\n" );
- else
- ot_file_write( $f, "{$markerline}" );
- }
-
- /* found end marker delete old CSS */
- if ( $markerline == "/* END {$field_id} */" ) {
- ot_file_write( $f, "" );
- $searching = true;
- }
-
- }
-
- }
-
- /* close file */
- ot_file_close( $f );
- return true;
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Normalize CSS
- *
- * Normalize & Convert all line-endings to UNIX format.
- *
- * @param string $css
- * @return string
- *
- * @access public
- * @since 1.1.8
- * @updated 2.0
- */
-if ( ! function_exists( 'ot_normalize_css' ) ) {
-
- function ot_normalize_css( $css ) {
-
- /* Normalize & Convert */
- $css = str_replace( "\r\n", "\n", $css );
- $css = str_replace( "\r", "\n", $css );
-
- /* Don't allow out-of-control blank lines */
- $css = preg_replace( "/\n{2,}/", "\n\n", $css );
-
- return $css;
- }
-
-}
-
-/**
- * Helper function to loop over the option types.
- *
- * @param array $type The current option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_loop_through_option_types' ) ) {
-
- function ot_loop_through_option_types( $type = '', $child = false ) {
-
- $content = '';
- $types = ot_option_types_array();
-
- if ( $child )
- unset($types['list-item']);
-
- foreach( $types as $key => $value )
- $content.= '' . $value . ' ';
-
- return $content;
-
- }
-
-}
-
-/**
- * Helper function to loop over choices.
- *
- * @param string $name The form element name.
- * @param array $choices The array of choices.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_loop_through_choices' ) ) {
-
- function ot_loop_through_choices( $name, $choices = array() ) {
-
- $content = '';
-
- foreach( (array) $choices as $key => $choice )
- $content.= '' . ot_choices_view( $name, $key, $choice ) . ' ';
-
- return $content;
- }
-
-}
-
-/**
- * Helper function to loop over sub settings.
- *
- * @param string $name The form element name.
- * @param array $settings The array of settings.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_loop_through_sub_settings' ) ) {
-
- function ot_loop_through_sub_settings( $name, $settings = array() ) {
-
- $content = '';
-
- foreach( $settings as $key => $setting )
- $content.= '' . ot_settings_view( $name, $key, $setting ) . ' ';
-
- return $content;
- }
-
-}
-
-/**
- * Helper function to display sections.
- *
- * This function is used in AJAX to add a new section
- * and when section have already been added and saved.
- *
- * @param int $key The array key for the current element.
- * @param array An array of values for the current section.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_sections_view' ) ) {
-
- function ot_sections_view( $name, $key, $section = array() ) {
-
- return '
-
-
' . ( isset( $section['title'] ) ? esc_attr( $section['title'] ) : 'Section ' . ( $key + 1 ) ) . '
-
-
-
';
-
- }
-
-}
-
-/**
- * Helper function to display settings.
- *
- * This function is used in AJAX to add a new setting
- * and when settings have already been added and saved.
- *
- * @param int $key The array key for the current element.
- * @param array An array of values for the current section.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_settings_view' ) ) {
-
- function ot_settings_view( $name, $key, $setting = array() ) {
-
- $child = ( strpos( $name, '][settings]') !== false ) ? true : false;
- $type = isset( $setting['type'] ) ? $setting['type'] : '';
- $std = isset( $setting['std'] ) ? $setting['std'] : '';
- $operator = isset( $setting['operator'] ) ? esc_attr( $setting['operator'] ) : 'and';
-
- // Serialize the standard value just incase
- if ( is_array( $std ) ) {
- $std = maybe_serialize( $std );
- }
-
- if ( in_array( $type, array( 'css', 'javascript', 'textarea', 'textarea-simple' ) ) ) {
- $std_form_element = '';
- } else {
- $std_form_element = ' ';
- }
-
- return '
-
-
' . ( isset( $setting['label'] ) ? esc_attr( $setting['label'] ) : 'Setting ' . ( $key + 1 ) ) . '
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ' . ( ! $child ? ' ' : '' );
-
- }
-
-}
-
-/**
- * Helper function to display setting choices.
- *
- * This function is used in AJAX to add a new choice
- * and when choices have already been added and saved.
- *
- * @param string $name The form element name.
- * @param array $key The array key for the current element.
- * @param array An array of values for the current choice.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_choices_view' ) ) {
-
- function ot_choices_view( $name, $key, $choice = array() ) {
-
- return '
-
-
' . ( isset( $choice['label'] ) ? esc_attr( $choice['label'] ) : 'Choice ' . ( $key + 1 ) ) . '
-
-
';
-
- }
-
-}
-
-/**
- * Helper function to display sections.
- *
- * This function is used in AJAX to add a new section
- * and when section have already been added and saved.
- *
- * @param int $key The array key for the current element.
- * @param array An array of values for the current section.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_contextual_help_view' ) ) {
-
- function ot_contextual_help_view( $name, $key, $content = array() ) {
-
- return '
-
-
' . ( isset( $content['title'] ) ? esc_attr( $content['title'] ) : 'Content ' . ( $key + 1 ) ) . '
-
-
-
';
-
- }
-
-}
-
-/**
- * Helper function to display sections.
- *
- * @param string $key
- * @param string $data
- * @param string $active_layout
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_layout_view' ) ) {
-
- function ot_layout_view( $key, $data = '', $active_layout = '' ) {
-
- return '
-
-
' . ( isset( $key ) ? esc_attr( $key ) : __( 'Layout', 'option-tree' ) ) . '
-
-
-
';
-
- }
-
-}
-
-/**
- * Helper function to display list items.
- *
- * This function is used in AJAX to add a new list items
- * and when they have already been added and saved.
- *
- * @param string $name The form field name.
- * @param int $key The array key for the current element.
- * @param array An array of values for the current list item.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_list_item_view' ) ) {
-
- function ot_list_item_view( $name, $key, $list_item = array(), $post_id = 0, $get_option = '', $settings = array(), $type = '' ) {
-
- /* required title setting */
- $required_setting = array(
- array(
- 'id' => 'title',
- 'label' => __( 'Title', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'text',
- 'rows' => '',
- 'class' => 'option-tree-setting-title',
- 'post_type' => '',
- 'choices' => array()
- )
- );
-
- /* load the old filterable slider settings */
- if ( 'slider' == $type ) {
-
- $settings = ot_slider_settings( $name );
-
- }
-
- /* if no settings array load the filterable list item settings */
- if ( empty( $settings ) ) {
-
- $settings = ot_list_item_settings( $name );
-
- }
-
- /* merge the two settings array */
- $settings = array_merge( $required_setting, $settings );
-
- echo '
-
-
' . ( isset( $list_item['title'] ) ? esc_attr( $list_item['title'] ) : '' ) . '
-
-
';
-
- foreach( $settings as $field ) {
-
- // Set field value
- $field_value = isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : '';
-
- /* set default to standard value */
- if ( isset( $field['std'] ) ) {
- $field_value = ot_filter_std_value( $field_value, $field['std'] );
- }
-
- // filter the title label and description
- if ( $field['id'] == 'title' ) {
-
- // filter the label
- $field['label'] = apply_filters( 'ot_list_item_title_label', $field['label'], $name );
-
- // filter the description
- $field['desc'] = apply_filters( 'ot_list_item_title_desc', $field['desc'], $name );
-
- }
-
- /* make life easier */
- $_field_name = $get_option ? $get_option . '[' . $name . ']' : $name;
-
- /* build the arguments array */
- $_args = array(
- 'type' => $field['type'],
- 'field_id' => $name . '_' . $field['id'] . '_' . $key,
- 'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']',
- 'field_value' => $field_value,
- 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
- 'field_std' => isset( $field['std'] ) ? $field['std'] : '',
- 'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
- 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
- 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
- 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1',
- 'field_class' => isset( $field['class'] ) ? $field['class'] : '',
- 'field_condition' => isset( $field['condition'] ) ? $field['condition'] : '',
- 'field_operator' => isset( $field['operator'] ) ? $field['operator'] : 'and',
- 'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(),
- 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
- 'post_id' => $post_id,
- 'get_option' => $get_option
- );
-
- $conditions = '';
-
- /* setup the conditions */
- if ( isset( $field['condition'] ) && ! empty( $field['condition'] ) ) {
-
- /* doing magic on the conditions so they work in a list item */
- $conditionals = explode( ',', $field['condition'] );
- foreach( $conditionals as $condition ) {
- $parts = explode( ':', $condition );
- if ( isset( $parts[0] ) ) {
- $field['condition'] = str_replace( $condition, $name . '_' . $parts[0] . '_' . $key . ':' . $parts[1], $field['condition'] );
- }
- }
-
- $conditions = ' data-condition="' . $field['condition'] . '"';
- $conditions.= isset( $field['operator'] ) && in_array( $field['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['operator'] . '"' : '';
-
- }
-
- // Build the setting CSS class
- if ( ! empty( $_args['field_class'] ) ) {
-
- $classes = explode( ' ', $_args['field_class'] );
-
- foreach( $classes as $_key => $value ) {
-
- $classes[$_key] = $value . '-wrap';
-
- }
-
- $class = 'format-settings ' . implode( ' ', $classes );
-
- } else {
-
- $class = 'format-settings';
-
- }
-
- /* option label */
- echo '
';
-
- /* don't show title with textblocks */
- if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) {
- echo '
';
- echo '
' . esc_attr( $field['label'] ) . ' ';
- echo '';
- }
-
- /* only allow simple textarea inside a list-item due to known DOM issues with wp_editor() */
- if ( apply_filters( 'ot_override_forced_textarea_simple', false, $field['id'] ) == false && $_args['type'] == 'textarea' )
- $_args['type'] = 'textarea-simple';
-
- /* option body, list-item is not allowed inside another list-item */
- if ( $_args['type'] !== 'list-item' && $_args['type'] !== 'slider' ) {
- echo ot_display_by_type( $_args );
- }
-
- echo '
';
-
- }
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Helper function to display social links.
- *
- * This function is used in AJAX to add a new list items
- * and when they have already been added and saved.
- *
- * @param string $name The form field name.
- * @param int $key The array key for the current element.
- * @param array An array of values for the current list item.
- *
- * @return void
- *
- * @access public
- * @since 2.4.0
- */
-if ( ! function_exists( 'ot_social_links_view' ) ) {
-
- function ot_social_links_view( $name, $key, $list_item = array(), $post_id = 0, $get_option = '', $settings = array(), $type = '' ) {
-
- /* if no settings array load the filterable social links settings */
- if ( empty( $settings ) ) {
-
- $settings = ot_social_links_settings( $name );
-
- }
-
- echo '
-
-
' . ( isset( $list_item['name'] ) ? esc_attr( $list_item['name'] ) : '' ) . '
-
-
';
-
- foreach( $settings as $field ) {
-
- // Set field value
- $field_value = isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : '';
-
- /* set default to standard value */
- if ( isset( $field['std'] ) ) {
- $field_value = ot_filter_std_value( $field_value, $field['std'] );
- }
-
- /* make life easier */
- $_field_name = $get_option ? $get_option . '[' . $name . ']' : $name;
-
- /* build the arguments array */
- $_args = array(
- 'type' => $field['type'],
- 'field_id' => $name . '_' . $field['id'] . '_' . $key,
- 'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']',
- 'field_value' => $field_value,
- 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
- 'field_std' => isset( $field['std'] ) ? $field['std'] : '',
- 'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
- 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
- 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
- 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1',
- 'field_class' => isset( $field['class'] ) ? $field['class'] : '',
- 'field_condition' => isset( $field['condition'] ) ? $field['condition'] : '',
- 'field_operator' => isset( $field['operator'] ) ? $field['operator'] : 'and',
- 'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(),
- 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
- 'post_id' => $post_id,
- 'get_option' => $get_option
- );
-
- $conditions = '';
-
- /* setup the conditions */
- if ( isset( $field['condition'] ) && ! empty( $field['condition'] ) ) {
-
- /* doing magic on the conditions so they work in a list item */
- $conditionals = explode( ',', $field['condition'] );
- foreach( $conditionals as $condition ) {
- $parts = explode( ':', $condition );
- if ( isset( $parts[0] ) ) {
- $field['condition'] = str_replace( $condition, $name . '_' . $parts[0] . '_' . $key . ':' . $parts[1], $field['condition'] );
- }
- }
-
- $conditions = ' data-condition="' . $field['condition'] . '"';
- $conditions.= isset( $field['operator'] ) && in_array( $field['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['operator'] . '"' : '';
-
- }
-
- /* option label */
- echo '
';
-
- }
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Helper function to display Theme Options layouts form.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) {
-
- function ot_theme_options_layouts_form( $active = false ) {
-
- echo '
';
-
- }
-
-}
-
-/**
- * Helper function to validate option ID's
- *
- * @param string $input The string to sanitize.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_sanitize_option_id' ) ) {
-
- function ot_sanitize_option_id( $input ) {
-
- return preg_replace( '/[^a-z0-9]/', '_', trim( strtolower( $input ) ) );
-
- }
-
-}
-
-/**
- * Helper function to validate layout ID's
- *
- * @param string $input The string to sanitize.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_sanitize_layout_id' ) ) {
-
- function ot_sanitize_layout_id( $input ) {
-
- return preg_replace( '/[^a-z0-9]/', '-', trim( strtolower( $input ) ) );
-
- }
-
-}
-
-/**
- * Convert choices array to string
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_convert_array_to_string' ) ) {
-
- function ot_convert_array_to_string( $input ) {
-
- if ( is_array( $input ) ) {
-
- foreach( $input as $k => $choice ) {
- $choices[$k] = $choice['value'] . '|' . $choice['label'];
-
- if ( isset( $choice['src'] ) )
- $choices[$k].= '|' . $choice['src'];
-
- }
-
- return implode( ',', $choices );
- }
-
- return false;
- }
-}
-
-/**
- * Convert choices string to array
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_convert_string_to_array' ) ) {
-
- function ot_convert_string_to_array( $input ) {
-
- if ( '' !== $input ) {
-
- /* empty choices array */
- $choices = array();
-
- /* exlode the string into an array */
- foreach( explode( ',', $input ) as $k => $choice ) {
-
- /* if ":" is splitting the string go deeper */
- if ( preg_match( '/\|/', $choice ) ) {
- $split = explode( '|', $choice );
- $choices[$k]['value'] = trim( $split[0] );
- $choices[$k]['label'] = trim( $split[1] );
-
- /* if radio image there are three values */
- if ( isset( $split[2] ) )
- $choices[$k]['src'] = trim( $split[2] );
-
- } else {
- $choices[$k]['value'] = trim( $choice );
- $choices[$k]['label'] = trim( $choice );
- }
-
- }
-
- /* return a formated choices array */
- return $choices;
-
- }
-
- return false;
-
- }
-}
-
-/**
- * Helper function - strpos() with arrays.
- *
- * @param string $haystack
- * @param array $needles
- * @return bool
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_strpos_array' ) ) {
-
- function ot_strpos_array( $haystack, $needles = array() ) {
-
- foreach( $needles as $needle ) {
- $pos = strpos( $haystack, $needle );
- if ( $pos !== false ) {
- return true;
- }
- }
-
- return false;
- }
-
-}
-
-/**
- * Helper function - strpos() with arrays.
- *
- * @param string $haystack
- * @param array $needles
- * @return bool
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_array_keys_exists' ) ) {
-
- function ot_array_keys_exists( $array, $keys ) {
-
- foreach($keys as $k) {
- if ( isset($array[$k]) ) {
- return true;
- }
- }
-
- return false;
- }
-
-}
-
-/**
- * Custom stripslashes from single value or array.
- *
- * @param mixed $input
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_stripslashes' ) ) {
-
- function ot_stripslashes( $input ) {
-
- if ( is_array( $input ) ) {
-
- foreach( $input as &$val ) {
-
- if ( is_array( $val ) ) {
-
- $val = ot_stripslashes( $val );
-
- } else {
-
- $val = stripslashes( trim( $val ) );
-
- }
-
- }
-
- } else {
-
- $input = stripslashes( trim( $input ) );
-
- }
-
- return $input;
-
- }
-
-}
-
-/**
- * Reverse wpautop.
- *
- * @param string $string The string to be filtered
- * @return string
- *
- * @access public
- * @since 2.0.9
- */
-if ( ! function_exists( 'ot_reverse_wpautop' ) ) {
-
- function ot_reverse_wpautop( $string = '' ) {
-
- /* return if string is empty */
- if ( trim( $string ) === '' )
- return '';
-
- /* remove all new lines &
tags */
- $string = str_replace( array( "\n", "
" ), "", $string );
-
- /* replace with \r */
- $string = str_replace( array( " ", " ", " " ), "\r", $string );
-
- /* replace
with \r\n */
- $string = str_replace( "", "\r\n", $string );
-
- /* return clean string */
- return trim( $string );
-
- }
-
-}
-
-/**
- * Returns an array of elements from start to limit, inclusive.
- *
- * Occasionally zero will be some impossibly large number to
- * the "E" power when creating a range from negative to positive.
- * This function attempts to fix that by setting that number back to "0".
- *
- * @param string $start First value of the sequence.
- * @param string $limit The sequence is ended upon reaching the limit value.
- * @param string $step If a step value is given, it will be used as the increment
- * between elements in the sequence. step should be given as a
- * positive number. If not specified, step will default to 1.
- * @return array
- *
- * @access public
- * @since 2.0.12
- */
-function ot_range( $start, $limit, $step = 1 ) {
-
- if ( $step < 0 )
- $step = 1;
-
- $range = range( $start, $limit, $step );
-
- foreach( $range as $k => $v ) {
- if ( strpos( $v, 'E' ) ) {
- $range[$k] = 0;
- }
- }
-
- return $range;
-}
-
-/**
- * Helper function to return encoded strings
- *
- * @return string
- *
- * @access public
- * @since 2.0.13
- */
-function ot_encode( $value ) {
-
- $func = 'base64' . '_encode';
- return $func( $value );
-
-}
-
-/**
- * Helper function to return decoded strings
- *
- * @return string
- *
- * @access public
- * @since 2.0.13
- */
-function ot_decode( $value ) {
-
- $func = 'base64' . '_decode';
- return $func( $value );
-
-}
-
-/**
- * Helper function to open a file
- *
- * @access public
- * @since 2.0.13
- */
-function ot_file_open( $handle, $mode ) {
-
- $func = 'f' . 'open';
- return @$func( $handle, $mode );
-
-}
-
-/**
- * Helper function to close a file
- *
- * @access public
- * @since 2.0.13
- */
-function ot_file_close( $handle ) {
-
- $func = 'f' . 'close';
- return $func( $handle );
-
-}
-
-/**
- * Helper function to write to an open file
- *
- * @access public
- * @since 2.0.13
- */
-function ot_file_write( $handle, $string ) {
-
- $func = 'f' . 'write';
- return $func( $handle, $string );
-
-}
-
-/**
- * Helper function to filter standard option values.
- *
- * @param mixed $value Saved string or array value
- * @param mixed $std Standard string or array value
- * @return mixed String or array
- *
- * @access public
- * @since 2.0.15
- */
-function ot_filter_std_value( $value = '', $std = '' ) {
-
- $std = maybe_unserialize( $std );
-
- if ( is_array( $value ) && is_array( $std ) ) {
-
- foreach( $value as $k => $v ) {
-
- if ( '' == $value[$k] && isset( $std[$k] ) ) {
-
- $value[$k] = $std[$k];
-
- }
-
- }
-
- } else if ( '' == $value && ! empty( $std ) ) {
-
- $value = $std;
-
- }
-
- return $value;
-
-}
-
-/**
- * Helper function to set the Google fonts array.
- *
- * @param string $id The option ID.
- * @param bool $value The option value
- * @return void
- *
- * @access public
- * @since 2.5.0
- */
-function ot_set_google_fonts( $id = '', $value = '' ) {
-
- $ot_set_google_fonts = get_theme_mod( 'ot_set_google_fonts', array() );
-
- if ( is_array( $value ) && ! empty( $value ) ) {
- $ot_set_google_fonts[$id] = $value;
- } else if ( isset( $ot_set_google_fonts[$id] ) ) {
- unset( $ot_set_google_fonts[$id] );
- }
-
- set_theme_mod( 'ot_set_google_fonts', $ot_set_google_fonts );
-
-}
-
-/**
- * Helper function to remove unused options from the Google fonts array.
- *
- * @param array $options The array of saved options.
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-function ot_update_google_fonts_after_save( $options ) {
-
- $ot_set_google_fonts = get_theme_mod( 'ot_set_google_fonts', array() );
-
- foreach( $ot_set_google_fonts as $key => $set ) {
- if ( ! isset( $options[$key] ) ) {
- unset( $ot_set_google_fonts[$key] );
- }
- }
- set_theme_mod( 'ot_set_google_fonts', $ot_set_google_fonts );
-
-}
-add_action( 'ot_after_theme_options_save', 'ot_update_google_fonts_after_save', 1 );
-
-/**
- * Helper function to fetch the Google fonts array.
- *
- * @param bool $normalize Whether or not to return a normalized array. Default 'true'.
- * @param bool $force_rebuild Whether or not to force the array to be rebuilt. Default 'false'.
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-function ot_fetch_google_fonts( $normalize = true, $force_rebuild = false ) {
-
- /* Google Fonts cache key */
- $ot_google_fonts_cache_key = apply_filters( 'ot_google_fonts_cache_key', 'ot_google_fonts_cache' );
-
- /* get the fonts from cache */
- $ot_google_fonts = apply_filters( 'ot_google_fonts_cache', get_transient( $ot_google_fonts_cache_key ) );
-
- if ( $force_rebuild || ! is_array( $ot_google_fonts ) || empty( $ot_google_fonts ) ) {
-
- $ot_google_fonts = array();
-
- /* API url and key */
- $ot_google_fonts_api_url = apply_filters( 'ot_google_fonts_api_url', 'https://www.googleapis.com/webfonts/v1/webfonts' );
- $ot_google_fonts_api_key = apply_filters( 'ot_google_fonts_api_key', 'AIzaSyB8G-4UtQr9fhDYTiNrDP40Y5GYQQKrNWI' );
-
- /* API arguments */
- $ot_google_fonts_fields = apply_filters( 'ot_google_fonts_fields', array( 'family', 'variants', 'subsets' ) );
- $ot_google_fonts_sort = apply_filters( 'ot_google_fonts_sort', 'alpha' );
-
- /* Initiate API request */
- $ot_google_fonts_query_args = array(
- 'key' => $ot_google_fonts_api_key,
- 'fields' => 'items(' . implode( ',', $ot_google_fonts_fields ) . ')',
- 'sort' => $ot_google_fonts_sort
- );
-
- /* Build and make the request */
- $ot_google_fonts_query = esc_url_raw( add_query_arg( $ot_google_fonts_query_args, $ot_google_fonts_api_url ) );
- $ot_google_fonts_response = wp_safe_remote_get( $ot_google_fonts_query, array( 'sslverify' => false, 'timeout' => 15 ) );
-
- /* continue if we got a valid response */
- if ( 200 == wp_remote_retrieve_response_code( $ot_google_fonts_response ) ) {
-
- if ( $response_body = wp_remote_retrieve_body( $ot_google_fonts_response ) ) {
-
- /* JSON decode the response body and cache the result */
- $ot_google_fonts_data = json_decode( trim( $response_body ), true );
-
- if ( is_array( $ot_google_fonts_data ) && isset( $ot_google_fonts_data['items'] ) ) {
-
- $ot_google_fonts = $ot_google_fonts_data['items'];
-
- // Normalize the array key
- $ot_google_fonts_tmp = array();
- foreach( $ot_google_fonts as $key => $value ) {
- $id = remove_accents( $value['family'] );
- $id = strtolower( $id );
- $id = preg_replace( '/[^a-z0-9_\-]/', '', $id );
- $ot_google_fonts_tmp[$id] = $value;
- }
-
- $ot_google_fonts = $ot_google_fonts_tmp;
- set_theme_mod( 'ot_google_fonts', $ot_google_fonts );
- set_transient( $ot_google_fonts_cache_key, $ot_google_fonts, WEEK_IN_SECONDS );
-
- }
-
- }
-
- }
-
- }
-
- return $normalize ? ot_normalize_google_fonts( $ot_google_fonts ) : $ot_google_fonts;
-
-}
-
-/**
- * Helper function to normalize the Google fonts array.
- *
- * @param array $google_fonts An array of fonts to nrmalize.
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
-function ot_normalize_google_fonts( $google_fonts ) {
-
- $ot_normalized_google_fonts = array();
-
- if ( is_array( $google_fonts ) && ! empty( $google_fonts ) ) {
-
- foreach( $google_fonts as $google_font ) {
-
- if( isset( $google_font['family'] ) ) {
-
- $id = str_replace( ' ', '+', $google_font['family'] );
-
- $ot_normalized_google_fonts[ $id ] = array(
- 'family' => $google_font['family']
- );
-
- if( isset( $google_font['variants'] ) ) {
-
- $ot_normalized_google_fonts[ $id ]['variants'] = $google_font['variants'];
-
- }
-
- if( isset( $google_font['subsets'] ) ) {
-
- $ot_normalized_google_fonts[ $id ]['subsets'] = $google_font['subsets'];
-
- }
-
- }
-
- }
-
- }
-
- return $ot_normalized_google_fonts;
-
-}
-
-/**
- * Helper function to register a WPML string
- *
- * @access public
- * @since 2.1
- */
-function ot_wpml_register_string( $id, $value ) {
-
- if ( function_exists( 'icl_register_string' ) ) {
-
- icl_register_string( 'Theme Options', $id, $value );
-
- }
-
-}
-
-/**
- * Helper function to unregister a WPML string
- *
- * @access public
- * @since 2.1
- */
-function ot_wpml_unregister_string( $id ) {
-
- if ( function_exists( 'icl_unregister_string' ) ) {
-
- icl_unregister_string( 'Theme Options', $id );
-
- }
-
-}
-
-/**
- * Maybe migrate Settings
- *
- * @return void
- *
- * @access public
- * @since 2.3.3
- */
-if ( ! function_exists( 'ot_maybe_migrate_settings' ) ) {
-
- function ot_maybe_migrate_settings() {
-
- // Filter the ID to migrate from
- $settings_id = apply_filters( 'ot_migrate_settings_id', '' );
-
- // Attempt to migrate Settings
- if ( ! empty( $settings_id ) && get_option( ot_settings_id() ) === false && ot_settings_id() !== $settings_id ) {
-
- // Old settings
- $settings = get_option( $settings_id );
-
- // Check for array keys
- if ( isset( $settings['sections'] ) && isset( $settings['settings'] ) ) {
-
- update_option( ot_settings_id(), $settings );
-
- }
-
- }
-
- }
-
-}
-
-/**
- * Maybe migrate Option
- *
- * @return void
- *
- * @access public
- * @since 2.3.3
- */
-if ( ! function_exists( 'ot_maybe_migrate_options' ) ) {
-
- function ot_maybe_migrate_options() {
-
- // Filter the ID to migrate from
- $options_id = apply_filters( 'ot_migrate_options_id', '' );
-
- // Attempt to migrate Theme Options
- if ( ! empty( $options_id ) && get_option( ot_options_id() ) === false && ot_options_id() !== $options_id ) {
-
- // Old options
- $options = get_option( $options_id );
-
- // Migrate to new ID
- update_option( ot_options_id(), $options );
-
- }
-
- }
-
-}
-
-/**
- * Maybe migrate Layouts
- *
- * @return void
- *
- * @access public
- * @since 2.3.3
- */
-if ( ! function_exists( 'ot_maybe_migrate_layouts' ) ) {
-
- function ot_maybe_migrate_layouts() {
-
- // Filter the ID to migrate from
- $layouts_id = apply_filters( 'ot_migrate_layouts_id', '' );
-
- // Attempt to migrate Layouts
- if ( ! empty( $layouts_id ) && get_option( ot_layouts_id() ) === false && ot_layouts_id() !== $layouts_id ) {
-
- // Old options
- $layouts = get_option( $layouts_id );
-
- // Migrate to new ID
- update_option( ot_layouts_id(), $layouts );
-
- }
-
- }
-
-}
-
-/**
- * Returns an array with the post format gallery meta box.
- *
- * @param mixed $pages Excepts a comma separated string or array of
- * post_types and is what tells the metabox where to
- * display. Default 'post'.
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-function ot_meta_box_post_format_gallery( $pages = 'post' ) {
-
- if ( ! current_theme_supports( 'post-formats' ) || ! in_array( 'gallery', current( get_theme_support( 'post-formats' ) ) ) )
- return false;
-
- if ( is_string( $pages ) )
- $pages = explode( ',', $pages );
-
- return apply_filters( 'ot_meta_box_post_format_gallery', array(
- 'id' => 'ot-post-format-gallery',
- 'title' => __( 'Gallery', 'option-tree' ),
- 'desc' => '',
- 'pages' => $pages,
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => '_format_gallery',
- 'label' => '',
- 'desc' => '',
- 'std' => '',
- 'type' => 'gallery',
- 'class' => 'ot-gallery-shortcode'
- )
- )
- ), $pages );
-
-}
-
-/**
- * Returns an array with the post format link metabox.
- *
- * @param mixed $pages Excepts a comma separated string or array of
- * post_types and is what tells the metabox where to
- * display. Default 'post'.
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-function ot_meta_box_post_format_link( $pages = 'post' ) {
-
- if ( ! current_theme_supports( 'post-formats' ) || ! in_array( 'link', current( get_theme_support( 'post-formats' ) ) ) )
- return false;
-
- if ( is_string( $pages ) )
- $pages = explode( ',', $pages );
-
- return apply_filters( 'ot_meta_box_post_format_link', array(
- 'id' => 'ot-post-format-link',
- 'title' => __( 'Link', 'option-tree' ),
- 'desc' => '',
- 'pages' => $pages,
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => '_format_link_url',
- 'label' => '',
- 'desc' => __( 'Link URL', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- ),
- array(
- 'id' => '_format_link_title',
- 'label' => '',
- 'desc' => __( 'Link Title', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- )
- )
- ), $pages );
-
-}
-
-/**
- * Returns an array with the post format quote metabox.
- *
- * @param mixed $pages Excepts a comma separated string or array of
- * post_types and is what tells the metabox where to
- * display. Default 'post'.
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-function ot_meta_box_post_format_quote( $pages = 'post' ) {
-
- if ( ! current_theme_supports( 'post-formats' ) || ! in_array( 'quote', current( get_theme_support( 'post-formats' ) ) ) )
- return false;
-
- if ( is_string( $pages ) )
- $pages = explode( ',', $pages );
-
- return apply_filters( 'ot_meta_box_post_format_quote', array(
- 'id' => 'ot-post-format-quote',
- 'title' => __( 'Quote', 'option-tree' ),
- 'desc' => '',
- 'pages' => $pages,
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => '_format_quote_source_name',
- 'label' => '',
- 'desc' => __( 'Source Name (ex. author, singer, actor)', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- ),
- array(
- 'id' => '_format_quote_source_url',
- 'label' => '',
- 'desc' => __( 'Source URL', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- ),
- array(
- 'id' => '_format_quote_source_title',
- 'label' => '',
- 'desc' => __( 'Source Title (ex. book, song, movie)', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- ),
- array(
- 'id' => '_format_quote_source_date',
- 'label' => '',
- 'desc' => __( 'Source Date', 'option-tree' ),
- 'std' => '',
- 'type' => 'text'
- )
- )
- ), $pages );
-
-}
-
-/**
- * Returns an array with the post format video metabox.
- *
- * @param mixed $pages Excepts a comma separated string or array of
- * post_types and is what tells the metabox where to
- * display. Default 'post'.
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-function ot_meta_box_post_format_video( $pages = 'post' ) {
-
- if ( ! current_theme_supports( 'post-formats' ) || ! in_array( 'video', current( get_theme_support( 'post-formats' ) ) ) )
- return false;
-
- if ( is_string( $pages ) )
- $pages = explode( ',', $pages );
-
- return apply_filters( 'ot_meta_box_post_format_video', array(
- 'id' => 'ot-post-format-video',
- 'title' => __( 'Video', 'option-tree' ),
- 'desc' => '',
- 'pages' => $pages,
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => '_format_video_embed',
- 'label' => '',
- 'desc' => sprintf( __( 'Embed video from services like Youtube, Vimeo, or Hulu. You can find a list of supported oEmbed sites in the %1$s. Alternatively, you could use the built-in %2$s shortcode.', 'option-tree' ), '
' . __( 'Wordpress Codex', 'option-tree' ) .' ', '
[video]
' ),
- 'std' => '',
- 'type' => 'textarea'
- )
- )
- ), $pages );
-
-}
-
-/**
- * Returns an array with the post format audio metabox.
- *
- * @param mixed $pages Excepts a comma separated string or array of
- * post_types and is what tells the metabox where to
- * display. Default 'post'.
- * @return array
- *
- * @access public
- * @since 2.4.0
- */
-function ot_meta_box_post_format_audio( $pages = 'post' ) {
-
- if ( ! current_theme_supports( 'post-formats' ) || ! in_array( 'audio', current( get_theme_support( 'post-formats' ) ) ) )
- return false;
-
- if ( is_string( $pages ) )
- $pages = explode( ',', $pages );
-
- return apply_filters( 'ot_meta_box_post_format_audio', array(
- 'id' => 'ot-post-format-audio',
- 'title' => __( 'Audio', 'option-tree' ),
- 'desc' => '',
- 'pages' => $pages,
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => '_format_audio_embed',
- 'label' => '',
- 'desc' => sprintf( __( 'Embed audio from services like SoundCloud and Rdio. You can find a list of supported oEmbed sites in the %1$s. Alternatively, you could use the built-in %2$s shortcode.', 'option-tree' ), '
' . __( 'Wordpress Codex', 'option-tree' ) .' ', '
[audio]
' ),
- 'std' => '',
- 'type' => 'textarea'
- )
- )
- ), $pages );
-
-}
-
-/**
- * Returns the option type by ID.
- *
- * @param string $option_id The option ID
- * @return string $settings_id The settings array ID
- * @return string The option type.
- *
- * @access public
- * @since 2.4.2
- */
-if ( ! function_exists( 'ot_get_option_type_by_id' ) ) {
-
- function ot_get_option_type_by_id( $option_id, $settings_id = '' ) {
-
- if ( empty( $settings_id ) ) {
-
- $settings_id = ot_settings_id();
-
- }
-
- $settings = get_option( $settings_id, array() );
-
- if ( isset( $settings['settings'] ) ) {
-
- foreach( $settings['settings'] as $value ) {
-
- if ( $option_id == $value['id'] && isset( $value['type'] ) ) {
-
- return $value['type'];
-
- }
-
- }
-
- }
-
- return false;
-
- }
-
-}
-
-/**
- * Build an array of potential Theme Options that could share terms
- *
- * @return array
- *
- * @access private
- * @since 2.5.4
- */
-function _ot_settings_potential_shared_terms() {
-
- $options = array();
- $settings = get_option( ot_settings_id(), array() );
- $option_types = array(
- 'category-checkbox',
- 'category-select',
- 'tag-checkbox',
- 'tag-select',
- 'taxonomy-checkbox',
- 'taxonomy-select'
- );
-
- if ( isset( $settings['settings'] ) ) {
-
- foreach( $settings['settings'] as $value ) {
-
- if ( isset( $value['type'] ) ) {
-
- if ( $value['type'] == 'list-item' && isset( $value['settings'] ) ) {
-
- $saved = ot_get_option( $value['id'] );
-
- foreach( $value['settings'] as $item ) {
-
- if ( isset( $value['id'] ) && isset( $item['type'] ) && in_array( $item['type'], $option_types ) ) {
- $sub_options = array();
-
- foreach( $saved as $sub_key => $sub_value ) {
- if ( isset( $sub_value[$item['id']] ) ) {
- $sub_options[$sub_key] = $sub_value[$item['id']];
- }
- }
-
- if ( ! empty( $sub_options ) ) {
- $options[] = array(
- 'id' => $item['id'],
- 'taxonomy' => $value['taxonomy'],
- 'parent' => $value['id'],
- 'value' => $sub_options
- );
- }
- }
-
- }
-
- }
-
- if ( in_array( $value['type'], $option_types ) ) {
- $saved = ot_get_option( $value['id'] );
- if ( ! empty( $saved ) ) {
- $options[] = array(
- 'id' => $value['id'],
- 'taxonomy' => $value['taxonomy'],
- 'value' => $saved
- );
- }
- }
-
- }
-
- }
-
- }
-
- return $options;
-
-}
-
-/**
- * Build an array of potential Meta Box options that could share terms
- *
- * @return array
- *
- * @access private
- * @since 2.5.4
- */
-function _ot_meta_box_potential_shared_terms() {
- global $ot_meta_boxes;
-
- $options = array();
- $settings = $ot_meta_boxes;
- $option_types = array(
- 'category-checkbox',
- 'category-select',
- 'tag-checkbox',
- 'tag-select',
- 'taxonomy-checkbox',
- 'taxonomy-select'
- );
-
- foreach( $settings as $setting ) {
-
- if ( isset( $setting['fields'] ) ) {
-
- foreach( $setting['fields'] as $value ) {
-
- if ( isset( $value['type'] ) ) {
-
- if ( $value['type'] == 'list-item' && isset( $value['settings'] ) ) {
-
- $children = array();
-
- foreach( $value['settings'] as $item ) {
-
- if ( isset( $value['id'] ) && isset( $item['type'] ) && in_array( $item['type'], $option_types ) ) {
-
- $children[$value['id']][] = $item['id'];
-
- }
-
- }
-
- if ( ! empty( $children[$value['id']] ) ) {
- $options[] = array(
- 'id' => $value['id'],
- 'children' => $children[$value['id']],
- 'taxonomy' => $value['taxonomy'],
- );
- }
-
- }
-
- if ( in_array( $value['type'], $option_types ) ) {
-
- $options[] = array(
- 'id' => $value['id'],
- 'taxonomy' => $value['taxonomy'],
- );
-
- }
-
- }
-
- }
-
- }
-
- }
-
- return $options;
-
-}
-
-/**
- * Update terms when a term gets split.
- *
- * @param int $term_id ID of the formerly shared term.
- * @param int $new_term_id ID of the new term created for the $term_taxonomy_id.
- * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split.
- * @param string $taxonomy Taxonomy for the split term.
- * @return void
- *
- * @access public
- * @since 2.5.4
- */
-function ot_split_shared_term( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
-
- // Process the Theme Options
- $settings = _ot_settings_potential_shared_terms();
- $old_options = get_option( ot_options_id(), array() );
- $new_options = $old_options;
-
- // Process the saved settings
- if ( ! empty( $settings ) && ! empty( $old_options ) ) {
-
- // Loop over the Theme Options
- foreach( $settings as $option ) {
-
- if ( ! is_array( $option['taxonomy'] ) ) {
- $option['taxonomy'] = explode( ',', $option['taxonomy'] );
- }
-
- if ( ! in_array( $taxonomy, $option['taxonomy'] ) ) {
- continue;
- }
-
- // The option ID was found
- if ( array_key_exists( $option['id'], $old_options ) || ( isset( $option['parent'] ) && array_key_exists( $option['parent'], $old_options ) ) ) {
-
- // This is a list item, we have to go deeper
- if ( isset( $option['parent'] ) ) {
-
- // Loop over the array
- foreach( $option['value'] as $key => $value ) {
-
- // The value is an array of IDs
- if ( is_array( $value ) ) {
-
- // Loop over the sub array
- foreach( $value as $sub_key => $sub_value ) {
-
- if ( $sub_value == $term_id ) {
-
- unset( $new_options[$option['parent']][$key][$option['id']][$sub_key] );
- $new_options[$option['parent']][$key][$option['id']][$new_term_id] = $new_term_id;
-
- }
-
- }
-
- } else if ( $value == $term_id ) {
-
- unset( $new_options[$option['parent']][$key][$option['id']] );
- $new_options[$option['parent']][$key][$option['id']] = $new_term_id;
-
- }
-
- }
-
- } else {
-
- // The value is an array of IDs
- if ( is_array( $option['value'] ) ) {
-
- // Loop over the array
- foreach( $option['value'] as $key => $value ) {
-
- // It's a single value, just replace it
- if ( $value == $term_id ) {
-
- unset( $new_options[$option['id']][$key] );
- $new_options[$option['id']][$new_term_id] = $new_term_id;
-
- }
-
- }
-
- // It's a single value, just replace it
- } else if ( $option['value'] == $term_id ) {
-
- $new_options[$option['id']] = $new_term_id;
-
- }
-
- }
-
- }
-
- }
-
- }
-
- // Options need to be updated
- if ( $old_options !== $new_options ) {
- update_option( ot_options_id(), $new_options );
- }
-
- // Process the Meta Boxes
- $meta_settings = _ot_meta_box_potential_shared_terms();
- $option_types = array(
- 'category-checkbox',
- 'category-select',
- 'tag-checkbox',
- 'tag-select',
- 'taxonomy-checkbox',
- 'taxonomy-select'
- );
-
- if ( ! empty( $meta_settings ) ) {
- $old_meta = array();
-
- foreach( $meta_settings as $option ) {
-
- if ( ! is_array( $option['taxonomy'] ) ) {
- $option['taxonomy'] = explode( ',', $option['taxonomy'] );
- }
-
- if ( ! in_array( $taxonomy, $option['taxonomy'] ) ) {
- continue;
- }
-
- if ( isset( $option['children'] ) ) {
- $post_ids = get_posts( array(
- 'fields' => 'ids',
- 'meta_key' => $option['id'],
- ) );
-
- if ( $post_ids ) {
-
- foreach( $post_ids as $post_id ) {
-
- // Get the meta
- $old_meta = get_post_meta( $post_id, $option['id'], true );
- $new_meta = $old_meta;
-
- // Has a saved value
- if ( ! empty( $old_meta ) && is_array( $old_meta ) ) {
-
- // Loop over the array
- foreach( $old_meta as $key => $value ) {
-
- foreach( $value as $sub_key => $sub_value ) {
-
- if ( in_array( $sub_key, $option['children'] ) ) {
-
- // The value is an array of IDs
- if ( is_array( $sub_value ) ) {
-
- // Loop over the array
- foreach( $sub_value as $sub_sub_key => $sub_sub_value ) {
-
- // It's a single value, just replace it
- if ( $sub_sub_value == $term_id ) {
-
- unset( $new_meta[$key][$sub_key][$sub_sub_key] );
- $new_meta[$key][$sub_key][$new_term_id] = $new_term_id;
-
- }
-
- }
-
- // It's a single value, just replace it
- } else if ( $sub_value == $term_id ) {
-
- $new_meta[$key][$sub_key] = $new_term_id;
-
- }
-
- }
-
- }
-
- }
-
- // Update
- if ( $old_meta !== $new_meta ) {
-
- update_post_meta( $post_id, $option['id'], $new_meta, $old_meta );
-
- }
-
- }
-
- }
-
- }
-
- } else {
- $post_ids = get_posts( array(
- 'fields' => 'ids',
- 'meta_query' => array(
- 'key' => $option['id'],
- 'value' => $term_id,
- 'compare' => 'IN'
- ),
- ) );
-
- if ( $post_ids ) {
-
- foreach( $post_ids as $post_id ) {
-
- // Get the meta
- $old_meta = get_post_meta( $post_id, $option['id'], true );
- $new_meta = $old_meta;
-
- // Has a saved value
- if ( ! empty( $old_meta ) ) {
-
- // The value is an array of IDs
- if ( is_array( $old_meta ) ) {
-
- // Loop over the array
- foreach( $old_meta as $key => $value ) {
-
- // It's a single value, just replace it
- if ( $value == $term_id ) {
-
- unset( $new_meta[$key] );
- $new_meta[$new_term_id] = $new_term_id;
-
- }
-
- }
-
- // It's a single value, just replace it
- } else if ( $old_meta == $term_id ) {
-
- $new_meta = $new_term_id;
-
- }
-
- // Update
- if ( $old_meta !== $new_meta ) {
-
- update_post_meta( $post_id, $option['id'], $new_meta, $old_meta );
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
-}
-add_action( 'split_shared_term', 'ot_split_shared_term', 10, 4 );
-
-/* End of file ot-functions-admin.php */
-/* Location: ./includes/ot-functions-admin.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions-compat.php b/option-tree/includes/ot-functions-compat.php
deleted file mode 100644
index 48e9a4b..0000000
--- a/option-tree/includes/ot-functions-compat.php
+++ /dev/null
@@ -1,364 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/* run the actions & filters */
-add_action( 'admin_init', 'compat_ot_import_from_files', 1 );
-add_filter( 'ot_option_types_array', 'compat_ot_option_types_array', 10, 1 );
-add_filter( 'ot_recognized_font_styles', 'compat_ot_recognized_font_styles', 10, 2 );
-add_filter( 'ot_recognized_font_weights', 'compat_ot_recognized_font_weights', 10, 2 );
-add_filter( 'ot_recognized_font_variants', 'compat_ot_recognized_font_variants', 10, 2 );
-add_filter( 'ot_recognized_font_families', 'compat_ot_recognized_font_families', 10, 2 );
-add_filter( 'ot_recognized_background_repeat', 'compat_ot_recognized_background_repeat', 10, 2 );
-add_filter( 'ot_recognized_background_position', 'compat_ot_recognized_background_position', 10, 2 );
-add_filter( 'ot_measurement_unit_types', 'compat_ot_measurement_unit_types', 10, 2 );
-
-/**
- * Import from the old 1.x files for backwards compatibility.
- *
- * @return void
- *
- * @access private
- * @since 2.0.8
- */
-if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
-
- function compat_ot_import_from_files() {
-
- /* file path & name without extention */
- $ot_xml = '/option-tree/theme-options.xml';
- $ot_data = '/option-tree/theme-options.txt';
- $ot_layout = '/option-tree/layouts.txt';
-
- /* XML file path - child theme first then parent */
- if ( is_readable( get_stylesheet_directory() . $ot_xml ) ) {
-
- $xml_file = get_stylesheet_directory_uri() . $ot_xml;
-
- } else if ( is_readable( get_template_directory() . $ot_xml ) ) {
-
- $xml_file = get_template_directory_uri() . $ot_xml;
-
- }
-
- /* Data file path - child theme first then parent */
- if ( is_readable( get_stylesheet_directory() . $ot_data ) ) {
-
- $data_file = get_stylesheet_directory_uri() . $ot_data;
-
- } else if ( is_readable( get_template_directory() . $ot_data ) ) {
-
- $data_file = get_template_directory_uri() . $ot_data;
-
- }
-
- /* Layout file path - child theme first then parent */
- if ( is_readable( get_stylesheet_directory() . $ot_layout ) ) {
-
- $layout_file = get_stylesheet_directory_uri() . $ot_layout;
-
- } else if ( is_readable( get_template_directory() . $ot_layout ) ) {
-
- $layout_file = get_template_directory_uri() . $ot_layout;
-
- }
-
- /* check for files */
- $has_xml = isset( $xml_file ) ? true : false;
- $has_data = isset( $data_file ) ? true : false;
- $has_layout = isset( $layout_file ) ? true : false;
-
- /* auto import XML file */
- if ( $has_xml == true && ! get_option( ot_settings_id() ) && class_exists( 'SimpleXMLElement' ) ) {
-
- $settings = ot_import_xml( $xml_file );
-
- if ( isset( $settings ) && ! empty( $settings ) ) {
-
- update_option( ot_settings_id(), $settings );
-
- }
-
- }
-
- /* auto import Data file */
- if ( $has_data == true && ! get_option( ot_options_id() ) ) {
-
- $get_data = wp_remote_get( $data_file );
-
- if ( is_wp_error( $get_data ) )
- return false;
-
- $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
- $options = unserialize( ot_decode( $rawdata ) );
-
- /* get settings array */
- $settings = get_option( ot_settings_id() );
-
- /* has options */
- if ( is_array( $options ) ) {
-
- /* validate options */
- if ( is_array( $settings ) ) {
-
- foreach( $settings['settings'] as $setting ) {
-
- if ( isset( $options[$setting['id']] ) ) {
-
- $content = ot_stripslashes( $options[$setting['id']] );
-
- $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] );
-
- }
-
- }
-
- }
-
- /* update the option tree array */
- update_option( ot_options_id(), $options );
-
- }
-
- }
-
- /* auto import Layout file */
- if ( $has_layout == true && ! get_option( ot_layouts_id() ) ) {
-
- $get_data = wp_remote_get( $layout_file );
-
- if ( is_wp_error( $get_data ) )
- return false;
-
- $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
- $layouts = unserialize( ot_decode( $rawdata ) );
-
- /* get settings array */
- $settings = get_option( ot_settings_id() );
-
- /* has layouts */
- if ( is_array( $layouts ) ) {
-
- /* validate options */
- if ( is_array( $settings ) ) {
-
- foreach( $layouts as $key => $value ) {
-
- if ( $key == 'active_layout' )
- continue;
-
- $options = unserialize( ot_decode( $value ) );
-
- foreach( $settings['settings'] as $setting ) {
-
- if ( isset( $options[$setting['id']] ) ) {
-
- $content = ot_stripslashes( $options[$setting['id']] );
-
- $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] );
-
- }
-
- }
-
- $layouts[$key] = ot_encode( serialize( $options ) );
-
- }
-
- }
-
- /* update the option tree array */
- if ( isset( $layouts['active_layout'] ) ) {
-
- update_option( ot_options_id(), unserialize( ot_decode( $layouts[$layouts['active_layout']] ) ) );
-
- }
-
- /* update the option tree layouts array */
- update_option( ot_layouts_id(), $layouts );
-
- }
-
- }
-
- }
-
-}
-
-/**
- * Filters the option types array.
- *
- * Allows the old 'option_tree_option_types' filter to
- * change the new 'ot_option_types_array' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_option_types_array' ) ) {
-
- function compat_ot_option_types_array( $array ) {
-
- return apply_filters( 'option_tree_option_types', $array );
-
- }
-
-}
-
-/**
- * Filters the recognized font styles array.
- *
- * Allows the old 'recognized_font_styles' filter to
- * change the new 'ot_recognized_font_styles' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_font_styles' ) ) {
-
- function compat_ot_recognized_font_styles( $array, $id ) {
-
- return apply_filters( 'recognized_font_styles', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the recognized font weights array.
- *
- * Allows the old 'recognized_font_weights' filter to
- * change the new 'ot_recognized_font_weights' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_font_weights' ) ) {
-
- function compat_ot_recognized_font_weights( $array, $id ) {
-
- return apply_filters( 'recognized_font_weights', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the recognized font variants array.
- *
- * Allows the old 'recognized_font_variants' filter to
- * change the new 'ot_recognized_font_variants' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_font_variants' ) ) {
-
- function compat_ot_recognized_font_variants( $array, $id ) {
-
- return apply_filters( 'recognized_font_variants', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the recognized font families array.
- *
- * Allows the old 'recognized_font_families' filter to
- * change the new 'ot_recognized_font_families' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_font_families' ) ) {
-
- function compat_ot_recognized_font_families( $array, $id ) {
-
- return apply_filters( 'recognized_font_families', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the recognized background repeat array.
- *
- * Allows the old 'recognized_background_repeat' filter to
- * change the new 'ot_recognized_background_repeat' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_background_repeat' ) ) {
-
- function compat_ot_recognized_background_repeat( $array, $id ) {
-
- return apply_filters( 'recognized_background_repeat', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the recognized background position array.
- *
- * Allows the old 'recognized_background_position' filter to
- * change the new 'ot_recognized_background_position' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_recognized_background_position' ) ) {
-
- function compat_ot_recognized_background_position( $array, $id ) {
-
- return apply_filters( 'recognized_background_position', $array, $id );
-
- }
-
-}
-
-/**
- * Filters the measurement unit types array.
- *
- * Allows the old 'measurement_unit_types' filter to
- * change the new 'ot_measurement_unit_types' return value.
- *
- * @return array
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'compat_ot_measurement_unit_types' ) ) {
-
- function compat_ot_measurement_unit_types( $array, $id ) {
-
- return apply_filters( 'measurement_unit_types', $array, $id );
-
- }
-
-}
-
-
-/* End of file ot-functions-compat.php */
-/* Location: ./includes/ot-functions-compat.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions-deprecated.php b/option-tree/includes/ot-functions-deprecated.php
deleted file mode 100644
index ac1d97d..0000000
--- a/option-tree/includes/ot-functions-deprecated.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Displays or returns a value from the 'option_tree' array.
- *
- * @param string $item_id
- * @param array $options
- * @param bool $echo
- * @param bool $is_array
- * @param int $offset
- * @return mixed array or comma seperated lists of values
- *
- * @access public
- * @since 1.0.0
- * @updated 2.0
- * @deprecated 2.0
- */
-if ( ! function_exists( 'get_option_tree' ) ) {
-
- function get_option_tree( $item_id = '', $options = '', $echo = false, $is_array = false, $offset = -1 ) {
- /* load saved options */
- if ( ! $options )
- $options = get_option( ot_options_id() );
-
- /* no value return */
- if ( ! isset( $options[$item_id] ) || empty( $options[$item_id] ) )
- return;
-
- /* set content value & strip slashes */
- $content = option_tree_stripslashes( $options[$item_id] );
-
- /* is an array */
- if ( $is_array == true ) {
- /* saved as a comma seperated lists of values, explode into an array */
- if ( !is_array( $content ) )
- $content = explode( ',', $content );
-
- /* get an array value using an offset */
- if ( is_numeric( $offset ) && $offset >= 0 ) {
- $content = $content[$offset];
- } else if ( ! is_numeric( $offset ) && isset( $content[$offset] ) ) {
- $content = $content[$offset];
- }
-
- /* not an array */
- } else if ( $is_array == false ) {
- /* saved as array, implode and return a comma seperated lists of values */
- if ( is_array( $content ) )
- $content = implode( ',', $content ); /* This is fucked */
- }
-
- /* echo content */
- if ( $echo )
- echo $content;
-
- return $content;
- }
-
-}
-
-/**
- * Custom stripslashes from single value or array.
- *
- * @param mixed $input
- * @return mixed
- *
- * @access public
- * @since 1.1.3
- * @deprecated 2.0
- */
-if ( ! function_exists( 'option_tree_stripslashes' ) ) {
-
- function option_tree_stripslashes( $input ) {
- if ( is_array( $input ) ) {
- foreach( $input as &$val ) {
- if ( is_array( $val ) ) {
- $val = option_tree_stripslashes( $val );
- } else {
- $val = stripslashes( $val );
- }
- }
- } else {
- $input = stripslashes( $input );
- }
- return $input;
- }
-
-}
-
-/* End of file ot-functions-deprecated.php */
-/* Location: ./includes/ot-functions-deprecated.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions-docs-page.php b/option-tree/includes/ot-functions-docs-page.php
deleted file mode 100644
index 361b99f..0000000
--- a/option-tree/includes/ot-functions-docs-page.php
+++ /dev/null
@@ -1,1020 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Creating Options option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_creating_options' ) ) {
-
- function ot_type_creating_options() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'Label', 'option-tree' ) . ': ';
- echo '
' . __( 'The Label field should be a short but descriptive block of text 100 characters or less with no HTML.', 'option-tree' ) . '
';
-
- echo '
'. __( 'ID', 'option-tree' ) . ': ';
- echo '
' . __( 'The ID field is a unique alphanumeric key used to differentiate each theme option (underscores are acceptable). Also, the plugin will change all text you write in this field to lowercase and replace spaces and special characters with an underscore automatically.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Type', 'option-tree' ) . ': ';
- echo '
' . __( 'You are required to choose one of the supported option types when creating a new option. Here is a list of the available option types. For more information about each type click the Option Types
tab to the left.', 'option-tree' ) . '
';
-
- echo '
';
- foreach( ot_option_types_array() as $key => $value )
- echo '' . $value . ' ';
- echo ' ';
-
- echo '
'. __( 'Description', 'option-tree' ) . ': ';
- echo '
' . __( 'Enter a detailed description for the users to read on the Theme Options page, HTML is allowed. This is also where you enter content for both the Textblock & Textblock Titled option types.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Choices', 'option-tree' ) . ': ';
- echo '
' . __( 'Click the "Add Choice" button to add an item to the choices array. This will only affect the following option types: Checkbox, Radio, Select & Select Image.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Settings', 'option-tree' ) . ': ';
- echo '
' . __( 'Click the "Add Setting" button found inside a newly created setting to add an item to the settings array. This will only affect the List Item type.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Standard', 'option-tree' ) . ': ';
- echo '
' . __( 'Setting the standard value for your option only works for some option types. Those types are one that have a single string value saved to them and not an array of values.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Rows', 'option-tree' ) . ': ';
- echo '
' . __( 'Enter a numeric value for the number of rows in your textarea. This will only affect the following option types: CSS, Textarea, & Textarea Simple.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Post Type', 'option-tree' ) . ': ';
- echo '
' . __( 'Add a comma separated list of post type like post,page
. This will only affect the following option types: Custom Post Type Checkbox, & Custom Post Type Select. Below are the default post types available with WordPress and that are also compatible with OptionTree. You can also add your own custom post_type
. At this time any
does not seem to return results properly and is something I plan on looking into.', 'option-tree' ) . '
';
-
- echo '
';
- echo 'post
';
- echo 'page
';
- echo 'attachment
';
- echo ' ';
-
- echo '
'. __( 'Taxonomy', 'option-tree' ) . ': ';
- echo '
' . __( 'Add a comma separated list of any registered taxonomy like category,post_tag
. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Min, Max, & Step', 'option-tree' ) . ': ';
- echo '
' . __( 'Add a comma separated list of options in the following format 0,100,1
(slide from 0-100
in intervals of 1
). The three values represent the minimum, maximum, and step options and will only affect the Numeric Slider option type.', 'option-tree' ) . '
';
-
- echo '
'. __( 'CSS Class', 'option-tree' ) . ': ';
- echo '
' . __( 'Add and optional class to any option type.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Condition', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'Add a comma separated list (no spaces) of conditions in which the field will be visible, leave this setting empty to always show the field. In these examples, %s is a placeholder for your condition, which can be in the form of %s.', 'option-tree' ), 'value
', 'field_id:is(value)
, field_id:not(value)
, field_id:contains(value)
, field_id:less_than(value)
, field_id:less_than_or_equal_to(value)
, field_id:greater_than(value)
, or field_id:greater_than_or_equal_to(value)
' ) . '
';
-
- echo '
'. __( 'Operator', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'Choose the logical operator to compute the result of the conditions. Your options are %s and %s.', 'option-tree' ), 'and
', 'or
' ) . '
';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * ot_get_option() option type.
- *
- * This is a callback function to display text about ot_get_option().
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_option_types' ) ) {
-
- function ot_type_option_types() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'Background', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Background option type is for adding background styles to your theme either dynamically via the CSS option type below or manually with %s. The Background option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'option-tree' ), 'ot_get_option()
', 'ot_recognized_background_fields
', 'ot_recognized_background_repeat
, ot_recognized_background_attachment
, ot_recognized_background_position
, ' . __( 'and', 'option-tree' ) . ' ot_type_background_size_choices
' ) . '
';
-
- echo '
'. __( 'Border', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Border option type is used to set width, unit, style, and color values. The text input excepts a numerical value and the unit select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter. The style select lets you choose the border style. The default styles are %s, %s, %s, %s, %s, %s, %s, and %s. However, you can change them with the %s filter. The colorpicker saves a hexadecimal color code.', 'option-tree' ), 'px
', '%
', 'em
', 'pt
', 'ot_recognized_border_unit_types
', 'hidden
', 'dashed
', 'solid
', 'double
', 'groove
', 'ridge
', 'inset
', 'outset
', 'ot_recognized_border_style_types
' ) . '
';
-
- echo '
'. __( 'Box Shadow', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values.', 'option-tree' ), 'inset
', 'offset-x
', 'offset-y
', 'blur-radius
', 'spread-radius
', 'color
' ) . '
';
-
- echo '
'. __( 'Category Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Category Checkbox option type displays a list of category IDs. It allows the user to check multiple category IDs and will return that value as an array for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Category Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Category Select option type displays a list of category IDs. It allows the user to select only one category ID and will return that value for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Checkbox option type displays a group of choices. It allows the user to check multiple choices and will return that value as an array for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Colorpicker', 'option-tree' ) . ': ';
- echo '
' . __( 'The Colorpicker option type saves a hexadecimal color code for use in CSS. Use it to modify the color of something in your theme.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Colorpicker Opacity', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Colorpicker Opacity option type saves a hexadecimal color code with an opacity value from %s to %s in increments of %s. Though the value is saved as hexadecimal, if used within the CSS option type the color and opacity values will be converted into a valid RGBA CSS value.', 'option-tree' ), '0
', '1
', '0.01
' ) . '
';
-
- echo '
'. __( 'CSS', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The CSS option type is a textarea that when used properly can add dynamic CSS to your theme from within OptionTree. Unfortunately, due server limitations you will need to create a file named %s at the root level of your theme and change permissions using %s so the server can write to the file. I have had the most success setting this single file to %s but feel free to play around with permissions until everything is working. A good starting point is %s. When the server can save to the file, CSS will automatically be updated when you save your Theme Options.', 'option-tree' ), 'dynamic.css
', 'chmod
', '0777
', '0666
' ) . '
';
-
- echo '
' . sprintf( __( 'This example assumes you have an option with the ID of %1$s. Which means this option will automatically insert the value of %1$s into the %2$s when the Theme Options are saved.', 'option-tree' ), 'demo_background
', 'dynamic.css
' ) . '
';
-
- echo '
'. __( 'Input', 'option-tree' ) . ':
';
- echo '
body {
- {{demo_background}}
- background-color: {{demo_background|background-color}};
-}
';
-
- echo '
'. __( 'Output', 'option-tree' ) . ':
';
- echo '
/* BEGIN demo_background */
-body {
- background: color image repeat attachment position;
- background-color: color;
-}
-/* END demo_background */
';
-
- echo '
'. __( 'Custom Post Type Checkbox', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It allows the user to check multiple post IDs for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'option-tree' ), 'post_type
' ) . '
';
-
- echo '
'. __( 'Custom Post Type Select', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It will return a single post ID for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'option-tree' ), 'post_type
' ) . '
';
-
- echo '
'. __( 'Date Picker', 'option-tree' ) . ': ';
- echo '
' . __( 'The Date Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date when focus is given to the input field. The returned value is a date formatted string.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Date Time Picker', 'option-tree' ) . ': ';
- echo '
' . __( 'The Date Time Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date and time when focus is given to the input field. The returned value is a date and time formatted string.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Dimension', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Dimension option type is used to set width and height values. The text inputs except numerical values and the select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter.', 'option-tree' ), 'px
', '%
', 'em
', 'pt
', 'ot_recognized_dimension_unit_types
' ) . '
';
-
- echo '
'. __( 'Gallery', 'option-tree' ) . ': ';
- echo '
' . __( 'The Gallery option type saves a comma separated list of image attachment IDs. You will need to create a front-end function to display the images in your theme.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Google Fonts', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Google Fonts option type will dynamically enqueue any number of Google Web Fonts into the document %1$s. As well, once the option has been saved each font family will automatically be inserted into the %2$s array for the Typography option type. You can further modify the font stack by using the %3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s parameter is being passed from %7$s, so it will be the ID of a Typography option type. This will allow you to add additional web safe fonts to individual font families on an as-need basis.', 'option-tree' ), 'HEAD
', 'font-family
', 'ot_google_font_stack
', '$font_stack
', '$family
', '$field_id
', 'ot_recognized_font_families
' ) . '
';
-
- echo '
'. __( 'JavaScript', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The JavaScript option type is a textarea that uses the %s code editor to highlight your JavaScript and display errors as you type.', 'option-tree' ), 'ace.js
' ) . '
';
-
- echo '
'. __( 'Link Color', 'option-tree' ) . ': ';
- echo '
' . __( 'The Link Color option type is used to set all link color states.', 'option-tree' ) . '
';
-
- echo '
'. __( 'List Item', 'option-tree' ) . ': ';
- echo '
' . __( 'The List Item option type replaced the Slider option type and allows for a great deal of customization. You can add settings to the List Item and those settings will be displayed to the user when they add a new List Item. Typical use is for creating sliding content or blocks of code for custom layouts.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Measurement', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Measurement option type is a mix of input and select fields. The text input excepts a value and the select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter.', 'option-tree' ), 'px
', '%
', 'em
', 'pt
', 'ot_measurement_unit_types
' ) . '
';
-
- echo '
' . sprintf( __( 'Example filter to add new units to the Measurement option type. Added to %s.', 'option-tree' ), 'functions.php
' ) . '
';
- echo '
function filter_measurement_unit_types( $array, $field_id ) {
-
- /* only run the filter on measurement with a field ID of my_measurement */
- if ( $field_id == \'my_measurement\' ) {
- $array[\'in\'] = \'inches\';
- $array[\'ft\'] = \'feet\';
- }
-
- return $array;
-}
-add_filter( \'ot_measurement_unit_types\', \'filter_measurement_unit_types\', 10, 2 );
';
-
- echo '
' . __( 'Example filter to completely change the units in the Measurement option type. Added to functions.php
.', 'option-tree' ) . '
';
- echo '
function filter_measurement_unit_types( $array, $field_id ) {
-
- /* only run the filter on measurement with a field ID of my_measurement */
- if ( $field_id == \'my_measurement\' ) {
- $array = array(
- \'in\' => \'inches\',
- \'ft\' => \'feet\'
- );
- }
-
- return $array;
-}
-add_filter( \'ot_measurement_unit_types\', \'filter_measurement_unit_types\', 10, 2 );
';
-
- echo '
'. __( 'Numeric Slider', 'option-tree' ) . ': ';
- echo '
' . __( 'The Numeric Slider option type displays a jQuery UI slider. It will return a single numerical value for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'On/Off', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The On/Off option type displays a simple switch that can be used to turn things on or off. The saved return value is either %s or %s.', 'option-tree' ), 'on
', 'off
' ) . '
';
-
- echo '
'. __( 'Page Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Page Checkbox option type displays a list of page IDs. It allows the user to check multiple page IDs for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Page Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Page Select option type displays a list of page IDs. It will return a single page ID for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Post Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Post Checkbox option type displays a list of post IDs. It allows the user to check multiple post IDs for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Post Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Post Select option type displays a list of post IDs. It will return a single post ID for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Radio', 'option-tree' ) . ': ';
- echo '
' . __( 'The Radio option type displays a group of choices. It allows the user to choose one and will return that value as a string for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Radio Image', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'the Radio Images option type is primarily used for layouts. However, you can filter the image list using %s. As well, you can add your own custom images using the choices array.', 'option-tree' ), 'ot_radio_images
' ) . '
';
-
- echo '
' . __( 'This example executes the ot_radio_images
filter on layout images attached to the my_radio_images
field. Added to functions.php
.', 'option-tree' ) . '
';
- echo '
function filter_radio_images( $array, $field_id ) {
-
- /* only run the filter where the field ID is my_radio_images */
- if ( $field_id == \'my_radio_images\' ) {
- $array = array(
- array(
- \'value\' => \'left-sidebar\',
- \'label\' => __( \'Left Sidebar\', \'option-tree\' ),
- \'src\' => OT_URL . \'/assets/images/layout/left-sidebar.png\'
- ),
- array(
- \'value\' => \'right-sidebar\',
- \'label\' => __( \'Right Sidebar\', \'option-tree\' ),
- \'src\' => OT_URL . \'/assets/images/layout/right-sidebar.png\'
- )
- );
- }
-
- return $array;
-
-}
-add_filter( \'ot_radio_images\', \'filter_radio_images\', 10, 2 );
';
-
- echo '
'. __( 'Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Select option type is used to list anything you want that would be chosen from a select list.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Sidebar Select', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'This option type makes it possible for users to select a WordPress registered sidebar to use on a specific area. By using the two provided filters, %s, and %s we can be selective about which sidebars are available on a specific content area.', 'option-tree' ), 'ot_recognized_sidebars
', 'ot_recognized_sidebars_{$field_id}
' ) . '
';
- echo '
' . sprintf( __( 'For example, if we create a WordPress theme that provides the ability to change the Blog Sidebar and we don\'t want to have the footer sidebars available on this area, we can unset those sidebars either manually or by using a regular expression if we have a common name like %s.', 'option-tree' ), 'footer-sidebar-$i
' ) . '
';
-
- echo '
'. __( 'Slider', 'option-tree' ) . ': ';
- echo '
' . __( 'The Slider option type is technically deprecated. Use the List Item option type instead, as it\'s infinitely more customizable. Typical use is for creating sliding image content.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Social Links', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Social Links option type utilizes a drag & drop interface to create a list of social links. There are a few filters that make extending this option type easy. You can set the %s filter to %s and turn off loading default values. Use the %s filter to change the default values that are loaded. To filter the settings array use the %s filter.', 'option-tree' ), 'ot_type_social_links_load_defaults
', 'false
', 'ot_type_social_links_defaults
', 'ot_social_links_settings
' ) . '
';
-
- echo '
'. __( 'Spacing', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Spacing option type is used to set spacing values such as padding or margin in the form of top, right, bottom, and left. The text inputs except numerical values and the select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter.', 'option-tree' ), 'px
', '%
', 'em
', 'pt
', 'ot_recognized_spacing_unit_types
' ) . '
';
-
- echo '
'. __( 'Tab', 'option-tree' ) . ': ';
- echo '
' . __( 'The Tab option type will break a section or metabox into tabbed content.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Tag Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Tag Checkbox option type displays a list of tag IDs. It allows the user to check multiple tag IDs and will return that value as an array for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Tag Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Tag Select option type displays a list of tag IDs. It allows the user to select only one tag ID and will return that value for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Taxonomy Checkbox', 'option-tree' ) . ': ';
- echo '
' . __( 'The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows the user to check multiple taxonomy IDs and will return that value as an array for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Taxonomy Select', 'option-tree' ) . ': ';
- echo '
' . __( 'The Taxonomy Select option type displays a list of taxonomy IDs. It allows the user to select only one taxonomy ID and will return that value for use in a custom function or loop.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Text', 'option-tree' ) . ': ';
- echo '
' . __( 'The Text option type is used to save string values. For example, any optional or required text that is of reasonably short character length.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Textarea', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Textarea option type is a large string value used for custom code or text in the theme and has a WYSIWYG editor that can be filtered to change the how it is displayed. For example, you can filter %s, %s, %s, and %s.', 'option-tree' ), 'wpautop
', 'media_buttons
', 'tinymce
', 'quicktags
' ) . '
';
-
- echo '
' . __( 'Example filters to alter the Textarea option type. Added to functions.php
.', 'option-tree' ) . '
';
-
- echo '
' . __( 'This example keeps WordPress from executing the wpautop
filter on the line breaks. The default is true
which means it wraps line breaks with an HTML p
tag.', 'option-tree' ) . '
';
- echo '
function filter_textarea_wpautop( $content, $field_id ) {
-
- /* only run the filter on the textarea with a field ID of my_textarea */
- if ( $field_id == \'my_textarea\' ) {
- return false;
- }
-
- return $content;
-
-}
-add_filter( \'ot_wpautop\', \'filter_textarea_wpautop\', 10, 2 );
';
-
- echo '
' . __( 'This example keeps WordPress from executing the media_buttons
filter on the textarea WYSIWYG. The default is true
which means show the buttons.', 'option-tree' ) . '
';
- echo '
function filter_textarea_media_buttons( $content, $field_id ) {
-
- /* only run the filter on the textarea with a field ID of my_textarea */
- if ( $field_id == \'my_textarea\' ) {
- return false;
- }
-
- return $content;
-
-}
-add_filter( \'ot_media_buttons\', \'filter_textarea_media_buttons\', 10, 2 );
';
-
- echo '
' . __( 'This example keeps WordPress from executing the tinymce
filter on the textarea WYSIWYG. The default is true
which means show the tinymce.', 'option-tree' ) . '
';
- echo '
function filter_textarea_tinymce( $content, $field_id ) {
-
- /* only run the filter on the textarea with a field ID of my_textarea */
- if ( $field_id == \'my_textarea\' ) {
- return false;
- }
-
- return $content;
-
-}
-add_filter( \'ot_tinymce\', \'filter_textarea_tinymce\', 10, 2 );
';
-
- echo '
' . __( 'This example alters the quicktags
filter on the textarea WYSIWYG. The default is array( \'buttons\' => \'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close\' )
which means show those quicktags. It also means you can filter in your own custom quicktags.', 'option-tree' ) . '
';
- echo '
function filter_textarea_quicktags( $content, $field_id ) {
-
- /* only run the filter on the textarea with a field ID of my_textarea */
- if ( $field_id == \'my_textarea\' ) {
- return array( \'buttons\' => \'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close,fullscreen\' );
- } else if ( $field_id == \'my_other_textarea\' ) {
- return false; /* show no quicktags */
- }
-
- return $content;
-
-}
-add_filter( \'ot_quicktags\', \'filter_textarea_quicktags\', 10, 1 );
';
-
- echo '
'. __( 'Textarea Simple', 'option-tree' ) . ': ';
- echo '
' . __( 'The Textarea Simple option type is a large string value used for custom code or text in the theme. The Textarea Simple does not have a WYSIWYG editor.', 'option-tree' ) . '
';
-
- echo '
' . sprintf( __( 'This example tells WordPress to execute the %s filter on the line breaks. The default is %s which means it does not wraps line breaks with an HTML %s tag. Added to %s.', 'option-tree' ), 'wpautop
', 'false
', 'p
', 'functions.php
' ) . '
';
- echo '
function filter_textarea_simple_wpautop( $content, $field_id ) {
-
- /* only run the filter on the textarea with a field ID of my_textarea */
- if ( $field_id == \'my_textarea\' ) {
- return true;
- }
-
- return $content;
-
-}
-add_filter( \'ot_wpautop\', \'filter_textarea_simple_wpautop\', 10, 2 );
';
-
- echo '
'. __( 'Textblock', 'option-tree' ) . ': ';
- echo '
' . __( 'The Textblock option type is used only on the Theme Option page. It will allow you to create & display HTML, but has no title above the text block. You can then use the Textblock to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Textblock Titled', 'option-tree' ) . ': ';
- echo '
' . __( 'The Textblock Titled option type is used only on the Theme Option page. It will allow you to create & display HTML, and has a title above the text block. You can then use the Textblock Titled to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'option-tree' ) . '
';
-
- echo '
'. __( 'Typography', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Typography option type is for adding typography styles to your theme either dynamically via the CSS option type above or manually with %s. The Typography option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'option-tree' ), 'ot_get_option()
', 'ot_recognized_typography_fields
', 'ot_recognized_font_families
, ot_recognized_font_sizes
, ot_recognized_font_styles
, ot_recognized_font_variants
, ot_recognized_font_weights
, ot_recognized_letter_spacing
, ot_recognized_line_heights
, ot_recognized_text_decorations
' . __( 'and', 'option-tree' ) . ' ot_recognized_text_transformations
' ) . '
';
-
- echo '
' . __( 'This example would filter ot_recognized_font_families
to build your own font stack. Added to functions.php
.', 'option-tree' ) . '
';
- echo '
function filter_ot_recognized_font_families( $array, $field_id ) {
-
- /* only run the filter when the field ID is my_google_fonts_headings */
- if ( $field_id == \'my_google_fonts_headings\' ) {
- $array = array(
- \'sans-serif\' => \'sans-serif\',
- \'open-sans\' => \'"Open Sans", sans-serif\',
- \'droid-sans\' => \'"Droid Sans", sans-serif\'
- );
- }
-
- return $array;
-
-}
-add_filter( \'ot_recognized_font_families\', \'filter_ot_recognized_font_families\', 10, 2 );
';
-
- echo '
'. __( 'Upload', 'option-tree' ) . ': ';
- echo '
' . sprintf( __( 'The Upload option type is used to upload any WordPress supported media. After uploading, users are required to press the "%s" button in order to populate the input with the URI of that media. There is one caveat of this feature. If you import the theme options and have uploaded media on one site the old URI will not reflect the URI of your new site. You will have to re-upload or %s any media to your new server and change the URIs if necessary.', 'option-tree' ), apply_filters( 'ot_upload_text', __( 'Send to OptionTree', 'option-tree' ) ), 'FTP' ) . '
';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * ot_get_option() option type.
- *
- * This is a callback function to display text about ot_get_option().
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_ot_get_option' ) ) {
-
- function ot_type_ot_get_option() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'Description', 'option-tree' ) . ': ';
-
- echo '
' . __( 'This function returns a value from the "option_tree" array of saved values or the default value supplied. The returned value would be mixed. Meaning it could be a string, integer, boolean, or array.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Usage', 'option-tree' ) . ': ';
-
- echo '
<?php ot_get_option( $option_id, $default ); ?>
';
-
- echo '
' . __( 'Parameters', 'option-tree' ) . ': ';
-
- echo '
$option_id
';
-
- echo '
(' . __( 'string', 'option-tree' ) . ' ) (' . __( 'required', 'option-tree' ) . ' ) ' . __( 'Enter the options unique identifier.', 'option-tree' ) . ' ' . __( 'Default:', 'option-tree' ) . ' ' . __( 'None', 'option-tree' ) . '
';
-
- echo '
$default
';
-
- echo '
(' . __( 'string', 'option-tree' ) . ' ) (' . __( 'optional', 'option-tree' ) . ' ) ' . __( 'Enter a default return value. This is just incase the request returns null.', 'option-tree' ) . ' ' . __( 'Default', 'option-tree' ) . ': ' . __( 'None', 'option-tree' ) . '
';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * get_option_tree() option type.
- *
- * This is a callback function to display text about get_option_tree().
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_get_option_tree' ) ) {
-
- function ot_type_get_option_tree() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Use', 'option-tree' ) . 'ot_get_option()
' . __( 'instead', 'option-tree' ) . '.
';
-
- echo '
'. __( 'Description', 'option-tree' ) . ': ';
-
- echo '
' . __( 'This function returns, or echos if asked, a value from the "option_tree" array of saved values.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Usage', 'option-tree' ) . ': ';
-
- echo '
<?php get_option_tree( $item_id, $options, $echo, $is_array, $offset ); ?>
';
-
- echo '
' . __( 'Parameters', 'option-tree' ) . ': ';
-
- echo '
$item_id
';
-
- echo '
(' . __( 'string', 'option-tree' ) . ' ) (' . __( 'required', 'option-tree' ) . ' ) ' . __( 'Enter a unique Option Key to get a returned value or array.', 'option-tree' ) . ' ' . __( 'Default:', 'option-tree' ) . ' ' . __( 'None', 'option-tree' ) . '
';
-
- echo '
$options
';
-
- echo '
(' . __( 'array', 'option-tree' ) . ' ) (' . __( 'optional', 'option-tree' ) . ' ) ' . __( 'Used to cut down on database queries in template files.', 'option-tree' ) . ' ' . __( 'Default', 'option-tree' ) . ': ' . __( 'None', 'option-tree' ) . '
';
-
- echo '
$echo
';
-
- echo '
(' . __( 'boolean', 'option-tree' ) . ' ) (' . __( 'optional', 'option-tree' ) . ' ) ' . __( 'Echo the output.', 'option-tree' ) . ' ' . __( 'Default', 'option-tree' ) . ': FALSE
';
-
- echo '
$is_array
';
-
- echo '
(' . __( 'boolean', 'option-tree' ) . ' ) (' . __( 'optional', 'option-tree' ) . ' ) ' . __( 'Used to indicate the $item_id is an array of values.', 'option-tree' ) . ' ' . __( 'Default', 'option-tree' ) . ': FALSE
';
-
- echo '
$offset
';
-
- echo '
(' . __( 'integer', 'option-tree' ) . ' ) (' . __( 'optional', 'option-tree' ) . ' ) ' . __( 'Numeric offset key for the $item_id array, -1 will return all values (an array starts at 0).', 'option-tree' ) . ' ' . __( 'Default', 'option-tree' ) . ': -1
';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Examples option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_examples' ) ) {
-
- function ot_type_examples() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'If you\'re using the plugin version of OptionTree it is highly recommended to include a function_exists
check in your code, as described in the examples below. If you\'ve integrated OptionTree directly into your themes root directory, you will not need to wrap your code with function_exists
, as you\'re guaranteed to have the ot_get_option()
function available.', 'option-tree' ) . '
';
-
- echo '
' . __( 'String Examples', 'option-tree' ) . ': ';
-
- echo '
' . __( 'Returns the value of test_input
.', 'option-tree' ) . '
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
- $test_input = ot_get_option( \'test_input\' );
-}
';
-
- echo '
' . __( 'Returns the value of test_input
, but also has a default value if it returns empty.', 'option-tree' ) . '
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
- $test_input = ot_get_option( \'test_input\', \'default input value goes here.\' );
-}
';
-
- echo '
' . __( 'Array Examples', 'option-tree' ) . ': ';
-
- echo '
' . __( 'Assigns the value of navigation_ids
to the variable $ids
. It then echos an unordered list of links (navigation) using wp_list_pages()
.', 'option-tree' ) . '
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
- /* get an array of page id\'s */
- $ids = ot_get_option( \'navigation_ids\', array() );
-
- /* echo custom navigation using wp_list_pages() */
- if ( ! empty( $ids ) )
- echo \'<ul>\';
- wp_list_pages(
- array(
- \'include\' => $ids,
- \'title_li\' => \'\'
- )
- );
- echo \'</ul>\';
- }
-
-}
';
-
- echo '
' . __( 'The next two examples demonstrate how to use the Measurement option type. The Measurement option type is an array with two key/value pairs. The first is the value of measurement and the second is the unit of measurement.', 'option-tree' ) . '
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
- /* get the array */
- $measurement = ot_get_option( \'measurement_option_type_id\' );
-
- /* only echo values if they actually exist, else echo some default value */
- if ( isset( measurement[0] ) && $measurement[1] ) {
- echo $measurement[0].$measurement[1];
- } else {
- echo \'10px\';
- }
-
-}
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
- /* get the array, and have a default just incase */
- $measurement = ot_get_option( \'measurement_option_type_id\', array( \'10\', \'px\' ) );
-
- /* implode array into a string value */
- if ( ! empty( measurement ) ) {
- echo implode( \'\', $measurement );
- }
-
-}
';
-
- echo '
' . __( 'This example displays a very basic slider loop.', 'option-tree' ) . '
';
-
- echo '
if ( function_exists( \'ot_get_option\' ) ) {
-
- /* get the slider array */
- $slides = ot_get_option( \'my_slider\', array() );
-
- if ( ! empty( $slides ) ) {
- foreach( $slides as $slide ) {
- echo \'
- <li>
- <a href="\' . $slide[\'link\'] . \'"><img src="\' . $slide[\'image\'] . \'" alt="\' . $slide[\'title\'] . \'" /></a>
- <div class="description">\' . $slide[\'description\'] . \'</div>
- </li>\';
- }
- }
-
-}
';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Layouts Overview option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_layouts_overview' ) ) {
-
- function ot_type_layouts_overview() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'It\'s Super Simple', 'option-tree' ) . ' ';
-
- echo '
' . __( 'Layouts make your theme awesome! With theme options data that you can save/import/export you can package themes with different color variations, or make it easy to do A/B testing on text and so much more. Basically, you save a snapshot of your data as a layout.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Once you have created all your different layouts, or theme variations, you can save them to a separate text file for repackaging with your theme. Alternatively, you could just make different variations for yourself and change your theme with the click of a button, all without deleting your previous options data.', 'option-tree' ) . '
';
-
- echo '
' . __( ' Adding a layout is ridiculously easy, follow these steps and you\'ll be on your way to having a WordPress super theme.', 'option-tree' ) . '
';
-
- echo '
' . __( 'For Developers', 'option-tree' ) . ': ';
-
- echo '
' . __( 'Creating a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the OptionTre->Settings->Layouts
tab.', 'option-tree' ) . ' ';
- echo '' . __( 'Enter a name for your layout in the text field and hit "Save Layouts", you\'ve created your first layout.', 'option-tree' ) . ' ';
- echo '' . __( 'Adding a new layout is as easy as repeating the steps above.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Activating a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the OptionTre->Settings->Layouts
tab.', 'option-tree' ) . ' ';
- echo '' . __( 'Click on the activate layout button in the actions list.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Deleting a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the OptionTre->Settings->Layouts
tab.', 'option-tree' ) . ' ';
- echo '' . __( 'Click on the delete layout button in the actions list.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Edit Layout Data', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the Appearance->Theme Options
page.', 'option-tree' ) . ' ';
- echo '' . __( 'Modify and save your theme options and the layout will be updated automatically.', 'option-tree' ) . ' ';
- echo '' . __( 'Saving theme options data will update the currently active layout, so before you start saving make sure you want to modify the current layout.', 'option-tree' ) . ' ';
- echo '' . __( 'If you want to edit a new layout, first create it then save your theme options.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'End-Users Mode', 'option-tree' ) . ': ';
-
- echo '
' . __( 'Creating a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the Appearance->Theme Options
page.', 'option-tree' ) . ' ';
- echo '' . __( 'Enter a name for your layout in the text field and hit "New Layout", you\'ve created your first layout.', 'option-tree' ) . ' ';
- echo '' . __( 'Adding a new layout is as easy as repeating the steps above.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Activating a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the Appearance->Theme Options
page.', 'option-tree' ) . ' ';
- echo '' . __( 'Choose a layout from the select list and click the "Activate Layout" button.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Deleting a Layout', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'End-Users mode does not allow deleting layouts.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'Edit Layout Data', 'option-tree' ) . ': ';
- echo '
';
- echo ''. __( 'Go to the Appearance->Theme Options
tab.', 'option-tree' ) . ' ';
- echo '' . __( 'Modify and save your theme options and the layout will be updated automatically.', 'option-tree' ) . ' ';
- echo '' . __( 'Saving theme options data will update the currently active layout, so before you start saving make sure you want to modify the current layout.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Meta Boxes option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_meta_boxes' ) ) {
-
- function ot_type_meta_boxes() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'How-to-guide', 'option-tree' ) . ' ';
-
- echo '
' . __( 'There are a few simple steps you need to take in order to use OptionTree\'s built in Meta Box API. In the code below I\'ll show you a basic demo of how to create your very own custom meta box using any number of the option types you have at your disposal. If you would like to see some demo code, there is a directory named theme-mode
inside the assets
directory that contains a file named demo-meta-boxes.php
you can reference.', 'option-tree' ) . '
';
-
- echo '
' . __( 'It\'s important to note that Meta Boxes do not support WYSIWYG editors at this time and if you set one of your options to Textarea it will automatically revert to a Textarea Simple until a valid solution is found. WordPress released this statement regarding the wp_editor() function:', 'option-tree' ) . '
';
-
- echo '
' . __( 'Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. What this means in practical terms, is that you cannot put it in meta-boxes that can be dragged and placed elsewhere on the page.', 'option-tree' ) . ' ';
-
- echo '
' . __( 'Create and include your custom meta boxes file.', 'option-tree' ) . ' ';
- echo '
';
- echo ''. __( 'Create a file and name it anything you want, maybe meta-boxes.php
.', 'option-tree' ) . ' ';
- echo ''. __( 'As well, you\'ll probably want to create a directory named includes
to put your meta-boxes.php
into which will help keep you file structure nice and tidy.', 'option-tree' ) . ' ';
- echo '' . __( 'Add the following code to your functions.php
.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
/**
- * Meta Boxes
- */
-require( trailingslashit( get_template_directory() ) . \'includes/meta-boxes.php\' );
-
';
-
- echo '
';
- echo '' . __( 'Add a variation of the following code to your meta-boxes.php
. You\'ll obviously need to fill it in with all your custom array values. It\'s important to note here that we use the admin_init
filter because if you were to call the ot_register_meta_box
function before OptionTree was loaded the sky would fall on your head.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo "
/**
- * Initialize the meta boxes.
- */
-add_action( 'admin_init', 'custom_meta_boxes' );
-
-function custom_meta_boxes() {
-
- $my_meta_box = array(
- 'id' => 'my_meta_box',
- 'title' => 'My Meta Box',
- 'desc' => '',
- 'pages' => array( 'post' ),
- 'context' => 'normal',
- 'priority' => 'high',
- 'fields' => array(
- array(
- 'id' => 'background',
- 'label' => 'Background',
- 'desc' => '',
- 'std' => '',
- 'type' => 'background',
- 'class' => '',
- 'choices' => array()
- )
- )
- );
-
- ot_register_meta_box( $my_meta_box );
-
-}
";
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Theme Mode option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_theme_mode' ) ) {
-
- function ot_type_theme_mode() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
'. __( 'How-to-guide', 'option-tree' ) . ' ';
-
- echo '
' . __( 'There are a few simple steps you need to take in order to use OptionTree as a theme included module. In the code below I\'ll show you a basic demo of how to include the entire plugin as a module, which will allow you to have the most up-to-date version of OptionTree without ever needing to hack the core of the plugin. If you would like to see some demo code, there is a directory named theme-mode
inside the assets
directory that contains a file named demo-theme-options.php
you can reference.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Step 1: Include the plugin & turn on theme mode.', 'option-tree' ) . ' ';
- echo '
';
- echo '' . sprintf( __( 'Download the latest version of %s and unarchive the %s directory.', 'option-tree' ), '' . __( 'OptionTree', 'option-tree' ) . ' ', '.zip
' ) . ' ';
- echo '' . sprintf( __( 'Put the %s directory in the root of your theme. For example, the server path would be %s.', 'option-tree' ), 'option-tree
', '/wp-content/themes/theme-name/option-tree/
' ) . ' ';
- echo '' . sprintf( __( 'Add the following code to the beginning of your %s.', 'option-tree' ), 'functions.php
' ) . ' ';
- echo ' ';
-
- echo '
/**
- * Required: set \'ot_theme_mode\' filter to true.
- */
-add_filter( \'ot_theme_mode\', \'__return_true\' );
-
-/**
- * Required: include OptionTree.
- */
-require( trailingslashit( get_template_directory() ) . \'option-tree/ot-loader.php\' );
-
';
-
- echo '
' . sprintf( __( 'For a list of all the OptionTree UI display filters refer to the %s file found in the %s directory of this plugin. This file is the starting point for developing themes with Theme Mode.', 'option-tree' ), 'demo-functions.php
', '/assets/theme-mode/
' ) . '
';
-
- echo '
' . __( 'You now have OptionTree built into your theme and anytime an update is available replace the old version with the new one.', 'option-tree' ) . '
';
-
- echo '
' . __( 'Step 2: Create Theme Options without using the UI Builder.', 'option-tree' ) . ' ';
- echo '
';
- echo ''. __( 'Create a file and name it anything you want, maybe theme-options.php
, or use the built in file export to create it for you. Remember, you should always check the file for errors before including it in your theme.', 'option-tree' ) . ' ';
- echo ''. __( 'As well, you\'ll probably want to create a directory named includes
to put your theme-options.php
into which will help keep you file structure nice and tidy.', 'option-tree' ) . ' ';
- echo '' . __( 'Add the following code to your functions.php
.', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
/**
- * Theme Options
- */
-require( trailingslashit( get_template_directory() ) . \'includes/theme-options.php\' );
-
';
-
- echo '
';
- echo '' . __( 'Add a variation of the following code to your theme-options.php
. You\'ll obviously need to fill it in with all your custom array values for contextual help (optional), sections (required), and settings (required).', 'option-tree' ) . ' ';
- echo ' ';
-
- echo '
' . __( 'The code below is a boilerplate to get your started. For a full list of the available option types click the "Option Types" tab above. Also a quick note, you don\'t need to put OptionTree in theme mode to manually create options but you will want to hide the docs and settings as each time you load the admin area the settings be written over with the code below if they\'ve changed in any way. However, this ensures your settings do not get tampered with by the end-user.', 'option-tree' ) . '
';
-
- echo "
/**
- * Initialize the options before anything else.
- */
-add_action( 'init', 'custom_theme_options', 1 );
-
-/**
- * Build the custom settings & update OptionTree.
- */
-function custom_theme_options() {
-
- /* OptionTree is not loaded yet, or this is not an admin request */
- if ( ! function_exists( 'ot_settings_id' ) || ! is_admin() )
- return false;
-
- /**
- * Get a copy of the saved settings array.
- */
- $saved_settings = get_option( 'option_tree_settings', array() );
-
- /**
- * Custom settings array that will eventually be
- * passes to the OptionTree Settings API Class.
- */
- $custom_settings = array(
- 'contextual_help' => array(
- 'content' => array(
- array(
- 'id' => 'general_help',
- 'title' => 'General',
- 'content' => '<p>Help content goes here!</p>'
- )
- ),
- 'sidebar' => '<p>Sidebar content goes here!</p>',
- ),
- 'sections' => array(
- array(
- 'id' => 'general',
- 'title' => 'General'
- )
- ),
- 'settings' => array(
- array(
- 'id' => 'my_checkbox',
- 'label' => 'Checkbox',
- 'desc' => '',
- 'std' => '',
- 'type' => 'checkbox',
- 'section' => 'general',
- 'class' => '',
- 'choices' => array(
- array(
- 'value' => 'yes',
- 'label' => 'Yes'
- )
- )
- ),
- array(
- 'id' => 'my_layout',
- 'label' => 'Layout',
- 'desc' => 'Choose a layout for your theme',
- 'std' => 'right-sidebar',
- 'type' => 'radio-image',
- 'section' => 'general',
- 'class' => '',
- 'choices' => array(
- array(
- 'value' => 'left-sidebar',
- 'label' => 'Left Sidebar',
- 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'
- ),
- array(
- 'value' => 'right-sidebar',
- 'label' => 'Right Sidebar',
- 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'
- ),
- array(
- 'value' => 'full-width',
- 'label' => 'Full Width (no sidebar)',
- 'src' => OT_URL . '/assets/images/layout/full-width.png'
- ),
- array(
- 'value' => 'dual-sidebar',
- 'label' => __( 'Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . '/assets/images/layout/dual-sidebar.png'
- ),
- array(
- 'value' => 'left-dual-sidebar',
- 'label' => __( 'Left Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . '/assets/images/layout/left-dual-sidebar.png'
- ),
- array(
- 'value' => 'right-dual-sidebar',
- 'label' => __( 'Right Dual Sidebar', 'option-tree' ),
- 'src' => OT_URL . '/assets/images/layout/right-dual-sidebar.png'
- )
- )
- ),
- array(
- 'id' => 'my_slider',
- 'label' => 'Images',
- 'desc' => '',
- 'std' => '',
- 'type' => 'list-item',
- 'section' => 'general',
- 'class' => '',
- 'choices' => array(),
- 'settings' => array(
- array(
- 'id' => 'slider_image',
- 'label' => 'Image',
- 'desc' => '',
- 'std' => '',
- 'type' => 'upload',
- 'class' => '',
- 'choices' => array()
- ),
- array(
- 'id' => 'slider_link',
- 'label' => 'Link to Post',
- 'desc' => 'Enter the posts url.',
- 'std' => '',
- 'type' => 'text',
- 'class' => '',
- 'choices' => array()
- ),
- array(
- 'id' => 'slider_description',
- 'label' => 'Description',
- 'desc' => 'This text is used to add fancy captions in the slider.',
- 'std' => '',
- 'type' => 'textarea',
- 'class' => '',
- 'choices' => array()
- )
- )
- )
- )
- );
-
- /* settings are not the same update the DB */
- if ( $saved_settings !== $custom_settings ) {
- update_option( 'option_tree_settings', $custom_settings );
- }
-
- /* Lets OptionTree know the UI Builder is being overridden */
- global $ot_has_custom_theme_options;
- $ot_has_custom_theme_options = true;
-
-}
-
";
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/* End of file ot-functions-docs-page.php */
-/* Location: ./includes/ot-functions-docs-page.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions-option-types.php b/option-tree/includes/ot-functions-option-types.php
deleted file mode 100644
index 1590f7e..0000000
--- a/option-tree/includes/ot-functions-option-types.php
+++ /dev/null
@@ -1,3233 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Builds the HTML for each of the available option types by calling those
- * function with call_user_func and passing the arguments to the second param.
- *
- * All fields are required!
- *
- * @param array $args The array of arguments are as follows:
- * @param string $type Type of option.
- * @param string $field_id The field ID.
- * @param string $field_name The field Name.
- * @param mixed $field_value The field value is a string or an array of values.
- * @param string $field_desc The field description.
- * @param string $field_std The standard value.
- * @param string $field_class Extra CSS classes.
- * @param array $field_choices The array of option choices.
- * @param array $field_settings The array of settings for a list item.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_display_by_type' ) ) {
-
- function ot_display_by_type( $args = array() ) {
-
- /* allow filters to be executed on the array */
- $args = apply_filters( 'ot_display_by_type', $args );
-
- /* build the function name */
- $function_name_by_type = str_replace( '-', '_', 'ot_type_' . $args['type'] );
-
- /* call the function & pass in arguments array */
- if ( function_exists( $function_name_by_type ) ) {
- call_user_func( $function_name_by_type, $args );
- } else {
- echo '
' . __( 'Sorry, this function does not exist', 'option-tree' ) . '
';
- }
-
- }
-
-}
-
-/**
- * Background option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_background' ) ) {
-
- function ot_type_background( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* If an attachment ID is stored here fetch its URL and replace the value */
- if ( isset( $field_value['background-image'] ) && wp_attachment_is_image( $field_value['background-image'] ) ) {
-
- $attachment_data = wp_get_attachment_image_src( $field_value['background-image'], 'original' );
-
- /* check for attachment data */
- if ( $attachment_data ) {
-
- $field_src = $attachment_data[0];
-
- }
-
- }
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Border Option Type
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The markup.
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_border' ) ) {
-
- function ot_type_border( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Box Shadow Option Type
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The markup.
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_box_shadow' ) ) {
-
- function ot_type_box_shadow( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Category Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_category_checkbox' ) ) {
-
- function ot_type_category_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Category Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_category_select' ) ) {
-
- function ot_type_category_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_checkbox' ) ) {
-
- function ot_type_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Colorpicker option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- * @updated 2.2.0
- */
-if ( ! function_exists( 'ot_type_colorpicker' ) ) {
-
- function ot_type_colorpicker( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Colorpicker Opacity option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_colorpicker_opacity' ) ) {
-
- function ot_type_colorpicker_opacity( $args = array() ) {
-
- $args['field_class'] = isset( $args['field_class'] ) ? $args['field_class'] . ' ot-colorpicker-opacity' : 'ot-colorpicker-opacity';
- ot_type_colorpicker( $args );
-
- }
-
-}
-
-/**
- * CSS option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_css' ) ) {
-
- function ot_type_css( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Custom Post Type Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_custom_post_type_checkbox' ) ) {
-
- function ot_type_custom_post_type_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Custom Post Type Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_custom_post_type_select' ) ) {
-
- function ot_type_custom_post_type_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* build category */
- echo '';
-
- /* setup the post types */
- $post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' );
-
- /* query posts array */
- $my_posts = get_posts( apply_filters( 'ot_type_custom_post_type_select_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
-
- /* has posts */
- if ( is_array( $my_posts ) && ! empty( $my_posts ) ) {
- echo '-- ' . __( 'Choose One', 'option-tree' ) . ' -- ';
- foreach( $my_posts as $my_post ) {
- $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled';
- echo 'ID, false ) . '>' . $post_title . ' ';
- }
- } else {
- echo '' . __( 'No Posts Found', 'option-tree' ) . ' ';
- }
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Date Picker option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.3
- */
-if ( ! function_exists( 'ot_type_date_picker' ) ) {
-
- function ot_type_date_picker( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* filter date format */
- $date_format = apply_filters( 'ot_type_date_picker_date_format', 'yy-mm-dd', $field_id );
-
- /**
- * Filter the addition of the readonly attribute.
- *
- * @since 2.5.0
- *
- * @param bool $is_readonly Whether to add the 'readonly' attribute. Default 'false'.
- * @param string $field_id The field ID.
- */
- $is_readonly = apply_filters( 'ot_type_date_picker_readonly', false, $field_id );
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Date Time Picker option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.3
- */
-if ( ! function_exists( 'ot_type_date_time_picker' ) ) {
-
- function ot_type_date_time_picker( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* filter date format */
- $date_format = apply_filters( 'ot_type_date_time_picker_date_format', 'yy-mm-dd', $field_id );
-
- /**
- * Filter the addition of the readonly attribute.
- *
- * @since 2.5.0
- *
- * @param bool $is_readonly Whether to add the 'readonly' attribute. Default 'false'.
- * @param string $field_id The field ID.
- */
- $is_readonly = apply_filters( 'ot_type_date_time_picker_readonly', false, $field_id );
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Dimension Option Type
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The markup.
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_dimension' ) ) {
-
- function ot_type_dimension( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Gallery option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The gallery metabox markup.
- *
- * @access public
- * @since 2.2.0
- */
-if ( ! function_exists( 'ot_type_gallery' ) ) {
-
- function ot_type_gallery( $args = array() ) {
-
- // Turns arguments array into variables
- extract( $args );
-
- // Verify a description
- $has_desc = $field_desc ? true : false;
-
- // Format setting outer wrapper
- echo '
';
-
- }
-
-}
-
-/**
- * Google Fonts option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_google_fonts' ) ) {
-
- function ot_type_google_fonts( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * JavaScript option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_javascript' ) ) {
-
- function ot_type_javascript( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Link Color option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The markup.
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_link_color' ) ) {
-
- function ot_type_link_color( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * List Item option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_list_item' ) ) {
-
- function ot_type_list_item( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- // Default
- $sortable = true;
-
- // Check if the list can be sorted
- if ( ! empty( $field_class ) ) {
- $classes = explode( ' ', $field_class );
- if ( in_array( 'not-sortable', $classes ) ) {
- $sortable = false;
- str_replace( 'not-sortable', '', $field_class );
- }
- }
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Measurement option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_measurement' ) ) {
-
- function ot_type_measurement( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Numeric Slider option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_type_numeric_slider' ) ) {
-
- function ot_type_numeric_slider( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- $_options = explode( ',', $field_min_max_step );
- $min = isset( $_options[0] ) ? $_options[0] : 0;
- $max = isset( $_options[1] ) ? $_options[1] : 100;
- $step = isset( $_options[2] ) ? $_options[2] : 1;
-
- /* format setting outer wrapper */
- echo '
';
- }
-
-}
-
-/**
- * On/Off option type
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array The options arguments
- * @return string The gallery metabox markup.
- *
- * @access public
- * @since 2.2.0
- */
-if ( ! function_exists( 'ot_type_on_off' ) ) {
-
- function ot_type_on_off( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Page Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_page_checkbox' ) ) {
-
- function ot_type_page_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Page Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_page_select' ) ) {
-
- function ot_type_page_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* build page select */
- echo '';
-
- /* query pages array */
- $my_posts = get_posts( apply_filters( 'ot_type_page_select_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
-
- /* has pages */
- if ( is_array( $my_posts ) && ! empty( $my_posts ) ) {
- echo '-- ' . __( 'Choose One', 'option-tree' ) . ' -- ';
- foreach( $my_posts as $my_post ) {
- $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled';
- echo 'ID, false ) . '>' . $post_title . ' ';
- }
- } else {
- echo '' . __( 'No Pages Found', 'option-tree' ) . ' ';
- }
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Post Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_post_checkbox' ) ) {
-
- function ot_type_post_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Post Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_post_select' ) ) {
-
- function ot_type_post_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* build page select */
- echo '';
-
- /* query posts array */
- $my_posts = get_posts( apply_filters( 'ot_type_post_select_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
-
- /* has posts */
- if ( is_array( $my_posts ) && ! empty( $my_posts ) ) {
- echo '-- ' . __( 'Choose One', 'option-tree' ) . ' -- ';
- foreach( $my_posts as $my_post ) {
- $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled';
- echo 'ID, false ) . '>' . $post_title . ' ';
- }
- } else {
- echo '' . __( 'No Posts Found', 'option-tree' ) . ' ';
- }
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Radio option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_radio' ) ) {
-
- function ot_type_radio( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Radio Images option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_radio_image' ) ) {
-
- function ot_type_radio_image( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_select' ) ) {
-
- function ot_type_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Sidebar Select option type.
- *
- * This option type makes it possible for users to select a WordPress registered sidebar
- * to use on a specific area. By using the two provided filters, 'ot_recognized_sidebars',
- * and 'ot_recognized_sidebars_{$field_id}' we can be selective about which sidebars are
- * available on a specific content area.
- *
- * For example, if we create a WordPress theme that provides the ability to change the
- * Blog Sidebar and we don't want to have the footer sidebars available on this area,
- * we can unset those sidebars either manually or by using a regular expression if we
- * have a common name like footer-sidebar-$i.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_type_sidebar_select' ) ) {
-
- function ot_type_sidebar_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '';
-
- }
-
-}
-
-/**
- * List Item option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_slider' ) ) {
-
- function ot_type_slider( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Social Links option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.4.0
- */
-if ( ! function_exists( 'ot_type_social_links' ) ) {
-
- function ot_type_social_links( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* Load the default social links */
- if ( empty( $field_value ) && apply_filters( 'ot_type_social_links_load_defaults', true, $field_id ) ) {
-
- $field_value = apply_filters( 'ot_type_social_links_defaults', array(
- array(
- 'name' => __( 'Facebook', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Twitter', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Google+', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'LinkedIn', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Pinterest', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Youtube', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Dribbble', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Github', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Forrst', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Digg', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Delicious', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Tumblr', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Skype', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'SoundCloud', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Vimeo', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'Flickr', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- ),
- array(
- 'name' => __( 'VK.com', 'option-tree' ),
- 'title' => '',
- 'href' => ''
- )
- ), $field_id );
-
- }
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Spacing Option Type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_type_spacing' ) ) {
-
- function ot_type_spacing( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Tab option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.3.0
- */
-if ( ! function_exists( 'ot_type_tab' ) ) {
-
- function ot_type_tab( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* format setting outer wrapper */
- echo '
';
-
- echo ' ';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Tag Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_tag_checkbox' ) ) {
-
- function ot_type_tag_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Tag Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_tag_select' ) ) {
-
- function ot_type_tag_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Taxonomy Checkbox option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_taxonomy_checkbox' ) ) {
-
- function ot_type_taxonomy_checkbox( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Taxonomy Select option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_taxonomy_select' ) ) {
-
- function ot_type_taxonomy_select( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Text option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_text' ) ) {
-
- function ot_type_text( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* build text input */
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Textarea option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_textarea' ) ) {
-
- function ot_type_textarea( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* build textarea */
- wp_editor(
- $field_value,
- esc_attr( $field_id ),
- array(
- 'editor_class' => esc_attr( $field_class ),
- 'wpautop' => apply_filters( 'ot_wpautop', false, $field_id ),
- 'media_buttons' => apply_filters( 'ot_media_buttons', true, $field_id ),
- 'textarea_name' => esc_attr( $field_name ),
- 'textarea_rows' => esc_attr( $field_rows ),
- 'tinymce' => apply_filters( 'ot_tinymce', true, $field_id ),
- 'quicktags' => apply_filters( 'ot_quicktags', array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ), $field_id )
- )
- );
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Textarea Simple option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_textarea_simple' ) ) {
-
- function ot_type_textarea_simple( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo $has_desc ? '
' . htmlspecialchars_decode( $field_desc ) . '
' : '';
-
- /* format setting inner wrapper */
- echo '
';
-
- /* filter to allow wpautop */
- $wpautop = apply_filters( 'ot_wpautop', false, $field_id );
-
- /* wpautop $field_value */
- if ( $wpautop == true )
- $field_value = wpautop( $field_value );
-
- /* build textarea simple */
- echo '';
-
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Textblock option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_textblock' ) ) {
-
- function ot_type_textblock( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
' . htmlspecialchars_decode( $field_desc ) . '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Textblock Titled option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_textblock_titled' ) ) {
-
- function ot_type_textblock_titled( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
' . htmlspecialchars_decode( $field_desc ) . '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Typography option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_typography' ) ) {
-
- function ot_type_typography( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/**
- * Upload option type.
- *
- * See @ot_display_by_type to see the full list of available arguments.
- *
- * @param array An array of arguments.
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_upload' ) ) {
-
- function ot_type_upload( $args = array() ) {
-
- /* turns arguments array into variables */
- extract( $args );
-
- /* verify a description */
- $has_desc = $field_desc ? true : false;
-
- /* If an attachment ID is stored here fetch its URL and replace the value */
- if ( $field_value && wp_attachment_is_image( $field_value ) ) {
-
- $attachment_data = wp_get_attachment_image_src( $field_value, 'original' );
-
- /* check for attachment data */
- if ( $attachment_data ) {
-
- $field_src = $attachment_data[0];
-
- }
-
- }
-
- /* format setting outer wrapper */
- echo '
';
-
- }
-
-}
-
-/* End of file ot-functions-option-types.php */
-/* Location: ./includes/ot-functions-option-types.php */
diff --git a/option-tree/includes/ot-functions-settings-page.php b/option-tree/includes/ot-functions-settings-page.php
deleted file mode 100644
index 6f768ad..0000000
--- a/option-tree/includes/ot-functions-settings-page.php
+++ /dev/null
@@ -1,572 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Create option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_theme_options_ui' ) ) {
-
- function ot_type_theme_options_ui() {
- global $blog_id;
-
- echo '
';
-
- }
-
-}
-
-/**
- * Import XML option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_import_xml' ) ) {
-
- function ot_type_import_xml() {
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'import_xml_form', 'import_xml_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'This import method has been deprecated. That means it has been replaced by a new method and is no longer supported, and may be removed from future versions. All themes that use this import method should be converted to use its replacement below.', 'option-tree' ) . '
';
-
- echo '
' . sprintf( __( 'If you were given a Theme Options XML file with a premium or free theme, locate it on your hard drive and upload that file by clicking the upload button. A popup window will appear, upload the XML file and click "%s". The file URL should be in the upload input, if it is click "Import XML".', 'option-tree' ), apply_filters( 'ot_upload_text', __( 'Send to OptionTree', 'option-tree' ) ) ) . '
';
-
- /* button */
- echo '
' . __( 'Import XML', 'option-tree' ) . ' ';
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/**
- * Import Settings option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_import_settings' ) ) {
-
- function ot_type_import_settings() {
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'import_settings_form', 'import_settings_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'To import your Settings copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Settings" button.', 'option-tree' ) . '
';
-
- /* button */
- echo '
' . __( 'Import Settings', 'option-tree' ) . ' ';
-
- echo '
';
-
- /* textarea */
- echo '
';
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/**
- * Import Data option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_import_data' ) ) {
-
- function ot_type_import_data() {
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'import_data_form', 'import_data_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- if ( OT_SHOW_SETTINGS_IMPORT ) echo '
' . __( 'Only after you\'ve imported the Settings should you try and update your Theme Options.', 'option-tree' ) . '
';
-
- echo '
' . __( 'To import your Theme Options copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Theme Options" button.', 'option-tree' ) . '
';
-
- /* button */
- echo '
' . __( 'Import Theme Options', 'option-tree' ) . ' ';
-
- echo '
';
-
- /* textarea */
- echo '
';
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/**
- * Import Layouts option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_import_layouts' ) ) {
-
- function ot_type_import_layouts() {
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'import_layouts_form', 'import_layouts_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- if ( OT_SHOW_SETTINGS_IMPORT ) echo '
' . __( 'Only after you\'ve imported the Settings should you try and update your Layouts.', 'option-tree' ) . '
';
-
- echo '
' . __( 'To import your Layouts copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Layouts" button. Keep in mind that when you import your layouts, the active layout\'s saved data will write over the current data set for your Theme Options.', 'option-tree' ) . '
';
-
- /* button */
- echo '
' . __( 'Import Layouts', 'option-tree' ) . ' ';
-
- echo '
';
-
- /* textarea */
- echo '
';
-
- echo ' ';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/**
- * Export Settings File option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0.8
- */
-if ( ! function_exists( 'ot_type_export_settings_file' ) ) {
-
- function ot_type_export_settings_file() {
- global $blog_id;
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'export_settings_file_form', 'export_settings_file_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- echo '
' . sprintf( __( 'Export your Settings into a fully functional %s file. If you want to add your own custom %s text domain to the file, enter it into the text field before exporting. For more information on how to use this file read the documentation on %s. Remember, you should always check the file for errors before including it in your theme.', 'option-tree' ), 'theme-options.php
', 'I18n ', '' . __( 'Theme Mode', 'option-tree' ) . ' ' ) . '
';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- /* button */
- echo '' . __( 'Export Settings File', 'option-tree' ) . ' ';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/**
- * Export Settings option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_export_settings' ) ) {
-
- function ot_type_export_settings() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'Export your Settings by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import
Settings textarea on another web site.', 'option-tree' ) . '
';
-
- echo '
';
-
- /* get theme options data */
- $settings = get_option( ot_settings_id() );
- $settings = ! empty( $settings ) ? ot_encode( serialize( $settings ) ) : '';
-
- echo '
';
- echo '' . $settings . ' ';
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Export Data option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_export_data' ) ) {
-
- function ot_type_export_data() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'Export your Theme Options data by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import
Theme Options textarea on another web site.', 'option-tree' ) . '
';
-
- echo '
';
-
- /* get theme options data */
- $data = get_option( ot_options_id() );
- $data = ! empty( $data ) ? ot_encode( serialize( $data ) ) : '';
-
- echo '
';
- echo '' . $data . ' ';
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Export Layouts option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_export_layouts' ) ) {
-
- function ot_type_export_layouts() {
-
- /* format setting outer wrapper */
- echo '
';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'Export your Layouts by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import
Layouts textarea on another web site.', 'option-tree' ) . '
';
-
-
- echo '
';
-
- /* get layout data */
- $layouts = get_option( ot_layouts_id() );
- $layouts = ! empty( $layouts ) ? ot_encode( serialize( $layouts ) ) : '';
-
- echo '
';
- echo '' . $layouts . ' ';
- echo '
';
-
- echo '
';
-
- }
-
-}
-
-/**
- * Modify Layouts option type.
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_type_modify_layouts' ) ) {
-
- function ot_type_modify_layouts() {
-
- echo '
';
-
- /* form nonce */
- wp_nonce_field( 'option_tree_modify_layouts_form', 'option_tree_modify_layouts_nonce' );
-
- /* format setting outer wrapper */
- echo '';
-
- /* description */
- echo '
';
-
- echo '
' . __( 'To add a new layout enter a unique lower case alphanumeric string (dashes allowed) in the text field and click "Save Layouts".', 'option-tree' ) . '
';
- echo '
' . __( 'As well, you can activate, remove, and drag & drop the order; all situations require you to click "Save Layouts" for the changes to be applied.', 'option-tree' ) . '
';
- echo '
' . __( 'When you create a new layout it will become active and any changes made to the Theme Options will be applied to it. If you switch back to a different layout immediately after creating a new layout that new layout will have a snapshot of the current Theme Options data attached to it.', 'option-tree' ) . '
';
- if ( OT_SHOW_DOCS ) echo '
' . __( 'Visit OptionTree->Documentation->Layouts Overview
to see a more in-depth description of what layouts are and how to use them.', 'option-tree' ) . '
';
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- echo ' ';
-
- }
-
-}
-
-/* End of file ot-functions-settings-page.php */
-/* Location: ./includes/ot-functions-settings-page.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-functions.php b/option-tree/includes/ot-functions.php
deleted file mode 100644
index 2f4812f..0000000
--- a/option-tree/includes/ot-functions.php
+++ /dev/null
@@ -1,397 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- * @since 2.0
- */
-
-/**
- * Theme Options ID
- *
- * @return string
- *
- * @access public
- * @since 2.3.0
- */
-if ( ! function_exists( 'ot_options_id' ) ) {
-
- function ot_options_id() {
-
- return apply_filters( 'ot_options_id', 'option_tree' );
-
- }
-
-}
-
-/**
- * Theme Settings ID
- *
- * @return string
- *
- * @access public
- * @since 2.3.0
- */
-if ( ! function_exists( 'ot_settings_id' ) ) {
-
- function ot_settings_id() {
-
- return apply_filters( 'ot_settings_id', 'option_tree_settings' );
-
- }
-
-}
-
-/**
- * Theme Layouts ID
- *
- * @return string
- *
- * @access public
- * @since 2.3.0
- */
-if ( ! function_exists( 'ot_layouts_id' ) ) {
-
- function ot_layouts_id() {
-
- return apply_filters( 'ot_layouts_id', 'option_tree_layouts' );
-
- }
-
-}
-
-/**
- * Get Option.
- *
- * Helper function to return the option value.
- * If no value has been saved, it returns $default.
- *
- * @param string The option ID.
- * @param string The default option value.
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_get_option' ) ) {
-
- function ot_get_option( $option_id, $default = '' ) {
-
- /* get the saved options */
- $options = get_option( ot_options_id() );
-
- /* look for the saved value */
- if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) {
-
- return ot_wpml_filter( $options, $option_id );
-
- }
-
- return $default;
-
- }
-
-}
-
-/**
- * Echo Option.
- *
- * Helper function to echo the option value.
- * If no value has been saved, it echos $default.
- *
- * @param string The option ID.
- * @param string The default option value.
- * @return mixed
- *
- * @access public
- * @since 2.2.0
- */
-if ( ! function_exists( 'ot_echo_option' ) ) {
-
- function ot_echo_option( $option_id, $default = '' ) {
-
- echo ot_get_option( $option_id, $default );
-
- }
-
-}
-
-/**
- * Filter the return values through WPML
- *
- * @param array $options The current options
- * @param string $option_id The option ID
- * @return mixed
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_wpml_filter' ) ) {
-
- function ot_wpml_filter( $options, $option_id ) {
-
- // Return translated strings using WMPL
- if ( function_exists('icl_t') ) {
-
- $settings = get_option( ot_settings_id() );
-
- if ( isset( $settings['settings'] ) ) {
-
- foreach( $settings['settings'] as $setting ) {
-
- // List Item & Slider
- if ( $option_id == $setting['id'] && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
-
- foreach( $options[$option_id] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- $id = $option_id . '_' . $ckey . '_' . $key;
- $_string = icl_t( 'Theme Options', $id, $cvalue );
-
- if ( ! empty( $_string ) ) {
-
- $options[$option_id][$key][$ckey] = $_string;
-
- }
-
- }
-
- }
-
- // List Item & Slider
- } else if ( $option_id == $setting['id'] && $setting['type'] == 'social-links' ) {
-
- foreach( $options[$option_id] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- $id = $option_id . '_' . $ckey . '_' . $key;
- $_string = icl_t( 'Theme Options', $id, $cvalue );
-
- if ( ! empty( $_string ) ) {
-
- $options[$option_id][$key][$ckey] = $_string;
-
- }
-
- }
-
- }
-
- // All other acceptable option types
- } else if ( $option_id == $setting['id'] && in_array( $setting['type'], apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) ) ) ) {
-
- $_string = icl_t( 'Theme Options', $option_id, $options[$option_id] );
-
- if ( ! empty( $_string ) ) {
-
- $options[$option_id] = $_string;
-
- }
-
- }
-
- }
-
- }
-
- }
-
- return $options[$option_id];
-
- }
-
-}
-
-/**
- * Enqueue the dynamic CSS.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_load_dynamic_css' ) ) {
-
- function ot_load_dynamic_css() {
-
- /* don't load in the admin */
- if ( is_admin() ) {
- return;
- }
-
- /**
- * Filter whether or not to enqueue a `dynamic.css` file at the theme level.
- *
- * By filtering this to `false` OptionTree will not attempt to enqueue any CSS files.
- *
- * Example: add_filter( 'ot_load_dynamic_css', '__return_false' );
- *
- * @since 2.5.5
- *
- * @param bool $load_dynamic_css Default is `true`.
- * @return bool
- */
- if ( false === (bool) apply_filters( 'ot_load_dynamic_css', true ) ) {
- return;
- }
-
- /* grab a copy of the paths */
- $ot_css_file_paths = get_option( 'ot_css_file_paths', array() );
- if ( is_multisite() ) {
- $ot_css_file_paths = get_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths );
- }
-
- if ( ! empty( $ot_css_file_paths ) ) {
-
- $last_css = '';
-
- /* loop through paths */
- foreach( $ot_css_file_paths as $key => $path ) {
-
- if ( '' != $path && file_exists( $path ) ) {
-
- $parts = explode( '/wp-content', $path );
-
- if ( isset( $parts[1] ) ) {
-
- $sub_parts = explode( '/', $parts[1] );
-
- if ( isset( $sub_parts[1] ) && isset( $sub_parts[2] ) ) {
- if ( $sub_parts[1] == 'themes' && $sub_parts[2] != get_stylesheet() ) {
- continue;
- }
- }
-
- $css = set_url_scheme( WP_CONTENT_URL ) . $parts[1];
-
- if ( $last_css !== $css ) {
-
- /* enqueue filtered file */
- wp_enqueue_style( 'ot-dynamic-' . $key, $css, false, OT_VERSION );
-
- $last_css = $css;
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
-}
-
-/**
- * Enqueue the Google Fonts CSS.
- *
- * @return void
- *
- * @access public
- * @since 2.5.0
- */
-if ( ! function_exists( 'ot_load_google_fonts_css' ) ) {
-
- function ot_load_google_fonts_css() {
-
- /* don't load in the admin */
- if ( is_admin() )
- return;
-
- $ot_google_fonts = get_theme_mod( 'ot_google_fonts', array() );
- $ot_set_google_fonts = get_theme_mod( 'ot_set_google_fonts', array() );
- $families = array();
- $subsets = array();
- $append = '';
-
- if ( ! empty( $ot_set_google_fonts ) ) {
-
- foreach( $ot_set_google_fonts as $id => $fonts ) {
-
- foreach( $fonts as $font ) {
-
- // Can't find the font, bail!
- if ( ! isset( $ot_google_fonts[$font['family']]['family'] ) ) {
- continue;
- }
-
- // Set variants & subsets
- if ( ! empty( $font['variants'] ) && is_array( $font['variants'] ) ) {
-
- // Variants string
- $variants = ':' . implode( ',', $font['variants'] );
-
- // Add subsets to array
- if ( ! empty( $font['subsets'] ) && is_array( $font['subsets'] ) ) {
- foreach( $font['subsets'] as $subset ) {
- $subsets[] = $subset;
- }
- }
-
- }
-
- // Add family & variants to array
- if ( isset( $variants ) ) {
- $families[] = str_replace( ' ', '+', $ot_google_fonts[$font['family']]['family'] ) . $variants;
- }
-
- }
-
- }
-
- }
-
- if ( ! empty( $families ) ) {
-
- $families = array_unique( $families );
-
- // Append all subsets to the path, unless the only subset is latin.
- if ( ! empty( $subsets ) ) {
- $subsets = implode( ',', array_unique( $subsets ) );
- if ( $subsets != 'latin' ) {
- $append = '&subset=' . $subsets;
- }
- }
-
- wp_enqueue_style( 'ot-google-fonts', esc_url( '//fonts.googleapis.com/css?family=' . implode( '%7C', $families ) ) . $append, false, null );
- }
-
- }
-
-}
-
-/**
- * Registers the Theme Option page link for the admin bar.
- *
- * @return void
- *
- * @access public
- * @since 2.1
- */
-if ( ! function_exists( 'ot_register_theme_options_admin_bar_menu' ) ) {
-
- function ot_register_theme_options_admin_bar_menu( $wp_admin_bar ) {
-
- if ( ! current_user_can( apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ) ) || ! is_admin_bar_showing() )
- return;
-
- $wp_admin_bar->add_node( array(
- 'parent' => 'appearance',
- 'id' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
- 'title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
- 'href' => admin_url( apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) )
- ) );
-
- }
-
-}
-
-/* End of file ot-functions.php */
-/* Location: ./includes/ot-functions.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-meta-box-api.php b/option-tree/includes/ot-meta-box-api.php
deleted file mode 100644
index 2dc957f..0000000
--- a/option-tree/includes/ot-meta-box-api.php
+++ /dev/null
@@ -1,363 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- */
-if ( ! class_exists( 'OT_Meta_Box' ) ) {
-
- class OT_Meta_Box {
-
- /* variable to store the meta box array */
- private $meta_box;
-
- /**
- * PHP5 constructor method.
- *
- * This method adds other methods of the class to specific hooks within WordPress.
- *
- * @uses add_action()
- *
- * @return void
- *
- * @access public
- * @since 1.0
- */
- function __construct( $meta_box ) {
- if ( ! is_admin() )
- return;
-
- global $ot_meta_boxes;
-
- if ( ! isset( $ot_meta_boxes ) ) {
- $ot_meta_boxes = array();
- }
-
- $ot_meta_boxes[] = $meta_box;
-
- $this->meta_box = $meta_box;
-
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
-
- add_action( 'save_post', array( $this, 'save_meta_box' ), 1, 2 );
-
- }
-
- /**
- * Adds meta box to any post type
- *
- * @uses add_meta_box()
- *
- * @return void
- *
- * @access public
- * @since 1.0
- */
- function add_meta_boxes() {
- foreach ( (array) $this->meta_box['pages'] as $page ) {
- add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array( $this, 'build_meta_box' ), $page, $this->meta_box['context'], $this->meta_box['priority'], $this->meta_box['fields'] );
- }
- }
-
- /**
- * Meta box view
- *
- * @return string
- *
- * @access public
- * @since 1.0
- */
- function build_meta_box( $post, $metabox ) {
-
- echo '
';
-
- }
-
- /**
- * Saves the meta box values
- *
- * @return void
- *
- * @access public
- * @since 1.0
- */
- function save_meta_box( $post_id, $post_object ) {
- global $pagenow;
-
- /* don't save if $_POST is empty */
- if ( empty( $_POST ) || ( isset( $_POST['vc_inline'] ) && $_POST['vc_inline'] == true ) )
- return $post_id;
-
- /* don't save during quick edit */
- if ( $pagenow == 'admin-ajax.php' )
- return $post_id;
-
- /* don't save during autosave */
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
- return $post_id;
-
- /* don't save if viewing a revision */
- if ( $post_object->post_type == 'revision' || $pagenow == 'revision.php' )
- return $post_id;
-
- /* verify nonce */
- if ( isset( $_POST[ $this->meta_box['id'] . '_nonce'] ) && ! wp_verify_nonce( $_POST[ $this->meta_box['id'] . '_nonce'], $this->meta_box['id'] ) )
- return $post_id;
-
- /* check permissions */
- if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
- if ( ! current_user_can( 'edit_page', $post_id ) )
- return $post_id;
- } else {
- if ( ! current_user_can( 'edit_post', $post_id ) )
- return $post_id;
- }
-
- foreach ( $this->meta_box['fields'] as $field ) {
-
- $old = get_post_meta( $post_id, $field['id'], true );
- $new = '';
-
- /* there is data to validate */
- if ( isset( $_POST[$field['id']] ) ) {
-
- /* slider and list item */
- if ( in_array( $field['type'], array( 'list-item', 'slider' ) ) ) {
-
- /* required title setting */
- $required_setting = array(
- array(
- 'id' => 'title',
- 'label' => __( 'Title', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'text',
- 'rows' => '',
- 'class' => 'option-tree-setting-title',
- 'post_type' => '',
- 'choices' => array()
- )
- );
-
- /* get the settings array */
- $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array();
-
- /* settings are empty for some odd ass reason get the defaults */
- if ( empty( $settings ) ) {
- $settings = 'slider' == $field['type'] ?
- ot_slider_settings( $field['id'] ) :
- ot_list_item_settings( $field['id'] );
- }
-
- /* merge the two settings array */
- $settings = array_merge( $required_setting, $settings );
-
- foreach( $_POST[$field['id']] as $k => $setting_array ) {
-
- foreach( $settings as $sub_setting ) {
-
- /* verify sub setting has a type & value */
- if ( isset( $sub_setting['type'] ) && isset( $_POST[$field['id']][$k][$sub_setting['id']] ) ) {
-
- $_POST[$field['id']][$k][$sub_setting['id']] = ot_validate_setting( $_POST[$field['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] );
-
- }
-
- }
-
- }
-
- /* set up new data with validated data */
- $new = $_POST[$field['id']];
-
- } else if ( $field['type'] == 'social-links' ) {
-
- /* get the settings array */
- $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array();
-
- /* settings are empty get the defaults */
- if ( empty( $settings ) ) {
- $settings = ot_social_links_settings( $field['id'] );
- }
-
- foreach( $_POST[$field['id']] as $k => $setting_array ) {
-
- foreach( $settings as $sub_setting ) {
-
- /* verify sub setting has a type & value */
- if ( isset( $sub_setting['type'] ) && isset( $_POST[$field['id']][$k][$sub_setting['id']] ) ) {
-
- $_POST[$field['id']][$k][$sub_setting['id']] = ot_validate_setting( $_POST[$field['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] );
-
- }
-
- }
-
- }
-
- /* set up new data with validated data */
- $new = $_POST[$field['id']];
-
- } else {
-
- /* run through validattion */
- $new = ot_validate_setting( $_POST[$field['id']], $field['type'], $field['id'] );
-
- }
-
- /* insert CSS */
- if ( $field['type'] == 'css' ) {
-
- /* insert CSS into dynamic.css */
- if ( '' !== $new ) {
-
- ot_insert_css_with_markers( $field['id'], $new, true );
-
- /* remove old CSS from dynamic.css */
- } else {
-
- ot_remove_old_css( $field['id'] );
-
- }
-
- }
-
- }
-
- if ( isset( $new ) && $new !== $old ) {
- update_post_meta( $post_id, $field['id'], $new );
- } else if ( '' == $new && $old ) {
- delete_post_meta( $post_id, $field['id'], $old );
- }
- }
-
- }
-
- }
-
-}
-
-/**
- * This method instantiates the meta box class & builds the UI.
- *
- * @uses OT_Meta_Box()
- *
- * @param array Array of arguments to create a meta box
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_register_meta_box' ) ) {
-
- function ot_register_meta_box( $args ) {
- if ( ! $args )
- return;
-
- $ot_meta_box = new OT_Meta_Box( $args );
- }
-
-}
-
-/* End of file ot-meta-box-api.php */
-/* Location: ./includes/ot-meta-box-api.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-post-formats-api.php b/option-tree/includes/ot-post-formats-api.php
deleted file mode 100644
index 70b3fe9..0000000
--- a/option-tree/includes/ot-post-formats-api.php
+++ /dev/null
@@ -1,131 +0,0 @@
-
- * @copyright Copyright (c) 2014, Derek Herman
- */
-if ( ! class_exists( 'OT_Post_Formats' ) ) {
-
- class OT_Post_Formats {
-
- /**
- * Class Constructor
- *
- * @return void
- *
- * @access public
- * @since 2.3.0
- */
- public function __construct() {
-
- $this->setup_actions();
-
- }
-
- /**
- * Setup the default filters and actions
- *
- * @uses add_action() To add various actions
- * @uses add_filter() To add various filters
- *
- * @return void
- *
- * @access private
- * @since 2.3.0
- */
- private function setup_actions() {
-
- // Initialize the meta boxes
- add_action( 'admin_init', array( $this, 'meta_boxes' ), 2 );
-
- // Setup pings for the link & quote URLs
- add_filter( 'pre_ping', array( $this, 'pre_ping_post_links' ), 10, 3 );
-
- }
-
- /**
- * Builds the default Meta Boxes.
- *
- * @return void
- *
- * @access private
- * @since 2.3.0
- */
- public function meta_boxes() {
-
- // Exit if called outside of WP admin
- if ( ! is_admin() )
- return false;
-
- /**
- * Filter the post formats meta boxes.
- *
- * @since 2.6.0
- *
- * @param array $meta_boxes The meta boxes being registered.
- * @return array
- */
- $meta_boxes = apply_filters( 'ot_recognized_post_format_meta_boxes', array(
- ot_meta_box_post_format_gallery(),
- ot_meta_box_post_format_link(),
- ot_meta_box_post_format_quote(),
- ot_meta_box_post_format_video(),
- ot_meta_box_post_format_audio(),
- ) );
-
- /**
- * Register our meta boxes using the
- * ot_register_meta_box() function.
- */
- foreach( $meta_boxes as $meta_box ) {
-
- ot_register_meta_box( $meta_box );
-
- }
-
- }
-
- /**
- * Setup pings for the link & quote URLs
- *
- * @param array $post_links The URLs to ping
- * @param array $pung Pinged URLs
- * @param int $post_id Post ID
- * @return array
- *
- * @access public
- * @since 2.3.0
- */
- public function pre_ping_post_links( $post_links, $pung, $post_id = null ) {
-
- $_link = get_post_meta( $post_id, '_format_link_url', true );
- if ( ! empty( $_link ) && ! in_array( $_link, $pung ) && ! in_array( $_link, $post_links ) )
- $post_links[] = $_link;
-
- $_quote = get_post_meta( $post_id, '_format_quote_source_url', true );
- if ( ! empty( $_quote ) && ! in_array( $_quote, $pung ) && ! in_array( $_quote, $post_links ) )
- $post_links[] = $_quote;
-
- }
-
- }
-
-}
-
-/**
- * Instantiate The Class
- *
- * @since 1.0
- */
-if ( function_exists( 'ot_register_meta_box' ) ) {
-
- new OT_Post_Formats();
-
-}
-
-/* End of file ot-post-formats-api.php */
-/* Location: ./includes/ot-post-formats-api.php */
\ No newline at end of file
diff --git a/option-tree/includes/ot-settings-api.php b/option-tree/includes/ot-settings-api.php
deleted file mode 100644
index db922c9..0000000
--- a/option-tree/includes/ot-settings-api.php
+++ /dev/null
@@ -1,1052 +0,0 @@
-
- * @copyright Copyright (c) 2013, Derek Herman
- */
-if ( ! class_exists( 'OT_Settings' ) ) {
-
- class OT_Settings {
-
- /* the options array */
- private $options;
-
- /* hooks for targeting admin pages */
- private $page_hook;
-
- /**
- * Constructor
- *
- * @param array An array of options
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function __construct( $args ) {
-
- $this->options = $args;
-
- /* return early if not viewing an admin page or no options */
- if ( ! is_admin() || ! is_array( $this->options ) )
- return false;
-
- /* load everything */
- $this->hooks();
-
- }
-
- /**
- * Execute the WordPress Hooks
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function hooks() {
-
- /**
- * Filter the `admin_menu` action hook priority.
- *
- * @since 2.5.0
- *
- * @param int $priority The priority. Default '10'.
- */
- $priority = apply_filters( 'ot_admin_menu_priority', 10 );
-
- /* add pages & menu items */
- add_action( 'admin_menu', array( $this, 'add_page' ), $priority );
-
- /* register sections */
- add_action( 'admin_init', array( $this, 'add_sections' ) );
-
- /* register settings */
- add_action( 'admin_init', array( $this, 'add_settings' ) );
-
- /* reset options */
- add_action( 'admin_init', array( $this, 'reset_options' ), 10 );
-
- /* initialize settings */
- add_action( 'admin_init', array( $this, 'initialize_settings' ), 11 );
-
- }
-
- /**
- * Loads each admin page
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function add_page() {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /**
- * Theme Check... stop nagging me about this kind of stuff.
- * The damn admin pages are required for OT to function, duh!
- */
- $theme_check_bs = 'add_menu_' . 'page';
- $theme_check_bs2 = 'add_submenu_' . 'page';
-
- /* load page in WP top level menu */
- if ( ! isset( $page['parent_slug'] ) || empty( $page['parent_slug'] ) ) {
- $page_hook = $theme_check_bs(
- $page['page_title'],
- $page['menu_title'],
- $page['capability'],
- $page['menu_slug'],
- array( $this, 'display_page' ),
- $page['icon_url'],
- $page['position']
- );
- /* load page in WP sub menu */
- } else {
- $page_hook = $theme_check_bs2(
- $page['parent_slug'],
- $page['page_title'],
- $page['menu_title'],
- $page['capability'],
- $page['menu_slug'],
- array( $this, 'display_page' )
- );
- }
-
- /* only load if not a hidden page */
- if ( ! isset( $page['hidden_page'] ) ) {
-
- /* associate $page_hook with page id */
- $this->page_hook[$page['id']] = $page_hook;
-
- /* add scripts */
- add_action( 'admin_print_scripts-' . $page_hook, array( $this, 'scripts' ) );
-
- /* add styles */
- add_action( 'admin_print_styles-' . $page_hook, array( $this, 'styles' ) );
-
- /* add contextual help */
- add_action( 'load-' . $page_hook, array( $this, 'help' ) );
-
- }
-
- }
-
- }
-
- return false;
- }
-
- /**
- * Loads the scripts
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function scripts() {
- ot_admin_scripts();
- }
-
- /**
- * Loads the styles
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function styles() {
- ot_admin_styles();
- }
-
- /**
- * Loads the contextual help for each page
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function help() {
- $screen = get_current_screen();
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* verify page */
- if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) {
-
- /* set up the help tabs */
- if ( ! empty( $page['contextual_help']['content'] ) ) {
- foreach( $page['contextual_help']['content'] as $contextual_help ) {
- $screen->add_help_tab(
- array(
- 'id' => esc_attr( $contextual_help['id'] ),
- 'title' => esc_attr( $contextual_help['title'] ),
- 'content' => htmlspecialchars_decode( $contextual_help['content'] ),
- )
- );
- }
- }
-
- /* set up the help sidebar */
- if ( ! empty( $page['contextual_help']['sidebar'] ) ) {
- $screen->set_help_sidebar( htmlspecialchars_decode( $page['contextual_help']['sidebar'] ) );
- }
-
- }
-
- }
-
- }
-
- return false;
- }
-
- /**
- * Loads the content for each page
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function display_page() {
- $screen = get_current_screen();
-
- /* loop through settings */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* verify page */
- if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) {
-
- $show_buttons = isset( $page['show_buttons'] ) && $page['show_buttons'] == false ? false : true;
-
- /* update active layout content */
- if ( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
-
- $layouts = get_option( ot_layouts_id() );
-
- /* has active layout */
- if ( isset( $layouts['active_layout'] ) ) {
- $option_tree = get_option( $option['id'] );
- $layouts[$layouts['active_layout']] = ot_encode( serialize( $option_tree ) );
- update_option( ot_layouts_id(), $layouts );
- }
-
- }
-
- echo '
';
-
- echo '
' . $page['page_title'] . ' ';
-
- echo ot_alert_message( $page );
-
- settings_errors( 'option-tree' );
-
- /* Header */
- echo '';
-
- /* remove forms on the custom settings pages */
- if ( $show_buttons ) {
-
- echo '
';
-
- settings_fields( $option['id'] );
-
- } else {
-
- echo '';
-
- }
-
- /* Sub Header */
- echo '';
-
- /* Navigation */
- echo '
';
-
- /* check for sections */
- if ( isset( $page['sections'] ) && count( $page['sections'] ) > 0 ) {
-
- echo '
';
-
- /* loop through page sections */
- foreach( (array) $page['sections'] as $section ) {
- echo '' . $section['title'] . ' ';
- }
-
- echo ' ';
-
- }
-
- /* sections */
- echo '
';
-
- echo '
';
-
- echo '
';
-
- $this->do_settings_sections( $_GET['page'] );
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- /* buttons */
- if ( $show_buttons ) {
-
- echo '
';
-
- echo '' . $page['button_text'] . ' ';
-
- echo '
';
-
- }
-
- echo $show_buttons ? '' : '
';
-
- /* reset button */
- if ( $show_buttons ) {
-
- echo ' ';
-
- /* form nonce */
- wp_nonce_field( 'option_tree_reset_form', 'option_tree_reset_nonce' );
-
- echo ' ';
-
- echo '' . __( 'Reset Options', 'option-tree' ) . ' ';
-
- echo ' ';
-
- }
-
- echo '
';
-
- }
-
- }
-
- }
-
- return false;
- }
-
- /**
- * Adds sections to the page
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function add_sections() {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* loop through page sections */
- foreach( (array) $this->get_sections( $page ) as $section ) {
-
- /* add each section */
- add_settings_section(
- $section['id'],
- $section['title'],
- array( $this, 'display_section' ),
- $page['menu_slug']
- );
-
- }
-
- }
-
- }
-
- return false;
- }
-
- /**
- * Callback for add_settings_section()
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function display_section() {
- /* currently pointless */
- }
-
- /**
- * Add settings the the page
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function add_settings() {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- register_setting( $option['id'], $option['id'], array ( $this, 'sanitize_callback' ) );
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* loop through page settings */
- foreach( (array) $this->get_the_settings( $page ) as $setting ) {
-
- /* skip if no setting ID */
- if ( ! isset( $setting['id'] ) )
- continue;
-
- /* add get_option param to the array */
- $setting['get_option'] = $option['id'];
-
- /* add each setting */
- add_settings_field(
- $setting['id'],
- $setting['label'],
- array( $this, 'display_setting' ),
- $page['menu_slug'],
- $setting['section'],
- $setting
- );
-
- }
-
- }
-
- }
-
- return false;
- }
-
- /**
- * Callback for add_settings_field() to build each setting by type
- *
- * @param array Setting object array
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function display_setting( $args = array() ) {
-
- extract( $args );
-
- /* get current saved data */
- $options = get_option( $get_option, false );
-
- // Set field value
- $field_value = isset( $options[$id] ) ? $options[$id] : '';
-
- /* set standard value */
- if ( isset( $std ) ) {
- $field_value = ot_filter_std_value( $field_value, $std );
- }
-
- // Allow the descriptions to be filtered before being displayed
- $desc = apply_filters( 'ot_filter_description', ( isset( $desc ) ? $desc : '' ), $id );
-
- /* build the arguments array */
- $_args = array(
- 'type' => $type,
- 'field_id' => $id,
- 'field_name' => $get_option . '[' . $id . ']',
- 'field_value' => $field_value,
- 'field_desc' => $desc,
- 'field_std' => isset( $std ) ? $std : '',
- 'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15,
- 'field_post_type' => isset( $post_type ) && ! empty( $post_type ) ? $post_type : 'post',
- 'field_taxonomy' => isset( $taxonomy ) && ! empty( $taxonomy ) ? $taxonomy : 'category',
- 'field_min_max_step'=> isset( $min_max_step ) && ! empty( $min_max_step ) ? $min_max_step : '0,100,1',
- 'field_condition' => isset( $condition ) && ! empty( $condition ) ? $condition : '',
- 'field_operator' => isset( $operator ) && ! empty( $operator ) ? $operator : 'and',
- 'field_class' => isset( $class ) ? $class : '',
- 'field_choices' => isset( $choices ) && ! empty( $choices ) ? $choices : array(),
- 'field_settings' => isset( $settings ) && ! empty( $settings ) ? $settings : array(),
- 'post_id' => ot_get_media_post_ID(),
- 'get_option' => $get_option,
- );
-
- // Limit DB queries for Google Fonts.
- if ( $type == 'google-fonts' ) {
- ot_fetch_google_fonts();
- ot_set_google_fonts( $id, $field_value );
- }
-
- /* get the option HTML */
- echo ot_display_by_type( $_args );
- }
-
- /**
- * Sets the option standards if nothing yet exists.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function initialize_settings() {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* skip if option is already set */
- if ( isset( $option['id'] ) && get_option( $option['id'], false ) ) {
- return false;
- }
-
- $defaults = array();
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* loop through page settings */
- foreach( (array) $this->get_the_settings( $page ) as $setting ) {
-
- if ( isset( $setting['std'] ) ) {
-
- $defaults[$setting['id']] = ot_validate_setting( $setting['std'], $setting['type'], $setting['id'] );
-
- }
-
- }
-
- }
-
- update_option( $option['id'], $defaults );
-
- }
-
- return false;
- }
-
- /**
- * Sanitize callback for register_setting()
- *
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function sanitize_callback( $input ) {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* loop through page settings */
- foreach( (array) $this->get_the_settings( $page ) as $setting ) {
-
- /* verify setting has a type & value */
- if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) {
-
- /* get the defaults */
- $current_settings = get_option( ot_settings_id() );
- $current_options = get_option( $option['id'] );
-
- /* validate setting */
- if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
-
- /* required title setting */
- $required_setting = array(
- array(
- 'id' => 'title',
- 'label' => __( 'Title', 'option-tree' ),
- 'desc' => '',
- 'std' => '',
- 'type' => 'text',
- 'rows' => '',
- 'class' => 'option-tree-setting-title',
- 'post_type' => '',
- 'choices' => array()
- )
- );
-
- /* get the settings array */
- $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array();
-
- /* settings are empty for some odd ass reason get the defaults */
- if ( empty( $settings ) ) {
- $settings = 'slider' == $setting['type'] ?
- ot_slider_settings( $setting['id'] ) :
- ot_list_item_settings( $setting['id'] );
- }
-
- /* merge the two settings array */
- $settings = array_merge( $required_setting, $settings );
-
- /* create an empty WPML id array */
- $wpml_ids = array();
-
- foreach( $input[$setting['id']] as $k => $setting_array ) {
-
- foreach( $settings as $sub_setting ) {
-
- /* setup the WPML ID */
- $wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k;
-
- /* add id to array */
- $wpml_ids[] = $wpml_id;
-
- /* verify sub setting has a type & value */
- if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) {
-
- /* validate setting */
- $input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id );
-
- }
-
- }
-
- }
-
- } else if ( is_array( $input[$setting['id']] ) && $setting['type'] == 'social-links' ) {
-
- /* get the settings array */
- $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array();
-
- /* settings are empty get the defaults */
- if ( empty( $settings ) ) {
- $settings = ot_social_links_settings( $setting['id'] );
- }
-
- /* create an empty WPML id array */
- $wpml_ids = array();
-
- foreach( $input[$setting['id']] as $k => $setting_array ) {
-
- foreach( $settings as $sub_setting ) {
-
- /* setup the WPML ID */
- $wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k;
-
- /* add id to array */
- $wpml_ids[] = $wpml_id;
-
- /* verify sub setting has a type & value */
- if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) {
-
- /* validate setting */
- $input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id );
-
- }
-
- }
-
- }
-
- } else {
-
- $input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'], $setting['id'] );
-
- }
-
- }
-
- /* unregister WPML strings that were deleted from lists and sliders */
- if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
-
- if ( ! isset( $wpml_ids ) )
- $wpml_ids = array();
-
- foreach( $current_settings['settings'] as $check_setting ) {
-
- if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) {
-
- foreach( $current_options[$setting['id']] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- $id = $setting['id'] . '_' . $ckey . '_' . $key;
-
- if ( ! in_array( $id, $wpml_ids ) ) {
-
- ot_wpml_unregister_string( $id );
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- /* unregister WPML strings that were deleted from social links */
- if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && $setting['type'] == 'social-links' ) {
-
- if ( ! isset( $wpml_ids ) )
- $wpml_ids = array();
-
- foreach( $current_settings['settings'] as $check_setting ) {
-
- if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) {
-
- foreach( $current_options[$setting['id']] as $key => $value ) {
-
- foreach( $value as $ckey => $cvalue ) {
-
- $id = $setting['id'] . '_' . $ckey . '_' . $key;
-
- if ( ! in_array( $id, $wpml_ids ) ) {
-
- ot_wpml_unregister_string( $id );
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- return $input;
-
- }
-
- /**
- * Helper function to get the pages array for an option
- *
- * @param array Option array
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
- public function get_pages( $option = array() ) {
-
- if ( empty( $option ) )
- return false;
-
- /* check for pages */
- if ( isset( $option['pages'] ) && ! empty( $option['pages'] ) ) {
-
- /* return pages array */
- return $option['pages'];
-
- }
-
- return false;
- }
-
- /**
- * Helper function to get the sections array for a page
- *
- * @param array Page array
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
- public function get_sections( $page = array() ) {
-
- if ( empty( $page ) )
- return false;
-
- /* check for sections */
- if ( isset( $page['sections'] ) && ! empty( $page['sections'] ) ) {
-
- /* return sections array */
- return $page['sections'];
-
- }
-
- return false;
- }
-
- /**
- * Helper function to get the settings array for a page
- *
- * @param array Page array
- * @return mixed
- *
- * @access public
- * @since 2.0
- */
- public function get_the_settings( $page = array() ) {
-
- if ( empty( $page ) )
- return false;
-
- /* check for settings */
- if ( isset( $page['settings'] ) && ! empty( $page['settings'] ) ) {
-
- /* return settings array */
- return $page['settings'];
-
- }
-
- return false;
- }
-
- /**
- * Prints out all settings sections added to a particular settings page
- *
- * @global $wp_settings_sections Storage array of all settings sections added to admin pages
- * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
- *
- * @param string The slug name of the page whos settings sections you want to output
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function do_settings_sections( $page ) {
- global $wp_settings_sections, $wp_settings_fields;
-
- if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[$page] ) ) {
- return false;
- }
-
- foreach ( (array) $wp_settings_sections[$page] as $section ) {
-
- if ( ! isset( $section['id'] ) )
- continue;
-
- $section_id = $section['id'];
-
- echo '
';
-
- call_user_func( $section['callback'], $section );
-
- if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[$page] ) || ! isset( $wp_settings_fields[$page][$section_id] ) )
- continue;
-
- echo '
';
-
- /**
- * Hook to insert arbitrary markup before the `do_settings_fields` method.
- *
- * @since 2.6.0
- *
- * @param string $page The page slug.
- * @param string $section_id The section ID.
- */
- do_action( 'ot_do_settings_fields_before', $page, $section_id );
-
- $this->do_settings_fields( $page, $section_id );
-
- /**
- * Hook to insert arbitrary markup after the `do_settings_fields` method.
- *
- * @since 2.6.0
- *
- * @param string $page The page slug.
- * @param string $section_id The section ID.
- */
- do_action( 'ot_do_settings_fields_after', $page, $section_id );
-
- echo '
';
-
- echo '
';
-
- }
-
- }
-
- /**
- * Print out the settings fields for a particular settings section
- *
- * @global $wp_settings_fields Storage array of settings fields and their pages/sections
- *
- * @param string $page Slug title of the admin page who's settings fields you want to show.
- * @param string $section Slug title of the settings section who's fields you want to show.
- * @return string
- *
- * @access public
- * @since 2.0
- */
- public function do_settings_fields( $page, $section ) {
- global $wp_settings_fields;
-
- if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) )
- return;
-
- foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
-
- $conditions = '';
-
- if ( isset( $field['args']['condition'] ) && ! empty( $field['args']['condition'] ) ) {
-
- $conditions = ' data-condition="' . $field['args']['condition'] . '"';
- $conditions.= isset( $field['args']['operator'] ) && in_array( $field['args']['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['args']['operator'] . '"' : '';
-
- }
-
- // Build the setting CSS class
- if ( isset( $field['args']['class'] ) && ! empty( $field['args']['class'] ) ) {
-
- $classes = explode( ' ', $field['args']['class'] );
-
- foreach( $classes as $key => $value ) {
-
- $classes[$key] = $value . '-wrap';
-
- }
-
- $class = 'format-settings ' . implode( ' ', $classes );
-
- } else {
-
- $class = 'format-settings';
-
- }
-
- echo '
';
-
- echo '
';
-
- echo '
';
-
- }
-
- }
-
- /**
- * Resets page options before the screen is displayed
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function reset_options() {
-
- /* check for reset action */
- if ( isset( $_POST['option_tree_reset_nonce'] ) && wp_verify_nonce( $_POST['option_tree_reset_nonce'], 'option_tree_reset_form' ) ) {
-
- /* loop through options */
- foreach( (array) $this->options as $option ) {
-
- /* loop through pages */
- foreach( (array) $this->get_pages( $option ) as $page ) {
-
- /* verify page */
- if ( isset( $_GET['page'] ) && $_GET['page'] == $page['menu_slug'] ) {
-
- /* reset options */
- delete_option( $option['id'] );
-
- }
-
- }
-
- }
-
- }
-
- return false;
-
- }
-
- }
-
-}
-
-/**
- * This method instantiates the settings class & builds the UI.
- *
- * @uses OT_Settings()
- *
- * @param array Array of arguments to create settings
- * @return void
- *
- * @access public
- * @since 2.0
- */
-if ( ! function_exists( 'ot_register_settings' ) ) {
-
- function ot_register_settings( $args ) {
- if ( ! $args )
- return;
-
- $ot_settings = new OT_Settings( $args );
- }
-
-}
-
-/* End of file ot-settings-api.php */
-/* Location: ./includes/ot-settings-api.php */
\ No newline at end of file
diff --git a/option-tree/languages/option-tree-et.mo b/option-tree/languages/option-tree-et.mo
deleted file mode 100644
index e8742be..0000000
Binary files a/option-tree/languages/option-tree-et.mo and /dev/null differ
diff --git a/option-tree/languages/option-tree-et.po b/option-tree/languages/option-tree-et.po
deleted file mode 100644
index b6b1c46..0000000
--- a/option-tree/languages/option-tree-et.po
+++ /dev/null
@@ -1,3021 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: OptionTree\n"
-"POT-Creation-Date: 2016-01-31 23:24-0800\n"
-"PO-Revision-Date: 2016-01-31 23:24-0800\n"
-"Last-Translator: Derek Herman
\n"
-"Language-Team: Valen Designs\n"
-"Language: et_EE\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.7.6\n"
-"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
-"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
-"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
-"X-Poedit-Basepath: .\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Poedit-SearchPath-0: ..\n"
-"X-Poedit-SearchPathExcluded-0: ../.git\n"
-"X-Poedit-SearchPathExcluded-1: ../composer.json\n"
-"X-Poedit-SearchPathExcluded-2: ../assets\n"
-
-#: ../includes/ot-cleanup-api.php:84 ../includes/ot-cleanup-api.php:101
-#: ../includes/ot-cleanup-api.php:130
-msgid "OptionTree Cleanup"
-msgstr "OptionTree puhastus"
-
-#: ../includes/ot-cleanup-api.php:101
-#, php-format
-msgid ""
-"OptionTree has outdated data that should be removed. Please go to %s for "
-"more information."
-msgstr ""
-"OptionTreel on aegunud andmeid, mis tuleks eemaldada. Lisainformatsiooni "
-"saamiseks mine palun %s."
-
-#: ../includes/ot-cleanup-api.php:136
-msgid "Multiple Media Posts"
-msgstr "Mitme meediaga postitused"
-
-#: ../includes/ot-cleanup-api.php:138
-#, php-format
-msgid ""
-"There are currently %s OptionTree media posts in your database. At some "
-"point in the past, a version of OptionTree added multiple %s media post "
-"objects cluttering up your %s table. There is no associated risk or harm "
-"that these posts have caused other than to add size to your overall "
-"database. Thankfully, there is a way to remove all these orphaned media "
-"posts and get your database cleaned up."
-msgstr ""
-"Sul on hetkel %s OptionTree meedia postitust andmebaasis. Millalgi varem "
-"lisas OptionTree mitu %s meedia postitust, risustades %s tabelit. Nende "
-"postitustega ei kaasne mingeid riske või kahju peale selle, et andmebaasi "
-"maht on suurem. Õnneks on nende orbudeks jäänud postituste eemaldamiseks "
-"moodus olemas, nii et saab andmebaasi jälle puhtaks."
-
-#: ../includes/ot-cleanup-api.php:140
-#, php-format
-msgid ""
-"By clicking the button below, OptionTree will delete %s records and "
-"consolidate them into one single OptionTree media post for uploading "
-"attachments to. Additionally, the attachments will have their parent ID "
-"updated to the correct media post."
-msgstr ""
-"Vajutades allolevat nuppu, kustutab OptionTree %s kirjet ning ühendab nad "
-"ainsasse OptionTree meedia postitusse, kuhu manuseid üles laaditakse. Lisaks "
-"määratakse nende manuste vanema ID-le õige väärtus."
-
-#: ../includes/ot-cleanup-api.php:142
-msgid ""
-"This could take a while to fully process depending on how many records you "
-"have in your database, so please be patient and wait for the script to "
-"finish."
-msgstr ""
-"See protsess võtab aega sõltuvalt andmebaasis olevate kirjete arvust, seega "
-"palun olge kannatlikud ja laske skriptil oma töö lõpetada."
-
-#: ../includes/ot-cleanup-api.php:144
-#, php-format
-msgid ""
-"%s Your server is running in safe mode. Which means this page will "
-"automatically reload after deleting %s posts, you can filter this number "
-"using %s if your server is having trouble processing that many at one time."
-msgstr ""
-"%s Sinu server töötab turvarežiimis, mistõttu see lehekülg laetakse peale %s "
-"postituse kustutamist uuesti. Kui serveril on nii korraga nii mitme "
-"postituse töötlemisega probleeme, siis on seda numbrit võimalik %s filtriga "
-"muuta."
-
-#: ../includes/ot-cleanup-api.php:146
-msgid "Consolidate Posts"
-msgstr "Konsolideeri postitused"
-
-#: ../includes/ot-cleanup-api.php:174
-msgid "Reloading..."
-msgstr "Värskendame..."
-
-#: ../includes/ot-cleanup-api.php:210
-msgid "Clean up script has completed, the page will now reload..."
-msgstr "Puhastusskript on töö lõpetanud, leht laeb end kohe uuesti..."
-
-#: ../includes/ot-cleanup-api.php:230
-msgid "Outdated Table"
-msgstr "Aegunud tabel"
-
-#: ../includes/ot-cleanup-api.php:232
-#, php-format
-msgid ""
-"If you have upgraded from an old 1.x version of OptionTree at some point, "
-"you have an extra %s table in your database that can be removed. It's not "
-"hurting anything, but does not need to be there. If you want to remove it. "
-"Click the button below."
-msgstr ""
-"Kui oled millalgi OptionTreed uuendanud vanalt 1.x versioonilt, on sul "
-"andmebaasis üleliigne tabel %s, mille saaks eemaldada. See ei tee midagi "
-"halba ning ei pea seal olema. Eemaldamiseks vajuta allolevat nuppu."
-
-#: ../includes/ot-cleanup-api.php:234
-msgid "Drop Table"
-msgstr "Eemalda tabel"
-
-#: ../includes/ot-cleanup-api.php:238
-#, php-format
-msgid "Deleting the outdated and unused %s table..."
-msgstr "Kustutan aegunud ja kasutamata tabeli %s..."
-
-#: ../includes/ot-cleanup-api.php:244
-#, php-format
-msgid "The %s table has been successfully deleted. The page will now reload..."
-msgstr "Tabel %s kustutatu edukalt. Leht laetakse kohe uuesti..."
-
-#: ../includes/ot-cleanup-api.php:256
-#, php-format
-msgid "Something went wrong. The %s table was not deleted."
-msgstr "Midagi läks valesti. Tabelit %s ei kustutatud."
-
-#: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51
-#: ../includes/ot-functions-admin.php:169
-#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:388
-msgid "Theme Options"
-msgstr "Teema seaded"
-
-#: ../includes/ot-functions-admin.php:56
-#: ../includes/ot-functions-admin.php:126
-#: ../includes/ot-functions-admin.php:220
-msgid "Theme Options updated."
-msgstr "Teema seaded on uuendatud."
-
-#: ../includes/ot-functions-admin.php:57
-#: ../includes/ot-functions-admin.php:127
-#: ../includes/ot-functions-admin.php:221
-msgid "Theme Options reset."
-msgstr "Teema valikute algseadistamine."
-
-#: ../includes/ot-functions-admin.php:58
-#: ../includes/ot-functions-settings-page.php:94
-#: ../includes/ot-functions-settings-page.php:133
-msgid "Save Changes"
-msgstr "Salvesta muudatused"
-
-#: ../includes/ot-functions-admin.php:97
-msgid ""
-"The Theme Options UI Builder is being overridden by a custom file in your "
-"theme. Any changes you make via the UI Builder will not be saved."
-msgstr ""
-"Teema kaustas on kohandatud fail, mistõttu Teema Valikute ehitaja "
-"kasutajaliideses tehtud muudatused ei salvestu."
-
-#: ../includes/ot-functions-admin.php:109
-#: ../includes/ot-functions-admin.php:110
-#: ../includes/ot-functions-docs-page.php:821
-msgid "OptionTree"
-msgstr "OptionTree"
-
-#: ../includes/ot-functions-admin.php:120
-#: ../includes/ot-functions-admin.php:121
-#: ../includes/ot-functions-admin.php:163
-#: ../includes/ot-functions-admin.php:187
-#: ../includes/ot-functions-docs-page.php:49
-msgid "Settings"
-msgstr "Seaded"
-
-#: ../includes/ot-functions-admin.php:128
-#: ../includes/ot-functions-admin.php:222
-msgid "Save Settings"
-msgstr "Salvesta seaded"
-
-#: ../includes/ot-functions-admin.php:133
-msgid "Theme Options UI"
-msgstr "Teema valikute kasutajaliides"
-
-#: ../includes/ot-functions-admin.php:137
-msgid "Import"
-msgstr "Impordi"
-
-#: ../includes/ot-functions-admin.php:141
-msgid "Export"
-msgstr "Ekspordi"
-
-#: ../includes/ot-functions-admin.php:145
-#: ../includes/ot-functions-admin.php:175
-#: ../includes/ot-functions-admin.php:199
-msgid "Layouts"
-msgstr "Paigutused"
-
-#: ../includes/ot-functions-admin.php:151
-msgid "Theme Options UI Builder"
-msgstr "Teema valikute kasutajaliidese ehitaja"
-
-#: ../includes/ot-functions-admin.php:157
-msgid "Settings XML"
-msgstr "Seadete XML"
-
-#: ../includes/ot-functions-admin.php:181
-msgid "Settings PHP File"
-msgstr "Seadete PHP fail"
-
-#: ../includes/ot-functions-admin.php:205
-msgid "Layout Management"
-msgstr "Paigutuste haldus"
-
-#: ../includes/ot-functions-admin.php:214
-#: ../includes/ot-functions-admin.php:215
-msgid "Documentation"
-msgstr "Dokumentatsioon"
-
-#: ../includes/ot-functions-admin.php:227
-msgid "Creating Options"
-msgstr "Seadete loomine"
-
-#: ../includes/ot-functions-admin.php:231
-msgid "Option Types"
-msgstr "Valikute tüübid"
-
-#: ../includes/ot-functions-admin.php:235
-msgid "Function References"
-msgstr "Funktsioonide ülevaade"
-
-#: ../includes/ot-functions-admin.php:239
-#: ../includes/ot-functions-admin.php:281
-#: ../includes/ot-functions-settings-page.php:366
-msgid "Theme Mode"
-msgstr "Teema režiim"
-
-#: ../includes/ot-functions-admin.php:243
-#: ../includes/ot-functions-admin.php:287
-msgid "Meta Boxes"
-msgstr "Meta kastid"
-
-#: ../includes/ot-functions-admin.php:247
-msgid "Code Examples"
-msgstr "Koodinäited"
-
-#: ../includes/ot-functions-admin.php:251
-msgid "Layouts Overview"
-msgstr "Paigutuste ülevaade"
-
-#: ../includes/ot-functions-admin.php:257
-msgid "Overview of available Theme Option fields."
-msgstr "Võimalike teema valikute väljade ülevaade."
-
-#: ../includes/ot-functions-admin.php:263
-msgid "Option types in alphabetical order & hooks to filter them."
-msgstr ""
-"Valikutüübid tähestikulises järjekorras ja konksud nende filtreerimiseks."
-
-#: ../includes/ot-functions-admin.php:269
-msgid "Function Reference:ot_get_option()"
-msgstr "Funktsiooni ülevaade:ot_get_option()"
-
-#: ../includes/ot-functions-admin.php:275
-msgid "Function Reference:get_option_tree()"
-msgstr "Funktsiooni ülevaade:get_option_tree()"
-
-#: ../includes/ot-functions-admin.php:293
-msgid "Code examples for front-end development."
-msgstr "Koodinäited veebilehe välise poole arenduseks."
-
-#: ../includes/ot-functions-admin.php:299
-msgid "What's a layout anyhow?"
-msgstr "Mis siis ikkagi on paigutus?"
-
-#: ../includes/ot-functions-admin.php:502
-#: ../includes/ot-functions-admin.php:604
-#: ../includes/ot-functions-admin.php:673
-#, php-format
-msgid "The %s input field for %s only allows numeric values."
-msgstr "%s sisendväli %s jaoks lubab vaid numbrilisi väärtusi."
-
-#: ../includes/ot-functions-admin.php:563
-#, php-format
-msgid "The %s Colorpicker only allows valid hexadecimal or rgba values."
-msgstr "%s värvi valija lubab väärtuseid vaid kuueteistkümnendiksüsteemis."
-
-#: ../includes/ot-functions-admin.php:847
-#: ../includes/ot-functions-docs-page.php:398
-#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:785
-msgid "Send to OptionTree"
-msgstr "Saada OptionTree-le"
-
-#: ../includes/ot-functions-admin.php:848
-#: ../includes/ot-functions-option-types.php:257
-#: ../includes/ot-functions-option-types.php:3218
-msgid "Remove Media"
-msgstr "Eemalda meedia"
-
-#: ../includes/ot-functions-admin.php:849
-msgid "Are you sure you want to reset back to the defaults?"
-msgstr "Kas olete kindel, et soovite taastada algseaded?"
-
-#: ../includes/ot-functions-admin.php:850
-msgid "You can't remove this! But you can edit the values."
-msgstr "Te ei saa seda eemaldada! Väärtuste muutmine on lubatud."
-
-#: ../includes/ot-functions-admin.php:851
-msgid "Are you sure you want to remove this?"
-msgstr "Kas olete kindel, et soovite seda eemaldada?"
-
-#: ../includes/ot-functions-admin.php:852
-msgid "Are you sure you want to activate this layout?"
-msgstr "Kas olete kindel, et soovite seda paigutust aktiveerida?"
-
-#: ../includes/ot-functions-admin.php:853
-msgid "Sorry, you can't have settings three levels deep."
-msgstr "Kahjuks ei saa sätteid määrata kolmanda taseme sügavusega."
-
-#: ../includes/ot-functions-admin.php:854
-#: ../includes/ot-functions-option-types.php:1159
-msgid "Delete Gallery"
-msgstr "Kustuta galerii"
-
-#: ../includes/ot-functions-admin.php:855
-#: ../includes/ot-functions-option-types.php:1160
-msgid "Edit Gallery"
-msgstr "Muuda galeriid"
-
-#: ../includes/ot-functions-admin.php:856
-#: ../includes/ot-functions-option-types.php:1167
-msgid "Create Gallery"
-msgstr "Loo galerii"
-
-#: ../includes/ot-functions-admin.php:857
-msgid "Are you sure you want to delete this Gallery?"
-msgstr "Kas olete kindel, et soovite seda galeriid kustutada?"
-
-#: ../includes/ot-functions-admin.php:858
-msgid "Today"
-msgstr "Täna"
-
-#: ../includes/ot-functions-admin.php:859
-msgid "Now"
-msgstr "Praegu"
-
-#: ../includes/ot-functions-admin.php:860
-msgid "Close"
-msgstr "Sulge"
-
-#: ../includes/ot-functions-admin.php:861
-msgid "Featured Image"
-msgstr "Tunuuspilt"
-
-#: ../includes/ot-functions-admin.php:862
-#: ../includes/ot-functions-admin.php:3251
-#: ../includes/ot-functions-admin.php:3312
-msgid "Image"
-msgstr "Pilt"
-
-#: ../includes/ot-functions-admin.php:930
-msgid "Option Tree"
-msgstr "Option Tree"
-
-#: ../includes/ot-functions-admin.php:1068
-msgid "General"
-msgstr "Üldseaded"
-
-#: ../includes/ot-functions-admin.php:1074
-msgid "Sample Text Field Label"
-msgstr "Tekstisisendi nimetuse näide"
-
-#: ../includes/ot-functions-admin.php:1075
-msgid "Description for the sample text field."
-msgstr "Tekstisisendi kirjelduse näide"
-
-#: ../includes/ot-functions-admin.php:2317
-msgid "Settings updated."
-msgstr "Seaded on uuendatud."
-
-#: ../includes/ot-functions-admin.php:2321
-msgid "Settings could not be saved."
-msgstr "Seadeid ei suudetud uuendada."
-
-#: ../includes/ot-functions-admin.php:2329
-msgid "Settings Imported."
-msgstr "Seaded on imporditud."
-
-#: ../includes/ot-functions-admin.php:2333
-msgid "Settings could not be imported."
-msgstr "Seadeid ei suudetud importida."
-
-#: ../includes/ot-functions-admin.php:2340
-msgid "Data Imported."
-msgstr "Andmed on imporditud."
-
-#: ../includes/ot-functions-admin.php:2344
-msgid "Data could not be imported."
-msgstr "Andmeid ei suudetud importida."
-
-#: ../includes/ot-functions-admin.php:2352
-msgid "Layouts Imported."
-msgstr "Paigutused on imporditud."
-
-#: ../includes/ot-functions-admin.php:2356
-msgid "Layouts could not be imported."
-msgstr "Paigutusi ei suudetud importida."
-
-#: ../includes/ot-functions-admin.php:2364
-msgid "Layouts Updated."
-msgstr "Paigutused on uuendatud."
-
-#: ../includes/ot-functions-admin.php:2368
-msgid "Layouts could not be updated."
-msgstr "Paigutusi ei suudetud uuendada."
-
-#: ../includes/ot-functions-admin.php:2372
-msgid "Layouts have been deleted."
-msgstr "Paigutused on kustutatud."
-
-#: ../includes/ot-functions-admin.php:2378
-msgid "Layout activated."
-msgstr "Paigutus on aktiveeritud."
-
-#: ../includes/ot-functions-admin.php:2417
-#: ../includes/ot-functions-docs-page.php:110
-msgid "Background"
-msgstr "Taust"
-
-#: ../includes/ot-functions-admin.php:2418
-#: ../includes/ot-functions-docs-page.php:113
-msgid "Border"
-msgstr "Ääris"
-
-#: ../includes/ot-functions-admin.php:2419
-#: ../includes/ot-functions-docs-page.php:116
-msgid "Box Shadow"
-msgstr "Kasti vari"
-
-#: ../includes/ot-functions-admin.php:2420
-#: ../includes/ot-functions-docs-page.php:119
-msgid "Category Checkbox"
-msgstr "Kategooriate valikkastid"
-
-#: ../includes/ot-functions-admin.php:2421
-#: ../includes/ot-functions-docs-page.php:122
-msgid "Category Select"
-msgstr "Kategooria rippvalik"
-
-#: ../includes/ot-functions-admin.php:2422
-#: ../includes/ot-functions-docs-page.php:125
-msgid "Checkbox"
-msgstr "Valikkastid"
-
-#: ../includes/ot-functions-admin.php:2423
-#: ../includes/ot-functions-docs-page.php:128
-msgid "Colorpicker"
-msgstr "Värvivalik"
-
-#: ../includes/ot-functions-admin.php:2424
-#: ../includes/ot-functions-docs-page.php:131
-msgid "Colorpicker Opacity"
-msgstr "Värvivalija läbipaistmatus"
-
-#: ../includes/ot-functions-admin.php:2425
-#: ../includes/ot-functions-docs-page.php:134
-msgid "CSS"
-msgstr "CSS"
-
-#: ../includes/ot-functions-admin.php:2426
-#: ../includes/ot-functions-docs-page.php:153
-msgid "Custom Post Type Checkbox"
-msgstr "Enda loodud postitüübi valikkastid"
-
-#: ../includes/ot-functions-admin.php:2427
-#: ../includes/ot-functions-docs-page.php:156
-msgid "Custom Post Type Select"
-msgstr "Enda loodud postitüübi rippvalik"
-
-#: ../includes/ot-functions-admin.php:2428
-#: ../includes/ot-functions-docs-page.php:159
-msgid "Date Picker"
-msgstr "Kuupäev valija"
-
-#: ../includes/ot-functions-admin.php:2429
-#: ../includes/ot-functions-docs-page.php:162
-msgid "Date Time Picker"
-msgstr "Kuupäeva ja kellaaja valija"
-
-#: ../includes/ot-functions-admin.php:2430
-#: ../includes/ot-functions-docs-page.php:165
-msgid "Dimension"
-msgstr "Mõõtmed"
-
-#: ../includes/ot-functions-admin.php:2431
-#: ../includes/ot-functions-admin.php:5466
-#: ../includes/ot-functions-docs-page.php:168
-msgid "Gallery"
-msgstr "Galerii"
-
-#: ../includes/ot-functions-admin.php:2432
-#: ../includes/ot-functions-docs-page.php:171
-msgid "Google Fonts"
-msgstr "Google Fondid"
-
-#: ../includes/ot-functions-admin.php:2433
-#: ../includes/ot-functions-docs-page.php:174
-msgid "JavaScript"
-msgstr "JavaScript"
-
-#: ../includes/ot-functions-admin.php:2434
-#: ../includes/ot-functions-docs-page.php:177
-msgid "Link Color"
-msgstr "Lingi värv"
-
-#: ../includes/ot-functions-admin.php:2435
-#: ../includes/ot-functions-docs-page.php:180
-msgid "List Item"
-msgstr "Nimekirja element"
-
-#: ../includes/ot-functions-admin.php:2436
-#: ../includes/ot-functions-docs-page.php:183
-msgid "Measurement"
-msgstr "Mõõt"
-
-#: ../includes/ot-functions-admin.php:2437
-#: ../includes/ot-functions-docs-page.php:214
-msgid "Numeric Slider"
-msgstr "Numbriskaala"
-
-#: ../includes/ot-functions-admin.php:2438
-#: ../includes/ot-functions-docs-page.php:217
-msgid "On/Off"
-msgstr "Sees/väljas"
-
-#: ../includes/ot-functions-admin.php:2439
-#: ../includes/ot-functions-docs-page.php:220
-msgid "Page Checkbox"
-msgstr "Lehekülgede valikkastid"
-
-#: ../includes/ot-functions-admin.php:2440
-#: ../includes/ot-functions-docs-page.php:223
-msgid "Page Select"
-msgstr "Lehekülje rippvalik"
-
-#: ../includes/ot-functions-admin.php:2441
-#: ../includes/ot-functions-docs-page.php:226
-msgid "Post Checkbox"
-msgstr "Postituste valikkastid"
-
-#: ../includes/ot-functions-admin.php:2442
-#: ../includes/ot-functions-docs-page.php:229
-msgid "Post Select"
-msgstr "Postituse rippvalik"
-
-#: ../includes/ot-functions-admin.php:2443
-#: ../includes/ot-functions-docs-page.php:232
-msgid "Radio"
-msgstr "Raadiokastid"
-
-#: ../includes/ot-functions-admin.php:2444
-#: ../includes/ot-functions-docs-page.php:235
-msgid "Radio Image"
-msgstr "Pildiga raadiokastid"
-
-#: ../includes/ot-functions-admin.php:2445
-#: ../includes/ot-functions-docs-page.php:262
-msgid "Select"
-msgstr "Rippvalik"
-
-#: ../includes/ot-functions-admin.php:2446
-#: ../includes/ot-functions-docs-page.php:265
-msgid "Sidebar Select"
-msgstr "Küljeriba rippvalik"
-
-#: ../includes/ot-functions-admin.php:2447
-#: ../includes/ot-functions-docs-page.php:269
-msgid "Slider"
-msgstr "Slaidiesitaja"
-
-#: ../includes/ot-functions-admin.php:2448
-#: ../includes/ot-functions-docs-page.php:272
-msgid "Social Links"
-msgstr "Sotsiaalmeedia"
-
-#: ../includes/ot-functions-admin.php:2449
-#: ../includes/ot-functions-docs-page.php:275
-msgid "Spacing"
-msgstr "Vahed"
-
-#: ../includes/ot-functions-admin.php:2450
-#: ../includes/ot-functions-docs-page.php:278
-msgid "Tab"
-msgstr "Sakk"
-
-#: ../includes/ot-functions-admin.php:2451
-#: ../includes/ot-functions-docs-page.php:281
-msgid "Tag Checkbox"
-msgstr "Sildi valikkastid"
-
-#: ../includes/ot-functions-admin.php:2452
-#: ../includes/ot-functions-docs-page.php:284
-msgid "Tag Select"
-msgstr "Sildi rippvalik"
-
-#: ../includes/ot-functions-admin.php:2453
-#: ../includes/ot-functions-docs-page.php:287
-msgid "Taxonomy Checkbox"
-msgstr "Taksonoomia valikkastid"
-
-#: ../includes/ot-functions-admin.php:2454
-#: ../includes/ot-functions-docs-page.php:290
-msgid "Taxonomy Select"
-msgstr "Taksonoomia rippvalik"
-
-#: ../includes/ot-functions-admin.php:2455
-#: ../includes/ot-functions-docs-page.php:293
-msgid "Text"
-msgstr "Tekstisisend"
-
-#: ../includes/ot-functions-admin.php:2456
-#: ../includes/ot-functions-docs-page.php:296
-msgid "Textarea"
-msgstr "Tekstiväli"
-
-#: ../includes/ot-functions-admin.php:2457
-#: ../includes/ot-functions-docs-page.php:355
-msgid "Textarea Simple"
-msgstr "Lihtne tekstiväli"
-
-#: ../includes/ot-functions-admin.php:2458
-#: ../includes/ot-functions-docs-page.php:371
-msgid "Textblock"
-msgstr "Tekstiblokk"
-
-#: ../includes/ot-functions-admin.php:2459
-#: ../includes/ot-functions-docs-page.php:374
-msgid "Textblock Titled"
-msgstr "Pealkirjaga tekstiblokk"
-
-#: ../includes/ot-functions-admin.php:2460
-#: ../includes/ot-functions-docs-page.php:377
-msgid "Typography"
-msgstr "Tüpograafia"
-
-#: ../includes/ot-functions-admin.php:2461
-#: ../includes/ot-functions-docs-page.php:397
-msgid "Upload"
-msgstr "Lae üles"
-
-#: ../includes/ot-functions-admin.php:3196
-msgid "Left Sidebar"
-msgstr "Vasak küljendusmenüü"
-
-#: ../includes/ot-functions-admin.php:3201
-msgid "Right Sidebar"
-msgstr "Parem küljendusmenüü"
-
-#: ../includes/ot-functions-admin.php:3206
-msgid "Full Width (no sidebar)"
-msgstr "Täies pikkuses (ilma küljendusmenüüta)"
-
-#: ../includes/ot-functions-admin.php:3211
-msgid "Dual Sidebar"
-msgstr "Topelt küljendusmenüü"
-
-#: ../includes/ot-functions-admin.php:3216
-msgid "Left Dual Sidebar"
-msgstr "Kaks küljendusmenüüd vasakul"
-
-#: ../includes/ot-functions-admin.php:3221
-msgid "Right Dual Sidebar"
-msgstr "Kaks küljendusmenüüd paremal"
-
-#: ../includes/ot-functions-admin.php:3262
-#: ../includes/ot-functions-admin.php:3318
-#: ../includes/ot-functions-admin.php:5506
-msgid "Link"
-msgstr "Viide"
-
-#: ../includes/ot-functions-admin.php:3273
-#: ../includes/ot-functions-admin.php:3324
-#: ../includes/ot-functions-docs-page.php:43
-#: ../includes/ot-functions-docs-page.php:428
-#: ../includes/ot-functions-docs-page.php:478
-msgid "Description"
-msgstr "Kirjeldus"
-
-#: ../includes/ot-functions-admin.php:3388
-msgid "Name"
-msgstr "Nimetus"
-
-#: ../includes/ot-functions-admin.php:3389
-msgid "Enter the name of the social website."
-msgstr "Sisesta sotsiaalmeedia veebilehe nimi."
-
-#: ../includes/ot-functions-admin.php:3397
-msgid "Enter the text shown in the title attribute of the link."
-msgstr "Sisesta tekst, mida näidatakse lingi pealkirja atribuudis."
-
-#: ../includes/ot-functions-admin.php:3403
-#, php-format
-msgid ""
-"Enter a link to the profile or page on the social website. Remember to add "
-"the %s part to the front of the link."
-msgstr ""
-"Sisesta link profiilile või lehele sellel sotsiaalmeedia veebilehel. Ära "
-"unusta lisada lingi ette %s osa."
-
-#: ../includes/ot-functions-admin.php:3756
-#, php-format
-msgid "Unable to write to file %s."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4026
-msgid "edit"
-msgstr "muuda"
-
-#: ../includes/ot-functions-admin.php:4027
-#: ../includes/ot-functions-admin.php:4095
-#: ../includes/ot-functions-admin.php:4096
-#: ../includes/ot-functions-admin.php:4258
-#: ../includes/ot-functions-admin.php:4259
-#: ../includes/ot-functions-admin.php:4324
-#: ../includes/ot-functions-admin.php:4325
-#: ../includes/ot-functions-admin.php:4452
-#: ../includes/ot-functions-admin.php:4453
-#: ../includes/ot-functions-admin.php:4605
-#: ../includes/ot-functions-admin.php:4606
-msgid "Edit"
-msgstr "Muuda"
-
-#: ../includes/ot-functions-admin.php:4029
-#: ../includes/ot-functions-admin.php:4030
-#: ../includes/ot-functions-admin.php:4098
-#: ../includes/ot-functions-admin.php:4099
-#: ../includes/ot-functions-admin.php:4261
-#: ../includes/ot-functions-admin.php:4262
-#: ../includes/ot-functions-admin.php:4327
-#: ../includes/ot-functions-admin.php:4328
-#: ../includes/ot-functions-admin.php:4386
-#: ../includes/ot-functions-admin.php:4387
-#: ../includes/ot-functions-admin.php:4455
-#: ../includes/ot-functions-admin.php:4456
-#: ../includes/ot-functions-admin.php:4608
-#: ../includes/ot-functions-admin.php:4609
-msgid "Delete"
-msgstr "Kustuta"
-
-#: ../includes/ot-functions-admin.php:4036
-msgid ""
-"Section Title : Displayed as a menu item on the Theme "
-"Options page."
-msgstr ""
-"Sektsiooni pealkiri : Näidatakse menüü elemendina teema "
-"valikute lehel."
-
-#: ../includes/ot-functions-admin.php:4044
-msgid ""
-"Section ID : A unique lower case alphanumeric string, "
-"underscores allowed."
-msgstr ""
-"Sektsiooni ID : unikaalne väiketähtedega tähtnumbriline "
-"string, alakriipsud lubatud."
-
-#: ../includes/ot-functions-admin.php:4105
-msgid ""
-"Label : Displayed as the label of a form element on the "
-"Theme Options page."
-msgstr ""
-"Nimetus : Näidatakse kui vormi elemendi nimetust teema "
-"valikute lehel."
-
-#: ../includes/ot-functions-admin.php:4113
-#: ../includes/ot-functions-admin.php:4342
-msgid ""
-"ID : A unique lower case alphanumeric string, underscores "
-"allowed."
-msgstr ""
-"ID : unikaalne väiketähtedega tähtnumbriline string, "
-"alakriipsud lubatud."
-
-#: ../includes/ot-functions-admin.php:4121
-msgid ""
-"Type : Choose one of the available option types from the "
-"dropdown."
-msgstr ""
-"Tüüp : vali rippmenüüst üks pakutavatest valiku tüüpidest."
-
-#: ../includes/ot-functions-admin.php:4132
-msgid ""
-"Description : Enter a detailed description for the users to "
-"read on the Theme Options page, HTML is allowed. This is also where you "
-"enter content for both the Textblock & Textblock Titled option types."
-msgstr ""
-"Kirjeldus : sisesta detailne kirjeldus, mida kasutajad "
-"saavad lugeda teema valikute lehel. HTML on lubatud. See on ühtlasi ka koht, "
-"kuhu sisestada tekstibloki ja pealkirjaga tekstibloki valikutüüpide sisu."
-
-#: ../includes/ot-functions-admin.php:4140
-msgid ""
-"Choices : This will only affect the following option types: "
-"Checkbox, Radio, Select & Select Image."
-msgstr ""
-"Valikud : mõjutab vaid järgnevaid valikutüüpe: valikkastid, "
-"raadiokastid, rippvalik ja pildi valik."
-
-#: ../includes/ot-functions-admin.php:4145
-msgid "Add Choice"
-msgstr "Lisa valik"
-
-#: ../includes/ot-functions-admin.php:4151
-msgid ""
-"Settings : This will only affect the List Item option type."
-msgstr "Sätted : mõjutab vaid nimekirja elemendi valikutüüpi."
-
-#: ../includes/ot-functions-admin.php:4156
-#: ../includes/ot-functions-settings-page.php:93
-msgid "Add Setting"
-msgstr "Lisa säte"
-
-#: ../includes/ot-functions-admin.php:4162
-msgid ""
-"Standard : Setting the standard value for your option only "
-"works for some option types. Read the OptionTree->Documentation
"
-"for more information on which ones."
-msgstr ""
-"Standard . standardväärtuse määramine mõjub vaid mõnele "
-"valikutüübile. Lisainfot leiad OptionTree->Dokumentatsioon
"
-"lehelt."
-
-#: ../includes/ot-functions-admin.php:4170
-msgid ""
-"Rows : Enter a numeric value for the number of rows in your "
-"textarea. This will only affect the following option types: CSS, Textarea, & "
-"Textarea Simple."
-msgstr ""
-"Ridu : sisesta numbriline väärtus, mis määrab ridade arvu "
-"tekstiväljal. Mõjutab vaid järgnevaid valikutüüpe: CSS, tekstiväli ja lihtne "
-"tekstiväli."
-
-#: ../includes/ot-functions-admin.php:4178
-msgid ""
-"Post Type : Add a comma separated list of post type like "
-"'post,page'. This will only affect the following option types: Custom Post "
-"Type Checkbox, & Custom Post Type Select."
-msgstr ""
-"Postituse tüüp : lisa siia komaga eraldatud loend "
-"postitüüpidest - näiteks 'post,page'. See mõjutab vaid järgnevaid "
-"valikutüüpe: enda loodud postitüübi valikkastid ja enda loodud postitüübi "
-"rippvalik."
-
-#: ../includes/ot-functions-admin.php:4186
-msgid ""
-"Taxonomy : Add a comma separated list of any registered "
-"taxonomy like 'category,post_tag'. This will only affect the following "
-"option types: Taxonomy Checkbox, & Taxonomy Select."
-msgstr ""
-"Taksonoomia : lisa komaga eraldatud loend registreeritud "
-"taksonoomiatest nagu 'category,post_tag'. See mõjutab vaid järgnevaid "
-"valikutüüpe: taksonoomia valikukastid & taksonoomia rippvalik."
-
-#: ../includes/ot-functions-admin.php:4194
-msgid ""
-"Min, Max, & Step : Add a comma separated list of options in "
-"the following format 0,100,1
(slide from 0-100
in "
-"intervals of 1
). The three values represent the minimum, "
-"maximum, and step options and will only affect the Numeric Slider option "
-"type."
-msgstr ""
-"min, max & aste : lisa komaga eraldatud loend valikutest "
-"järgnevas formaadis: 0,100,1
( liugle vahemikus 0-100"
-"code> intervalliga 1
). Need kolm väärtust näitavad miinimumi, "
-"maksimumi ja astme valikuid ning mõjutavad vaid numbriliuguri valikutüüpi."
-
-#: ../includes/ot-functions-admin.php:4202
-msgid "CSS Class : Add and optional class to this option type."
-msgstr ""
-"CSS klass : Soovi korral lisa sellele valikutüübile klass."
-
-#: ../includes/ot-functions-admin.php:4210
-#, php-format
-msgid ""
-"Condition : Add a comma separated list (no spaces) of "
-"conditions in which the field will be visible, leave this setting empty to "
-"always show the field. In these examples, value
is a "
-"placeholder for your condition, which can be in the form of %s."
-msgstr ""
-"Tingimus : lisa komaga eraldatud loend ( ilma tühikuteta ) "
-"tingimustest, mille korral see väli on nähtav. Välja alati näitamiseks jäta "
-"tühjaks. Nendes näidetes on value
kohahoidja teie tingimustele, "
-"mis võivad olla kujul %s."
-
-#: ../includes/ot-functions-admin.php:4218
-msgid ""
-"Operator : Choose the logical operator to compute the result "
-"of the conditions."
-msgstr ""
-"Operaator : vali loogiline operaator, millega arvutada välja "
-"tingimuste tulemus."
-
-#: ../includes/ot-functions-admin.php:4221
-#: ../includes/ot-functions-docs-page.php:111
-#: ../includes/ot-functions-docs-page.php:378
-msgid "and"
-msgstr "ja"
-
-#: ../includes/ot-functions-admin.php:4222
-msgid "or"
-msgstr "või"
-
-#: ../includes/ot-functions-admin.php:4268
-#: ../includes/ot-functions-docs-page.php:29
-msgid "Label"
-msgstr "Nimetus"
-
-#: ../includes/ot-functions-admin.php:4278
-msgid "Value"
-msgstr "Väärtus"
-
-#: ../includes/ot-functions-admin.php:4288
-msgid "Image Source (Radio Image only)"
-msgstr "Pildi allikas ( ainult pildiga raadiovaliku jaoks )"
-
-#: ../includes/ot-functions-admin.php:4334
-msgid ""
-"Title : Displayed as a contextual help menu item on the "
-"Theme Options page."
-msgstr ""
-"Pealkiri : kuvatakse kui kontekstipõhine abimenüü element "
-"teema valikute lehel."
-
-#: ../includes/ot-functions-admin.php:4350
-msgid ""
-"Content : Enter the HTML content about this contextual help "
-"item displayed on the Theme Option page for end users to read."
-msgstr ""
-"Sisu : sisesta HTML sisu selle kontekstipõhise elemendi "
-"kohta. Näidatakse teema valikute lehel lõppkasutajatele."
-
-#: ../includes/ot-functions-admin.php:4381
-msgid "Layout"
-msgstr "Paigutus"
-
-#: ../includes/ot-functions-admin.php:4383
-#: ../includes/ot-functions-admin.php:4384
-msgid "Activate"
-msgstr "Aktiveeri"
-
-#: ../includes/ot-functions-admin.php:4420 ../includes/ot-meta-box-api.php:231
-#: ../includes/ot-settings-api.php:610
-msgid "Title"
-msgstr "Pealkiri"
-
-#: ../includes/ot-functions-admin.php:4760
-msgid "New Layout"
-msgstr "Uus paigutus"
-
-#: ../includes/ot-functions-admin.php:5515
-msgid "Link URL"
-msgstr "Viide"
-
-#: ../includes/ot-functions-admin.php:5522
-msgid "Link Title"
-msgstr "Lingi pealkiri"
-
-#: ../includes/ot-functions-admin.php:5552
-msgid "Quote"
-msgstr "Tsitaat"
-
-#: ../includes/ot-functions-admin.php:5561
-msgid "Source Name (ex. author, singer, actor)"
-msgstr "Allika nimi (nt autor, laulja, näitleja)"
-
-#: ../includes/ot-functions-admin.php:5568
-msgid "Source URL"
-msgstr "Allika URL"
-
-#: ../includes/ot-functions-admin.php:5575
-msgid "Source Title (ex. book, song, movie)"
-msgstr "Allika pealkiri (nt raamat, laul, film)"
-
-#: ../includes/ot-functions-admin.php:5582
-msgid "Source Date"
-msgstr "Allika kuupäev"
-
-#: ../includes/ot-functions-admin.php:5612
-msgid "Video"
-msgstr "Video"
-
-#: ../includes/ot-functions-admin.php:5621
-#, php-format
-msgid ""
-"Embed video from services like Youtube, Vimeo, or Hulu. You can find a list "
-"of supported oEmbed sites in the %1$s. Alternatively, you could use the "
-"built-in %2$s shortcode."
-msgstr ""
-"Lisa video välisest allikast, nagu näiteks Youtube, Vimeo või Hulu. "
-"Nimekirja toetatud oEmbed veebilehtedest leiad %1$s. Teine variant oleks "
-"kasutada sisse ehitatud lühikoodi %2$s."
-
-#: ../includes/ot-functions-admin.php:5621
-#: ../includes/ot-functions-admin.php:5660
-msgid "Wordpress Codex"
-msgstr "Wordpress Codex"
-
-#: ../includes/ot-functions-admin.php:5651
-msgid "Audio"
-msgstr "Audio"
-
-#: ../includes/ot-functions-admin.php:5660
-#, php-format
-msgid ""
-"Embed audio from services like SoundCloud and Rdio. You can find a list of "
-"supported oEmbed sites in the %1$s. Alternatively, you could use the built-"
-"in %2$s shortcode."
-msgstr ""
-"Lisa heli teenustest SoundCloud, Rdio või teistest sarnastest. Nimekirja "
-"toetatud oEmbed veebilehtedest leiad %1$s. Teine variant oleks kasutada "
-"sisse ehitatud lühikoodi %2$s."
-
-#: ../includes/ot-functions-docs-page.php:30
-msgid ""
-"The Label field should be a short but descriptive block of text 100 "
-"characters or less with no HTML."
-msgstr ""
-"Nimetuse väli peaks olema lühike kuid kirjeldav tekstiblokk, mis on kuni 100 "
-"tähemärki pikk ja ei sisalda HTML-i."
-
-#: ../includes/ot-functions-docs-page.php:32
-msgid "ID"
-msgstr "ID"
-
-#: ../includes/ot-functions-docs-page.php:33
-msgid ""
-"The ID field is a unique alphanumeric key used to differentiate each theme "
-"option (underscores are acceptable). Also, the plugin will change all text "
-"you write in this field to lowercase and replace spaces and special "
-"characters with an underscore automatically."
-msgstr ""
-"ID väli on unikaalne tähtnumbriline võti eristamaks teema valikuid "
-"( alakriipsud on lubatud ). Lisaks muudetakse kõik siia välja kirjutatav "
-"tekst väiketähtedeks ning erimärgid asendatakse automaatselt alakriipsudega."
-
-#: ../includes/ot-functions-docs-page.php:35
-msgid "Type"
-msgstr "Tüüp"
-
-#: ../includes/ot-functions-docs-page.php:36
-msgid ""
-"You are required to choose one of the supported option types when creating a "
-"new option. Here is a list of the available option types. For more "
-"information about each type click the Option Types
tab to the "
-"left."
-msgstr ""
-"Uue valiku loomisel peate valima mõne toetatud valikutüüpidest. Siin on "
-"nimekiri saadaolevatest valikutüüpidest. Lisainfo igaühe kohta neist on "
-"saadaval vajutades vasakul olevat Valiku tüüp
sakki."
-
-#: ../includes/ot-functions-docs-page.php:44
-msgid ""
-"Enter a detailed description for the users to read on the Theme Options "
-"page, HTML is allowed. This is also where you enter content for both the "
-"Textblock & Textblock Titled option types."
-msgstr ""
-"Sisesta detailne kirjeldus, mida kasutajad saavad lugeda teema valikute "
-"lehel. HTML on lubatud. See on ka koht sisu sisestamiseks tekstibloki ja "
-"pealkirjaga tekstibloki valikutüüpide jaoks."
-
-#: ../includes/ot-functions-docs-page.php:46
-msgid "Choices"
-msgstr "Valikud"
-
-#: ../includes/ot-functions-docs-page.php:47
-msgid ""
-"Click the \"Add Choice\" button to add an item to the choices array. This "
-"will only affect the following option types: Checkbox, Radio, Select & "
-"Select Image."
-msgstr ""
-"Elemendi lisamiseks valikute massiivi vajuta \"Lisa valik\" nuppu. See "
-"mõjutab järgnevaid valikutüüpe: valikkastid, raadiokastid, rippvalik ja "
-"pildivalik."
-
-#: ../includes/ot-functions-docs-page.php:50
-msgid ""
-"Click the \"Add Setting\" button found inside a newly created setting to add "
-"an item to the settings array. This will only affect the List Item type."
-msgstr ""
-"Elemendi lisamiseks sätete massiivi vajuta vastloodud sättes asuvat \"Lisa "
-"säte\" nuppu. See mõjutab vaid nimekirja elemendi tüüpi."
-
-#: ../includes/ot-functions-docs-page.php:52
-msgid "Standard"
-msgstr "Standartne"
-
-#: ../includes/ot-functions-docs-page.php:53
-msgid ""
-"Setting the standard value for your option only works for some option types. "
-"Those types are one that have a single string value saved to them and not an "
-"array of values."
-msgstr ""
-"Standard väärtuse määramine oma valikule töötab vaid mõnede valikutüüpidega. "
-"Need tüübid on sellised, kus hoitakse vaid ühte väärtust stringi kujul, "
-"mitte väärtuste massiivi."
-
-#: ../includes/ot-functions-docs-page.php:55
-msgid "Rows"
-msgstr "Ridasid"
-
-#: ../includes/ot-functions-docs-page.php:56
-msgid ""
-"Enter a numeric value for the number of rows in your textarea. This will "
-"only affect the following option types: CSS, Textarea, & Textarea Simple."
-msgstr ""
-"Sisesta numbriline väärtus, mis määrab ridade arvu tekstialas. See mõjutab "
-"vaid järgnevaid valikutüüpe: CSS, tekstiala & lihtne tekstiala."
-
-#: ../includes/ot-functions-docs-page.php:58
-msgid "Post Type"
-msgstr "Postitüüp"
-
-#: ../includes/ot-functions-docs-page.php:59
-msgid ""
-"Add a comma separated list of post type like post,page
. This "
-"will only affect the following option types: Custom Post Type Checkbox, & "
-"Custom Post Type Select. Below are the default post types available with "
-"WordPress and that are also compatible with OptionTree. You can also add "
-"your own custom post_type
. At this time any
does "
-"not seem to return results properly and is something I plan on looking into."
-msgstr ""
-"Lisa komaga eraldatud loetelu postitüüpidest, näiteks post,page"
-"code>. See mõjutab vaid järgnevaid valikutüüpe: kohandatud postitüübi "
-"valikkastid ja kohandatud postitüübi rippmenüü. All on vaikimisi Wordpressis "
-"saadaval postitüübid, mis on OptionTreega kokkusobivad. Saad kasutada ka "
-"enda loodud post_type
. Hetkel any
ei tagasta "
-"õigeid väärtusi."
-
-#: ../includes/ot-functions-docs-page.php:67
-msgid "Taxonomy"
-msgstr "Taksonoomia"
-
-#: ../includes/ot-functions-docs-page.php:68
-msgid ""
-"Add a comma separated list of any registered taxonomy like category,"
-"post_tag
. This will only affect the following option types: Taxonomy "
-"Checkbox, & Taxonomy Select."
-msgstr ""
-"Lisa komaga eraldatud loend registreeritud taksonoomiatest nagu 'category,"
-"post_tag'. See mõjutab vaid järgnevaid valikutüüpe: taksonoomia valikukastid "
-"& taksonoomia rippvalik."
-
-#: ../includes/ot-functions-docs-page.php:70
-msgid "Min, Max, & Step"
-msgstr "Miinimum, maksimum ning aste"
-
-#: ../includes/ot-functions-docs-page.php:71
-msgid ""
-"Add a comma separated list of options in the following format 0,100,1"
-"code> (slide from 0-100
in intervals of 1
). The "
-"three values represent the minimum, maximum, and step options and will only "
-"affect the Numeric Slider option type."
-msgstr ""
-"Lisa komaga eraldatud loend valikutest järgnevas formaadis: 0,100,1"
-"code> ( liugle vahemikus 0-100
intervalliga 1
). "
-"Need kolm väärtust näitavad miinimumi, maksimumi ja astme valikuid ning "
-"mõjutavad vaid numbriliuguri valikutüüpi."
-
-#: ../includes/ot-functions-docs-page.php:73
-msgid "CSS Class"
-msgstr "CSS klass"
-
-#: ../includes/ot-functions-docs-page.php:74
-msgid "Add and optional class to any option type."
-msgstr "Soovi korral lisa klassi-atribuut ükskõik millisele valikutüübile."
-
-#: ../includes/ot-functions-docs-page.php:76
-msgid "Condition"
-msgstr "Tingimus"
-
-#: ../includes/ot-functions-docs-page.php:77
-#, php-format
-msgid ""
-"Add a comma separated list (no spaces) of conditions in which the field will "
-"be visible, leave this setting empty to always show the field. In these "
-"examples, %s is a placeholder for your condition, which can be in the form "
-"of %s."
-msgstr ""
-"Lisa komaga eraldatud loend ( ilma tühikuteta ) tingimustest, mille korral "
-"see väli on nähtav. Tühjaks jättes on väli alati nähtav. Nendes näidetes on "
-"%s tingimuse kohahoidjaks, mis tohib olla kujul %s."
-
-#: ../includes/ot-functions-docs-page.php:79
-msgid "Operator"
-msgstr "Operaator"
-
-#: ../includes/ot-functions-docs-page.php:80
-#, php-format
-msgid ""
-"Choose the logical operator to compute the result of the conditions. Your "
-"options are %s and %s."
-msgstr ""
-"Vali loogiline operaator, millega arvutada tingimuste tulemus. Sinu "
-"valikuteks on %s ja %s."
-
-#: ../includes/ot-functions-docs-page.php:111
-#, php-format
-msgid ""
-"The Background option type is for adding background styles to your theme "
-"either dynamically via the CSS option type below or manually with %s. The "
-"Background option type has filters that allow you to remove fields or change "
-"the defaults. For example, you can filter %s to remove unwanted fields from "
-"all Background options or an individual one. You can also filter %s. These "
-"filters allow you to fine tune the select lists for your specific needs."
-msgstr ""
-"Tausta valikutüüpi kasutatakse teemasse tausta stiilide lisamiseks "
-"dünaamiliselt alloleva CSS valikutüübiga või käsitsi kasutades %s. Tausta "
-"valikutüübil on filtrid, mis võimaldavad eemaldada välju või muuta "
-"vaikeväärtusi. Näiteks saab filtreerida %s eemaldamaks soovimatuid välju "
-"kõikidelt tausta valikutelt või ainult ühelt neist. Saab filtreerida ka %s. "
-"Need filtrid võimaldavad sul sättida valikute nimekirja täpselt oma "
-"vajadustele vastavaks."
-
-#: ../includes/ot-functions-docs-page.php:114
-#, php-format
-msgid ""
-"The Border option type is used to set width, unit, style, and color values. "
-"The text input excepts a numerical value and the unit select lets you choose "
-"the unit of measurement to add to that value. Currently the default units "
-"are %s, %s, %s, and %s. However, you can change them with the %s filter. The "
-"style select lets you choose the border style. The default styles are %s, "
-"%s, %s, %s, %s, %s, %s, and %s. However, you can change them with the %s "
-"filter. The colorpicker saves a hexadecimal color code."
-msgstr ""
-"Äärise valikutüüp kasutatakse laiuse, ühiku, stiili ja värvi määramiseks. "
-"Tekstisisendisse saab kirjutada numbrilise väärtuse ning rippmenüü laseb "
-"valida talle mõõtühiku. Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid "
-"saab muuta %s filtriga. Stiili rippmenüü laseb valida äärise stiili. "
-"Vaikimisi stiilid on %s, %s, %s, %s, %s, %s, %s ja %s. Neid saab muuta %s "
-"filtriga. Värvivalija salvestab värvikoodi kuueteistkümnendiksüsteemis."
-
-#: ../includes/ot-functions-docs-page.php:117
-#, php-format
-msgid ""
-"The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values."
-msgstr ""
-"Kasti varju valikutüüpi kasutatakse %s, %s, %s, %s, %s ja %s väärtuse "
-"määramiseks."
-
-#: ../includes/ot-functions-docs-page.php:120
-msgid ""
-"The Category Checkbox option type displays a list of category IDs. It allows "
-"the user to check multiple category IDs and will return that value as an "
-"array for use in a custom function or loop."
-msgstr ""
-"Kategooria valikkastide valikutüüp näitab loendit kategooriate ID-dest. See "
-"laseb kasutajal märkida mitu kategooria ID-d ja tagastab selle väärtuse "
-"massiivina, enda funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:123
-msgid ""
-"The Category Select option type displays a list of category IDs. It allows "
-"the user to select only one category ID and will return that value for use "
-"in a custom function or loop."
-msgstr ""
-"Kategooria rippvaliku valikutüüp näitab loendit kategooriate ID-dest. See "
-"laseb kasutajal märkida üks kategooria ID ja tagastab selle väärtuse enda "
-"funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:126
-msgid ""
-"The Checkbox option type displays a group of choices. It allows the user to "
-"check multiple choices and will return that value as an array for use in a "
-"custom function or loop."
-msgstr ""
-"Valikkastide valikutüüp kuvab valikute grupi. See laseb kasutajal märkida "
-"mitu valikut ning tagastab selle väärtuse massiivina enda funktsioonis või "
-"tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:129
-msgid ""
-"The Colorpicker option type saves a hexadecimal color code for use in CSS. "
-"Use it to modify the color of something in your theme."
-msgstr ""
-"Värvi valija valikutüüp salvestab värvikoodi kuueteistkümnendiksüsteemis, "
-"mida saab kasutada CSS-is. Kasuta seda millegi värvi muutmiseks enda teemas."
-
-#: ../includes/ot-functions-docs-page.php:132
-#, php-format
-msgid ""
-"The Colorpicker Opacity option type saves a hexadecimal color code with an "
-"opacity value from %s to %s in increments of %s. Though the value is saved "
-"as hexadecimal, if used within the CSS option type the color and opacity "
-"values will be converted into a valid RGBA CSS value."
-msgstr ""
-"Värvivalija läbipaistmatuse valikutüüp salvestab värvikoodi "
-"kuueteistkümnendiksüsteemis läbipaistmatuse väärtusega %s kuni %s sammuga "
-"%s. Kuigi väärtus salvestatakse kuueteistkümnendiksüsteemis, kasutades teda "
-"koos CSS valikutüübiga teisendatakse ja korrektseks RGBA CSS väärtuseks."
-
-#: ../includes/ot-functions-docs-page.php:135
-#, php-format
-msgid ""
-"The CSS option type is a textarea that when used properly can add dynamic "
-"CSS to your theme from within OptionTree. Unfortunately, due server "
-"limitations you will need to create a file named %s at the root level of "
-"your theme and change permissions using %s so the server can write to the "
-"file. I have had the most success setting this single file to %s but feel "
-"free to play around with permissions until everything is working. A good "
-"starting point is %s. When the server can save to the file, CSS will "
-"automatically be updated when you save your Theme Options."
-msgstr ""
-"CSS valikutüüp on tekstiväli, mille õigel kasutamisel saab teemale lisada "
-"dünaamiliselt genereeritud CSS-i OptionTree kaudu. Serveri piirangute tõttu "
-"peate selleks looma teema juurkausta faili nimega %s ning muutma õiguseid "
-"kasutades %s, et server saaks faili kirjutada. Mul on tulnud parimad "
-"tulemused siis, kui muutsin selle ainsa faili õiguste väärtuseks %s, kuid "
-"katsetage teisi variante, kuni kõik toimib nagu vaja. Hea alguspunkt on %s. "
-"Kui server saab edukalt faili salvestada. siis uuendatakse CSS automaatselt "
-"teema salvestamisel."
-
-#: ../includes/ot-functions-docs-page.php:137
-#, php-format
-msgid ""
-"This example assumes you have an option with the ID of %1$s. Which means "
-"this option will automatically insert the value of %1$s into the %2$s when "
-"the Theme Options are saved."
-msgstr ""
-"See näide eeldab, et sul on valik ID-ga %1$s. See tähendab, et teema "
-"valikute salvestamisel sisestatakse %1$s väärtus automaatselt %2$s külge."
-
-#: ../includes/ot-functions-docs-page.php:139
-msgid "Input"
-msgstr "Sisend"
-
-#: ../includes/ot-functions-docs-page.php:145
-msgid "Output"
-msgstr "Väljund"
-
-#: ../includes/ot-functions-docs-page.php:154
-#, php-format
-msgid ""
-"The Custom Post Type Select option type displays a list of IDs from any "
-"available WordPress post type or custom post type. It allows the user to "
-"check multiple post IDs for use in a custom function or loop. Requires at "
-"least one valid %1$s in the %1$s field."
-msgstr ""
-"Enda loodud postitüübi rippvaliku valikutüüp kuvab nimekirja kõikidest "
-"WordPressi postitüüpide või enda loodud postitüüpide ID-dest. See võimaldab "
-"kasutajal märgistada mitu postituse ID-d, mida kasutada enda funktsioonis "
-"või tsüklis. Vajab vähemalt ühte sobivat %1$s väljal %1$s."
-
-#: ../includes/ot-functions-docs-page.php:157
-#, php-format
-msgid ""
-"The Custom Post Type Select option type displays a list of IDs from any "
-"available WordPress post type or custom post type. It will return a single "
-"post ID for use in a custom function or loop. Requires at least one valid "
-"%1$s in the %1$s field."
-msgstr ""
-"Enda loodud postitüübi rippvaliku valikutüüp kuvab nimekirja kõikidest "
-"WordPressi postitüüpide või enda loodud postitüüpide ID-dest. See tagastab "
-"ühe postituse ID, mida kasutada enda funktsioonis või tsüklis. Vajab "
-"vähemalt ühte sobivat %1$s väljal %1$s."
-
-#: ../includes/ot-functions-docs-page.php:160
-msgid ""
-"The Date Picker option type is tied to a standard form input field which "
-"displays a calendar pop-up that allow the user to pick any date when focus "
-"is given to the input field. The returned value is a date formatted string."
-msgstr ""
-"Kuupäeva valiku valikutüüp on seotud standartse vormi sisendväljaga. Kui "
-"sellele antakse fookus, siis kuvatakse kalendri aken, mis laseb kasutajal "
-"valida suvalise kuupäeva. Tagastatav väärtus on kuupäeva formaadis string."
-
-#: ../includes/ot-functions-docs-page.php:163
-msgid ""
-"The Date Time Picker option type is tied to a standard form input field "
-"which displays a calendar pop-up that allow the user to pick any date and "
-"time when focus is given to the input field. The returned value is a date "
-"and time formatted string."
-msgstr ""
-"Kuupäeva ja aja valiku valikutüüp on seotud standartse vormi sisendväljaga. "
-"Kui sellele antakse fookus, siis kuvatakse kalendri aken, mis laseb "
-"kasutajal valida suvalise kuupäeva ja kellaaja. Tagastatav väärtus on "
-"kuupäeva ja kellaaja formaadis string."
-
-#: ../includes/ot-functions-docs-page.php:166
-#, php-format
-msgid ""
-"The Dimension option type is used to set width and height values. The text "
-"inputs except numerical values and the select lets you choose the unit of "
-"measurement to add to that value. Currently the default units are %s, %s, "
-"%s, and %s. However, you can change them with the %s filter."
-msgstr ""
-"Mõõtme valikutüüpi kasutatakse laiuse ja kõrguse väärtuste jaoks. "
-"Tekstisisendisse saab kirjutada numbrilise väärtuse ning rippmenüü laseb "
-"valida talle mõõtühiku. Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid "
-"saab muuta %s filtriga."
-
-#: ../includes/ot-functions-docs-page.php:169
-msgid ""
-"The Gallery option type saves a comma separated list of image attachment "
-"IDs. You will need to create a front-end function to display the images in "
-"your theme."
-msgstr ""
-"Galerii valikutüüp salvestab komaga eraldatud loendi pildi tüüpi manuste ID-"
-"dest. Nende piltide teemas näitamiseks tuleb luua kuvatava lehe jaoks "
-"funktsioon."
-
-#: ../includes/ot-functions-docs-page.php:172
-#, php-format
-msgid ""
-"The Google Fonts option type will dynamically enqueue any number of Google "
-"Web Fonts into the document %1$s. As well, once the option has been saved "
-"each font family will automatically be inserted into the %2$s array for the "
-"Typography option type. You can further modify the font stack by using the "
-"%3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s "
-"parameter is being passed from %7$s, so it will be the ID of a Typography "
-"option type. This will allow you to add additional web safe fonts to "
-"individual font families on an as-need basis."
-msgstr ""
-"Google Fontide valikutüüp kaasab dokumendi %1$s dünaamiliselt soovitud hulga "
-"Google veebifonte. Lisaks salvestub iga valitud fondi perekond automaatselt "
-"%2$s massiivi tüpograafia valikutüübis. Fondi salve saab veel rohkem "
-"modifitseerida %3$s filtriga, mis saab kaasa %4$s, %5$s ja %6$s parameetrid. "
-"%6$s parameeter antakse %7$s, nii et ta on tüpograafia valikutüübi ID. See "
-"võimaldab lisada veebis kasutamiseks sobilikke fonte erinevatele fondi "
-"perekondadele vastavalt vajadusele."
-
-#: ../includes/ot-functions-docs-page.php:175
-#, php-format
-msgid ""
-"The JavaScript option type is a textarea that uses the %s code editor to "
-"highlight your JavaScript and display errors as you type."
-msgstr ""
-"JavaScript valikutüüp on tekstiväli, mis kasutab %s koodi redaktorit sinu "
-"kirjutatava JavaScripti süntaksi esile toomiseks ning vigade näitamiseks "
-"kirjutamise ajal."
-
-#: ../includes/ot-functions-docs-page.php:178
-msgid "The Link Color option type is used to set all link color states."
-msgstr ""
-"Lingi värvi valikutüüpi kasutatakse kõikide linkide värviolekute määramiseks."
-
-#: ../includes/ot-functions-docs-page.php:181
-msgid ""
-"The List Item option type replaced the Slider option type and allows for a "
-"great deal of customization. You can add settings to the List Item and those "
-"settings will be displayed to the user when they add a new List Item. "
-"Typical use is for creating sliding content or blocks of code for custom "
-"layouts."
-msgstr ""
-"Nimekirja valikutüüp vahetas välja slaidiesitaja valikutüübi ning võimaldab "
-"põhjalikku kohandamist. Nimekirja elementidele saab lisada sätteid, mida "
-"näidatakse kasutajale uue elemendi lisamisel. Tüüpiline kasutusjuht on "
-"liugleva sisu või koodiblokkide loomiseks."
-
-#: ../includes/ot-functions-docs-page.php:184
-#, php-format
-msgid ""
-"The Measurement option type is a mix of input and select fields. The text "
-"input excepts a value and the select lets you choose the unit of measurement "
-"to add to that value. Currently the default units are %s, %s, %s, and %s. "
-"However, you can change them with the %s filter."
-msgstr ""
-"Mõõdu valikutüüp on segu sisendväljast ja valikuväljast. Tekstisisend eeldab "
-"väärtust ning rippvalik laseb valida mõõduühiku sellele väärtusele. Hetkel "
-"on vaikimisi ühikuteks %s, %s, %s ja %s. Neid saab muuta %s filtriga."
-
-#: ../includes/ot-functions-docs-page.php:186
-#, php-format
-msgid ""
-"Example filter to add new units to the Measurement option type. Added to %s."
-msgstr "Näidisfilter mõõdu valikutüüpi ühikute lisamiseks. Lisatakse %s faili."
-
-#: ../includes/ot-functions-docs-page.php:199
-msgid ""
-"Example filter to completely change the units in the Measurement option "
-"type. Added to functions.php
."
-msgstr ""
-"Näidisfilter, mis muudab mõõdu valikutüübi ühikud täiesti teistsugusteks. "
-"Lisatakse functions.php
faili."
-
-#: ../includes/ot-functions-docs-page.php:215
-msgid ""
-"The Numeric Slider option type displays a jQuery UI slider. It will return a "
-"single numerical value for use in a custom function or loop."
-msgstr ""
-"Numbriliuguri valikutüüp kuvab jQuery UI liuguri. See tagastab ühe "
-"numbrilise väärtuse enda funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:218
-#, php-format
-msgid ""
-"The On/Off option type displays a simple switch that can be used to turn "
-"things on or off. The saved return value is either %s or %s."
-msgstr ""
-"Sees/väljas valikutüüp kuvab lihtsa lüliti, millega saab asju sisse või "
-"välja lülitada. Salvestatud väärtus on kas %s või %s."
-
-#: ../includes/ot-functions-docs-page.php:221
-msgid ""
-"The Page Checkbox option type displays a list of page IDs. It allows the "
-"user to check multiple page IDs for use in a custom function or loop."
-msgstr ""
-"Lehe valikkastide valikutüüp kuvab nimekirja kõikidest lehtede ID-dest. See "
-"võimaldab kasutajal märgistada mitu lehe ID-d, mida kasutada enda "
-"funktsioonis või tsüklis."
-
-#: ../includes/ot-functions-docs-page.php:224
-msgid ""
-"The Page Select option type displays a list of page IDs. It will return a "
-"single page ID for use in a custom function or loop."
-msgstr ""
-"Lehe rippvaliku valikutüüp kuvab nimekirja kõikidest lehtede ID-dest. See "
-"tagastab ühe lehe ID, mida kasutada enda funktsioonis või tsüklis."
-
-#: ../includes/ot-functions-docs-page.php:227
-msgid ""
-"The Post Checkbox option type displays a list of post IDs. It allows the "
-"user to check multiple post IDs for use in a custom function or loop."
-msgstr ""
-"Postituse valikkastid valikutüüp kuvab nimekirja kõikidest postituste ID-"
-"dest. See võimaldab kasutajal märgistada mitu postituse ID-d, mida kasutada "
-"enda funktsioonis või tsüklis."
-
-#: ../includes/ot-functions-docs-page.php:230
-msgid ""
-"The Post Select option type displays a list of post IDs. It will return a "
-"single post ID for use in a custom function or loop."
-msgstr ""
-"Postituse rippvaliku valikutüüp kuvab nimekirja kõikidest postituste ID-"
-"dest. See tagastab ühe postituse ID, mida kasutada enda funktsioonis või "
-"tsüklis."
-
-#: ../includes/ot-functions-docs-page.php:233
-msgid ""
-"The Radio option type displays a group of choices. It allows the user to "
-"choose one and will return that value as a string for use in a custom "
-"function or loop."
-msgstr ""
-"Raadiovaliku valikutüüp näitab valikute gruppi. See laseb kasutajal valida "
-"neist ühe ning tagastab selle väärtuse string-ina enda funktsioonis või "
-"tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:236
-#, php-format
-msgid ""
-"the Radio Images option type is primarily used for layouts. However, you can "
-"filter the image list using %s. As well, you can add your own custom images "
-"using the choices array."
-msgstr ""
-"Piltidega raadiovaliku valikutüüpi kasutatakse peamiselt paigutuste jaoks. "
-"Piltide loendit saab filtreerida %s abil. Valikute massiivi saab lisada enda "
-"pilte."
-
-#: ../includes/ot-functions-docs-page.php:238
-msgid ""
-"This example executes the ot_radio_images
filter on layout "
-"images attached to the my_radio_images
field. Added to "
-"functions.php
."
-msgstr ""
-"See näide käivitab ot_radio_images
filtri "
-"my_radio_images
väljale lisatud paigutuse piltidel. Lisatakse "
-"functions.php
faili."
-
-#: ../includes/ot-functions-docs-page.php:263
-msgid ""
-"The Select option type is used to list anything you want that would be "
-"chosen from a select list."
-msgstr ""
-"Rippvaliku valikutüüpi saab kasutada ükskõik mille loendamiseks, mida saab "
-"valida rippmenüüst."
-
-#: ../includes/ot-functions-docs-page.php:266
-#, php-format
-msgid ""
-"This option type makes it possible for users to select a WordPress "
-"registered sidebar to use on a specific area. By using the two provided "
-"filters, %s, and %s we can be selective about which sidebars are available "
-"on a specific content area."
-msgstr ""
-"See valikutüüp võimaldab kasutajatel valida WordPressis registreeritud "
-"küljeriba, kasutamaks seda kindlas kohas. Kahe kaasa antud filtri, %s ja %s "
-"abil saab määrata, millist küljeriba millises sisuosas näidata."
-
-#: ../includes/ot-functions-docs-page.php:267
-#, php-format
-msgid ""
-"For example, if we create a WordPress theme that provides the ability to "
-"change the Blog Sidebar and we don't want to have the footer sidebars "
-"available on this area, we can unset those sidebars either manually or by "
-"using a regular expression if we have a common name like %s."
-msgstr ""
-"Näiteks kui luua WordPressi teema, mis võimaldab muuta blogi küljeriba ning "
-"me ei soovi siin alas näha jaluse küljeribasid, siis saame need küljeribad "
-"ära võtta kas käsitsi või kasutades regulaaravaldist, nagu näiteks %s."
-
-#: ../includes/ot-functions-docs-page.php:270
-msgid ""
-"The Slider option type is technically deprecated. Use the List Item option "
-"type instead, as it's infinitely more customizable. Typical use is for "
-"creating sliding image content."
-msgstr ""
-"Tehniliselt on slaidiesitaja valikutüübi kasutamine taunitud. Kasutage parem "
-"nimekirja elemendi valikutüüpi, kuna see on lõpmatult kohandatav. Tüüpiline "
-"kasutusjuht on libisevate piltidega sisu jaoks."
-
-#: ../includes/ot-functions-docs-page.php:273
-#, php-format
-msgid ""
-"The Social Links option type utilizes a drag & drop interface to create a "
-"list of social links. There are a few filters that make extending this "
-"option type easy. You can set the %s filter to %s and turn off loading "
-"default values. Use the %s filter to change the default values that are "
-"loaded. To filter the settings array use the %s filter."
-msgstr ""
-"Sotsiaalmeedia linkide valikutüübis kasutatakse nimekirja loomiseks tiri-ja-"
-"pilla liidest. On loodud mõned filtrid, mis teevad selle valikutüübi "
-"täiendamise kergeks. Filter %s väärtuseks saab määrata %s, et lülitada välja "
-"vaikimisi väärtuste laadimine. %s filtriga saab muuta vaikeväärtuseid. "
-"Sätete massiivi filtreerimiseks on %s."
-
-#: ../includes/ot-functions-docs-page.php:276
-#, php-format
-msgid ""
-"The Spacing option type is used to set spacing values such as padding or "
-"margin in the form of top, right, bottom, and left. The text inputs except "
-"numerical values and the select lets you choose the unit of measurement to "
-"add to that value. Currently the default units are %s, %s, %s, and %s. "
-"However, you can change them with the %s filter."
-msgstr ""
-"Vahede valikutüüpi kasutatakse \"padding\" ja \"margin\" väärtuste jaoks "
-"kujul \"top\", \"right\", \"bottom\", \"left\". Tekstisisendisse saab "
-"kirjutada numbrilise väärtuse ning rippmenüü laseb valida talle mõõtühiku. "
-"Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid saab muuta %s filtriga."
-
-#: ../includes/ot-functions-docs-page.php:279
-msgid ""
-"The Tab option type will break a section or metabox into tabbed content."
-msgstr ""
-"Saki valikutüüp muudab sektsiooni või meta-kasti sakkidega sisuelemendiks."
-
-#: ../includes/ot-functions-docs-page.php:282
-msgid ""
-"The Tag Checkbox option type displays a list of tag IDs. It allows the user "
-"to check multiple tag IDs and will return that value as an array for use in "
-"a custom function or loop."
-msgstr ""
-"Sildi valikukasti valikutüüp kuvab loendi siltide ID-dega. See laseb "
-"kasutajal märkida mitu sildi ID-d ning tagastab selle väärtuse massiivina "
-"enda funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:285
-msgid ""
-"The Tag Select option type displays a list of tag IDs. It allows the user to "
-"select only one tag ID and will return that value for use in a custom "
-"function or loop."
-msgstr ""
-"Sildi rippvaliku valikutüüp kuvab loendi siltide ID-dega. See laseb "
-"kasutajal märkida ainult ühe sildi ID ning tagastab selle väärtuse enda "
-"funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:288
-msgid ""
-"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows "
-"the user to check multiple taxonomy IDs and will return that value as an "
-"array for use in a custom function or loop."
-msgstr ""
-"Taksonoomia valikukasti valikutüüp kuvab loendi taksonoomiate ID-dega. See "
-"laseb kasutajal märkida mitu taksonoomia ID-d ning tagastab selle väärtuse "
-"massiivina enda funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:291
-msgid ""
-"The Taxonomy Select option type displays a list of taxonomy IDs. It allows "
-"the user to select only one taxonomy ID and will return that value for use "
-"in a custom function or loop."
-msgstr ""
-"Taksonoomia rippvaliku valikutüüp kuvab loendi taksonoomiate ID-dega. See "
-"laseb kasutajal märkida ainult ühe taksonoomia ID ning tagastab selle "
-"väärtuse enda funktsioonis või tsüklis kasutamiseks."
-
-#: ../includes/ot-functions-docs-page.php:294
-msgid ""
-"The Text option type is used to save string values. For example, any "
-"optional or required text that is of reasonably short character length."
-msgstr ""
-"Teksti valikutüüpi kasutatakse väärtuste salvestamiseks stringi kujul. "
-"Näiteks mõni valikuline või nõutud tekst, mis on piisavalt lühike."
-
-#: ../includes/ot-functions-docs-page.php:297
-#, php-format
-msgid ""
-"The Textarea option type is a large string value used for custom code or "
-"text in the theme and has a WYSIWYG editor that can be filtered to change "
-"the how it is displayed. For example, you can filter %s, %s, %s, and %s."
-msgstr ""
-"Tekstivälja valikutüüp on suur väärtus stringi kujul salvestamiseks, millel "
-"on WYSIWYG toimetaja, mida saab filtreerida muutmaks tema kuvamist. Näiteks "
-"saab filtreerida %s, %s, %s ja %s."
-
-#: ../includes/ot-functions-docs-page.php:299
-msgid ""
-"Example filters to alter the Textarea option type. Added to functions."
-"php
."
-msgstr ""
-"Näidisfiltrid, millega muuta tekstivälja valikutüüpi. Lisatakse "
-"functions.php
faili."
-
-#: ../includes/ot-functions-docs-page.php:301
-msgid ""
-"This example keeps WordPress from executing the wpautop
filter "
-"on the line breaks. The default is true
which means it wraps "
-"line breaks with an HTML p
tag."
-msgstr ""
-"See näide takistab Wordpressil kasutada wpautop
filtrit "
-"reavahetustel. Vaikeväärtus on true
, mis tähendab, et "
-"reavahtused mähitakse HTML p
elemendiga."
-
-#: ../includes/ot-functions-docs-page.php:314
-msgid ""
-"This example keeps WordPress from executing the media_buttons
"
-"filter on the textarea WYSIWYG. The default is true
which means "
-"show the buttons."
-msgstr ""
-"See näide takistab Wordpressil kasutada media_buttons
filtrit "
-"tekstivälja WYSIWYG toimetajas. Vaikeväärtus on true
, mis "
-"tähendab, et nuppe näidatakse."
-
-#: ../includes/ot-functions-docs-page.php:327
-msgid ""
-"This example keeps WordPress from executing the tinymce
filter "
-"on the textarea WYSIWYG. The default is true
which means show "
-"the tinymce."
-msgstr ""
-"See näide takistab Wordpressil kasutada tinymce
filtrit "
-"tekstivälja WYSIWYG toimetajas. Vaikeväärtus on true
, mis "
-"tähendab, et tinymce on nähtaval."
-
-#: ../includes/ot-functions-docs-page.php:340
-msgid ""
-"This example alters the quicktags
filter on the textarea "
-"WYSIWYG. The default is array( 'buttons' => 'strong,em,link,block,del,"
-"ins,img,ul,ol,li,code,spell,close' )
which means show those "
-"quicktags. It also means you can filter in your own custom quicktags."
-msgstr ""
-"See näide muudab quicktags
filtrit tekstivälja WYSIWYG "
-"toimetajas. Vaikeväärtus on array('buttons' => 'strong,em,link,block,"
-"del,ins,img,ul,ol,li,code,spell,close')
, mis tähendab, et neid "
-"elemente näidatakse. Siitkaudu saad kaasata endale sobivaid elemente."
-
-#: ../includes/ot-functions-docs-page.php:356
-msgid ""
-"The Textarea Simple option type is a large string value used for custom code "
-"or text in the theme. The Textarea Simple does not have a WYSIWYG editor."
-msgstr ""
-"Lihtsa tekstivälja valikutüüp on suur string-tüüpi väärtus teemas oleva "
-"kohandatud koodi või teksti jaoks. Lihtsal tekstiväljal ei ole WYSIWYG "
-"toimetajat."
-
-#: ../includes/ot-functions-docs-page.php:358
-#, php-format
-msgid ""
-"This example tells WordPress to execute the %s filter on the line breaks. "
-"The default is %s which means it does not wraps line breaks with an HTML %s "
-"tag. Added to %s."
-msgstr ""
-"See näide ütleb Wordpressile, et reavahetuste korral kasutada %s filtrit. "
-"Vaikeväärtus on %s, mis tähendab, et reavahetusi ei mähita HTML %s "
-"elemendiga. Lisatakse %s faili."
-
-#: ../includes/ot-functions-docs-page.php:372
-msgid ""
-"The Textblock option type is used only on the Theme Option page. It will "
-"allow you to create & display HTML, but has no title above the text block. "
-"You can then use the Textblock to add a more detailed set of instruction on "
-"how the options are used in your theme. You would never use this in your "
-"themes template files as it does not save a value."
-msgstr ""
-"Tekstibloki valikutüüpi kasutatakse teema valikute lehel. See võimaldab luua "
-"ja kuvada HTML-i, kuid tal puudub pealkiri. Sellega saab lisada detailsemaid "
-"kirjeldusi teemas kasutatavate valikute jaoks. Seda ei kasutata teema "
-"mallifailides, kuna ta ei salvesta mingit väärtust."
-
-#: ../includes/ot-functions-docs-page.php:375
-msgid ""
-"The Textblock Titled option type is used only on the Theme Option page. It "
-"will allow you to create & display HTML, and has a title above the text "
-"block. You can then use the Textblock Titled to add a more detailed set of "
-"instruction on how the options are used in your theme. You would never use "
-"this in your themes template files as it does not save a value."
-msgstr ""
-"Pealkirjaga tekstibloki valikutüüpi kasutatakse teema valikute lehel. See "
-"võimaldab luua ja kuvada HTML-i ning tema kohal on pealkiri. Sellega saab "
-"lisada detailsemaid kirjeldusi teemas kasutatavate valikute jaoks. Seda ei "
-"kasutata teema mallifailides, kuna ta ei salvesta mingit väärtust."
-
-#: ../includes/ot-functions-docs-page.php:378
-#, php-format
-msgid ""
-"The Typography option type is for adding typography styles to your theme "
-"either dynamically via the CSS option type above or manually with %s. The "
-"Typography option type has filters that allow you to remove fields or change "
-"the defaults. For example, you can filter %s to remove unwanted fields from "
-"all Background options or an individual one. You can also filter %s. These "
-"filters allow you to fine tune the select lists for your specific needs."
-msgstr ""
-"Tüpograafia valikutüübiga saab teemale lisada stiile, kas dünaamiliselt ülal "
-"oleva CSS valikutüübiga või käsitsi %s abil. Tüpograafia valikutüübil on "
-"filtrid, mis lasevad välju eemaldada või vaikimisi välju muuta. Näiteks saab "
-"filtreerida %s, eemaldamaks soovimatuid välju kõikidelt tausta valikutelt "
-"või mõnelt neist. Saab filtreerida ka %s. Need filtrid aitavad valikute "
-"nimekirja täpselt oma vajaduste järgi häälestada."
-
-#: ../includes/ot-functions-docs-page.php:380
-msgid ""
-"This example would filter ot_recognized_font_families
to build "
-"your own font stack. Added to functions.php
."
-msgstr ""
-"See näide filtreerib ot_recognized_font_families
loomaks enda "
-"fondipinu. Lisatakse functions.php
faili."
-
-#: ../includes/ot-functions-docs-page.php:398
-#, php-format
-msgid ""
-"The Upload option type is used to upload any WordPress supported media. "
-"After uploading, users are required to press the \"%s\" button in order to "
-"populate the input with the URI of that media. There is one caveat of this "
-"feature. If you import the theme options and have uploaded media on one site "
-"the old URI will not reflect the URI of your new site. You will have to re-"
-"upload or %s any media to your new server and change the URIs if necessary."
-msgstr ""
-"Üleslaadimise valikutüüp kasutatakse suvalise Wordpressi toetatava meedia "
-"üles laadimiseks. Peale üleslaadimist peab kasutaja vajutama \"%s\" nuppu, "
-"et täita sisend selle meediaelemendi URI-ga. Selle omadusega kaasneb üks "
-"probleem - kui importida teema valikuid teistsuguse aadressiga veebilehelt, "
-"siis URI-d automaatselt ei uuene. Meediafailid tuleb kas uuesti üles laadida "
-"või %s, vajadusel muutes URI-sid."
-
-#: ../includes/ot-functions-docs-page.php:430
-msgid ""
-"This function returns a value from the \"option_tree\" array of saved values "
-"or the default value supplied. The returned value would be mixed. Meaning it "
-"could be a string, integer, boolean, or array."
-msgstr ""
-"See funktsioon tagastab või vajadusel trükib väärtuse \"option_tree\" "
-"massiivi salvestatud väärtustest või kaasaantud vaikeväärtuse. Tagastatud "
-"väärtus tüüp on segunenud. See tähendab, et ta võib olla string, integer, "
-"boolean või massiiv."
-
-#: ../includes/ot-functions-docs-page.php:432
-#: ../includes/ot-functions-docs-page.php:482
-msgid "Usage"
-msgstr "Kasutus"
-
-#: ../includes/ot-functions-docs-page.php:436
-#: ../includes/ot-functions-docs-page.php:486
-msgid "Parameters"
-msgstr "Parameetrid"
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:490
-msgid "string"
-msgstr "string"
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:490
-msgid "required"
-msgstr "nõutud"
-
-#: ../includes/ot-functions-docs-page.php:440
-msgid "Enter the options unique identifier."
-msgstr "Sisesta valikule unikaalne identifikaator."
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:490
-msgid "Default:"
-msgstr "Vaikimisi:"
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:490
-#: ../includes/ot-functions-docs-page.php:494
-msgid "None"
-msgstr "Puudub"
-
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:494
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-#: ../includes/ot-functions-docs-page.php:506
-msgid "optional"
-msgstr "valikuline"
-
-#: ../includes/ot-functions-docs-page.php:444
-msgid ""
-"Enter a default return value. This is just incase the request returns null."
-msgstr "Sisesta vaikeväärtus. See on vajalik juhul, kui päring tagastab nulli."
-
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:494
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-#: ../includes/ot-functions-docs-page.php:506
-msgid "Default"
-msgstr "Vaikimisi"
-
-#: ../includes/ot-functions-docs-page.php:474
-msgid ""
-"This function has been deprecated. That means it has been replaced by a new "
-"function or is no longer supported, and may be removed from future versions. "
-"All code that uses this function should be converted to use its replacement."
-msgstr ""
-"Selle funktsiooni kasutamist taunitakse. See tähendab, et ta on asendatud "
-"uue funktsiooniga või teda ei toetata enam ning ta võidakse tulevastest "
-"versioonidest välja jätta. Kõik seda funktsiooni kasutav kood tuleks ümber "
-"muuta kasutamaks tema asendust."
-
-#: ../includes/ot-functions-docs-page.php:476
-msgid "Use"
-msgstr "Kasuta"
-
-#: ../includes/ot-functions-docs-page.php:476
-msgid "instead"
-msgstr "asemel"
-
-#: ../includes/ot-functions-docs-page.php:480
-msgid ""
-"This function returns, or echos if asked, a value from the \"option_tree\" "
-"array of saved values."
-msgstr ""
-"See funktsioon tagastab või vajadusel trükib väärtuse \"option_tree\" "
-"massiivi salvestatud väärtustest."
-
-#: ../includes/ot-functions-docs-page.php:490
-msgid "Enter a unique Option Key to get a returned value or array."
-msgstr "Sisesta unikaalne valiku võti saamaks väärtust või massiivi."
-
-#: ../includes/ot-functions-docs-page.php:494
-msgid "array"
-msgstr "array"
-
-#: ../includes/ot-functions-docs-page.php:494
-msgid "Used to cut down on database queries in template files."
-msgstr "Kasutatakse andmebaasi päringute vähendamiseks mallifailides."
-
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-msgid "boolean"
-msgstr "boolean"
-
-#: ../includes/ot-functions-docs-page.php:498
-msgid "Echo the output."
-msgstr "Trüki väljund."
-
-#: ../includes/ot-functions-docs-page.php:502
-msgid "Used to indicate the $item_id is an array of values."
-msgstr "Kasutatakse märkimaks, et $item_id on väärtuste massiiv."
-
-#: ../includes/ot-functions-docs-page.php:506
-msgid "integer"
-msgstr "integer"
-
-#: ../includes/ot-functions-docs-page.php:506
-msgid ""
-"Numeric offset key for the $item_id array, -1 will return all values (an "
-"array starts at 0)."
-msgstr ""
-"Numbriline nihkevõti $item_id massiivi jaoks, -1 tagastab kõik väärtused "
-"( massiiv algab 0-st )."
-
-#: ../includes/ot-functions-docs-page.php:534
-msgid ""
-"If you're using the plugin version of OptionTree it is highly recommended to "
-"include a function_exists
check in your code, as described in "
-"the examples below. If you've integrated OptionTree directly into your "
-"themes root directory, you will not need to wrap your code "
-"with function_exists
, as you're guaranteed to have the "
-"ot_get_option()
function available."
-msgstr ""
-"Kui kasutate OptionTree mooduli versiooni, siis on soovitatav oma koodi "
-"lisada function_exists
kontroll, nagu kirjeldatud allpool "
-"toodud näidetes. Kui olete OptionTree otse oma teema juurkataloogi sisse "
-"ehitanud, siis teil ei ole vaja mähkida oma koodi "
-"function_exists
kontrolliga, sest teil on "
-"ot_get_option()
funktsiooni saadavus garanteeritud."
-
-#: ../includes/ot-functions-docs-page.php:536
-msgid "String Examples"
-msgstr "String-i näited"
-
-#: ../includes/ot-functions-docs-page.php:538
-msgid "Returns the value of test_input
."
-msgstr "Tagastab test_input
väärtuse."
-
-#: ../includes/ot-functions-docs-page.php:544
-msgid ""
-"Returns the value of test_input
, but also has a default value "
-"if it returns empty."
-msgstr ""
-"Tagastab test_input
väärtuse või vaikeväärtuse, kui tagastatud "
-"väärtus on tühi."
-
-#: ../includes/ot-functions-docs-page.php:550
-msgid "Array Examples"
-msgstr "Array näited"
-
-#: ../includes/ot-functions-docs-page.php:552
-msgid ""
-"Assigns the value of navigation_ids
to the variable $ids"
-"code>. It then echos an unordered list of links (navigation) using "
-"wp_list_pages()
."
-msgstr ""
-"Omistab navigation_ids
väärtuse $ids
muutujale. "
-"See trükib välja järjestamata loetelu ( navigatsiooni ) linkidest, kasutades "
-"wp_list_pages()
."
-
-#: ../includes/ot-functions-docs-page.php:572
-msgid ""
-"The next two examples demonstrate how to use the Measurement"
-"strong> option type. The Measurement option type is an array with two key/"
-"value pairs. The first is the value of measurement and the second is the "
-"unit of measurement."
-msgstr ""
-"Järgnevad kaks näidet demonstreerivad, kuidas kasutada mõõdu"
-"strong> valikutüüpi. Mõõdu valikutüüp on massiiv kahe võti-väärtus paariga. "
-"Esimene on mõõdu väärtus ning teine on mõõduühik."
-
-#: ../includes/ot-functions-docs-page.php:598
-msgid "This example displays a very basic slider loop."
-msgstr "See näide kuvab väga algelise slaidi esitleja tsükli."
-
-#: ../includes/ot-functions-docs-page.php:643
-msgid "It's Super Simple"
-msgstr "See on imelihtne"
-
-#: ../includes/ot-functions-docs-page.php:645
-msgid ""
-"Layouts make your theme awesome! With theme options data that you can save/"
-"import/export you can package themes with different color variations, or "
-"make it easy to do A/B testing on text and so much more. Basically, you save "
-"a snapshot of your data as a layout."
-msgstr ""
-"Paigutused teevad su teema aukartust äratavaks! Teema valikute infoga, mida "
-"saad salvestada/importida/eksportida, saad pakendada teemasid erinevate "
-"värvivariatsioonidega või kergelt teostada A/B testimist tekstiosadel ning "
-"palju muud. Põhimõtteliselt on paigutus sinu andmete ülesvõtte salvestus."
-
-#: ../includes/ot-functions-docs-page.php:647
-msgid ""
-"Once you have created all your different layouts, or theme variations, you "
-"can save them to a separate text file for repackaging with your theme. "
-"Alternatively, you could just make different variations for yourself and "
-"change your theme with the click of a button, all without deleting your "
-"previous options data."
-msgstr ""
-"Peale kõikide erinevate paigutuste või teema variatsioonide loomist saab nad "
-"salvestada eraldi tekstifaili, mida teemaga kaasa pakendada. Teine "
-"kasutusviis oleks teha enda jaoks erinevad variatsioonid ja muuta oma teemat "
-"ainsa nupuvajutusega, ilma eelnevate andmete kustutamiseta."
-
-#: ../includes/ot-functions-docs-page.php:649
-msgid ""
-" Adding a layout is ridiculously easy, follow these steps and you'll be on "
-"your way to having a WordPress super theme."
-msgstr ""
-"Paigutuse lisamine on naeruväärselt lihtne. Järgi neid samme ning oled teel "
-"WordPressi superteema omamisele."
-
-#: ../includes/ot-functions-docs-page.php:651
-msgid "For Developers"
-msgstr "Arendajatele"
-
-#: ../includes/ot-functions-docs-page.php:653
-#: ../includes/ot-functions-docs-page.php:682
-msgid "Creating a Layout"
-msgstr "Paigutuse loomine"
-
-#: ../includes/ot-functions-docs-page.php:655
-#: ../includes/ot-functions-docs-page.php:662
-#: ../includes/ot-functions-docs-page.php:668
-msgid "Go to the OptionTre->Settings->Layouts
tab."
-msgstr "Mine OptionTree->Sätted->Paigutused
sakile."
-
-#: ../includes/ot-functions-docs-page.php:656
-msgid ""
-"Enter a name for your layout in the text field and hit \"Save Layouts\", "
-"you've created your first layout."
-msgstr ""
-"Sisesta tekstivälja oma paigutuse nimi ja vajuta \"Salvesta paigutused\" "
-"nuppu. Oled loonud oma esimese paigutuse."
-
-#: ../includes/ot-functions-docs-page.php:657
-#: ../includes/ot-functions-docs-page.php:686
-msgid "Adding a new layout is as easy as repeating the steps above."
-msgstr "Uue paigutuse lisamine on lihtne, kui järgid ülaltoodud samme."
-
-#: ../includes/ot-functions-docs-page.php:660
-#: ../includes/ot-functions-docs-page.php:689
-msgid "Activating a Layout"
-msgstr "Paigutuse aktiveerimine"
-
-#: ../includes/ot-functions-docs-page.php:663
-msgid "Click on the activate layout button in the actions list."
-msgstr "Vajuta paigutuse aktiveerimise nupul tegevuste nimekirjas."
-
-#: ../includes/ot-functions-docs-page.php:666
-#: ../includes/ot-functions-docs-page.php:695
-msgid "Deleting a Layout"
-msgstr "Paigutuse kustutamine"
-
-#: ../includes/ot-functions-docs-page.php:669
-msgid "Click on the delete layout button in the actions list."
-msgstr "Vajuta paigutuse kustutamise nupul tegevuste nimekirjas."
-
-#: ../includes/ot-functions-docs-page.php:672
-#: ../includes/ot-functions-docs-page.php:700
-msgid "Edit Layout Data"
-msgstr "Muuda paigutuse andmeid"
-
-#: ../includes/ot-functions-docs-page.php:674
-#: ../includes/ot-functions-docs-page.php:684
-#: ../includes/ot-functions-docs-page.php:691
-msgid "Go to the Appearance->Theme Options
page."
-msgstr "Mine Välimus->Teema valikud
lehele."
-
-#: ../includes/ot-functions-docs-page.php:675
-#: ../includes/ot-functions-docs-page.php:703
-msgid ""
-"Modify and save your theme options and the layout will be updated "
-"automatically."
-msgstr ""
-"Muuda ja salvesta oma teema valikuid ning paigutust uuendatakse automaatselt."
-
-#: ../includes/ot-functions-docs-page.php:676
-#: ../includes/ot-functions-docs-page.php:704
-msgid ""
-"Saving theme options data will update the currently active layout, so before "
-"you start saving make sure you want to modify the current layout."
-msgstr ""
-"Teema valikute andmete salvestamine uuendab hetkel aktiivset paigutust, "
-"seega enne salvestamist veendu, et soovid muuta hetkel kasutuses olevat "
-"paigutust."
-
-#: ../includes/ot-functions-docs-page.php:677
-msgid ""
-"If you want to edit a new layout, first create it then save your theme "
-"options."
-msgstr ""
-"Kui soovid muuta uut paigutust, tuleb see kõigepealt luua ja seejärel teema "
-"valikud salvestada."
-
-#: ../includes/ot-functions-docs-page.php:680
-msgid "End-Users Mode"
-msgstr "Lõppkasutaja režiim"
-
-#: ../includes/ot-functions-docs-page.php:685
-msgid ""
-"Enter a name for your layout in the text field and hit \"New Layout\", "
-"you've created your first layout."
-msgstr ""
-"Sisesta tekstivälja oma uue paigutuse nimi ja vajuta nuppu \"Uus paigutus\". "
-"Oled loonud oma esimese paigutuse."
-
-#: ../includes/ot-functions-docs-page.php:692
-msgid ""
-"Choose a layout from the select list and click the \"Activate Layout\" "
-"button."
-msgstr "Vali rippmenüüst paigutus ja vajuta \"Aktiveeri paigutus\" nuppu."
-
-#: ../includes/ot-functions-docs-page.php:697
-msgid "End-Users mode does not allow deleting layouts."
-msgstr "Lõppkasutaja režiim ei luba paigutusi kustutada."
-
-#: ../includes/ot-functions-docs-page.php:702
-msgid "Go to the Appearance->Theme Options
tab."
-msgstr "Mine Välimus->Teema valikud
sakile."
-
-#: ../includes/ot-functions-docs-page.php:733
-#: ../includes/ot-functions-docs-page.php:815
-msgid "How-to-guide"
-msgstr "Õpetus"
-
-#: ../includes/ot-functions-docs-page.php:735
-msgid ""
-"There are a few simple steps you need to take in order to use OptionTree's "
-"built in Meta Box API. In the code below I'll show you a basic demo of how "
-"to create your very own custom meta box using any number of the option types "
-"you have at your disposal. If you would like to see some demo code, there is "
-"a directory named theme-mode
inside the assets
"
-"directory that contains a file named demo-meta-boxes.php
you "
-"can reference."
-msgstr ""
-"OptionTreele sisse ehitatud Meta Box API kasutamiseks on vaja paari lihtsat "
-"toimingut. Allolevas koodis demonstreeritakse meta kasti loomist suvalise "
-"hulga saadaolevate valikutüüpidega. Koodinäiteid leiab ka failist demo-"
-"meta-boxes.php
, mis asub kaustas theme-mode
, mis "
-"omakorda asub kaustas assets
."
-
-#: ../includes/ot-functions-docs-page.php:737
-msgid ""
-"It's important to note that Meta Boxes do not support WYSIWYG editors at "
-"this time and if you set one of your options to Textarea it will "
-"automatically revert to a Textarea Simple until a valid solution is found. "
-"WordPress released this statement regarding the wp_editor() function:"
-msgstr ""
-"Tähtis märkus: meta kastid ei toeta hetkel WYSIWYG redaktoreid. Kui määrata "
-"mõne valiku tüübiks tekstiala, muudetakse see automaatselt lihtsustatud "
-"tekstialaks, kuni leitakse töötav lahendus. Wordpress väljastas järgneva "
-"teadaande wp_editor() funktsiooni kohta:"
-
-#: ../includes/ot-functions-docs-page.php:739
-msgid ""
-"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. "
-"What this means in practical terms, is that you cannot put it in meta-boxes "
-"that can be dragged and placed elsewhere on the page."
-msgstr ""
-"Korra loodud WYSIWYG toimetajat ei saa DOM-is ringi liigutada. Praktikas "
-"tähendab see, et teda ei saa panna meta-kastidesse, mida on võimalik "
-"leheküljel ringi liigutada."
-
-#: ../includes/ot-functions-docs-page.php:741
-msgid "Create and include your custom meta boxes file."
-msgstr "Loo ja kaasa oma kohandatud meta kastide fail."
-
-#: ../includes/ot-functions-docs-page.php:743
-msgid ""
-"Create a file and name it anything you want, maybe meta-boxes.php"
-"code>."
-msgstr ""
-"Loo fail ja anna talle meelepärane nimi, näiteks meta-boxes.php
."
-
-#: ../includes/ot-functions-docs-page.php:744
-msgid ""
-"As well, you'll probably want to create a directory named includes"
-"code> to put your meta-boxes.php
into which will help keep you "
-"file structure nice and tidy."
-msgstr ""
-"Tõenäoliselt soovid luua kausta nimega includes
, kuhu panna oma "
-"meta-boxes.php
fail, hoidmaks oma failistruktuuri ilusa ja "
-"puhtana."
-
-#: ../includes/ot-functions-docs-page.php:745
-#: ../includes/ot-functions-docs-page.php:845
-msgid "Add the following code to your functions.php
."
-msgstr "Lisa järgnev kood oma functions.php
faili."
-
-#: ../includes/ot-functions-docs-page.php:755
-msgid ""
-"Add a variation of the following code to your meta-boxes.php
. "
-"You'll obviously need to fill it in with all your custom array values. It's "
-"important to note here that we use the admin_init
filter "
-"because if you were to call the ot_register_meta_box
function "
-"before OptionTree was loaded the sky would fall on your head."
-msgstr ""
-"Lisa variatsioon järgnevast koodist oma meta-boxes.php
faili. "
-"Loomulikult tuleb see täita enda kohandatud massiivi väärtustega. Oluline "
-"märkus: kasutame admin_init
filtrit, sest kui kutsuda "
-"ot_register_meta_box
funktsiooni enne OptionTree laadimist, "
-"kukuks taevas kaela."
-
-#: ../includes/ot-functions-docs-page.php:817
-msgid ""
-"There are a few simple steps you need to take in order to use OptionTree as "
-"a theme included module. In the code below I'll show you a basic demo of how "
-"to include the entire plugin as a module, which will allow you to have the "
-"most up-to-date version of OptionTree without ever needing to hack the core "
-"of the plugin. If you would like to see some demo code, there is a directory "
-"named theme-mode
inside the assets
directory that "
-"contains a file named demo-theme-options.php
you can reference."
-msgstr ""
-"Paari lihtsa sammuga saab Optiontreed kasutada teemasse kaasatud moodulina. "
-"Allolevas koodis näidatakse lihtsat demonstratsiooni, kuidas kaasata terve "
-"moodul moodulina. Sellisel moel on sul kõige uuem versioon OptionTreest, "
-"ilma et peaks mooduli tuuma häkkima. Näidiskoodi leiab failist demo-"
-"theme-options.php
, mis asub kaustas theme-mode
, mis "
-"omakorda asub kaustas assets
."
-
-#: ../includes/ot-functions-docs-page.php:819
-msgid "Step 1: Include the plugin & turn on theme mode."
-msgstr "Samm 1: kaasa moodul ja lülita sisse teemarežiim."
-
-#: ../includes/ot-functions-docs-page.php:821
-#, php-format
-msgid "Download the latest version of %s and unarchive the %s directory."
-msgstr "Lae alla viimane %s versioon ja paki ta lahti %s kausta."
-
-#: ../includes/ot-functions-docs-page.php:822
-#, php-format
-msgid ""
-"Put the %s directory in the root of your theme. For example, the server path "
-"would be %s."
-msgstr "Pane %s kaust oma teema juurkausta. Serveri rada oleks näiteks %s."
-
-#: ../includes/ot-functions-docs-page.php:823
-#, php-format
-msgid "Add the following code to the beginning of your %s."
-msgstr "Lisa järgnev kood oma %s algusesse."
-
-#: ../includes/ot-functions-docs-page.php:837
-#, php-format
-msgid ""
-"For a list of all the OptionTree UI display filters refer to the %s file "
-"found in the %s directory of this plugin. This file is the starting point "
-"for developing themes with Theme Mode."
-msgstr ""
-"Täieliku OptionTree UI kuvamise filtrite nimekirja leiad selle plugina %s "
-"failist %s kaustast. See fail on teemarežiimis teemade arenduse "
-"alguspunktiks."
-
-#: ../includes/ot-functions-docs-page.php:839
-msgid ""
-"You now have OptionTree built into your theme and anytime an update is "
-"available replace the old version with the new one."
-msgstr ""
-"Sul on nüüd OptionTree teemasse sisse ehitatud. Iga kord, kui saadaval on "
-"uus versioon, vaheta oma vana versioon uue vastu välja."
-
-#: ../includes/ot-functions-docs-page.php:841
-msgid "Step 2: Create Theme Options without using the UI Builder."
-msgstr "Samm 2: loo teema valikud ilma UI ehitajata."
-
-#: ../includes/ot-functions-docs-page.php:843
-msgid ""
-"Create a file and name it anything you want, maybe theme-options.php"
-"code>, or use the built in file export to create it for you. Remember, you "
-"should always check the file for errors before including it in your theme."
-msgstr ""
-"Loo fail ja anna talle suvaline nimi, näiteks theme-options.php"
-"code>, või kasuta selle loomiseks sisse ehitatud faili eksporti. Enne teemas "
-"kasutamist tuleks failile kindlasti vigade kontroll teha."
-
-#: ../includes/ot-functions-docs-page.php:844
-msgid ""
-"As well, you'll probably want to create a directory named includes"
-"code> to put your theme-options.php
into which will help keep "
-"you file structure nice and tidy."
-msgstr ""
-"Tõenäoliselt soovid luua ka kausta includes
, kuhu oma "
-"theme-options.php
fail panna. See hoiab failistruktuuri ilusa "
-"ja puhtana."
-
-#: ../includes/ot-functions-docs-page.php:855
-msgid ""
-"Add a variation of the following code to your theme-options.php"
-"code>. You'll obviously need to fill it in with all your custom array values "
-"for contextual help (optional), sections (required), and settings (required)."
-msgstr ""
-"Lisa oma theme-options.php
faili mingi variatsioon järgnevast "
-"koodist. Loomulikult tuleb see täita enda massiiviväärtustega "
-"kontekstipõhise abi ( valikuline ), sektsioonide ( nõutud ) ja sätete "
-"( nõutud ) jaoks."
-
-#: ../includes/ot-functions-docs-page.php:858
-msgid ""
-"The code below is a boilerplate to get your started. For a full list of the "
-"available option types click the \"Option Types\" tab above. Also a quick "
-"note, you don't need to put OptionTree in theme mode to manually create "
-"options but you will want to hide the docs and settings as each time you "
-"load the admin area the settings be written over with the code below if "
-"they've changed in any way. However, this ensures your settings do not get "
-"tampered with by the end-user."
-msgstr ""
-"Allolev kood on stereotüüp, millega saad alustada. Saadaolevate "
-"valikutüüpide täieliku nimekirja saad ülalolevast \"Valikutüübid\" sakist. "
-"Kiire vahemärkus: käsitsi valikute loomiseks ei pea OptionTree olema "
-"teemarežiimis, kuid sel juhul tuleks peita ära dokumentatsioon ja sätted, "
-"sest iga kord kui haldusliides laaditakse kirjutatakse sätted üle alloleva "
-"koodiga. Samas see kindlustab, et lõppkasutaja ei saa sätteid näppida."
-
-#: ../includes/ot-functions-option-types.php:46
-msgid "Sorry, this function does not exist"
-msgstr "Kahjuks sellist funktsiooni pole."
-
-#: ../includes/ot-functions-option-types.php:134
-msgid "background-repeat"
-msgstr "background-repeat"
-
-#: ../includes/ot-functions-option-types.php:152
-msgid "background-attachment"
-msgstr "background-attachment"
-
-#: ../includes/ot-functions-option-types.php:171
-msgid "background-position"
-msgstr "background-position"
-
-#: ../includes/ot-functions-option-types.php:224
-msgid "background-size"
-msgstr "background-size"
-
-#: ../includes/ot-functions-option-types.php:238
-msgid "background-image"
-msgstr "background-image"
-
-#: ../includes/ot-functions-option-types.php:241
-#: ../includes/ot-functions-option-types.php:3202
-msgid "Add Media"
-msgstr "Lisa meediat"
-
-#: ../includes/ot-functions-option-types.php:316
-#: ../includes/ot-functions-option-types.php:1045
-msgid "width"
-msgstr "width"
-
-#: ../includes/ot-functions-option-types.php:327
-#: ../includes/ot-functions-option-types.php:1065
-#: ../includes/ot-functions-option-types.php:1550
-#: ../includes/ot-functions-option-types.php:2506
-msgid "unit"
-msgstr "ühik"
-
-#: ../includes/ot-functions-option-types.php:346
-msgid "style"
-msgstr "style"
-
-#: ../includes/ot-functions-option-types.php:439
-msgid "offset-x"
-msgstr "offset-x"
-
-#: ../includes/ot-functions-option-types.php:448
-msgid "offset-y"
-msgstr "offset-y"
-
-#: ../includes/ot-functions-option-types.php:457
-msgid "blur-radius"
-msgstr "blur-radius"
-
-#: ../includes/ot-functions-option-types.php:466
-msgid "spread-radius"
-msgstr "spread-radius"
-
-#: ../includes/ot-functions-option-types.php:538
-#: ../includes/ot-functions-option-types.php:592
-msgid "No Categories Found"
-msgstr "Kategooriaid ei leitud"
-
-#: ../includes/ot-functions-option-types.php:587
-#: ../includes/ot-functions-option-types.php:870
-#: ../includes/ot-functions-option-types.php:1819
-#: ../includes/ot-functions-option-types.php:1930
-#: ../includes/ot-functions-option-types.php:2646
-#: ../includes/ot-functions-option-types.php:2761
-msgid "Choose One"
-msgstr "Valik üks"
-
-#: ../includes/ot-functions-option-types.php:818
-#: ../includes/ot-functions-option-types.php:876
-#: ../includes/ot-functions-option-types.php:1881
-#: ../includes/ot-functions-option-types.php:1936
-msgid "No Posts Found"
-msgstr "Postitusi ei leitud"
-
-#: ../includes/ot-functions-option-types.php:1054
-msgid "height"
-msgstr "height"
-
-#: ../includes/ot-functions-option-types.php:1232
-#: ../includes/ot-functions-option-types.php:1275
-msgid "Remove Google Font"
-msgstr "Eemalda Google Font"
-
-#: ../includes/ot-functions-option-types.php:1234
-#: ../includes/ot-functions-option-types.php:1277
-msgid "-- Choose One --"
-msgstr "-- Vali üks --"
-
-#: ../includes/ot-functions-option-types.php:1298
-msgid "Add Google Font"
-msgstr "Lisa Google Font"
-
-#: ../includes/ot-functions-option-types.php:1384
-msgctxt "color picker"
-msgid "Standard"
-msgstr "Standard"
-
-#: ../includes/ot-functions-option-types.php:1385
-msgctxt "color picker"
-msgid "Hover"
-msgstr "Hõljudes"
-
-#: ../includes/ot-functions-option-types.php:1386
-msgctxt "color picker"
-msgid "Active"
-msgstr "Aktiivne"
-
-#: ../includes/ot-functions-option-types.php:1387
-msgctxt "color picker"
-msgid "Visited"
-msgstr "Külastatud"
-
-#: ../includes/ot-functions-option-types.php:1388
-msgctxt "color picker"
-msgid "Focus"
-msgstr "Fookus"
-
-#: ../includes/ot-functions-option-types.php:1497
-#: ../includes/ot-functions-option-types.php:2246
-#: ../includes/ot-functions-option-types.php:2411
-msgid "Add New"
-msgstr "Lisa uus"
-
-#: ../includes/ot-functions-option-types.php:1500
-#: ../includes/ot-functions-option-types.php:2249
-#: ../includes/ot-functions-option-types.php:2414
-msgid "You can re-order with drag & drop, the order will update after saving."
-msgstr ""
-"Lohistades saab elemente ümber paigutada. Järjekord uueneb peale "
-"salvestamist."
-
-#: ../includes/ot-functions-option-types.php:1670
-msgid "On"
-msgstr "Sees"
-
-#: ../includes/ot-functions-option-types.php:1692
-msgid "Off"
-msgstr "Väljas"
-
-#: ../includes/ot-functions-option-types.php:1770
-#: ../includes/ot-functions-option-types.php:1825
-msgid "No Pages Found"
-msgstr "Lehekülgi ei leitud"
-
-#: ../includes/ot-functions-option-types.php:2169
-msgid "Choose Sidebar"
-msgstr "Vali küljendusmenüü"
-
-#: ../includes/ot-functions-option-types.php:2174
-msgid "No Sidebars"
-msgstr "Küljendusmenüüd puuduvad"
-
-#: ../includes/ot-functions-option-types.php:2282
-msgid "Facebook"
-msgstr "Facebook"
-
-#: ../includes/ot-functions-option-types.php:2287
-msgid "Twitter"
-msgstr "Twitter"
-
-#: ../includes/ot-functions-option-types.php:2292
-msgid "Google+"
-msgstr "Google+"
-
-#: ../includes/ot-functions-option-types.php:2297
-msgid "LinkedIn"
-msgstr "LinkedIn"
-
-#: ../includes/ot-functions-option-types.php:2302
-msgid "Pinterest"
-msgstr "Pinterest"
-
-#: ../includes/ot-functions-option-types.php:2307
-msgid "Youtube"
-msgstr "Youtube"
-
-#: ../includes/ot-functions-option-types.php:2312
-msgid "Dribbble"
-msgstr "Dribbble"
-
-#: ../includes/ot-functions-option-types.php:2317
-msgid "Github"
-msgstr "Github"
-
-#: ../includes/ot-functions-option-types.php:2322
-msgid "Forrst"
-msgstr "Forrst"
-
-#: ../includes/ot-functions-option-types.php:2327
-msgid "Digg"
-msgstr "Digg"
-
-#: ../includes/ot-functions-option-types.php:2332
-msgid "Delicious"
-msgstr "Delicious"
-
-#: ../includes/ot-functions-option-types.php:2337
-msgid "Tumblr"
-msgstr "Tumblr"
-
-#: ../includes/ot-functions-option-types.php:2342
-msgid "Skype"
-msgstr "Skype"
-
-#: ../includes/ot-functions-option-types.php:2347
-msgid "SoundCloud"
-msgstr "SoundCloud"
-
-#: ../includes/ot-functions-option-types.php:2352
-msgid "Vimeo"
-msgstr "Vimeo"
-
-#: ../includes/ot-functions-option-types.php:2357
-msgid "Flickr"
-msgstr "Flickr"
-
-#: ../includes/ot-functions-option-types.php:2362
-msgid "VK.com"
-msgstr "VK.com"
-
-#: ../includes/ot-functions-option-types.php:2468
-msgid "top"
-msgstr "top"
-
-#: ../includes/ot-functions-option-types.php:2477
-msgid "right"
-msgstr "right"
-
-#: ../includes/ot-functions-option-types.php:2486
-msgid "bottom"
-msgstr "bottom"
-
-#: ../includes/ot-functions-option-types.php:2495
-msgid "left"
-msgstr "left"
-
-#: ../includes/ot-functions-option-types.php:2597
-#: ../includes/ot-functions-option-types.php:2651
-msgid "No Tags Found"
-msgstr "Märksõnu ei leitud"
-
-#: ../includes/ot-functions-option-types.php:2709
-#: ../includes/ot-functions-option-types.php:2766
-msgid "No Taxonomies Found"
-msgstr "Taksonoomiaid ei leitud"
-
-#: ../includes/ot-functions-settings-page.php:35
-msgid "Warning!"
-msgstr "Hoiatus!"
-
-#: ../includes/ot-functions-settings-page.php:36
-#, php-format
-msgid ""
-"Go to the %s page if you want to save data, this page is for adding settings."
-msgstr "Info salvestamiseks on %s leht, see leht siin on sätete lisamiseks."
-
-#: ../includes/ot-functions-settings-page.php:37
-#, php-format
-msgid ""
-"If you're unsure or not completely positive that you should be editing these "
-"settings, you should read the %s first."
-msgstr "Kui kahtled, kas peaksid neid sätteid muutma, loe kõigepealt %s."
-
-#: ../includes/ot-functions-settings-page.php:38
-msgid ""
-"Things could break or be improperly displayed to the end-user if you do one "
-"of the following:"
-msgstr ""
-"Kui teed ühte järgnevatest, võivad asjad katki minna või olla lõpp-"
-"kasutajale valesti kuvatud:"
-
-#: ../includes/ot-functions-settings-page.php:39
-msgid ""
-"Give two sections the same ID, give two settings the same ID, give two "
-"contextual help content areas the same ID, don't create any settings, or "
-"have a section at the end of the settings list."
-msgstr ""
-"annad kahele sektsioonile sama ID, annad kahele sättele sama ID, annad "
-"kahele kontekstipõhise abi alale sama ID, ei loo ühtegi sätet või jätad "
-"sektsiooni sätete nimekirja lõppu."
-
-#: ../includes/ot-functions-settings-page.php:40
-msgid ""
-"You can create as many settings as your project requires and use them how "
-"you see fit. When you add a setting here, it will be available on the Theme "
-"Options page for use in your theme. To separate your settings into sections, "
-"click the \"Add Section\" button, fill in the input fields, and a new "
-"navigation menu item will be created."
-msgstr ""
-"Sätteid saab luua nii palju kui vaja ning kasutada oma parema äranägemise "
-"järgi. Siia sätte lisamisel tekib see teema valikute lehele oma teemas "
-"kasutamiseks. Sätete sektsioonidesse eraldamiseks vajuta \"Lisa sektsioon\" "
-"nupule, täida sisendväljad ning uus navigatsioonimenüü element on loodud."
-
-#: ../includes/ot-functions-settings-page.php:41
-msgid ""
-"All of the settings can be sorted and rearranged to your liking with Drag & "
-"Drop. Don't worry about the order in which you create your settings, you can "
-"always reorder them."
-msgstr ""
-"Kõiki sätteid saab sorteerida ja ümber paigutada lohistamise abil. Sätete "
-"loomise järjekorra üle ei pea muretsema, sest neid saab alati ümber "
-"järjestada."
-
-#: ../includes/ot-functions-settings-page.php:92
-msgid "Add Section"
-msgstr "Lisa sektsioon"
-
-#: ../includes/ot-functions-settings-page.php:99
-msgid "Contextual Help"
-msgstr "Konteksti põhine abi"
-
-#: ../includes/ot-functions-settings-page.php:103
-msgid "Contextual Help Sidebar"
-msgstr "Konteksti põhise abi küljeriba"
-
-#: ../includes/ot-functions-settings-page.php:103
-msgid ""
-"If you decide to add contextual help to the Theme Option page, enter the "
-"optional \"Sidebar\" HTML here. This would be an extremely useful place to "
-"add links to your themes documentation or support forum. Only after you've "
-"added some content below will this display to the user."
-msgstr ""
-"Kui soovida lisada kontekstipõhist abiteksti, sisesta \"Küljeriba\" HTML "
-"siia. See oleks väga hea koht, kuhu lisada linke oma teema "
-"dokumentatsioonile või kasutajatoe foorumile. Seda näidatakse kasutajale "
-"vaid juhul, kui allpool on mingi sisu lisatud."
-
-#: ../includes/ot-functions-settings-page.php:132
-msgid "Add Contextual Help Content"
-msgstr "Lisa konteksti põhine abitekst"
-
-#: ../includes/ot-functions-settings-page.php:168
-msgid ""
-"This import method has been deprecated. That means it has been replaced by a "
-"new method and is no longer supported, and may be removed from future "
-"versions. All themes that use this import method should be converted to use "
-"its replacement below."
-msgstr ""
-"Impordi meetodit taunitakse. See tähendab, et teda asendab uuem meetod ja "
-"enam teda ei toetata. Ta võidakse tulevastes versioonides eemaldada. Kõik "
-"teemad, mis seda impordi meetodit kasutavad, tuleks ümber muuta allolevat "
-"asendust kasutama."
-
-#: ../includes/ot-functions-settings-page.php:170
-#, php-format
-msgid ""
-"If you were given a Theme Options XML file with a premium or free theme, "
-"locate it on your hard drive and upload that file by clicking the upload "
-"button. A popup window will appear, upload the XML file and click \"%s\". "
-"The file URL should be in the upload input, if it is click \"Import XML\"."
-msgstr ""
-"Kui sulle anti teemaga kaasa valikute XML fail, leia see oma kõvakettalt "
-"ning vajuta üleslaadimise nuppu. Avanevas aknas lae üles XML fail ja vajuta "
-"\"%s\". Faili URL peaks olema üleslaadimise sisendis. Kui see seal on, "
-"vajuta nuppu \"Impordi XML\"."
-
-#: ../includes/ot-functions-settings-page.php:173
-msgid "Import XML"
-msgstr "Impordi XML"
-
-#: ../includes/ot-functions-settings-page.php:189
-msgid "Add XML"
-msgstr "Lisa XML"
-
-#: ../includes/ot-functions-settings-page.php:226
-msgid ""
-"To import your Settings copy and paste what appears to be a random string of "
-"alpha numeric characters into this textarea and press the \"Import Settings"
-"\" button."
-msgstr ""
-"Sätete importimiseks kopeeri ja kleebi näiliselt juhuslik string tähtedest "
-"ja numbritest siia tekstialasse ning vajuta \"Impordi sätted\" nuppu."
-
-#: ../includes/ot-functions-settings-page.php:229
-msgid "Import Settings"
-msgstr "Impordi seaded"
-
-#: ../includes/ot-functions-settings-page.php:271
-msgid ""
-"Only after you've imported the Settings should you try and update your Theme "
-"Options."
-msgstr "Enne teema valikute uuendamist impordi sätted."
-
-#: ../includes/ot-functions-settings-page.php:273
-msgid ""
-"To import your Theme Options copy and paste what appears to be a random "
-"string of alpha numeric characters into this textarea and press the \"Import "
-"Theme Options\" button."
-msgstr ""
-"Teema valikute importimiseks kopeeri ja kleebi näiliselt juhuslik string "
-"tähtedest ja numbritest siia tekstialasse ning vajuta \"Impordi teema valikud"
-"\" nuppu."
-
-#: ../includes/ot-functions-settings-page.php:276
-msgid "Import Theme Options"
-msgstr "Impordi teema valikud"
-
-#: ../includes/ot-functions-settings-page.php:318
-msgid ""
-"Only after you've imported the Settings should you try and update your "
-"Layouts."
-msgstr "Enne paigutuste uuendamist impordi sätted."
-
-#: ../includes/ot-functions-settings-page.php:320
-msgid ""
-"To import your Layouts copy and paste what appears to be a random string of "
-"alpha numeric characters into this textarea and press the \"Import Layouts\" "
-"button. Keep in mind that when you import your layouts, the active layout's "
-"saved data will write over the current data set for your Theme Options."
-msgstr ""
-"Paigutuste importimiseks kopeeri ja kleebi näiliselt juhuslik string "
-"tähtedest ja numbritest siia tekstialasse ning vajuta \"Impordi paigutus\" "
-"nuppu. Arvesta, et aktiivse paigutuse salvestatud andmed kirjutavad "
-"hetkeandmed üle."
-
-#: ../includes/ot-functions-settings-page.php:323
-msgid "Import Layouts"
-msgstr "Impordi paigutused"
-
-#: ../includes/ot-functions-settings-page.php:366
-#, php-format
-msgid ""
-"Export your Settings into a fully functional %s file. If you want to add "
-"your own custom %s text domain to the file, enter it into the text field "
-"before exporting. For more information on how to use this file read the "
-"documentation on %s. Remember, you should always check the file for errors "
-"before including it in your theme."
-msgstr ""
-"Ekspordi oma sätted täisfunktsionaalsesse %s faili. Kui soovid failile "
-"lisada enda kohandatud %s tekstidomeeni, sisesta see tekstivälja enne "
-"eksportimist. Lisainformatsiooni selle faili kasutamise kohta leiad "
-"dokumentatsioonis %s. Pea meeles, et failile tuleks teha vigade kontroll "
-"enne teemasse kaasamist."
-
-#: ../includes/ot-functions-settings-page.php:375
-msgid "Export Settings File"
-msgstr "Ekspordi seadete fail"
-
-#: ../includes/ot-functions-settings-page.php:405
-msgid ""
-"Export your Settings by highlighting this text and doing a copy/paste into a "
-"blank .txt file. Then save the file for importing into another install of "
-"WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Settings textarea "
-"on another web site."
-msgstr ""
-"Ekspordi oma sätted, markeerides see tekst ja kopeerides ta tühja .txt "
-"faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi "
-"installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe "
-"OptionTree->Sätted->Import
Sätted tekstialasse."
-
-#: ../includes/ot-functions-settings-page.php:441
-msgid ""
-"Export your Theme Options data by highlighting this text and doing a copy/"
-"paste into a blank .txt file. Then save the file for importing into another "
-"install of WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Theme Options "
-"textarea on another web site."
-msgstr ""
-"Ekspordi oma teema valikud, markeerides see tekst ja kopeerides ta tühja ."
-"txt faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi "
-"installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe "
-"OptionTree->Sätted->Import
Teema valikud "
-"tekstialasse."
-
-#: ../includes/ot-functions-settings-page.php:477
-msgid ""
-"Export your Layouts by highlighting this text and doing a copy/paste into a "
-"blank .txt file. Then save the file for importing into another install of "
-"WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Layouts textarea "
-"on another web site."
-msgstr ""
-"Ekspordi oma paigutused, markeerides see tekst ja kopeerides ta tühja .txt "
-"faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi "
-"installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe "
-"OptionTree->Sätted->Import
Paigutused "
-"tekstialasse."
-
-#: ../includes/ot-functions-settings-page.php:519
-msgid ""
-"To add a new layout enter a unique lower case alphanumeric string (dashes "
-"allowed) in the text field and click \"Save Layouts\"."
-msgstr ""
-"Uue paigutuse lisamiseks sisestage tekstivälja unikaalne väiketähtedega "
-"alfanumbriline string ( sidekriipsud lubatud ) ning vajutage \"Salvesta "
-"paigutused\" nupul."
-
-#: ../includes/ot-functions-settings-page.php:520
-msgid ""
-"As well, you can activate, remove, and drag & drop the order; all situations "
-"require you to click \"Save Layouts\" for the changes to be applied."
-msgstr ""
-"Saate ka aktiveerida, eemaldada ning lohistades järjekorda muuta. Muudatused "
-"ei mõju enne, kui vajutate \"Salvesta paigutused\" nuppu."
-
-#: ../includes/ot-functions-settings-page.php:521
-msgid ""
-"When you create a new layout it will become active and any changes made to "
-"the Theme Options will be applied to it. If you switch back to a different "
-"layout immediately after creating a new layout that new layout will have a "
-"snapshot of the current Theme Options data attached to it."
-msgstr ""
-"Uue paigutuse loomisel muudetakse see aktiivseks ning edasised muudatused "
-"teema valikutes mõjuvad talle. Kui peale uue paigutuse loomist kohe mõne muu "
-"paigutuse peale vahetada, siis uue paigutuse külge jääb teema valikute "
-"andmete hetkeseis paigutuse loomisel."
-
-#: ../includes/ot-functions-settings-page.php:522
-msgid ""
-"Visit OptionTree->Documentation->Layouts Overview
to see a more "
-"in-depth description of what layouts are and how to use them."
-msgstr ""
-"Lehel OptionTree->Dokumentatsioon->Paigutuste ülevaade
leiad "
-"põhjalikuma paigutuste kirjelduse ja kasutusjuhendi."
-
-#: ../includes/ot-functions-settings-page.php:559
-msgid "Save Layouts"
-msgstr "Salvesta paigutused"
-
-#: ../includes/ot-settings-api.php:364
-msgid "Reset Options"
-msgstr "Algseadista seaded"
-
-#: ../ot-loader.php:22
-msgid ""
-"OptionTree is installed as a plugin and also embedded in your current theme. "
-"Please deactivate the plugin to load the theme dependent version of "
-"OptionTree, and remove this warning."
-msgstr ""
-"OptionTree on paigaldatud nii moodulina kui ka kaasatud aktiivses teemas. "
-"Palun lülita moodul välja, et laetaks teemast sõltuv versioon OptionTreest "
-"ja see hoiatus kaoks."
-
-#~ msgid "The Colorpicker only allows valid hexadecimal values."
-#~ msgstr ""
-#~ "Värvi valija lubab vaid sobivaid kuueteistkümnendiksüsteemis väärtuseid."
-
-#~ msgid "Congratulations! You have a clean install."
-#~ msgstr "Õnnitlused! Sul on puhas paigaldus."
-
-#~ msgid ""
-#~ "Your version of OptionTree does not have any outdated data. If there was "
-#~ "outdated data, you would be presented with options to clean it up."
-#~ msgstr ""
-#~ "Sinu OptionTree versioonis ei ole aegunud andmeid. Kui neid oleks, siis "
-#~ "pakutaks võimalust puhastamiseks."
-
-#~ msgid "Hide This Page"
-#~ msgstr "Peida lehekülg"
-
-#~ msgid "Demo Meta Box"
-#~ msgstr "Näidis meta kast"
-
-#~ msgid "Conditions"
-#~ msgstr "Tingimused"
-
-#~ msgid "Show Gallery"
-#~ msgstr "Näita galeriid"
-
-#~ msgid "Shows the Gallery when set to %s."
-#~ msgstr "Näitab galeriid, kui on määratud asendisse %s"
-
-#~ msgid "Congratulations, you created a gallery!"
-#~ msgstr "Õnnitlused, lõite just galerii!"
-
-#~ msgid "This is a Gallery option type. It displays when %s."
-#~ msgstr "See on galerii valikutüüp. Nähtaval, kui ta on %s"
-
-#~ msgid "More Options"
-#~ msgstr "Rohkem seadeid"
-
-#~ msgid "This is a demo Text field."
-#~ msgstr "See on näidis tekstisisend."
-
-#~ msgid "This is a demo Textarea field."
-#~ msgstr "See on näidis tekstiväli."
-
-#~ msgid "Help content goes here!"
-#~ msgstr "Siia lähevad abitekstid!"
-
-#~ msgid "Sidebar content goes here!"
-#~ msgstr "Siia läheb küljeriba sisu!"
-
-#~ msgid "No"
-#~ msgstr "Ei"
-
-#~ msgid "Yes"
-#~ msgstr "Jah"
-
-#~ msgid "Gallery Shortcode"
-#~ msgstr "Galerii lühikood"
-
-#~ msgid ""
-#~ "The Gallery option type can also be saved as a shortcode by adding %s to "
-#~ "the class attribute. Using the Gallery option type in this manner will "
-#~ "result in a better user experience as you're able to save the link, "
-#~ "column, and order settings."
-#~ msgstr ""
-#~ "Lisades %s klassiatribuudiks saab galerii valikutüübi salvestada ka "
-#~ "lühikoodina. Sellisel moel galerii valikutüüpi kasutades on tulemuseks "
-#~ "parem kasutajakogemus, kuna saad salvestada lingi, tulba ja järjekorra "
-#~ "sätteid."
-
-#~ msgid ""
-#~ "The List Item option type allows for a great deal of customization. You "
-#~ "can add settings to the List Item and those settings will be displayed to "
-#~ "the user when they add a new List Item. Typical use is for creating "
-#~ "sliding content or blocks of code for custom layouts."
-#~ msgstr ""
-#~ "Nimekirja elemendi valikutüüpi on väga hästi kohandatav. Nimekirja "
-#~ "elementidele saab lisada sätteid ning neid näidatakse kasutajale uue "
-#~ "elemendi lisamisel. Tüüpiline kasutus on liugleva sisu jaoks või "
-#~ "kohandatud paigutuse koodiblokkide tarvis."
-
-#~ msgid "Content"
-#~ msgstr "Sisu"
-
-#~ msgid "Maybe"
-#~ msgstr "Võib-olla"
-
-#~ msgid "Upload Attachment ID"
-#~ msgstr "Üles laetud manuse ID"
-
-#~ msgid ""
-#~ "The Upload option type can also be saved as an attachment ID by adding %s "
-#~ "to the class attribute."
-#~ msgstr ""
-#~ "Üleslaadimise valikutüüpi saab salvestada ka manuse ID-na, lisades %s "
-#~ "klassi atribuudile."
-
-#~ msgid "Color Picker"
-#~ msgstr "Värvi valija"
diff --git a/option-tree/languages/option-tree.po b/option-tree/languages/option-tree.po
deleted file mode 100644
index 4300914..0000000
--- a/option-tree/languages/option-tree.po
+++ /dev/null
@@ -1,2461 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: OptionTree\n"
-"POT-Creation-Date: 2016-01-31 23:23-0800\n"
-"PO-Revision-Date: 2016-01-31 23:24-0800\n"
-"Last-Translator: Derek Herman \n"
-"Language-Team: Valen Designs\n"
-"Language: en\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.7.6\n"
-"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
-"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
-"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
-"X-Poedit-Basepath: .\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Poedit-SearchPath-0: ..\n"
-"X-Poedit-SearchPathExcluded-0: ../.git\n"
-"X-Poedit-SearchPathExcluded-1: ../composer.json\n"
-"X-Poedit-SearchPathExcluded-2: ../assets\n"
-
-#: ../includes/ot-cleanup-api.php:84 ../includes/ot-cleanup-api.php:101
-#: ../includes/ot-cleanup-api.php:130
-msgid "OptionTree Cleanup"
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:101
-#, php-format
-msgid ""
-"OptionTree has outdated data that should be removed. Please go to %s for "
-"more information."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:136
-msgid "Multiple Media Posts"
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:138
-#, php-format
-msgid ""
-"There are currently %s OptionTree media posts in your database. At some "
-"point in the past, a version of OptionTree added multiple %s media post "
-"objects cluttering up your %s table. There is no associated risk or harm "
-"that these posts have caused other than to add size to your overall "
-"database. Thankfully, there is a way to remove all these orphaned media "
-"posts and get your database cleaned up."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:140
-#, php-format
-msgid ""
-"By clicking the button below, OptionTree will delete %s records and "
-"consolidate them into one single OptionTree media post for uploading "
-"attachments to. Additionally, the attachments will have their parent ID "
-"updated to the correct media post."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:142
-msgid ""
-"This could take a while to fully process depending on how many records you "
-"have in your database, so please be patient and wait for the script to "
-"finish."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:144
-#, php-format
-msgid ""
-"%s Your server is running in safe mode. Which means this page will "
-"automatically reload after deleting %s posts, you can filter this number "
-"using %s if your server is having trouble processing that many at one time."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:146
-msgid "Consolidate Posts"
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:174
-msgid "Reloading..."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:210
-msgid "Clean up script has completed, the page will now reload..."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:230
-msgid "Outdated Table"
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:232
-#, php-format
-msgid ""
-"If you have upgraded from an old 1.x version of OptionTree at some point, "
-"you have an extra %s table in your database that can be removed. It's not "
-"hurting anything, but does not need to be there. If you want to remove it. "
-"Click the button below."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:234
-msgid "Drop Table"
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:238
-#, php-format
-msgid "Deleting the outdated and unused %s table..."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:244
-#, php-format
-msgid "The %s table has been successfully deleted. The page will now reload..."
-msgstr ""
-
-#: ../includes/ot-cleanup-api.php:256
-#, php-format
-msgid "Something went wrong. The %s table was not deleted."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51
-#: ../includes/ot-functions-admin.php:169
-#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:388
-msgid "Theme Options"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:56
-#: ../includes/ot-functions-admin.php:126
-#: ../includes/ot-functions-admin.php:220
-msgid "Theme Options updated."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:57
-#: ../includes/ot-functions-admin.php:127
-#: ../includes/ot-functions-admin.php:221
-msgid "Theme Options reset."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:58
-#: ../includes/ot-functions-settings-page.php:94
-#: ../includes/ot-functions-settings-page.php:133
-msgid "Save Changes"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:97
-msgid ""
-"The Theme Options UI Builder is being overridden by a custom file in your "
-"theme. Any changes you make via the UI Builder will not be saved."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:109
-#: ../includes/ot-functions-admin.php:110
-#: ../includes/ot-functions-docs-page.php:821
-msgid "OptionTree"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:120
-#: ../includes/ot-functions-admin.php:121
-#: ../includes/ot-functions-admin.php:163
-#: ../includes/ot-functions-admin.php:187
-#: ../includes/ot-functions-docs-page.php:49
-msgid "Settings"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:128
-#: ../includes/ot-functions-admin.php:222
-msgid "Save Settings"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:133
-msgid "Theme Options UI"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:137
-msgid "Import"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:141
-msgid "Export"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:145
-#: ../includes/ot-functions-admin.php:175
-#: ../includes/ot-functions-admin.php:199
-msgid "Layouts"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:151
-msgid "Theme Options UI Builder"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:157
-msgid "Settings XML"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:181
-msgid "Settings PHP File"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:205
-msgid "Layout Management"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:214
-#: ../includes/ot-functions-admin.php:215
-msgid "Documentation"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:227
-msgid "Creating Options"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:231
-msgid "Option Types"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:235
-msgid "Function References"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:239
-#: ../includes/ot-functions-admin.php:281
-#: ../includes/ot-functions-settings-page.php:366
-msgid "Theme Mode"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:243
-#: ../includes/ot-functions-admin.php:287
-msgid "Meta Boxes"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:247
-msgid "Code Examples"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:251
-msgid "Layouts Overview"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:257
-msgid "Overview of available Theme Option fields."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:263
-msgid "Option types in alphabetical order & hooks to filter them."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:269
-msgid "Function Reference:ot_get_option()"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:275
-msgid "Function Reference:get_option_tree()"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:293
-msgid "Code examples for front-end development."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:299
-msgid "What's a layout anyhow?"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:502
-#: ../includes/ot-functions-admin.php:604
-#: ../includes/ot-functions-admin.php:673
-#, php-format
-msgid "The %s input field for %s only allows numeric values."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:563
-#, php-format
-msgid "The %s Colorpicker only allows valid hexadecimal or rgba values."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:847
-#: ../includes/ot-functions-docs-page.php:398
-#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:785
-msgid "Send to OptionTree"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:848
-#: ../includes/ot-functions-option-types.php:257
-#: ../includes/ot-functions-option-types.php:3218
-msgid "Remove Media"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:849
-msgid "Are you sure you want to reset back to the defaults?"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:850
-msgid "You can't remove this! But you can edit the values."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:851
-msgid "Are you sure you want to remove this?"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:852
-msgid "Are you sure you want to activate this layout?"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:853
-msgid "Sorry, you can't have settings three levels deep."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:854
-#: ../includes/ot-functions-option-types.php:1159
-msgid "Delete Gallery"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:855
-#: ../includes/ot-functions-option-types.php:1160
-msgid "Edit Gallery"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:856
-#: ../includes/ot-functions-option-types.php:1167
-msgid "Create Gallery"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:857
-msgid "Are you sure you want to delete this Gallery?"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:858
-msgid "Today"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:859
-msgid "Now"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:860
-msgid "Close"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:861
-msgid "Featured Image"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:862
-#: ../includes/ot-functions-admin.php:3251
-#: ../includes/ot-functions-admin.php:3312
-msgid "Image"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:930
-msgid "Option Tree"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:1068
-msgid "General"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:1074
-msgid "Sample Text Field Label"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:1075
-msgid "Description for the sample text field."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2317
-msgid "Settings updated."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2321
-msgid "Settings could not be saved."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2329
-msgid "Settings Imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2333
-msgid "Settings could not be imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2340
-msgid "Data Imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2344
-msgid "Data could not be imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2352
-msgid "Layouts Imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2356
-msgid "Layouts could not be imported."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2364
-msgid "Layouts Updated."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2368
-msgid "Layouts could not be updated."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2372
-msgid "Layouts have been deleted."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2378
-msgid "Layout activated."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2417
-#: ../includes/ot-functions-docs-page.php:110
-msgid "Background"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2418
-#: ../includes/ot-functions-docs-page.php:113
-msgid "Border"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2419
-#: ../includes/ot-functions-docs-page.php:116
-msgid "Box Shadow"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2420
-#: ../includes/ot-functions-docs-page.php:119
-msgid "Category Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2421
-#: ../includes/ot-functions-docs-page.php:122
-msgid "Category Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2422
-#: ../includes/ot-functions-docs-page.php:125
-msgid "Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2423
-#: ../includes/ot-functions-docs-page.php:128
-msgid "Colorpicker"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2424
-#: ../includes/ot-functions-docs-page.php:131
-msgid "Colorpicker Opacity"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2425
-#: ../includes/ot-functions-docs-page.php:134
-msgid "CSS"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2426
-#: ../includes/ot-functions-docs-page.php:153
-msgid "Custom Post Type Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2427
-#: ../includes/ot-functions-docs-page.php:156
-msgid "Custom Post Type Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2428
-#: ../includes/ot-functions-docs-page.php:159
-msgid "Date Picker"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2429
-#: ../includes/ot-functions-docs-page.php:162
-msgid "Date Time Picker"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2430
-#: ../includes/ot-functions-docs-page.php:165
-msgid "Dimension"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2431
-#: ../includes/ot-functions-admin.php:5466
-#: ../includes/ot-functions-docs-page.php:168
-msgid "Gallery"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2432
-#: ../includes/ot-functions-docs-page.php:171
-msgid "Google Fonts"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2433
-#: ../includes/ot-functions-docs-page.php:174
-msgid "JavaScript"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2434
-#: ../includes/ot-functions-docs-page.php:177
-msgid "Link Color"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2435
-#: ../includes/ot-functions-docs-page.php:180
-msgid "List Item"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2436
-#: ../includes/ot-functions-docs-page.php:183
-msgid "Measurement"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2437
-#: ../includes/ot-functions-docs-page.php:214
-msgid "Numeric Slider"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2438
-#: ../includes/ot-functions-docs-page.php:217
-msgid "On/Off"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2439
-#: ../includes/ot-functions-docs-page.php:220
-msgid "Page Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2440
-#: ../includes/ot-functions-docs-page.php:223
-msgid "Page Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2441
-#: ../includes/ot-functions-docs-page.php:226
-msgid "Post Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2442
-#: ../includes/ot-functions-docs-page.php:229
-msgid "Post Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2443
-#: ../includes/ot-functions-docs-page.php:232
-msgid "Radio"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2444
-#: ../includes/ot-functions-docs-page.php:235
-msgid "Radio Image"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2445
-#: ../includes/ot-functions-docs-page.php:262
-msgid "Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2446
-#: ../includes/ot-functions-docs-page.php:265
-msgid "Sidebar Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2447
-#: ../includes/ot-functions-docs-page.php:269
-msgid "Slider"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2448
-#: ../includes/ot-functions-docs-page.php:272
-msgid "Social Links"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2449
-#: ../includes/ot-functions-docs-page.php:275
-msgid "Spacing"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2450
-#: ../includes/ot-functions-docs-page.php:278
-msgid "Tab"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2451
-#: ../includes/ot-functions-docs-page.php:281
-msgid "Tag Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2452
-#: ../includes/ot-functions-docs-page.php:284
-msgid "Tag Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2453
-#: ../includes/ot-functions-docs-page.php:287
-msgid "Taxonomy Checkbox"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2454
-#: ../includes/ot-functions-docs-page.php:290
-msgid "Taxonomy Select"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2455
-#: ../includes/ot-functions-docs-page.php:293
-msgid "Text"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2456
-#: ../includes/ot-functions-docs-page.php:296
-msgid "Textarea"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2457
-#: ../includes/ot-functions-docs-page.php:355
-msgid "Textarea Simple"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2458
-#: ../includes/ot-functions-docs-page.php:371
-msgid "Textblock"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2459
-#: ../includes/ot-functions-docs-page.php:374
-msgid "Textblock Titled"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2460
-#: ../includes/ot-functions-docs-page.php:377
-msgid "Typography"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:2461
-#: ../includes/ot-functions-docs-page.php:397
-msgid "Upload"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3196
-msgid "Left Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3201
-msgid "Right Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3206
-msgid "Full Width (no sidebar)"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3211
-msgid "Dual Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3216
-msgid "Left Dual Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3221
-msgid "Right Dual Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3262
-#: ../includes/ot-functions-admin.php:3318
-#: ../includes/ot-functions-admin.php:5506
-msgid "Link"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3273
-#: ../includes/ot-functions-admin.php:3324
-#: ../includes/ot-functions-docs-page.php:43
-#: ../includes/ot-functions-docs-page.php:428
-#: ../includes/ot-functions-docs-page.php:478
-msgid "Description"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3388
-msgid "Name"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3389
-msgid "Enter the name of the social website."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3397
-msgid "Enter the text shown in the title attribute of the link."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3403
-#, php-format
-msgid ""
-"Enter a link to the profile or page on the social website. Remember to add "
-"the %s part to the front of the link."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:3756
-#, php-format
-msgid "Unable to write to file %s."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4026
-msgid "edit"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4027
-#: ../includes/ot-functions-admin.php:4095
-#: ../includes/ot-functions-admin.php:4096
-#: ../includes/ot-functions-admin.php:4258
-#: ../includes/ot-functions-admin.php:4259
-#: ../includes/ot-functions-admin.php:4324
-#: ../includes/ot-functions-admin.php:4325
-#: ../includes/ot-functions-admin.php:4452
-#: ../includes/ot-functions-admin.php:4453
-#: ../includes/ot-functions-admin.php:4605
-#: ../includes/ot-functions-admin.php:4606
-msgid "Edit"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4029
-#: ../includes/ot-functions-admin.php:4030
-#: ../includes/ot-functions-admin.php:4098
-#: ../includes/ot-functions-admin.php:4099
-#: ../includes/ot-functions-admin.php:4261
-#: ../includes/ot-functions-admin.php:4262
-#: ../includes/ot-functions-admin.php:4327
-#: ../includes/ot-functions-admin.php:4328
-#: ../includes/ot-functions-admin.php:4386
-#: ../includes/ot-functions-admin.php:4387
-#: ../includes/ot-functions-admin.php:4455
-#: ../includes/ot-functions-admin.php:4456
-#: ../includes/ot-functions-admin.php:4608
-#: ../includes/ot-functions-admin.php:4609
-msgid "Delete"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4036
-msgid ""
-"Section Title : Displayed as a menu item on the Theme "
-"Options page."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4044
-msgid ""
-"Section ID : A unique lower case alphanumeric string, "
-"underscores allowed."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4105
-msgid ""
-"Label : Displayed as the label of a form element on the "
-"Theme Options page."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4113
-#: ../includes/ot-functions-admin.php:4342
-msgid ""
-"ID : A unique lower case alphanumeric string, underscores "
-"allowed."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4121
-msgid ""
-"Type : Choose one of the available option types from the "
-"dropdown."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4132
-msgid ""
-"Description : Enter a detailed description for the users to "
-"read on the Theme Options page, HTML is allowed. This is also where you "
-"enter content for both the Textblock & Textblock Titled option types."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4140
-msgid ""
-"Choices : This will only affect the following option types: "
-"Checkbox, Radio, Select & Select Image."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4145
-msgid "Add Choice"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4151
-msgid ""
-"Settings : This will only affect the List Item option type."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4156
-#: ../includes/ot-functions-settings-page.php:93
-msgid "Add Setting"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4162
-msgid ""
-"Standard : Setting the standard value for your option only "
-"works for some option types. Read the OptionTree->Documentation
"
-"for more information on which ones."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4170
-msgid ""
-"Rows : Enter a numeric value for the number of rows in your "
-"textarea. This will only affect the following option types: CSS, Textarea, & "
-"Textarea Simple."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4178
-msgid ""
-"Post Type : Add a comma separated list of post type like "
-"'post,page'. This will only affect the following option types: Custom Post "
-"Type Checkbox, & Custom Post Type Select."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4186
-msgid ""
-"Taxonomy : Add a comma separated list of any registered "
-"taxonomy like 'category,post_tag'. This will only affect the following "
-"option types: Taxonomy Checkbox, & Taxonomy Select."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4194
-msgid ""
-"Min, Max, & Step : Add a comma separated list of options in "
-"the following format 0,100,1
(slide from 0-100
in "
-"intervals of 1
). The three values represent the minimum, "
-"maximum, and step options and will only affect the Numeric Slider option "
-"type."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4202
-msgid "CSS Class : Add and optional class to this option type."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4210
-#, php-format
-msgid ""
-"Condition : Add a comma separated list (no spaces) of "
-"conditions in which the field will be visible, leave this setting empty to "
-"always show the field. In these examples, value
is a "
-"placeholder for your condition, which can be in the form of %s."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4218
-msgid ""
-"Operator : Choose the logical operator to compute the result "
-"of the conditions."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4221
-#: ../includes/ot-functions-docs-page.php:111
-#: ../includes/ot-functions-docs-page.php:378
-msgid "and"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4222
-msgid "or"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4268
-#: ../includes/ot-functions-docs-page.php:29
-msgid "Label"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4278
-msgid "Value"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4288
-msgid "Image Source (Radio Image only)"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4334
-msgid ""
-"Title : Displayed as a contextual help menu item on the "
-"Theme Options page."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4350
-msgid ""
-"Content : Enter the HTML content about this contextual help "
-"item displayed on the Theme Option page for end users to read."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4381
-msgid "Layout"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4383
-#: ../includes/ot-functions-admin.php:4384
-msgid "Activate"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4420 ../includes/ot-meta-box-api.php:231
-#: ../includes/ot-settings-api.php:610
-msgid "Title"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:4760
-msgid "New Layout"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5515
-msgid "Link URL"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5522
-msgid "Link Title"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5552
-msgid "Quote"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5561
-msgid "Source Name (ex. author, singer, actor)"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5568
-msgid "Source URL"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5575
-msgid "Source Title (ex. book, song, movie)"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5582
-msgid "Source Date"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5612
-msgid "Video"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5621
-#, php-format
-msgid ""
-"Embed video from services like Youtube, Vimeo, or Hulu. You can find a list "
-"of supported oEmbed sites in the %1$s. Alternatively, you could use the "
-"built-in %2$s shortcode."
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5621
-#: ../includes/ot-functions-admin.php:5660
-msgid "Wordpress Codex"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5651
-msgid "Audio"
-msgstr ""
-
-#: ../includes/ot-functions-admin.php:5660
-#, php-format
-msgid ""
-"Embed audio from services like SoundCloud and Rdio. You can find a list of "
-"supported oEmbed sites in the %1$s. Alternatively, you could use the built-"
-"in %2$s shortcode."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:30
-msgid ""
-"The Label field should be a short but descriptive block of text 100 "
-"characters or less with no HTML."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:32
-msgid "ID"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:33
-msgid ""
-"The ID field is a unique alphanumeric key used to differentiate each theme "
-"option (underscores are acceptable). Also, the plugin will change all text "
-"you write in this field to lowercase and replace spaces and special "
-"characters with an underscore automatically."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:35
-msgid "Type"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:36
-msgid ""
-"You are required to choose one of the supported option types when creating a "
-"new option. Here is a list of the available option types. For more "
-"information about each type click the Option Types
tab to the "
-"left."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:44
-msgid ""
-"Enter a detailed description for the users to read on the Theme Options "
-"page, HTML is allowed. This is also where you enter content for both the "
-"Textblock & Textblock Titled option types."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:46
-msgid "Choices"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:47
-msgid ""
-"Click the \"Add Choice\" button to add an item to the choices array. This "
-"will only affect the following option types: Checkbox, Radio, Select & "
-"Select Image."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:50
-msgid ""
-"Click the \"Add Setting\" button found inside a newly created setting to add "
-"an item to the settings array. This will only affect the List Item type."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:52
-msgid "Standard"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:53
-msgid ""
-"Setting the standard value for your option only works for some option types. "
-"Those types are one that have a single string value saved to them and not an "
-"array of values."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:55
-msgid "Rows"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:56
-msgid ""
-"Enter a numeric value for the number of rows in your textarea. This will "
-"only affect the following option types: CSS, Textarea, & Textarea Simple."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:58
-msgid "Post Type"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:59
-msgid ""
-"Add a comma separated list of post type like post,page
. This "
-"will only affect the following option types: Custom Post Type Checkbox, & "
-"Custom Post Type Select. Below are the default post types available with "
-"WordPress and that are also compatible with OptionTree. You can also add "
-"your own custom post_type
. At this time any
does "
-"not seem to return results properly and is something I plan on looking into."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:67
-msgid "Taxonomy"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:68
-msgid ""
-"Add a comma separated list of any registered taxonomy like category,"
-"post_tag
. This will only affect the following option types: Taxonomy "
-"Checkbox, & Taxonomy Select."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:70
-msgid "Min, Max, & Step"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:71
-msgid ""
-"Add a comma separated list of options in the following format 0,100,1"
-"code> (slide from 0-100
in intervals of 1
). The "
-"three values represent the minimum, maximum, and step options and will only "
-"affect the Numeric Slider option type."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:73
-msgid "CSS Class"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:74
-msgid "Add and optional class to any option type."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:76
-msgid "Condition"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:77
-#, php-format
-msgid ""
-"Add a comma separated list (no spaces) of conditions in which the field will "
-"be visible, leave this setting empty to always show the field. In these "
-"examples, %s is a placeholder for your condition, which can be in the form "
-"of %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:79
-msgid "Operator"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:80
-#, php-format
-msgid ""
-"Choose the logical operator to compute the result of the conditions. Your "
-"options are %s and %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:111
-#, php-format
-msgid ""
-"The Background option type is for adding background styles to your theme "
-"either dynamically via the CSS option type below or manually with %s. The "
-"Background option type has filters that allow you to remove fields or change "
-"the defaults. For example, you can filter %s to remove unwanted fields from "
-"all Background options or an individual one. You can also filter %s. These "
-"filters allow you to fine tune the select lists for your specific needs."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:114
-#, php-format
-msgid ""
-"The Border option type is used to set width, unit, style, and color values. "
-"The text input excepts a numerical value and the unit select lets you choose "
-"the unit of measurement to add to that value. Currently the default units "
-"are %s, %s, %s, and %s. However, you can change them with the %s filter. The "
-"style select lets you choose the border style. The default styles are %s, "
-"%s, %s, %s, %s, %s, %s, and %s. However, you can change them with the %s "
-"filter. The colorpicker saves a hexadecimal color code."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:117
-#, php-format
-msgid ""
-"The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:120
-msgid ""
-"The Category Checkbox option type displays a list of category IDs. It allows "
-"the user to check multiple category IDs and will return that value as an "
-"array for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:123
-msgid ""
-"The Category Select option type displays a list of category IDs. It allows "
-"the user to select only one category ID and will return that value for use "
-"in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:126
-msgid ""
-"The Checkbox option type displays a group of choices. It allows the user to "
-"check multiple choices and will return that value as an array for use in a "
-"custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:129
-msgid ""
-"The Colorpicker option type saves a hexadecimal color code for use in CSS. "
-"Use it to modify the color of something in your theme."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:132
-#, php-format
-msgid ""
-"The Colorpicker Opacity option type saves a hexadecimal color code with an "
-"opacity value from %s to %s in increments of %s. Though the value is saved "
-"as hexadecimal, if used within the CSS option type the color and opacity "
-"values will be converted into a valid RGBA CSS value."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:135
-#, php-format
-msgid ""
-"The CSS option type is a textarea that when used properly can add dynamic "
-"CSS to your theme from within OptionTree. Unfortunately, due server "
-"limitations you will need to create a file named %s at the root level of "
-"your theme and change permissions using %s so the server can write to the "
-"file. I have had the most success setting this single file to %s but feel "
-"free to play around with permissions until everything is working. A good "
-"starting point is %s. When the server can save to the file, CSS will "
-"automatically be updated when you save your Theme Options."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:137
-#, php-format
-msgid ""
-"This example assumes you have an option with the ID of %1$s. Which means "
-"this option will automatically insert the value of %1$s into the %2$s when "
-"the Theme Options are saved."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:139
-msgid "Input"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:145
-msgid "Output"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:154
-#, php-format
-msgid ""
-"The Custom Post Type Select option type displays a list of IDs from any "
-"available WordPress post type or custom post type. It allows the user to "
-"check multiple post IDs for use in a custom function or loop. Requires at "
-"least one valid %1$s in the %1$s field."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:157
-#, php-format
-msgid ""
-"The Custom Post Type Select option type displays a list of IDs from any "
-"available WordPress post type or custom post type. It will return a single "
-"post ID for use in a custom function or loop. Requires at least one valid "
-"%1$s in the %1$s field."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:160
-msgid ""
-"The Date Picker option type is tied to a standard form input field which "
-"displays a calendar pop-up that allow the user to pick any date when focus "
-"is given to the input field. The returned value is a date formatted string."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:163
-msgid ""
-"The Date Time Picker option type is tied to a standard form input field "
-"which displays a calendar pop-up that allow the user to pick any date and "
-"time when focus is given to the input field. The returned value is a date "
-"and time formatted string."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:166
-#, php-format
-msgid ""
-"The Dimension option type is used to set width and height values. The text "
-"inputs except numerical values and the select lets you choose the unit of "
-"measurement to add to that value. Currently the default units are %s, %s, "
-"%s, and %s. However, you can change them with the %s filter."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:169
-msgid ""
-"The Gallery option type saves a comma separated list of image attachment "
-"IDs. You will need to create a front-end function to display the images in "
-"your theme."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:172
-#, php-format
-msgid ""
-"The Google Fonts option type will dynamically enqueue any number of Google "
-"Web Fonts into the document %1$s. As well, once the option has been saved "
-"each font family will automatically be inserted into the %2$s array for the "
-"Typography option type. You can further modify the font stack by using the "
-"%3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s "
-"parameter is being passed from %7$s, so it will be the ID of a Typography "
-"option type. This will allow you to add additional web safe fonts to "
-"individual font families on an as-need basis."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:175
-#, php-format
-msgid ""
-"The JavaScript option type is a textarea that uses the %s code editor to "
-"highlight your JavaScript and display errors as you type."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:178
-msgid "The Link Color option type is used to set all link color states."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:181
-msgid ""
-"The List Item option type replaced the Slider option type and allows for a "
-"great deal of customization. You can add settings to the List Item and those "
-"settings will be displayed to the user when they add a new List Item. "
-"Typical use is for creating sliding content or blocks of code for custom "
-"layouts."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:184
-#, php-format
-msgid ""
-"The Measurement option type is a mix of input and select fields. The text "
-"input excepts a value and the select lets you choose the unit of measurement "
-"to add to that value. Currently the default units are %s, %s, %s, and %s. "
-"However, you can change them with the %s filter."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:186
-#, php-format
-msgid ""
-"Example filter to add new units to the Measurement option type. Added to %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:199
-msgid ""
-"Example filter to completely change the units in the Measurement option "
-"type. Added to functions.php
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:215
-msgid ""
-"The Numeric Slider option type displays a jQuery UI slider. It will return a "
-"single numerical value for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:218
-#, php-format
-msgid ""
-"The On/Off option type displays a simple switch that can be used to turn "
-"things on or off. The saved return value is either %s or %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:221
-msgid ""
-"The Page Checkbox option type displays a list of page IDs. It allows the "
-"user to check multiple page IDs for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:224
-msgid ""
-"The Page Select option type displays a list of page IDs. It will return a "
-"single page ID for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:227
-msgid ""
-"The Post Checkbox option type displays a list of post IDs. It allows the "
-"user to check multiple post IDs for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:230
-msgid ""
-"The Post Select option type displays a list of post IDs. It will return a "
-"single post ID for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:233
-msgid ""
-"The Radio option type displays a group of choices. It allows the user to "
-"choose one and will return that value as a string for use in a custom "
-"function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:236
-#, php-format
-msgid ""
-"the Radio Images option type is primarily used for layouts. However, you can "
-"filter the image list using %s. As well, you can add your own custom images "
-"using the choices array."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:238
-msgid ""
-"This example executes the ot_radio_images
filter on layout "
-"images attached to the my_radio_images
field. Added to "
-"functions.php
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:263
-msgid ""
-"The Select option type is used to list anything you want that would be "
-"chosen from a select list."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:266
-#, php-format
-msgid ""
-"This option type makes it possible for users to select a WordPress "
-"registered sidebar to use on a specific area. By using the two provided "
-"filters, %s, and %s we can be selective about which sidebars are available "
-"on a specific content area."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:267
-#, php-format
-msgid ""
-"For example, if we create a WordPress theme that provides the ability to "
-"change the Blog Sidebar and we don't want to have the footer sidebars "
-"available on this area, we can unset those sidebars either manually or by "
-"using a regular expression if we have a common name like %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:270
-msgid ""
-"The Slider option type is technically deprecated. Use the List Item option "
-"type instead, as it's infinitely more customizable. Typical use is for "
-"creating sliding image content."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:273
-#, php-format
-msgid ""
-"The Social Links option type utilizes a drag & drop interface to create a "
-"list of social links. There are a few filters that make extending this "
-"option type easy. You can set the %s filter to %s and turn off loading "
-"default values. Use the %s filter to change the default values that are "
-"loaded. To filter the settings array use the %s filter."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:276
-#, php-format
-msgid ""
-"The Spacing option type is used to set spacing values such as padding or "
-"margin in the form of top, right, bottom, and left. The text inputs except "
-"numerical values and the select lets you choose the unit of measurement to "
-"add to that value. Currently the default units are %s, %s, %s, and %s. "
-"However, you can change them with the %s filter."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:279
-msgid ""
-"The Tab option type will break a section or metabox into tabbed content."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:282
-msgid ""
-"The Tag Checkbox option type displays a list of tag IDs. It allows the user "
-"to check multiple tag IDs and will return that value as an array for use in "
-"a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:285
-msgid ""
-"The Tag Select option type displays a list of tag IDs. It allows the user to "
-"select only one tag ID and will return that value for use in a custom "
-"function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:288
-msgid ""
-"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows "
-"the user to check multiple taxonomy IDs and will return that value as an "
-"array for use in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:291
-msgid ""
-"The Taxonomy Select option type displays a list of taxonomy IDs. It allows "
-"the user to select only one taxonomy ID and will return that value for use "
-"in a custom function or loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:294
-msgid ""
-"The Text option type is used to save string values. For example, any "
-"optional or required text that is of reasonably short character length."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:297
-#, php-format
-msgid ""
-"The Textarea option type is a large string value used for custom code or "
-"text in the theme and has a WYSIWYG editor that can be filtered to change "
-"the how it is displayed. For example, you can filter %s, %s, %s, and %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:299
-msgid ""
-"Example filters to alter the Textarea option type. Added to functions."
-"php
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:301
-msgid ""
-"This example keeps WordPress from executing the wpautop
filter "
-"on the line breaks. The default is true
which means it wraps "
-"line breaks with an HTML p
tag."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:314
-msgid ""
-"This example keeps WordPress from executing the media_buttons
"
-"filter on the textarea WYSIWYG. The default is true
which means "
-"show the buttons."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:327
-msgid ""
-"This example keeps WordPress from executing the tinymce
filter "
-"on the textarea WYSIWYG. The default is true
which means show "
-"the tinymce."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:340
-msgid ""
-"This example alters the quicktags
filter on the textarea "
-"WYSIWYG. The default is array( 'buttons' => 'strong,em,link,block,del,"
-"ins,img,ul,ol,li,code,spell,close' )
which means show those "
-"quicktags. It also means you can filter in your own custom quicktags."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:356
-msgid ""
-"The Textarea Simple option type is a large string value used for custom code "
-"or text in the theme. The Textarea Simple does not have a WYSIWYG editor."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:358
-#, php-format
-msgid ""
-"This example tells WordPress to execute the %s filter on the line breaks. "
-"The default is %s which means it does not wraps line breaks with an HTML %s "
-"tag. Added to %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:372
-msgid ""
-"The Textblock option type is used only on the Theme Option page. It will "
-"allow you to create & display HTML, but has no title above the text block. "
-"You can then use the Textblock to add a more detailed set of instruction on "
-"how the options are used in your theme. You would never use this in your "
-"themes template files as it does not save a value."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:375
-msgid ""
-"The Textblock Titled option type is used only on the Theme Option page. It "
-"will allow you to create & display HTML, and has a title above the text "
-"block. You can then use the Textblock Titled to add a more detailed set of "
-"instruction on how the options are used in your theme. You would never use "
-"this in your themes template files as it does not save a value."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:378
-#, php-format
-msgid ""
-"The Typography option type is for adding typography styles to your theme "
-"either dynamically via the CSS option type above or manually with %s. The "
-"Typography option type has filters that allow you to remove fields or change "
-"the defaults. For example, you can filter %s to remove unwanted fields from "
-"all Background options or an individual one. You can also filter %s. These "
-"filters allow you to fine tune the select lists for your specific needs."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:380
-msgid ""
-"This example would filter ot_recognized_font_families
to build "
-"your own font stack. Added to functions.php
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:398
-#, php-format
-msgid ""
-"The Upload option type is used to upload any WordPress supported media. "
-"After uploading, users are required to press the \"%s\" button in order to "
-"populate the input with the URI of that media. There is one caveat of this "
-"feature. If you import the theme options and have uploaded media on one site "
-"the old URI will not reflect the URI of your new site. You will have to re-"
-"upload or %s any media to your new server and change the URIs if necessary."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:430
-msgid ""
-"This function returns a value from the \"option_tree\" array of saved values "
-"or the default value supplied. The returned value would be mixed. Meaning it "
-"could be a string, integer, boolean, or array."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:432
-#: ../includes/ot-functions-docs-page.php:482
-msgid "Usage"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:436
-#: ../includes/ot-functions-docs-page.php:486
-msgid "Parameters"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:490
-msgid "string"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:490
-msgid "required"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:440
-msgid "Enter the options unique identifier."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:490
-msgid "Default:"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:440
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:490
-#: ../includes/ot-functions-docs-page.php:494
-msgid "None"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:494
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-#: ../includes/ot-functions-docs-page.php:506
-msgid "optional"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:444
-msgid ""
-"Enter a default return value. This is just incase the request returns null."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:444
-#: ../includes/ot-functions-docs-page.php:494
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-#: ../includes/ot-functions-docs-page.php:506
-msgid "Default"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:474
-msgid ""
-"This function has been deprecated. That means it has been replaced by a new "
-"function or is no longer supported, and may be removed from future versions. "
-"All code that uses this function should be converted to use its replacement."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:476
-msgid "Use"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:476
-msgid "instead"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:480
-msgid ""
-"This function returns, or echos if asked, a value from the \"option_tree\" "
-"array of saved values."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:490
-msgid "Enter a unique Option Key to get a returned value or array."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:494
-msgid "array"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:494
-msgid "Used to cut down on database queries in template files."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:498
-#: ../includes/ot-functions-docs-page.php:502
-msgid "boolean"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:498
-msgid "Echo the output."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:502
-msgid "Used to indicate the $item_id is an array of values."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:506
-msgid "integer"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:506
-msgid ""
-"Numeric offset key for the $item_id array, -1 will return all values (an "
-"array starts at 0)."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:534
-msgid ""
-"If you're using the plugin version of OptionTree it is highly recommended to "
-"include a function_exists
check in your code, as described in "
-"the examples below. If you've integrated OptionTree directly into your "
-"themes root directory, you will not need to wrap your code "
-"with function_exists
, as you're guaranteed to have the "
-"ot_get_option()
function available."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:536
-msgid "String Examples"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:538
-msgid "Returns the value of test_input
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:544
-msgid ""
-"Returns the value of test_input
, but also has a default value "
-"if it returns empty."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:550
-msgid "Array Examples"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:552
-msgid ""
-"Assigns the value of navigation_ids
to the variable $ids"
-"code>. It then echos an unordered list of links (navigation) using "
-"wp_list_pages()
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:572
-msgid ""
-"The next two examples demonstrate how to use the Measurement"
-"strong> option type. The Measurement option type is an array with two key/"
-"value pairs. The first is the value of measurement and the second is the "
-"unit of measurement."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:598
-msgid "This example displays a very basic slider loop."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:643
-msgid "It's Super Simple"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:645
-msgid ""
-"Layouts make your theme awesome! With theme options data that you can save/"
-"import/export you can package themes with different color variations, or "
-"make it easy to do A/B testing on text and so much more. Basically, you save "
-"a snapshot of your data as a layout."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:647
-msgid ""
-"Once you have created all your different layouts, or theme variations, you "
-"can save them to a separate text file for repackaging with your theme. "
-"Alternatively, you could just make different variations for yourself and "
-"change your theme with the click of a button, all without deleting your "
-"previous options data."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:649
-msgid ""
-" Adding a layout is ridiculously easy, follow these steps and you'll be on "
-"your way to having a WordPress super theme."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:651
-msgid "For Developers"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:653
-#: ../includes/ot-functions-docs-page.php:682
-msgid "Creating a Layout"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:655
-#: ../includes/ot-functions-docs-page.php:662
-#: ../includes/ot-functions-docs-page.php:668
-msgid "Go to the OptionTre->Settings->Layouts
tab."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:656
-msgid ""
-"Enter a name for your layout in the text field and hit \"Save Layouts\", "
-"you've created your first layout."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:657
-#: ../includes/ot-functions-docs-page.php:686
-msgid "Adding a new layout is as easy as repeating the steps above."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:660
-#: ../includes/ot-functions-docs-page.php:689
-msgid "Activating a Layout"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:663
-msgid "Click on the activate layout button in the actions list."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:666
-#: ../includes/ot-functions-docs-page.php:695
-msgid "Deleting a Layout"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:669
-msgid "Click on the delete layout button in the actions list."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:672
-#: ../includes/ot-functions-docs-page.php:700
-msgid "Edit Layout Data"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:674
-#: ../includes/ot-functions-docs-page.php:684
-#: ../includes/ot-functions-docs-page.php:691
-msgid "Go to the Appearance->Theme Options
page."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:675
-#: ../includes/ot-functions-docs-page.php:703
-msgid ""
-"Modify and save your theme options and the layout will be updated "
-"automatically."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:676
-#: ../includes/ot-functions-docs-page.php:704
-msgid ""
-"Saving theme options data will update the currently active layout, so before "
-"you start saving make sure you want to modify the current layout."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:677
-msgid ""
-"If you want to edit a new layout, first create it then save your theme "
-"options."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:680
-msgid "End-Users Mode"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:685
-msgid ""
-"Enter a name for your layout in the text field and hit \"New Layout\", "
-"you've created your first layout."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:692
-msgid ""
-"Choose a layout from the select list and click the \"Activate Layout\" "
-"button."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:697
-msgid "End-Users mode does not allow deleting layouts."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:702
-msgid "Go to the Appearance->Theme Options
tab."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:733
-#: ../includes/ot-functions-docs-page.php:815
-msgid "How-to-guide"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:735
-msgid ""
-"There are a few simple steps you need to take in order to use OptionTree's "
-"built in Meta Box API. In the code below I'll show you a basic demo of how "
-"to create your very own custom meta box using any number of the option types "
-"you have at your disposal. If you would like to see some demo code, there is "
-"a directory named theme-mode
inside the assets
"
-"directory that contains a file named demo-meta-boxes.php
you "
-"can reference."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:737
-msgid ""
-"It's important to note that Meta Boxes do not support WYSIWYG editors at "
-"this time and if you set one of your options to Textarea it will "
-"automatically revert to a Textarea Simple until a valid solution is found. "
-"WordPress released this statement regarding the wp_editor() function:"
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:739
-msgid ""
-"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. "
-"What this means in practical terms, is that you cannot put it in meta-boxes "
-"that can be dragged and placed elsewhere on the page."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:741
-msgid "Create and include your custom meta boxes file."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:743
-msgid ""
-"Create a file and name it anything you want, maybe meta-boxes.php"
-"code>."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:744
-msgid ""
-"As well, you'll probably want to create a directory named includes"
-"code> to put your meta-boxes.php
into which will help keep you "
-"file structure nice and tidy."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:745
-#: ../includes/ot-functions-docs-page.php:845
-msgid "Add the following code to your functions.php
."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:755
-msgid ""
-"Add a variation of the following code to your meta-boxes.php
. "
-"You'll obviously need to fill it in with all your custom array values. It's "
-"important to note here that we use the admin_init
filter "
-"because if you were to call the ot_register_meta_box
function "
-"before OptionTree was loaded the sky would fall on your head."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:817
-msgid ""
-"There are a few simple steps you need to take in order to use OptionTree as "
-"a theme included module. In the code below I'll show you a basic demo of how "
-"to include the entire plugin as a module, which will allow you to have the "
-"most up-to-date version of OptionTree without ever needing to hack the core "
-"of the plugin. If you would like to see some demo code, there is a directory "
-"named theme-mode
inside the assets
directory that "
-"contains a file named demo-theme-options.php
you can reference."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:819
-msgid "Step 1: Include the plugin & turn on theme mode."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:821
-#, php-format
-msgid "Download the latest version of %s and unarchive the %s directory."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:822
-#, php-format
-msgid ""
-"Put the %s directory in the root of your theme. For example, the server path "
-"would be %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:823
-#, php-format
-msgid "Add the following code to the beginning of your %s."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:837
-#, php-format
-msgid ""
-"For a list of all the OptionTree UI display filters refer to the %s file "
-"found in the %s directory of this plugin. This file is the starting point "
-"for developing themes with Theme Mode."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:839
-msgid ""
-"You now have OptionTree built into your theme and anytime an update is "
-"available replace the old version with the new one."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:841
-msgid "Step 2: Create Theme Options without using the UI Builder."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:843
-msgid ""
-"Create a file and name it anything you want, maybe theme-options.php"
-"code>, or use the built in file export to create it for you. Remember, you "
-"should always check the file for errors before including it in your theme."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:844
-msgid ""
-"As well, you'll probably want to create a directory named includes"
-"code> to put your theme-options.php
into which will help keep "
-"you file structure nice and tidy."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:855
-msgid ""
-"Add a variation of the following code to your theme-options.php"
-"code>. You'll obviously need to fill it in with all your custom array values "
-"for contextual help (optional), sections (required), and settings (required)."
-msgstr ""
-
-#: ../includes/ot-functions-docs-page.php:858
-msgid ""
-"The code below is a boilerplate to get your started. For a full list of the "
-"available option types click the \"Option Types\" tab above. Also a quick "
-"note, you don't need to put OptionTree in theme mode to manually create "
-"options but you will want to hide the docs and settings as each time you "
-"load the admin area the settings be written over with the code below if "
-"they've changed in any way. However, this ensures your settings do not get "
-"tampered with by the end-user."
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:46
-msgid "Sorry, this function does not exist"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:134
-msgid "background-repeat"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:152
-msgid "background-attachment"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:171
-msgid "background-position"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:224
-msgid "background-size"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:238
-msgid "background-image"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:241
-#: ../includes/ot-functions-option-types.php:3202
-msgid "Add Media"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:316
-#: ../includes/ot-functions-option-types.php:1045
-msgid "width"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:327
-#: ../includes/ot-functions-option-types.php:1065
-#: ../includes/ot-functions-option-types.php:1550
-#: ../includes/ot-functions-option-types.php:2506
-msgid "unit"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:346
-msgid "style"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:439
-msgid "offset-x"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:448
-msgid "offset-y"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:457
-msgid "blur-radius"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:466
-msgid "spread-radius"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:538
-#: ../includes/ot-functions-option-types.php:592
-msgid "No Categories Found"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:587
-#: ../includes/ot-functions-option-types.php:870
-#: ../includes/ot-functions-option-types.php:1819
-#: ../includes/ot-functions-option-types.php:1930
-#: ../includes/ot-functions-option-types.php:2646
-#: ../includes/ot-functions-option-types.php:2761
-msgid "Choose One"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:818
-#: ../includes/ot-functions-option-types.php:876
-#: ../includes/ot-functions-option-types.php:1881
-#: ../includes/ot-functions-option-types.php:1936
-msgid "No Posts Found"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1054
-msgid "height"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1232
-#: ../includes/ot-functions-option-types.php:1275
-msgid "Remove Google Font"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1234
-#: ../includes/ot-functions-option-types.php:1277
-msgid "-- Choose One --"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1298
-msgid "Add Google Font"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1384
-msgctxt "color picker"
-msgid "Standard"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1385
-msgctxt "color picker"
-msgid "Hover"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1386
-msgctxt "color picker"
-msgid "Active"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1387
-msgctxt "color picker"
-msgid "Visited"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1388
-msgctxt "color picker"
-msgid "Focus"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1497
-#: ../includes/ot-functions-option-types.php:2246
-#: ../includes/ot-functions-option-types.php:2411
-msgid "Add New"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1500
-#: ../includes/ot-functions-option-types.php:2249
-#: ../includes/ot-functions-option-types.php:2414
-msgid "You can re-order with drag & drop, the order will update after saving."
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1670
-msgid "On"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1692
-msgid "Off"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:1770
-#: ../includes/ot-functions-option-types.php:1825
-msgid "No Pages Found"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2169
-msgid "Choose Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2174
-msgid "No Sidebars"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2282
-msgid "Facebook"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2287
-msgid "Twitter"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2292
-msgid "Google+"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2297
-msgid "LinkedIn"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2302
-msgid "Pinterest"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2307
-msgid "Youtube"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2312
-msgid "Dribbble"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2317
-msgid "Github"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2322
-msgid "Forrst"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2327
-msgid "Digg"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2332
-msgid "Delicious"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2337
-msgid "Tumblr"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2342
-msgid "Skype"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2347
-msgid "SoundCloud"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2352
-msgid "Vimeo"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2357
-msgid "Flickr"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2362
-msgid "VK.com"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2468
-msgid "top"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2477
-msgid "right"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2486
-msgid "bottom"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2495
-msgid "left"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2597
-#: ../includes/ot-functions-option-types.php:2651
-msgid "No Tags Found"
-msgstr ""
-
-#: ../includes/ot-functions-option-types.php:2709
-#: ../includes/ot-functions-option-types.php:2766
-msgid "No Taxonomies Found"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:35
-msgid "Warning!"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:36
-#, php-format
-msgid ""
-"Go to the %s page if you want to save data, this page is for adding settings."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:37
-#, php-format
-msgid ""
-"If you're unsure or not completely positive that you should be editing these "
-"settings, you should read the %s first."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:38
-msgid ""
-"Things could break or be improperly displayed to the end-user if you do one "
-"of the following:"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:39
-msgid ""
-"Give two sections the same ID, give two settings the same ID, give two "
-"contextual help content areas the same ID, don't create any settings, or "
-"have a section at the end of the settings list."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:40
-msgid ""
-"You can create as many settings as your project requires and use them how "
-"you see fit. When you add a setting here, it will be available on the Theme "
-"Options page for use in your theme. To separate your settings into sections, "
-"click the \"Add Section\" button, fill in the input fields, and a new "
-"navigation menu item will be created."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:41
-msgid ""
-"All of the settings can be sorted and rearranged to your liking with Drag & "
-"Drop. Don't worry about the order in which you create your settings, you can "
-"always reorder them."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:92
-msgid "Add Section"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:99
-msgid "Contextual Help"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:103
-msgid "Contextual Help Sidebar"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:103
-msgid ""
-"If you decide to add contextual help to the Theme Option page, enter the "
-"optional \"Sidebar\" HTML here. This would be an extremely useful place to "
-"add links to your themes documentation or support forum. Only after you've "
-"added some content below will this display to the user."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:132
-msgid "Add Contextual Help Content"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:168
-msgid ""
-"This import method has been deprecated. That means it has been replaced by a "
-"new method and is no longer supported, and may be removed from future "
-"versions. All themes that use this import method should be converted to use "
-"its replacement below."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:170
-#, php-format
-msgid ""
-"If you were given a Theme Options XML file with a premium or free theme, "
-"locate it on your hard drive and upload that file by clicking the upload "
-"button. A popup window will appear, upload the XML file and click \"%s\". "
-"The file URL should be in the upload input, if it is click \"Import XML\"."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:173
-msgid "Import XML"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:189
-msgid "Add XML"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:226
-msgid ""
-"To import your Settings copy and paste what appears to be a random string of "
-"alpha numeric characters into this textarea and press the \"Import Settings"
-"\" button."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:229
-msgid "Import Settings"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:271
-msgid ""
-"Only after you've imported the Settings should you try and update your Theme "
-"Options."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:273
-msgid ""
-"To import your Theme Options copy and paste what appears to be a random "
-"string of alpha numeric characters into this textarea and press the \"Import "
-"Theme Options\" button."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:276
-msgid "Import Theme Options"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:318
-msgid ""
-"Only after you've imported the Settings should you try and update your "
-"Layouts."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:320
-msgid ""
-"To import your Layouts copy and paste what appears to be a random string of "
-"alpha numeric characters into this textarea and press the \"Import Layouts\" "
-"button. Keep in mind that when you import your layouts, the active layout's "
-"saved data will write over the current data set for your Theme Options."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:323
-msgid "Import Layouts"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:366
-#, php-format
-msgid ""
-"Export your Settings into a fully functional %s file. If you want to add "
-"your own custom %s text domain to the file, enter it into the text field "
-"before exporting. For more information on how to use this file read the "
-"documentation on %s. Remember, you should always check the file for errors "
-"before including it in your theme."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:375
-msgid "Export Settings File"
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:405
-msgid ""
-"Export your Settings by highlighting this text and doing a copy/paste into a "
-"blank .txt file. Then save the file for importing into another install of "
-"WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Settings textarea "
-"on another web site."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:441
-msgid ""
-"Export your Theme Options data by highlighting this text and doing a copy/"
-"paste into a blank .txt file. Then save the file for importing into another "
-"install of WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Theme Options "
-"textarea on another web site."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:477
-msgid ""
-"Export your Layouts by highlighting this text and doing a copy/paste into a "
-"blank .txt file. Then save the file for importing into another install of "
-"WordPress later. Alternatively, you could just paste it into the "
-"OptionTree->Settings->Import
Layouts textarea "
-"on another web site."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:519
-msgid ""
-"To add a new layout enter a unique lower case alphanumeric string (dashes "
-"allowed) in the text field and click \"Save Layouts\"."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:520
-msgid ""
-"As well, you can activate, remove, and drag & drop the order; all situations "
-"require you to click \"Save Layouts\" for the changes to be applied."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:521
-msgid ""
-"When you create a new layout it will become active and any changes made to "
-"the Theme Options will be applied to it. If you switch back to a different "
-"layout immediately after creating a new layout that new layout will have a "
-"snapshot of the current Theme Options data attached to it."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:522
-msgid ""
-"Visit OptionTree->Documentation->Layouts Overview
to see a more "
-"in-depth description of what layouts are and how to use them."
-msgstr ""
-
-#: ../includes/ot-functions-settings-page.php:559
-msgid "Save Layouts"
-msgstr ""
-
-#: ../includes/ot-settings-api.php:364
-msgid "Reset Options"
-msgstr ""
-
-#: ../ot-loader.php:22
-msgid ""
-"OptionTree is installed as a plugin and also embedded in your current theme. "
-"Please deactivate the plugin to load the theme dependent version of "
-"OptionTree, and remove this warning."
-msgstr ""
diff --git a/option-tree/license.txt b/option-tree/license.txt
deleted file mode 100644
index 20d40b6..0000000
--- a/option-tree/license.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
- .
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
\ No newline at end of file
diff --git a/option-tree/ot-loader.php b/option-tree/ot-loader.php
deleted file mode 100644
index 949fe83..0000000
--- a/option-tree/ot-loader.php
+++ /dev/null
@@ -1,806 +0,0 @@
-' . __( 'OptionTree is installed as a plugin and also embedded in your current theme. Please deactivate the plugin to load the theme dependent version of OptionTree, and remove this warning.', 'option-tree' ) . '
';
-
- }
-
- add_action( 'admin_notices', 'ot_conflict_notice' );
-
-}
-
-/**
- * This is the OptionTree loader class.
- *
- * @package OptionTree
- * @author Derek Herman
- * @copyright Copyright (c) 2013, Derek Herman
- */
-if ( ! class_exists( 'OT_Loader' ) ) {
-
- class OT_Loader {
-
- /**
- * PHP5 constructor method.
- *
- * This method loads other methods of the class.
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- public function __construct() {
-
- /* load languages */
- $this->load_languages();
-
- /* load OptionTree */
- add_action( 'after_setup_theme', array( $this, 'load_option_tree' ), 1 );
-
- }
-
- /**
- * Load the languages before everything else.
- *
- * @return void
- *
- * @access private
- * @since 2.1.3
- */
- private function load_languages() {
-
- /**
- * A quick check to see if we're in plugin mode.
- *
- * @since 2.1.3
- */
- define( 'OT_PLUGIN_MODE', strpos( dirname( __FILE__ ), 'plugins' . DIRECTORY_SEPARATOR . basename( dirname( __FILE__ ) ) ) !== false ? true : false );
-
- /**
- * Path to the languages directory.
- *
- * This path will be relative in plugin mode and absolute in theme mode.
- *
- * @since 2.0.10
- * @updated 2.4.1
- */
- if ( OT_PLUGIN_MODE ) {
-
- define( 'OT_LANG_DIR', trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) . trailingslashit( 'languages' ) );
-
- } else {
-
- if ( apply_filters( 'ot_child_theme_mode', false ) == true ) {
-
- $path = @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) );
- $path = ltrim( end( $path ), '/' );
- define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' );
-
- } else {
-
- $path = @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) );
- $path = ltrim( end( $path ), '/' );
- define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' );
-
- }
-
- }
-
- /* load the text domain */
- if ( OT_PLUGIN_MODE ) {
-
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
-
- } else {
-
- add_action( 'after_setup_theme', array( $this, 'load_textdomain' ) );
-
- }
-
- }
-
- /**
- * Load the text domain.
- *
- * @return void
- *
- * @access private
- * @since 2.0
- */
- public function load_textdomain() {
-
- if ( OT_PLUGIN_MODE ) {
-
- load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR );
-
- } else {
-
- load_theme_textdomain( 'option-tree', OT_LANG_DIR );
-
- }
-
- }
-
- /**
- * Load OptionTree on the 'after_setup_theme' action. Then filters will
- * be availble to the theme, and not only when in Theme Mode.
- *
- * @return void
- *
- * @access public
- * @since 2.1.2
- */
- public function load_option_tree() {
-
- /* setup the constants */
- $this->constants();
-
- /* include the required admin files */
- $this->admin_includes();
-
- /* include the required files */
- $this->includes();
-
- /* hook into WordPress */
- $this->hooks();
-
- }
-
- /**
- * Constants
- *
- * Defines the constants for use within OptionTree. Constants
- * are prefixed with 'OT_' to avoid any naming collisions.
- *
- * @return void
- *
- * @access private
- * @since 2.0
- */
- private function constants() {
-
- /**
- * Current Version number.
- */
- define( 'OT_VERSION', '2.6.0' );
-
- /**
- * For developers: Theme mode.
- *
- * Run a filter and set to true to enable OptionTree theme mode.
- * You must have this files parent directory inside of
- * your themes root directory. As well, you must include
- * a reference to this file in your themes functions.php.
- *
- * @since 2.0
- */
- define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) );
-
- /**
- * For developers: Child Theme mode. TODO document
- *
- * Run a filter and set to true to enable OptionTree child theme mode.
- * You must have this files parent directory inside of
- * your themes root directory. As well, you must include
- * a reference to this file in your themes functions.php.
- *
- * @since 2.0.15
- */
- define( 'OT_CHILD_THEME_MODE', apply_filters( 'ot_child_theme_mode', false ) );
-
- /**
- * For developers: Show Pages.
- *
- * Run a filter and set to false if you don't want to load the
- * settings & documentation pages in the admin area of WordPress.
- *
- * @since 2.0
- */
- define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
-
- /**
- * For developers: Show Theme Options UI Builder
- *
- * Run a filter and set to false if you want to hide the
- * Theme Options UI page in the admin area of WordPress.
- *
- * @since 2.1
- */
- define( 'OT_SHOW_OPTIONS_UI', apply_filters( 'ot_show_options_ui', true ) );
-
- /**
- * For developers: Show Settings Import
- *
- * Run a filter and set to false if you want to hide the
- * Settings Import options on the Import page.
- *
- * @since 2.1
- */
- define( 'OT_SHOW_SETTINGS_IMPORT', apply_filters( 'ot_show_settings_import', true ) );
-
- /**
- * For developers: Show Settings Export
- *
- * Run a filter and set to false if you want to hide the
- * Settings Import options on the Import page.
- *
- * @since 2.1
- */
- define( 'OT_SHOW_SETTINGS_EXPORT', apply_filters( 'ot_show_settings_export', true ) );
-
- /**
- * For developers: Show New Layout.
- *
- * Run a filter and set to false if you don't want to show the
- * "New Layout" section at the top of the theme options page.
- *
- * @since 2.0.10
- */
- define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) );
-
- /**
- * For developers: Show Documentation
- *
- * Run a filter and set to false if you want to hide the Documentation.
- *
- * @since 2.1
- */
- define( 'OT_SHOW_DOCS', apply_filters( 'ot_show_docs', true ) );
-
- /**
- * For developers: Custom Theme Option page
- *
- * Run a filter and set to false if you want to hide the OptionTree
- * Theme Option page and build your own.
- *
- * @since 2.1
- */
- define( 'OT_USE_THEME_OPTIONS', apply_filters( 'ot_use_theme_options', true ) );
-
- /**
- * For developers: Meta Boxes.
- *
- * Run a filter and set to false to keep OptionTree from
- * loading the meta box resources.
- *
- * @since 2.0
- */
- define( 'OT_META_BOXES', apply_filters( 'ot_meta_boxes', true ) );
-
- /**
- * For developers: Allow Unfiltered HTML in all the textareas.
- *
- * Run a filter and set to true if you want all the
- * users to be able to post anything in the textareas.
- * WARNING: This opens a security hole for low level users
- * to be able to post malicious scripts, you've been warned.
- *
- * @since 2.0
- */
- define( 'OT_ALLOW_UNFILTERED_HTML', apply_filters( 'ot_allow_unfiltered_html', false ) );
-
- /**
- * For developers: Post Formats.
- *
- * Run a filter and set to true if you want OptionTree
- * to load meta boxes for post formats.
- *
- * @since 2.4.0
- */
- define( 'OT_POST_FORMATS', apply_filters( 'ot_post_formats', false ) );
-
- /**
- * Check if in theme mode.
- *
- * If OT_THEME_MODE and OT_CHILD_THEME_MODE is false, set the
- * directory path & URL like any other plugin. Otherwise, use
- * the parent or child themes root directory.
- *
- * @since 2.0
- */
- if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
- define( 'OT_DIR', plugin_dir_path( __FILE__ ) );
- define( 'OT_URL', plugin_dir_url( __FILE__ ) );
- } else {
- if ( true == OT_CHILD_THEME_MODE ) {
- $path = ltrim( end( @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' );
- define( 'OT_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) );
- define( 'OT_URL', trailingslashit( trailingslashit( get_stylesheet_directory_uri() ) . $path ) );
- } else {
- $path = ltrim( end( @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' );
- define( 'OT_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) );
- define( 'OT_URL', trailingslashit( trailingslashit( get_template_directory_uri() ) . $path ) );
- }
- }
-
- /**
- * Template directory URI for the current theme.
- *
- * @since 2.1
- */
- if ( true == OT_CHILD_THEME_MODE ) {
- define( 'OT_THEME_URL', get_stylesheet_directory_uri() );
- } else {
- define( 'OT_THEME_URL', get_template_directory_uri() );
- }
-
- }
-
- /**
- * Include admin files
- *
- * These functions are included on admin pages only.
- *
- * @return void
- *
- * @access private
- * @since 2.0
- */
- private function admin_includes() {
-
- /* exit early if we're not on an admin page */
- if ( ! is_admin() )
- return false;
-
- /* global include files */
- $files = array(
- 'ot-functions-admin',
- 'ot-functions-option-types',
- 'ot-functions-compat',
- 'ot-settings-api'
- );
-
- /* include the meta box api */
- if ( OT_META_BOXES == true ) {
- $files[] = 'ot-meta-box-api';
- }
-
- /* include the post formats api */
- if ( OT_META_BOXES == true && OT_POST_FORMATS == true ) {
- $files[] = 'ot-post-formats-api';
- }
-
- /* include the settings & docs pages */
- if ( OT_SHOW_PAGES == true ) {
- $files[] = 'ot-functions-settings-page';
- $files[] = 'ot-functions-docs-page';
- }
-
- /* include the cleanup api */
- $files[] = 'ot-cleanup-api';
-
- /* require the files */
- foreach ( $files as $file ) {
- $this->load_file( OT_DIR . "includes" . DIRECTORY_SEPARATOR . "{$file}.php" );
- }
-
- /* Registers the Theme Option page */
- add_action( 'init', 'ot_register_theme_options_page' );
-
- /* Registers the Settings page */
- if ( OT_SHOW_PAGES == true ) {
- add_action( 'init', 'ot_register_settings_page' );
-
- /* global CSS */
- add_action( 'admin_head', array( $this, 'global_admin_css' ) );
- }
-
- }
-
- /**
- * Include front-end files
- *
- * These functions are included on every page load
- * incase other plugins need to access them.
- *
- * @return void
- *
- * @access private
- * @since 2.0
- */
- private function includes() {
-
- $files = array(
- 'ot-functions',
- 'ot-functions-deprecated'
- );
-
- /* require the files */
- foreach ( $files as $file ) {
- $this->load_file( OT_DIR . "includes" . DIRECTORY_SEPARATOR . "{$file}.php" );
- }
-
- }
-
- /**
- * Execute the WordPress Hooks
- *
- * @return void
- *
- * @access public
- * @since 2.0
- */
- private function hooks() {
-
- // Attempt to migrate the settings
- if ( function_exists( 'ot_maybe_migrate_settings' ) )
- add_action( 'init', 'ot_maybe_migrate_settings', 1 );
-
- // Attempt to migrate the Options
- if ( function_exists( 'ot_maybe_migrate_options' ) )
- add_action( 'init', 'ot_maybe_migrate_options', 1 );
-
- // Attempt to migrate the Layouts
- if ( function_exists( 'ot_maybe_migrate_layouts' ) )
- add_action( 'init', 'ot_maybe_migrate_layouts', 1 );
-
- /* load the Meta Box assets */
- if ( OT_META_BOXES == true ) {
-
- /* add scripts for metaboxes to post-new.php & post.php */
- add_action( 'admin_print_scripts-post-new.php', 'ot_admin_scripts', 11 );
- add_action( 'admin_print_scripts-post.php', 'ot_admin_scripts', 11 );
-
- /* add styles for metaboxes to post-new.php & post.php */
- add_action( 'admin_print_styles-post-new.php', 'ot_admin_styles', 11 );
- add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 );
-
- }
-
- /* Adds the Theme Option page to the admin bar */
- add_action( 'admin_bar_menu', 'ot_register_theme_options_admin_bar_menu', 999 );
-
- /* prepares the after save do_action */
- add_action( 'admin_init', 'ot_after_theme_options_save', 1 );
-
- /* default settings */
- add_action( 'admin_init', 'ot_default_settings', 2 );
-
- /* add xml to upload filetypes array */
- add_action( 'admin_init', 'ot_add_xml_to_upload_filetypes', 3 );
-
- /* import */
- add_action( 'admin_init', 'ot_import', 4 );
-
- /* export */
- add_action( 'admin_init', 'ot_export', 5 );
-
- /* save settings */
- add_action( 'admin_init', 'ot_save_settings', 6 );
-
- /* save layouts */
- add_action( 'admin_init', 'ot_modify_layouts', 7 );
-
- /* create media post */
- add_action( 'admin_init', 'ot_create_media_post', 8 );
-
- /* Google Fonts front-end CSS */
- add_action( 'wp_enqueue_scripts', 'ot_load_google_fonts_css', 1 );
-
- /* dynamic front-end CSS */
- add_action( 'wp_enqueue_scripts', 'ot_load_dynamic_css', 999 );
-
- /* insert theme CSS dynamically */
- add_action( 'ot_after_theme_options_save', 'ot_save_css' );
-
- /* AJAX call to create a new section */
- add_action( 'wp_ajax_add_section', array( $this, 'add_section' ) );
-
- /* AJAX call to create a new setting */
- add_action( 'wp_ajax_add_setting', array( $this, 'add_setting' ) );
-
- /* AJAX call to create a new contextual help */
- add_action( 'wp_ajax_add_the_contextual_help', array( $this, 'add_the_contextual_help' ) );
-
- /* AJAX call to create a new choice */
- add_action( 'wp_ajax_add_choice', array( $this, 'add_choice' ) );
-
- /* AJAX call to create a new list item setting */
- add_action( 'wp_ajax_add_list_item_setting', array( $this, 'add_list_item_setting' ) );
-
- /* AJAX call to create a new layout */
- add_action( 'wp_ajax_add_layout', array( $this, 'add_layout' ) );
-
- /* AJAX call to create a new list item */
- add_action( 'wp_ajax_add_list_item', array( $this, 'add_list_item' ) );
-
- /* AJAX call to create a new social link */
- add_action( 'wp_ajax_add_social_links', array( $this, 'add_social_links' ) );
-
- /* AJAX call to retrieve Google Font data */
- add_action( 'wp_ajax_ot_google_font', array( $this, 'retrieve_google_font' ) );
-
- // Adds the temporary hacktastic shortcode
- add_filter( 'media_view_settings', array( $this, 'shortcode' ), 10, 2 );
-
- // AJAX update
- add_action( 'wp_ajax_gallery_update', array( $this, 'ajax_gallery_update' ) );
-
- /* Modify the media uploader button */
- add_filter( 'gettext', array( $this, 'change_image_button' ), 10, 3 );
-
- }
-
- /**
- * Load a file
- *
- * @return void
- *
- * @access private
- * @since 2.0.15
- */
- private function load_file( $file ){
-
- include_once( $file );
-
- }
-
- /**
- * Adds the global CSS to fix the menu icon.
- */
- public function global_admin_css() {
- global $wp_version;
-
- $wp_38plus = version_compare( $wp_version, '3.8', '>=' ) ? true : false;
- $fontsize = $wp_38plus ? '20px' : '16px';
- $wp_38minus = '';
-
- if ( ! $wp_38plus ) {
- $wp_38minus = '
- #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image {
- background: none;
- }
- #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image:before {
- padding-left: 6px;
- }';
- }
-
- echo '
-
- ';
- }
-
- /**
- * AJAX utility function for adding a new section.
- */
- public function add_section() {
- echo ot_sections_view( ot_settings_id() . '[sections]', $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new setting.
- */
- public function add_setting() {
- echo ot_settings_view( $_REQUEST['name'], $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new list item setting.
- */
- public function add_list_item_setting() {
- echo ot_settings_view( $_REQUEST['name'] . '[settings]', $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding new contextual help content.
- */
- public function add_the_contextual_help() {
- echo ot_contextual_help_view( $_REQUEST['name'], $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new choice.
- */
- public function add_choice() {
- echo ot_choices_view( $_REQUEST['name'], $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new layout.
- */
- public function add_layout() {
- echo ot_layout_view( $_REQUEST['count'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new list item.
- */
- public function add_list_item() {
- check_ajax_referer( 'option_tree', 'nonce' );
- ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] );
- die();
- }
-
- /**
- * AJAX utility function for adding a new social link.
- */
- public function add_social_links() {
- check_ajax_referer( 'option_tree', 'nonce' );
- ot_social_links_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] );
- die();
- }
-
- /**
- * Fake the gallery shortcode
- *
- * The JS takes over and creates the actual shortcode with
- * the real attachment IDs on the fly. Here we just need to
- * pass in the post ID to get the ball rolling.
- *
- * @param array The current settings
- * @param object The post object
- * @return array
- *
- * @access public
- * @since 2.2.0
- */
- public function shortcode( $settings, $post ) {
- global $pagenow;
-
- if ( in_array( $pagenow, array( 'upload.php', 'customize.php' ) ) ) {
- return $settings;
- }
-
- // Set the OptionTree post ID
- if ( ! is_object( $post ) ) {
- $post_id = isset( $_GET['post'] ) ? $_GET['post'] : ( isset( $_GET['post_ID'] ) ? $_GET['post_ID'] : 0 );
- if ( $post_id == 0 && function_exists( 'ot_get_media_post_ID' ) ) {
- $post_id = ot_get_media_post_ID();
- }
- $settings['post']['id'] = $post_id;
- }
-
- // No ID return settings
- if ( $settings['post']['id'] == 0 )
- return $settings;
-
- // Set the fake shortcode
- $settings['ot_gallery'] = array( 'shortcode' => "[gallery id='{$settings['post']['id']}']" );
-
- // Return settings
- return $settings;
-
- }
-
- /**
- * Returns the AJAX images
- *
- * @return string
- *
- * @access public
- * @since 2.2.0
- */
- public function ajax_gallery_update() {
-
- if ( ! empty( $_POST['ids'] ) ) {
-
- $return = '';
-
- foreach( $_POST['ids'] as $id ) {
-
- $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
-
- $return .= ' ';
-
- }
-
- echo $return;
- exit();
-
- }
-
- }
-
- /**
- * Returns a JSON encoded Google fonts array.
- *
- * @return array
- *
- * @access public
- * @since 2.5.0
- */
- public function retrieve_google_font() {
-
- if ( isset( $_POST['field_id'], $_POST['family'] ) ) {
-
- ot_fetch_google_fonts();
-
- echo json_encode( array(
- 'variants' => ot_recognized_google_font_variants( $_POST['field_id'], $_POST['family'] ),
- 'subsets' => ot_recognized_google_font_subsets( $_POST['field_id'], $_POST['family'] )
- ) );
- exit();
-
- }
-
- }
-
- /**
- * Filters the media uploader button.
- *
- * @return string
- *
- * @access public
- * @since 2.1
- */
- public function change_image_button( $translation, $text, $domain ) {
- global $pagenow;
-
- if ( $pagenow == apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) && 'default' == $domain && 'Insert into post' == $text ) {
-
- // Once is enough.
- remove_filter( 'gettext', array( $this, 'ot_change_image_button' ) );
- return apply_filters( 'ot_upload_text', __( 'Send to OptionTree', 'option-tree' ) );
-
- }
-
- return $translation;
-
- }
-
-
- }
-
- /**
- * Instantiate the OptionTree loader class.
- *
- * @since 2.0
- */
- $ot_loader = new OT_Loader();
-
-}
-
-/* End of file ot-loader.php */
-/* Location: ./ot-loader.php */
diff --git a/option-tree/readme.txt b/option-tree/readme.txt
deleted file mode 100644
index d15a017..0000000
--- a/option-tree/readme.txt
+++ /dev/null
@@ -1,636 +0,0 @@
-=== OptionTree ===
-Contributors: valendesigns
-Donate link: http://bit.ly/NuXI3T
-Tags: options, theme options, meta boxes
-Requires at least: 3.8
-Tested up to: 4.4
-Stable tag: 2.6.0
-License: GPLv3
-
-Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
-
-== Description ==
-
-OptionTree attempts to bridge the gap between WordPress developers, designers and end-users by creating fully responsive option panels and meta boxes with an ease unlike any other plugin. OptionTree has many advanced features with well placed hooks and filters to adjust every aspect of the user experience.
-
-Build your Theme Options panel locally with an easy to use drag & drop interface and then export a functioning `theme-options.php` file for production use that is i18n translation ready, with your custom text domain automatically inserted.
-
-And, in just a few simple lines of code, save settings to the database with a unique array ID so none of your Theme Options conflict with other themes that use OptionTree.
-
-Also, OptionTree now takes full advantage of the new color schemes introduced in WordPress 3.8, it looks and feels built-in.
-
-#### Theme Integration
-If you're like me, you want to know how everything works. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and see first hand how to integrate OptionTree into your own project. I'll walk you through installing OptionTree and you'll get a chance to see all the various options and filters first hand and in the wild.
-
-#### Contributing
-To contribute or report bugs, please go to the [OptionTree Github](https://github.com/valendesigns/option-tree) repository.
-
-#### Sponsorship
-OptionTree is a project partly sponsored by ThemeForest , the largest WordPress theme marketplace on the web.
-
-#### Option Types
-This is a complete list of all the available option types that come shipped with OptionTree.
-
-* Background
-* Border
-* Box Shadow
-* Category Checkbox
-* Category Select
-* Checkbox
-* Colorpicker
-* Colorpicker Opacity
-* CSS
-* Custom Post Type Checkbox
-* Custom Post Type Select
-* Date Picker
-* Date Time Picker
-* Dimension
-* Gallery
-* Google Fonts
-* JavaScript
-* Link Color
-* List Item
-* Measurement
-* Numeric Slider
-* On/Off
-* Page Checkbox
-* Page Select
-* Post Checkbox
-* Post Select
-* Radio
-* Radio Image
-* Select
-* Sidebar Select
-* Slider
-* Social Links
-* Spacing
-* Tab
-* Tag Checkbox
-* Tag Select
-* Taxonomy Checkbox
-* Taxonomy Select
-* Text
-* Textarea
-* Textarea Simple
-* Textblock
-* Textblock Titled
-* Typography
-* Upload
-
-== Installation ==
-
-**Plugin Mode**
-
-1. Upload `option-tree` to the `/wp-content/plugins/` directory
-1. Activate the plugin through the `Plugins` menu in WordPress
-1. Click the `OptionTree->Documentation` link in the WordPress admin sidebar menu for further setup assistance.
-
-**Theme Mode**
-
-1. Download the latest version of OptionTree and unarchive the `.zip` directory.
-1. Put the `option-tree` directory in the root of your theme. For example, the server path would be `/wp-content/themes/theme-name/option-tree/`.
-1. You must deactivate and/or delete the plugin version of OptionTree.
-1. Add the following code to the beginning of your `functions.php`.
-
-`/**
- * Required: set 'ot_theme_mode' filter to true.
- */
-add_filter( 'ot_theme_mode', '__return_true' );
-
-/**
- * Required: include OptionTree.
- */
-require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' );`
-
-For a list of all the OptionTree UI display filters refer to the `demo-functions.php` file found in the `/assets/theme-mode/` directory of this plugin. This file is the starting point for developing themes with Theme Mode.
-
-== Frequently Asked Questions ==
-
-= Is there a demo theme I can install? =
-
-There sure is, and I'm glad you asked. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and get some experience setting up OptionTree on your own with detailed directions and tips.
-
-= Why are my translation files not loading? =
-
-It is important to note that when you use OptionTree as a plugin, you must store your language files in the `option-tree/languages` directory and use file names like `option-tree-es_ES.mo` & `option-tree-es_ES.po`. However, when using OptionTree in Theme Mode you must also create a `theme-mode` directory inside the `option-tree/languages` directory and store your files there with names like `es_ES.mo` & `es_ES.po`. This is due to the different naming conventions of the `load_plugin_textdomain()` and `load_theme_textdomain()` functions.
-
-= I get errors or a blank screen when I activate the plugin. What's the deal? =
-
-The most likely scenario is your theme already has OptionTree installed in Theme Mode. And since the plugin and theme version can't both be active at the same time without the sky falling on your head, your site has decided to throw in the towel. If that's not your issue, open up a support request and we'll figure it out together. UPDATE: As of OptionTree 2.4.0 the plugin version will not conflict with the Theme Mode version if they are both 2.4.0 or higher.
-
-== Screenshots ==
-
-1. Theme Options
-2. Settings
-3. Documentation
-
-== Changelog ==
-
-= 2.6.0 =
-* Fix a reflected XSS vulnerability with the `add_list_item` & `add_social_links` Ajax requests.
-* Fix the Google Fonts URL so it passed the W3 Validator. props @BassemN
-* Fix `global_admin_css` so it's only enqueued when needed.
-* Fix `dynamic.css` so that a child theme doesn't load the styles saved to the parent theme.
-* Add filter `ot_recognized_post_format_meta_boxes` to support additional post formats meta boxes. props @BassemN
-* Add action `ot_do_settings_fields_before` & `ot_do_settings_fields_after`. props @BassemN, @valendesigns
-* Add Text Domain to plugin file to fully support the new translate.wordpress.org Language Packs.
-* Fix notice in PHP 7.0.0 props @Zackio
-
-= 2.5.5 =
-* Hotfix - Allow a `0` value to be saved with certain option types. Contributors via github @BassemN.
-* Hotfix - Stop media from being attached to the OptionTree post type when uploaded from the media manager or customizer. Contributors via github @earnjam, and @valendesigns.
-* Hotfix - Added filter `ot_load_dynamic_css` to explicitly turn the feature off if desired.
-* Hotfix - Stopped `dynamic.css` created with other themes from being loaded elsewhere.
-
-= 2.5.4 =
-* Hotfix - Support for WordPress 4.2 term splitting.
-* Hotfix - Removed any potential XSS security issues with `add_query_arg` by escaping it.
-* Hotfix - Fixed an issue where Visual Composer was indirectly destroying OptionTree meta box values.
-* Hotfix - Fixed an issue where the select field value was not visible. Contributors via github @sabbirk15.
-
-= 2.5.3 =
-* Hotfix - Added `inherit` fallback to the `border` option type in dynamic.css.
-* Hotfix - Added `none` fallback to the `box-shadow` option type in dynamic.css.
-* Hotfix - Added `inherit` fallback to the `colorpicker` option type in dynamic.css.
-* Hotfix - Added `inherit` fallback to the `colorpicker-opacity` option type in dynamic.css.
-* Hotfix - Added filter `ot_insert_css_with_markers_fallback` to filter the `dynamic.css` fallback value.
-* Hotfix - Added filter `ot_type_radio_image_attributes` to filter the image attributes for each radio choice. Contributors via github @BassemN, and @valendesigns.
-* Hotfix - Refactored `ot_insert_css_with_markers` to remove confusing & unnecessary PHP statements and fix whitespace.
-* Hotfix - Fixed an issue in `ot_insert_css_with_markers` where the `$option_type` variable was not being set properly.
-* Hotfix - Fixed an issue where having multiple Google Fonts option types caused the "Add Google Font" button to insert multiple dropdowns.
-
-= 2.5.2 =
-* Hotfix - Added `inherit` fallback to the `link-color` option type in dynamic.css.
-* Hotfix - Remove `$.browser.msie` JS error caused by function being deprecated.
-* Hotfix - Change `hover` to `mouseenter mouseleave` to stop jQuery migrate error message.
-* Hotfix - Don't allow duplicate Google Fonts in the `ot-google-fonts-css` enqueue.
-* Hotfix - Fixed an issue with the CSS and JavaScript option types not being initiating inside of tabs.
-* Hotfix - Fixed metabox tab styles for mobile.
-* Hotfix - Separate the post formats JS so it does not interfere with the default behavior and loads only as needed.
-* Hotfix - Adding the `not-sortable` class to the List Item option type will remove the sortable feature for that option.
-
-= 2.5.1 =
-* Hotfix - Overhaul the Colorpicker Opacity option type so it saves rgba values, not arrays.
-* Hotfix - Added the ability to set opacity on any colorpicker with the `ot-colorpicker-opacity` class.
-* Hotfix - Don't use `esc_url_raw` to filter the Upload option type when it's saving an attachment ID. Contributors via github @RistoNiinemets.
-* Hotfix - Show an error message to user if unable to write to the `dynamic.css` file. Contributors via github @johnh10, and @valendesigns.
-* Hotfix - Force the `ot_google_fonts` array to be rebuilt when switching between themes.
-* Hotfix - Stop theme check from nagging about using `add_menu_page` in `ot-cleanup-api.php`.
-
-= 2.5.0 =
-* Added the Google Fonts option type. Contributors via github @maimairel, and @valendesigns.
-* Added the Border option type. Contributors via github @doitmax, and @valendesigns.
-* Added the Box Shadow option type. Contributors via github @doitmax, and @valendesigns.
-* Added the Colorpicker Opacity option type. Contributors via github @doitmax, and @valendesigns.
-* Added the Dimension option type. Contributors via github @doitmax, and @valendesigns.
-* Added the JavaScript option type.
-* Added the Link Color option type. Contributors via github @doitmax, and @valendesigns.
-* Added the Spacing option type. Contributors via github @doitmax, and @valendesigns.
-* Fixed an issue where the Colorpicker was not parsing conditions on `change` or `clear`.
-* Fixed the Colorpicker styles on mobile devices.
-* Show the Colorpicker setting ID inside the error message string when the value is invalid.
-* Added an 'on change' trigger to the Numeric Slider's hidden input. Contributors via github @cubell.
-* Stop Theme Check from complaining about the `register_post_type()` function being used in Theme Mode.
-* Added styles that clean up the appearance of the included Font Awesome icons in section tabs.
-* Fixed jQuery UI style conflicts created by the WP Review plugin.
-* Changed the sanitization function from `sanitize_text_field` to `esc_url_raw` for the Upload option type.
-* Added filter `ot_dequeue_jquery_ui_css_screen_ids` to dequeue `jquery-ui-css` by screen ID.
-* Added filter `ot_on_off_switch_on_value` to filter the value of the On button. Contributors via github @BassemN, and @valendesigns.
-* Added filter `ot_on_off_switch_on_label` to filter the label of the On button. Contributors via github @BassemN, and @valendesigns.
-* Added filter `ot_on_off_switch_off_value` to filter the value of the Off button. Contributors via github @BassemN, and @valendesigns.
-* Added filter `ot_on_off_switch_off_label` to filter the label of the Off button. Contributors via github @BassemN, and @valendesigns.
-* Added filter `ot_on_off_switch_width` to filter the width of the On/Off switch.
-* Added filter `ot_type_date_picker_readonly` to filter the addition of the readonly attribute.
-* Added filter `ot_type_date_time_picker_readonly` to filter the addition of the readonly attribute.
-* Added filter `ot_admin_menu_priority` to filter the `admin_menu` action hook priority.
-* Added Estonian translation. Contributors via github @tjuris, and @RistoNiinemets.
-* Fixed an issue where changes to `theme-options.php` required a second page load.
-* Fixed the clean up script, it only displays when there's something to clean up. No more menu item!
-* Update demo files with the latest option types.
-* Changed where `ot_css_file_paths` is saved when `is_multisite` for better `dynamic.css` file support.
-* Changed the default `dynamic.css` file path in multisite to be `dynamic-{current-blog-id}.css`.
-
-= 2.4.6 =
-* Hotfix - Added a clean up script to consolidate orphaned media posts and remove the old and unused `wp_option_tree` table.
-* Hotfix - Fixed an issue where `ot_get_media_post_ID()` was never able to set the value of the `ot_media_post_ID` option because it was already set to empty. Causing the `ot_create_media_post()` function to create multiple media posts.
-
-= 2.4.5 =
-* Hotfix - Fixed an issue where `ot_get_media_post_ID()` was setting the value of the `ot_media_post_ID` option to `null`. Causing the `ot_create_media_post()` function to create multiple media posts. A clean up script will be added to `2.5.0`.
-
-= 2.4.4 =
-* Hotfix - Fixed undefined index caused by shorthand conditional.
-* Hotfix - Fixed jQuery UI style conflicts created by the Easy Digital Downloads plugin.
-* Hotfix - Added placeholder to background-image. Contributors via github @BassemN.
-
-= 2.4.3 =
-* Hotfix - WordPress 4.0 compatible.
-* Hotfix - Fixed an issue where all media was being attached to the default OptionTree media post.
-* Hotfix - Removed the deprecated `screen_icon()` function.
-* Hotfix - Fixed the `ot_line_height_range_interval` filter being misnamed as `ot_line_height_unit_type`. Contributors via github @youri--.
-* Hotfix - Fixed a conflict with "Frontend Publishing Pro" when using the media uploader on the front-end.
-* Hotfix - Increase condition performance. Contributors via github @designst.
-* Hotfix - Add custom style classes to list-item settings. Contributors via github @designst.
-* Hotfix - Check for `post_title` instead of `post_name` in `ot_get_media_post_ID()`. Contributors via github @clifgriffin.
-* Hotfix - Store the return value of `ot_get_media_post_ID()` in the options table as `ot_media_post_ID`.
-* Hotfix - Added padding to List Items options to reflect the same UI as individual options. Contributors via github @valendesigns and @designst.
-* Hotfix - Fixed a bug that caused the Social Links option type to not properly import.
-
-= 2.4.2 =
-* Hotfix - Fixed a PHP notice that was created when `background-size` in the Background option type is undefined.
-* Hotfix - Fixed an issue with the Upload option type, in attachment ID mode, not storing its value.
-* Hotfix - Replaced `load_template` with `require` throught the documentation.
-* Hotfix - Added a settings ID auto-fill that is based on the text of the settings label in the Theme Options UI Builder. Contributors via github @valendesigns and @Ore4444.
-* Hotfix - Added filter `ot_override_forced_textarea_simple` to allow the Textarea option type to be moved in the DOM and not replaced with the Textarea Simple option type in meta boxes and list items.
-
-= 2.4.1 =
-* Hotfix - Fixed a typo in the demo Theme Options related to the `social-links`.
-* Hotfix - Fixed the language directory path conflict between IIS and Linux while in Theme Mode.
-* Hotfix - Fixed a style issue where select fields would overflow their parent elements.
-* Hotfix - Fixed a PHP notice that was created when the Measurement option type did not have a saved value.
-
-= 2.4.0 =
-* Added filter 'ot_post_formats' which loads meta boxes specifically for post formats.
-* Added the Social Links option type.
-* Fixed OptionTree being conflicted due to having both the plugin and theme version activated. Contributors via github @valendesigns and @bitcommit.
-* Added an admin notice when the UI Builder is being overridden by custom theme options.
-* Allow the Upload option type to be stored as an attachment ID by adding `ot-upload-attachment-id` to the elements `class` attribute. Contributors via github @valendesigns and @krisarsov.
-* Fixed an issue with the CSS option type not showing the Ace editor in a metabox that is broken into tabbed content.
-* Fixed missing option type translation strings. Contributors via github @RistoNiinemets.
-* Replaced mysql functions with the wpdb equivalent. Contributors via github @joshlevinson.
-* Fixed search order of the `contains` condition string. Contributors via github @designst.
-* Added meta box field wrapper class if a custom field class is defined in the settings. Contributors via github @designst.
-* Added filter 'ot_type_select_choices' to dynamically change select choices. Contributors via github @maimairel and @valendesigns.
-* Fixed a bug that added an unnecessary directory separator to the `load_theme_textdomain()` `$path` variable. Contributors via github @PatrickDelancy and @valendesigns.
-* Fixed the state of metabox radio buttons after a Drag & Drop event. Contributors via github @themovation and @valendesigns.
-* Fixed conditions not working correctly within list items.
-* Fixed the min-height issue when using tabs in metaboxes.
-* Added filter `ot_recognized_font_sizes` to dynamically change the font sizes by field ID.
-* Added filter `ot_recognized_letter_spacing` to dynamically change the letter spacing by field ID.
-* Added filter `ot_recognized_line_heights` to dynamically change the line heights by field ID.
-* Fixed a style issue where list item labels in metaboxes were not displaying correctly.
-* Fixed an issue where the WooCommerce plugin would alter the style of metabox tabs on product pages.
-
-= 2.3.4 =
-* Hotfix - Fixed an issue where condition number values were being treated like strings and not returning a correct boolean response.
-
-= 2.3.3 =
-* Hotfix - Fixed subfolder compatibility with versions of Windows that use backslashes instead of forward slashes. Contributors via github @primozcigler and @valendesigns.
-* Hotfix - Fixed missing text domain in demo files. Contributors via github @jetonr.
-* Hotfix - Added filter `ot_migrate_settings_id` to migrate themes that used `option_tree_settings` and now use a custom settings ID.
-* Hotfix - Added filter `ot_migrate_options_id` to migrate themes that used `option_tree` and now use a custom options ID.
-* Hotfix - Added filter `ot_migrate_layouts_id` to migrate themes that used `option_tree_layouts` and now use a custom layouts ID.
-
-= 2.3.2 =
-* Hotfix - Fixed an issue with the `ot_create_media_post` function creating multiple `option-tree` posts.
-* Hotfix - Change the icon used by the layout management option type to differentiate it from the edit button.
-* Hotfix - Suppress PHP warning in the Background option type "Invalid argument supplied for foreach()". Contributors via github @tomkwok.
-* Hotfix - Added filter `ot_type_date_picker_date_format` to change the date format of the Date Picker option type.
-* Hotfix - Added filter `ot_type_date_time_picker_date_format` to change the date format of the Date Time Picker option type.
-
-= 2.3.1 =
-* Hotfix - Fixed a bug with the Gallery option type that would show attachments in the media window when none had been added yet.
-* Hotfix - Added the option to save the Gallery as a shortcode by adding `ot-gallery-shortcode` to the elements `class` attribute.
-* Hotfix - Fixed conditions not being effective in List Items directly after clicking "Add New". Contributors via github @bitcommit.
-
-= 2.3.0 =
-* Added the Tab option type.
-* Added Ace Editor to the CSS option type. Contributors via github @imangm and @valendesigns.
-* Added support for WordPress 3.8 color schemes.
-* Added support for RTL languages. Contributors via github @omid-khd and @valendesigns.
-* Added actions before and after the enqueue styles and scripts.
-* Added Date Picker option type. Contributors via github @jetonr and @valendesigns.
-* Added Date Time Picker option type. Contributors via github @jetonr and @valendesigns.
-* Added filter 'ot_list_item_title_label' to change the label for a List Item's required title field.
-* Added filter 'ot_list_item_title_desc' to change the description for a List Item's required title field.
-* Added filter 'ot_options_id' to change the 'option_tree' option ID to a unique value.
-* Added filter 'ot_settings_id' to change the 'option_tree_settings' option ID to a unique value.
-* Added filter 'ot_layouts_id' to change the 'option_tree_layouts' option ID to a unique value.
-* Added filter 'ot_header_logo_link' to change the logo link inside the header of OptionTree.
-* Added filter 'ot_header_version_text' to change the version text inside the header of OptionTree.
-* Added action 'ot_header_list' to add additional theme specific list items to the header of OptionTree.
-* Added filter 'ot_upload_text' to change the "Send to OptionTree" text.
-* Added the CSS Class field value to the parent `.format-settings` div in addition to the class being added to the element. Each class is now appended with `-wrap`.
-* Added support for [Composer](https://github.com/composer/composer). Contributors via github @designst.
-* Added support for adding I18n text domains to the exported `theme-options.php` file.
-* Fixed a bug that kept the UI from displaying when using the `ot_type_background_size_choices` filter.
-* Fixed a bug that caused the Gallery option type to save a single space instead of `null`.
-* Fixed the return value of the Background, Measurement, and Typography option types. They now return `null` if no values are saved to the array.
-* Fixed a bug that resulted in a PHP warning if the choices array was set to an empty string.
-* Updated the documentation, including this `readme.txt` and a new demo [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) to parallel OptionTree.
-* Added filter 'ot_type_radio_image_src' which allows the Radio Image option type source URI to be changed. Contributors via github @bitcommit.
-
-= 2.2.3 =
-* Hotfix - Allow empty condition values. For example, `field_id:is()` or `field_id:not()` would now be valid syntax.
-* Hotfix - Fixed a bug in the `init_upload_fix` JavaScript method.
-* Hotfix - Fixed a bug in the `url_exists` javaScript method. The code will no longer will check if a URL exists on another domain.
-
-= 2.2.2 =
-* Hotfix - Added support for both upper and lower case conditions operator.
-* Hotfix - Updated the color and font size of inline code.
-* Hotfix - Fix an issue with IE filter and updated the style of the On/Off option type.
-* Hotfix - Added opacity to radio images to improve distinction. Contributors via github @jetonr.
-
-= 2.2.1 =
-* Hotfix - Fixed a UI bug that caused the layouts input to cover the wp menu.
-* Hotfix - Moved the screen shots to the WordPress SVN assets directory.
-
-= 2.2.0 =
-* Added the Gallery option type.
-* Added the On/Off option type.
-* Replaced the old Color Picker with the default WP Color Picker.
-* Added UI support for WordPress 3.8. Contributors via github @AlxMedia, and @valendesigns.
-* Added support for conditional toggling of settings fields. Contributors via github @maimairel, @valendesigns, @doitmax, and @imangm.
-* Replaced the OptionTree image icon with a font version.
-* Added 'background-size' to the Background option type.
-* Added fallback text when displaying posts without titles in various option types.
-* Added filter 'ot_recognized_background_fields' to show/hide fields for background option types.
-* Added filter 'ot_filter_description' that allows the theme option descriptions to be filtered before being displayed.
-* Added subfolder compatibility in theme mode. Contributors via github @doitmax, and @valendesigns.
-* Fixed a bug caused by using 'home_url' when loading dynamic CSS files.
-* Fixed an issue where you could not save metabox text field values as "0". Contributors via github @sparkdevelopment, and @valendesigns.
-* Fixed the broken localization directory path in theme mode. Contributors via github @youri--, and @valendesigns.
-* Fixed missing custom class for the Numeric Slider. Contributors via github @doitmax.
-* Added filter 'ot_type_category_checkbox_query' which allows you to filter the get_categories() args for Category Checkbox.
-* Added filter 'ot_type_category_select_query' which allows you to filter the get_categories() args for Category Select.
-* Added filter 'ot_type_taxonomy_checkbox_query' which allows you to filter the get_categories() args for Taxonomy Checkbox.
-* Added filter 'ot_type_taxonomy_select_query' which allows you to filter the get_categories() args for Taxonomy Select.
-* Added the 'ot_echo_option' function. Contributors via github @joshlevinson.
-* Added filter 'ot_theme_options_contextual_help' which allows you to filter the Contextual Help on the Theme Options page.
-* Added filter 'ot_theme_options_sections' which allows you to filter the Sections on the Theme Options page. Contributors via github @joshlevinson.
-* Added filter 'ot_theme_options_settings' which allows you to filter the Settings on the Theme Options page. Contributors via github @joshlevinson.
-
-= 2.1.4 =
-* Hotfix - Fixed the Numeric Slider not work inside of a newly added List item.
-* Hotfix - Fixed the numeric slider fallback value being set to 0, it now becomes the minimum value if no standard is set.
-* Hotfix - Allow single quotes in std and choice value when exporting theme-options.php. Contributors via github @maimairel.
-* Hotfix - Additional Themecheck bypass for required functions. Contributors via github @maimairel.
-* Hotfix - Fixed post meta information being lost when loading revisions. Contributors via github @live-mesh.
-* Hotfix - Removed template queries in option types. Contributors via github @live-mesh.
-
-= 2.1.3 =
-* Hotfix - Loading OptionTree on the 'init' action proved to be wrong, it now loads on 'after_setup_theme'.
-* Hotfix - Layouts were not being imported properly due to using the wrong path variable.
-
-= 2.1.2 =
-* Hotfix - Fixed a JS mistake that caused upload in list items and sliders to not open the media uploader until saved first.
-* Hotfix - Load OptionTree on the 'init' action, which allows the UI filters to properly function when not in theme mode.
-
-= 2.1.1 =
-* Hotfix - The OT_SHOW_SETTINGS_EXPORT constant was incorrectly set to false as the default.
-
-= 2.1 =
-* Added support for WordPress 3.6.
-* UI got a small but needed update, and is now more inline with WordPress.
-* Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop.
-* Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns.
-* Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns.
-* Added a Sidebar Select option type. Contributors via github @maimairel.
-* Removed additional deprecated assigning of return value in PHP.
-* Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim.
-* Fix option types that use $count instead of an array key to select the option value.
-* Created functions to register the Theme Options & Settings pages, and with better filtering.
-* Added relative path support for Radio Image choices.
-* Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path.
-* Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel.
-* The 'ot_theme_options_capability' filter is now working for different capabilities like editor.
-* The 'ot_display_by_type' filter is now being assigned to a value.
-* Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder.
-* Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page.
-* Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page.
-* Added filter 'ot_show_docs' which allows you to hide the Documentation.
-* Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners).
-* Added filter 'ot_list_item_description' which allows you to change the default list item description text.
-* Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the get_posts() args for Custom Post Type Checkbox.
-* Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the get_posts() args for Custom Post Type Select.
-* Added filter 'ot_type_page_checkbox_query' which allows you to filter the get_posts() args for Page Checkbox.
-* Added filter 'ot_type_page_select_query' which allows you to filter the get_posts() args for Page Select.
-* Added filter 'ot_type_post_checkbox_query' which allows you to filter the get_posts() args for Post Checkbox.
-* Added filter 'ot_type_post_select_query' which allows you to filter the get_posts() args for Post Select.
-
-= 2.0.16 =
-* Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github.
-* Added 'font-color' to the typography filter.
-
-= 2.0.15 =
-* Added support for Child Theme mode.
-* Improved handling of standard values when settings are written manually.
-* Add filter for CSS insertion value.
-* Added 'ot_before_theme_options_save' action hook.
-* Fix 'indexOf' JS error when upload is closed without uploading.
-* Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'.
-* Remove load_template and revert back to include_once.
-* Fixed dynamic.css regression from 2.0.13 that caused the file to not save.
-
-= 2.0.14 =
-* Removed deprecated assigning of return value in PHP.
-* Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
-* Fixed missing required arguments in OT_Loader::add_layout.
-* Removed esc_attr() on font-family check.
-* Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php
-* Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents().
-
-= 2.0.13 =
-* Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
-* Fix an issue where Media Upload stopped working on some servers.
-
-= 2.0.12 =
-* Added additional filters to the array that builds the Theme Option UI.
-* Made option-tree post type private.
-* Revert capabilities back to manage_options in ot-ui-admin.php.
-* Upload now sends the URL of the selected image size to OptionTree.
-* Added new range interval filter to font-size, letter-spacing, & line-height.
-* Allow Typography fields to be filtered out of the UI.
-
-= 2.0.11 =
-* Added filters to the array that builds the Theme Option UI.
-* Added .format-setting-wrap div to allow for complex CSS layouts.
-* Added better namespacing for the Colorpicker option type.
-* Fixed theme-options.php export where it was adding an extra comma.
-
-= 2.0.10 =
-* Fixed a bug where the Textarea row count wasn't working for List Items.
-* Added an apply_filter to the exported theme-options.php file.
-* Added CSS id's to tabs and settings.
-* Allow "New Layout" section to be hidden on the theme options page via a filter.
-* Fixed a bug where the Colorpicker was not closing in List Items.
-* Change capabilities from manage_options to edit_theme_options.
-* Remove Textblock title in List Items & Metaboxes.
-* Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark
-* Fixed incorrect text domain paths for both plugin and theme mode.
-* Fixed a bug with UI Sortable not properly calculating the container height.
-* Fixed Select dropdown selector bug - submitted by Manfred Haltner
-* Fixed Radio Image remove class bug - submitted by designst
-* Added new typography fields - submitted by darknailblue
-* Added dynamic CSS support for new typography fields.
-* Added new filters to typography fields, including low/high range & unit types.
-
-= 2.0.9 =
-* Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop.
-* Added missing class setting to Textarea, Textarea Simple, & CSS option types.
-* Fixed theme-options.php exported array where label values were not correct.
-* Change GET to POST for all AJAX calls to fix a bug where some servers would not allow long strings to be passed in GET variables.
-* Added the 'ot_after_validate_setting' filter to the validation function.
-* Added $field_id to the ot_validate_setting() for more precise filtering.
-* Added the ot_reverse_wpautop() function that you can run input through just incase you need it.
-* Updated the docs to include information on why WYSIWYG editors are not allowed in meta boxes and that they revert to a Textarea Simple.
-* Update option-tree.pot file.
-
-= 2.0.8 =
-* Add auto import for backwards compatibility of old 1.x files.
-* Added the ability to export settings into a fully functional theme-options.php.
-* Fix typo in docs regarding the filter demo code.
-* Removed slashes in the section and contextual help titles.
-* Made colorpicker input field alignment more cross browser compatible.
-
-= 2.0.7 =
-* Fixed the load order to be compatible with 1.x version themes that think the get_option_tree() function doesn't exist yet.
-* Tested and compatible with Cudazi themes, but the nag message is still visible.
-
-= 2.0.6 =
-* Run the 'option_tree' array through validation when importing data and layouts.
-* Fix a bug where list items and sliders were not allowing the user to select the input field.
-* Add a filter that allows you to not load resources for meta boxes if you're not going to use them.
-* Update option-tree.pot file.
-
-= 2.0.5 =
-* Change the way the 'option_tree_settings' array validates. Strip out those damn slashes!
-
-= 2.0.4 =
-* Run the 'option_tree' array through validation when upgrading from the 1.0 branch to the 2.0 branch for the first time.
-* Fix a typo in the slider array where textarea's were not saving the first time due to an incorrect array key.
-
-= 2.0.3 =
-* Had an incorrect conditional statement causing an issue where the plugin was attempting to create the 'option-tree' image attachment page, even though it was already created.
-* The above also fixed a conflict with 'The Events Calendar' plugin.
-
-= 2.0.2 =
-* Added I18n support, let the translations begin. The option-tree.pot file is inside the languages directory.
-* Trim whitespace on imported choices array.
-* Fixed the CSS insert function not having a value to save.
-
-= 2.0.1 =
-* Import from table was not mapping settings correctly. It is now.
-
-= 2.0 =
-* Complete rewrite form the ground up.
-* Better Theme Options UI Builder.
-* New in-plugin documentation.
-* Brand new responsive UI.
-* Add new option types, most notable the List Item which should eventually replace the Slider.
-* Added the simpler ot_get_option() function to eventually replace get_option_tree().
-* Added support for Meta Boxes.
-* Added Theme Mode where you can now include the plugin directly in your theme.
-* Better validation on saved data.
-* Simplified the import process.
-* Added support for contextual help.
-* Permanently move the Theme Option to the Appearance tab.
-* Added a ton of filters.
-* Made huge improvements to the code base and tested rigorously.
-
-= 1.1.8.1 =
-* Removed get_option_tree() in the WordPress admin area due to theme conflicts.
-* Removed demo files in the assets folder at the request of WordPress
-
-= 1.1.8 =
-* Fixed scrolling issue on extra tall pages
-* Added ability to show/hide settings & documentation via the User Profile page.
-* Added Background option type.
-* Added Typography option type.
-* Added CSS option type.
-* Better looking selects with 1=Yes,2=No where '1' is the value and 'Yes' is the text in the select.
-* Made the AJAX message CSS more prominent.
-* functions.load.php will now only load option type functions if viewing an OT admin page.
-* Deregistered the custom jQuery UI in the 'Cispm Mail Contact' plugin when viewing an OptionTree page.
-* Can now save layouts from the Theme Options page.
-* You can now change the slider fields by targeting a specific "Option Key"
-* Modified upload for situations where you manually enter a relative path
-* Allow get_option_tree() function to be used in WP admin
-* Changed permissions to edit_theme_options
-
-= 1.1.7.1 =
-* Revert functions.load.php, will fix and update in next version
-
-= 1.1.7 =
-* Added layout (theme variation) support with save/delete/activate/import/export capabilities.
-* Allow layout change on Theme Options page.
-* Full Multisite compatibility by manually adding xml mime type for import options.
-* Replaced eregi() with preg_match() for 5.3+ compatibility.
-* Changed test data in the assets directory for new layout option.
-* Made it so when the slider & upload image changes it's reflected on blur.
-* Gave the slider image an upload button.
-* Added do_action('option_tree_import_data') to option_tree_import_data() function before exit.
-* Added do_action('option_tree_array_save') to option_tree_array_save() function before exit.
-* Added do_action('option_tree_save_layout') to option_tree_save_layout() function before exit.
-* Added do_action('option_tree_delete_layout') to option_tree_delete_layout() function before exit.
-* Added do_action('option_tree_activate_layout') to option_tree_activate_layout() function before exit.
-* Added do_action('option_tree_import_layout') to option_tree_import_layout() function before redirect.
-* Added do_action('option_tree_admin_header') hook before all admin pages.
-* Fixed bug where users could add a color without a hash.
-* Only load option type function on Theme Options page
-* Loading resources with absolute paths, no longer relative.
-* Fixed a bug with uploader creating extra option-tree draft pages.
-* Fixed slider toggle bug, now the sliders close when you open another or create new slide.
-
-= 1.1.6 =
-* Theme Integration added.
-* Made the upload XML file openbase_dir compliant.
-
-= 1.1.5 =
-* Fixed multiple sliders issue
-
-= 1.1.4 =
-* Patch for get_option_tree() $is_array being false and still returning an array
-
-= 1.1.3 =
-* Added Slider option type with filter for changing the optional fields
-* Fixed the text displayed for Measurement option type after options are reset
-* Added filter to measurement units
-* Code cleanup in the option_tree_array_save() function
-* Fixed double quotes on front-end display
-
-= 1.1.2 =
-* Fixed double quotes in Textarea option type
-* Added Measurement option type for CSS values
-* Fixed Post option type only returning 5 items
-* Added a scrolling window for checkboxes > 10
-
-= 1.1.1 =
-* Fixed the 'remove' icon from showing when nothing's uploaded
-
-= 1.1 =
-* Fixed the Undefined index: notices when WP_DEBUG is set to true
-
-= 1.0.0 =
-* Initial version
-
-== Upgrade Notice ==
-
-= 2.3.0 =
-As with each major release, please install OptionTree on a test server before upgrading your live site.
-
-= 2.1.4 =
-If you're not the developer of this theme, please ask them to test compatibility with version 2.1 before upgrading. If you are the developer, I urge you to do the same in a controlled environment.
-
-= 2.0.16 =
-There was an issue with the upload option type's JavaScript not allowing anything other than images to be sent to the editor. This urgent issue is now fixed and why this version is light on changes.
-
-= 2.0.12 =
-The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility.
-
-= 1.1.8.1 =
-Removed get_option_tree() in the WordPress admin area due to theme conflicts.
-
-= 1.1.8 =
-Added Typography, Background, & CSS option types. Lots of way to extend them, as well.
-
-= 1.1.7 =
-Lots of additions, none critical just fun. Added layouts & upload to slider. As well, started including action hooks for extending and integrating with other plugins.
-
-= 1.1.6 =
-Added theme integration for developers. It's now possible to have a default XML file included in your theme to populate the theme options and hide the settings and docs pages. Read more about this in the plugins built in documentation.
-
-= 1.1.5 =
-Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
-
-= 1.1.4 =
-Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
diff --git a/page-templates/child-menu.php b/page-templates/child-menu.php
index a59c5d1..db4ef8b 100644
--- a/page-templates/child-menu.php
+++ b/page-templates/child-menu.php
@@ -25,7 +25,7 @@ Template Name: Child Menu
-
+
diff --git a/page.php b/page.php
index 5029247..9c2feaa 100644
--- a/page.php
+++ b/page.php
@@ -20,7 +20,7 @@
-
+
diff --git a/search.php b/search.php
index 98ea20f..acd4927 100644
--- a/search.php
+++ b/search.php
@@ -17,7 +17,7 @@
-
+
-
+
diff --git a/single.php b/single.php
index 24d2e43..55a46cb 100644
--- a/single.php
+++ b/single.php
@@ -28,9 +28,9 @@
-
+
-
+
@@ -42,12 +42,12 @@
-
-
+
+
-
+
diff --git a/style.css b/style.css
index 9249ce0..11b90eb 100644
--- a/style.css
+++ b/style.css
@@ -641,12 +641,12 @@ box-shadow: 0 0 2px rgba(255,255,255,0.4);
#footer { background: #fff; position: relative; width: 100%; font-weight: 400; }
#footer-widgets{ padding-top: 20px; }
-#footer-bottom { font-size: 15px; font-weight: 300; color: #999; background: #fff; border-top: 1px solid #ddd; }
+#footer-bottom { font-size: 15px; font-weight: 300; color: #999; background: #fff; border-top: 1px solid #eee; }
#footer-bottom .pad { padding-top: 30px; padding-bottom: 60px!important; }
#footer-bottom a { color: #222; }
#footer-bottom a:hover { color: #555; }
#footer-bottom #footer-logo { display: block; margin-bottom: 20px; max-height: 50px; -webkit-border-radius: 0; border-radius: 0; }
-#footer-bottom #back-to-top { background: #eee; color: #222; position: relative; text-align: center; width: 40px; height: 40px; display: block; margin: 0 auto; margin: 0 auto -30px; border-radius: 0 0 5px 5px; }
+#footer-bottom #back-to-top { background: #eee; z-index: 9; color: #222; position: relative; text-align: center; width: 40px; height: 40px; display: block; margin: 0 auto; margin: 0 auto -30px; border-radius: 0 0 5px 5px; }
#footer-bottom #back-to-top i { font-size: 38px; position: relative; top: 0; }
#footer-bottom .social-links { padding-top: 10px; }
@@ -778,6 +778,14 @@ box-shadow: 0 0 2px rgba(255,255,255,0.4);
.sharrre#pinterest .box:hover .count { color: #ca2128; }
.sharrre#pinterest .box:hover .count { background: #ca2128; }
+.sharrre#linkedin .box:hover { background: #f2f8fb; }
+.sharrre#linkedin .box { border-top-color: #0077b5; }
+.sharrre#linkedin .box:hover .count:after { border-left-color: #0077b5; }
+.sharrre#linkedin .count,
+.sharrre#linkedin .share,
+.sharrre#linkedin .box:hover .count { color: #0077b5; }
+.sharrre#linkedin .box:hover .count { background: #0077b5; }
+
/* single : post pages
/* ------------------------------------ */
.entry-pages { font-weight: 600; margin-bottom: 20px; }