Version Description
- Improvement: Set post type and taxonomy to non-public facing
- Improvement: Rename the Link Performance report to Link Overview
- Improvement: Improve codebase
- Bug Fix: Shortcode issue with WPML
- Bug Fix: Issue with inserting thirsty affiliate link into an existing image and hitting enter key right after
- Bug Fix: Affiliate link category pages are accessible on the front end
Download this release
Release Info
Developer | jkohlbach |
Plugin | ThirstyAffiliates Affiliate Link Manager |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
- Helpers/Plugin_Constants.php +1 -1
- Models/Affiliate_Link.php +1 -1
- Models/Affiliate_Links_CPT.php +72 -12
- Models/Settings.php +4 -0
- Models/Shortcodes.php +23 -2
- Models/Stats_Reporting.php +31 -7
- css/admin/ta-reports.css +15 -0
- css/admin/ta-settings.css +9 -0
- js/app/advance_link_picker/dist/advance-link-picker.js +2 -2
- js/app/quick_add_affiliate_link/dist/quick-add-affiliate-link.js +2 -2
- js/app/ta-reports.js +3 -3
- js/lib/select2/select2.js +0 -5725
- js/lib/select2/select2.min.js +0 -3
- js/lib/thirstymce/editor-plugin.js +3 -0
- readme.txt +10 -2
- thirstyaffiliates.php +1 -1
- views/reports/link-performance-report.php +3 -1
Helpers/Plugin_Constants.php
CHANGED
@@ -27,7 +27,7 @@ class Plugin_Constants {
|
|
27 |
// Plugin configuration constants
|
28 |
const TOKEN = 'ta';
|
29 |
const INSTALLED_VERSION = 'ta_installed_version';
|
30 |
-
const VERSION = '3.2.
|
31 |
const TEXT_DOMAIN = 'thirstyaffiliates';
|
32 |
const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
|
33 |
const META_DATA_PREFIX = '_ta_';
|
27 |
// Plugin configuration constants
|
28 |
const TOKEN = 'ta';
|
29 |
const INSTALLED_VERSION = 'ta_installed_version';
|
30 |
+
const VERSION = '3.2.1';
|
31 |
const TEXT_DOMAIN = 'thirstyaffiliates';
|
32 |
const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
|
33 |
const META_DATA_PREFIX = '_ta_';
|
Models/Affiliate_Link.php
CHANGED
@@ -177,7 +177,7 @@ class Affiliate_Link {
|
|
177 |
*/
|
178 |
private function read() {
|
179 |
|
180 |
-
$this->post_data
|
181 |
|
182 |
if ( ! is_a( $this->post_data , 'WP_Post' ) || $this->object_is_read )
|
183 |
return;
|
177 |
*/
|
178 |
private function read() {
|
179 |
|
180 |
+
$this->post_data = get_post( $this->id );
|
181 |
|
182 |
if ( ! is_a( $this->post_data , 'WP_Post' ) || $this->object_is_read )
|
183 |
return;
|
Models/Affiliate_Links_CPT.php
CHANGED
@@ -178,7 +178,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
|
|
178 |
'supports' => array( 'title' , 'custom-fields' ),
|
179 |
'taxonomies' => array(),
|
180 |
'hierarchical' => true,
|
181 |
-
'public' =>
|
182 |
'show_ui' => true,
|
183 |
'show_in_menu' => true,
|
184 |
'show_in_json' => false,
|
@@ -188,7 +188,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
|
|
188 |
'with_front' => false,
|
189 |
'pages' => false
|
190 |
),
|
191 |
-
'show_in_nav_menus' =>
|
192 |
'show_in_admin_bar' => true,
|
193 |
'menu_position' => 26,
|
194 |
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="16.688" height="9.875" viewBox="0 0 16.688 9.875">
|
@@ -245,10 +245,10 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
|
|
245 |
$args = array(
|
246 |
'labels' => $labels,
|
247 |
'hierarchical' => true,
|
248 |
-
'public' =>
|
249 |
'show_ui' => true,
|
250 |
'show_admin_column' => true,
|
251 |
-
'show_in_nav_menus' =>
|
252 |
'show_tagcloud' => false,
|
253 |
'rewrite' => false
|
254 |
);
|
@@ -292,20 +292,80 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
|
|
292 |
*/
|
293 |
public function register_metaboxes() {
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
-
//
|
301 |
-
|
302 |
-
|
303 |
|
304 |
-
//
|
|
|
|
|
|
|
|
|
305 |
remove_meta_box( 'submitdiv', Plugin_Constants::AFFILIATE_LINKS_CPT , 'side' );
|
306 |
remove_meta_box( 'postcustom' , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
|
307 |
}
|
308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
/**
|
310 |
* Display "URls" metabox
|
311 |
*
|
178 |
'supports' => array( 'title' , 'custom-fields' ),
|
179 |
'taxonomies' => array(),
|
180 |
'hierarchical' => true,
|
181 |
+
'public' => false,
|
182 |
'show_ui' => true,
|
183 |
'show_in_menu' => true,
|
184 |
'show_in_json' => false,
|
188 |
'with_front' => false,
|
189 |
'pages' => false
|
190 |
),
|
191 |
+
'show_in_nav_menus' => false,
|
192 |
'show_in_admin_bar' => true,
|
193 |
'menu_position' => 26,
|
194 |
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="16.688" height="9.875" viewBox="0 0 16.688 9.875">
|
245 |
$args = array(
|
246 |
'labels' => $labels,
|
247 |
'hierarchical' => true,
|
248 |
+
'public' => false,
|
249 |
'show_ui' => true,
|
250 |
'show_admin_column' => true,
|
251 |
+
'show_in_nav_menus' => false,
|
252 |
'show_tagcloud' => false,
|
253 |
'rewrite' => false
|
254 |
);
|
292 |
*/
|
293 |
public function register_metaboxes() {
|
294 |
|
295 |
+
$normal_metaboxes = apply_filters( 'ta_register_normal_metaboxes' , array(
|
296 |
+
array(
|
297 |
+
'id' => 'ta-urls-metabox',
|
298 |
+
'title' => __( 'URLs', 'thirstyaffiliates' ),
|
299 |
+
'cb' => array( $this , 'urls_metabox' ),
|
300 |
+
'sort' => 10,
|
301 |
+
'priority' => 'high'
|
302 |
+
),
|
303 |
+
array(
|
304 |
+
'id' => 'ta-attach-images-metabox',
|
305 |
+
'title' => __( 'Attach Images', 'thirstyaffiliates' ),
|
306 |
+
'cb' => array( $this , 'attach_images_metabox' ),
|
307 |
+
'sort' => 20,
|
308 |
+
'priority' => 'high'
|
309 |
+
),
|
310 |
+
array(
|
311 |
+
'id' => 'ta-inserted-link-scanner-metabox',
|
312 |
+
'title' => __( 'Link Inserted Scanner', 'thirstyaffiliates' ),
|
313 |
+
'cb' => array( $this , 'inserted_link_scanner_metabox' ),
|
314 |
+
'sort' => 99,
|
315 |
+
'priority' => 'low'
|
316 |
+
),
|
317 |
+
) );
|
318 |
+
|
319 |
+
$side_metaboxes = apply_filters( 'ta_register_side_metaboxes' , array(
|
320 |
+
array(
|
321 |
+
'id' => 'ta-save-affiliate-link-metabox-side',
|
322 |
+
'title' => __( 'Save Affiliate Link', 'thirstyaffiliates' ),
|
323 |
+
'cb' => array( $this , 'save_affiliate_link_metabox' ),
|
324 |
+
'sort' => 10,
|
325 |
+
'priority' => 'high'
|
326 |
+
),
|
327 |
+
array(
|
328 |
+
'id' => 'ta-link-options-metabox',
|
329 |
+
'title' => __( 'Link Options', 'thirstyaffiliates' ),
|
330 |
+
'cb' => array( $this , 'link_options_metabox' ),
|
331 |
+
'sort' => 30,
|
332 |
+
'priority' => 'default'
|
333 |
+
),
|
334 |
+
) );
|
335 |
+
|
336 |
+
// sort metaboxes by priority.
|
337 |
+
$this->sort_metaboxes( $normal_metaboxes );
|
338 |
+
$this->sort_metaboxes( $side_metaboxes );
|
339 |
|
340 |
+
// register normal metaboxes.
|
341 |
+
foreach ( $normal_metaboxes as $metabox )
|
342 |
+
add_meta_box( $metabox[ 'id' ] , $metabox[ 'title' ] , $metabox[ 'cb' ] , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' , $metabox[ 'priority' ] );
|
343 |
|
344 |
+
// register side metaboxes.
|
345 |
+
foreach ( $side_metaboxes as $metabox )
|
346 |
+
add_meta_box( $metabox[ 'id' ] , $metabox[ 'title' ] , $metabox[ 'cb' ] , Plugin_Constants::AFFILIATE_LINKS_CPT , 'side' , $metabox[ 'priority' ] );
|
347 |
+
|
348 |
+
// remove unnecessary metaboxes
|
349 |
remove_meta_box( 'submitdiv', Plugin_Constants::AFFILIATE_LINKS_CPT , 'side' );
|
350 |
remove_meta_box( 'postcustom' , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
|
351 |
}
|
352 |
|
353 |
+
/**
|
354 |
+
* Function to sort registered metaboxes by priority.
|
355 |
+
*
|
356 |
+
* @since 3.2.1
|
357 |
+
* @access private
|
358 |
+
*
|
359 |
+
* @param array $metaboxes Metaboxes list to sort.
|
360 |
+
*/
|
361 |
+
private function sort_metaboxes( &$metaboxes ) {
|
362 |
+
|
363 |
+
usort( $metaboxes , function( $a , $b ) {
|
364 |
+
if ( $a[ 'priority' ] == $b[ 'priority' ] ) return 0;
|
365 |
+
return ( $a[ 'priority' ] > $b[ 'priority' ] ) ? 1 : -1;
|
366 |
+
} );
|
367 |
+
}
|
368 |
+
|
369 |
/**
|
370 |
* Display "URls" metabox
|
371 |
*
|
Models/Settings.php
CHANGED
@@ -694,6 +694,10 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
|
|
694 |
<?php foreach ( $this->_settings_sections as $section_key => $section_data ) { ?>
|
695 |
<a href="?post_type=thirstylink&page=thirsty-settings&tab=<?php echo $section_key; ?>" class="nav-tab <?php echo $active_tab == $section_key ? 'nav-tab-active' : ''; ?> <?php echo $section_key; ?>"><?php echo $section_data[ 'title' ]; ?></a>
|
696 |
<?php } ?>
|
|
|
|
|
|
|
|
|
697 |
</h2>
|
698 |
|
699 |
<?php do_action( 'ta_before_settings_form' ); ?>
|
694 |
<?php foreach ( $this->_settings_sections as $section_key => $section_data ) { ?>
|
695 |
<a href="?post_type=thirstylink&page=thirsty-settings&tab=<?php echo $section_key; ?>" class="nav-tab <?php echo $active_tab == $section_key ? 'nav-tab-active' : ''; ?> <?php echo $section_key; ?>"><?php echo $section_data[ 'title' ]; ?></a>
|
696 |
<?php } ?>
|
697 |
+
|
698 |
+
<?php if ( ! $this->_helper_functions->is_plugin_active( 'thirstyaffiliates-pro/thirstyaffiliates-pro.php' ) ) : ?>
|
699 |
+
<a class="tapro-upgrade nav-tab" href="https://thirstyaffiliates.com/pricing/?utm_source=Free%20Plugin&utm_medium=Pro&utm_campaign=Admin%20Settings" target="_blank"><?php _e( 'Pro Features →' , 'thirstyaffiliates' ); ?></a>
|
700 |
+
<?php endif; ?>
|
701 |
</h2>
|
702 |
|
703 |
<?php do_action( 'ta_before_settings_form' ); ?>
|
Models/Shortcodes.php
CHANGED
@@ -191,7 +191,7 @@ class Shortcodes implements Model_Interface {
|
|
191 |
|
192 |
// get the link URL
|
193 |
$link_attributes[ 'href' ] = ( $uncloak_link ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
|
194 |
-
$link_attributes[ 'href' ] =
|
195 |
|
196 |
// get link text content default if no value is set
|
197 |
if ( empty( $content ) && $atts[ 'linktext' ] )
|
@@ -241,7 +241,7 @@ class Shortcodes implements Model_Interface {
|
|
241 |
$output .= ! empty($value) ? ' ' . $name . '="' . trim( esc_attr( $value ) ) . '"' : '';
|
242 |
}
|
243 |
|
244 |
-
$output .= 'data-shortcode="true">' . do_shortcode( $content ) . '</a>';
|
245 |
|
246 |
|
247 |
} else
|
@@ -250,6 +250,27 @@ class Shortcodes implements Model_Interface {
|
|
250 |
return $output;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
/**
|
254 |
* Execute shortcodes class.
|
255 |
*
|
191 |
|
192 |
// get the link URL
|
193 |
$link_attributes[ 'href' ] = ( $uncloak_link ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
|
194 |
+
$link_attributes[ 'href' ] = $this->clean_url( $link_attributes[ 'href' ] );
|
195 |
|
196 |
// get link text content default if no value is set
|
197 |
if ( empty( $content ) && $atts[ 'linktext' ] )
|
241 |
$output .= ! empty($value) ? ' ' . $name . '="' . trim( esc_attr( $value ) ) . '"' : '';
|
242 |
}
|
243 |
|
244 |
+
$output .= ' data-shortcode="true">' . do_shortcode( $content ) . '</a>';
|
245 |
|
246 |
|
247 |
} else
|
250 |
return $output;
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* Remove parameters in the URL added via the get_permalink hook and escape it.
|
255 |
+
* Note: This is needed for WPML support.
|
256 |
+
*
|
257 |
+
* @since 3.2.1
|
258 |
+
* @access private
|
259 |
+
*
|
260 |
+
* @param string $raw_url Raw URL.
|
261 |
+
* @param string Cleaned URL.
|
262 |
+
*/
|
263 |
+
private function clean_url( $raw_url ) {
|
264 |
+
|
265 |
+
$parse = parse_url( $raw_url );
|
266 |
+
extract( $parse );
|
267 |
+
|
268 |
+
// rebuild url excluding parameters.
|
269 |
+
$url = $scheme . '://' . $host . $path;
|
270 |
+
|
271 |
+
return esc_url( $url );
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Execute shortcodes class.
|
276 |
*
|
Models/Stats_Reporting.php
CHANGED
@@ -317,6 +317,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
|
|
317 |
* AJAX fetch report by linkid.
|
318 |
*
|
319 |
* @since 3.0.0
|
|
|
320 |
* @access public
|
321 |
*/
|
322 |
public function ajax_fetch_report_by_linkid() {
|
@@ -341,10 +342,11 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
|
|
341 |
$data = $this->prepare_data_for_flot( $range , array( $link_id ) );
|
342 |
|
343 |
$response = array(
|
344 |
-
'status'
|
345 |
-
'label'
|
346 |
-
'slug'
|
347 |
-
'report_data'
|
|
|
348 |
);
|
349 |
}
|
350 |
}
|
@@ -410,8 +412,8 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
|
|
410 |
$reports[ 'link_performance' ] = array(
|
411 |
'id' => 'ta_link_performance_report',
|
412 |
'tab' => 'link_performance',
|
413 |
-
'name' => __( 'Link
|
414 |
-
'title' => __( 'Link
|
415 |
'desc' => __( 'Total clicks on affiliate links over a given period.' , 'thirstyaffiliates' ),
|
416 |
'content' => function() { return $this->get_link_performance_report_content(); }
|
417 |
);
|
@@ -535,7 +537,8 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
|
|
535 |
'posts_per_page' => -1
|
536 |
) );
|
537 |
|
538 |
-
$data
|
|
|
539 |
|
540 |
ob_start();
|
541 |
include( $this->_constants->VIEWS_ROOT_PATH() . 'reports/link-performance-report.php' );
|
@@ -716,6 +719,27 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
|
|
716 |
return $flot_data;
|
717 |
}
|
718 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
/**
|
720 |
* Get the DateTime object of the first day of a given month.
|
721 |
*
|
317 |
* AJAX fetch report by linkid.
|
318 |
*
|
319 |
* @since 3.0.0
|
320 |
+
* @since 3.1.2 Add total clicks count on the response.
|
321 |
* @access public
|
322 |
*/
|
323 |
public function ajax_fetch_report_by_linkid() {
|
342 |
$data = $this->prepare_data_for_flot( $range , array( $link_id ) );
|
343 |
|
344 |
$response = array(
|
345 |
+
'status' => 'success',
|
346 |
+
'label' => $thirstylink->get_prop( 'name' ),
|
347 |
+
'slug' => $thirstylink->get_prop( 'slug' ),
|
348 |
+
'report_data' => $data,
|
349 |
+
'total_clicks' => $this->count_total_clicks_from_flot_data( $data )
|
350 |
);
|
351 |
}
|
352 |
}
|
412 |
$reports[ 'link_performance' ] = array(
|
413 |
'id' => 'ta_link_performance_report',
|
414 |
'tab' => 'link_performance',
|
415 |
+
'name' => __( 'Link Overview' , 'thirstyaffiliates' ),
|
416 |
+
'title' => __( 'Link Overview Report' , 'thirstyaffiliates' ),
|
417 |
'desc' => __( 'Total clicks on affiliate links over a given period.' , 'thirstyaffiliates' ),
|
418 |
'content' => function() { return $this->get_link_performance_report_content(); }
|
419 |
);
|
537 |
'posts_per_page' => -1
|
538 |
) );
|
539 |
|
540 |
+
$data = $this->prepare_data_for_flot( $range , $query->posts );
|
541 |
+
$total_clicks = $this->count_total_clicks_from_flot_data( $data );
|
542 |
|
543 |
ob_start();
|
544 |
include( $this->_constants->VIEWS_ROOT_PATH() . 'reports/link-performance-report.php' );
|
719 |
return $flot_data;
|
720 |
}
|
721 |
|
722 |
+
/**
|
723 |
+
* Count total clicks from flot data.
|
724 |
+
*
|
725 |
+
* @since 3.2.1
|
726 |
+
* @access public
|
727 |
+
*
|
728 |
+
* @param array $data Flot data.
|
729 |
+
* @param int $total Total click counts (offset).
|
730 |
+
* @return int Total click clounts.
|
731 |
+
*/
|
732 |
+
public function count_total_clicks_from_flot_data( $data , $total = 0 ) {
|
733 |
+
|
734 |
+
if ( ! is_array( $data ) || empty( $data ) )
|
735 |
+
return;
|
736 |
+
|
737 |
+
foreach ( $data as $flot )
|
738 |
+
$total += intval( $flot[1] );
|
739 |
+
|
740 |
+
return $total;
|
741 |
+
}
|
742 |
+
|
743 |
/**
|
744 |
* Get the DateTime object of the first day of a given month.
|
745 |
*
|
css/admin/ta-reports.css
CHANGED
@@ -141,6 +141,7 @@ ul.chart-legend {
|
|
141 |
border-right: 0;
|
142 |
}
|
143 |
ul.chart-legend li {
|
|
|
144 |
padding: 10px 15px;
|
145 |
margin: 0;
|
146 |
border-right: 5px solid #ccc;
|
@@ -151,6 +152,20 @@ ul.chart-legend li span {
|
|
151 |
color: #aaa;
|
152 |
font-size: 11px;
|
153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
ul.chart-legend li:hover {
|
155 |
background: #efefef;
|
156 |
}
|
141 |
border-right: 0;
|
142 |
}
|
143 |
ul.chart-legend li {
|
144 |
+
position: relative;
|
145 |
padding: 10px 15px;
|
146 |
margin: 0;
|
147 |
border-right: 5px solid #ccc;
|
152 |
color: #aaa;
|
153 |
font-size: 11px;
|
154 |
}
|
155 |
+
ul.chart-legend li em.count {
|
156 |
+
display: none !important; /* Remove on next version of TA (3.2.2) */
|
157 |
+
position: absolute;
|
158 |
+
top: 50%;
|
159 |
+
right: 10px;
|
160 |
+
margin-top: -12px;
|
161 |
+
display: inline-block;
|
162 |
+
padding: 1px 5px;
|
163 |
+
background: #565656;
|
164 |
+
color: #fff;
|
165 |
+
border-radius: 50px;
|
166 |
+
font-size: 11px;
|
167 |
+
font-style: normal;
|
168 |
+
}
|
169 |
ul.chart-legend li:hover {
|
170 |
background: #efefef;
|
171 |
}
|
css/admin/ta-settings.css
CHANGED
@@ -25,6 +25,15 @@
|
|
25 |
#wpbody-content .ta-settings .nav-tab-wrapper a:last-child {
|
26 |
border-bottom: 1px solid #ccc;
|
27 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
#wpbody-content .ta-settings > form {
|
29 |
position: relative;
|
30 |
float:left;
|
25 |
#wpbody-content .ta-settings .nav-tab-wrapper a:last-child {
|
26 |
border-bottom: 1px solid #ccc;
|
27 |
}
|
28 |
+
#wpbody-content .ta-settings .nav-tab-wrapper a.tapro-upgrade.nav-tab {
|
29 |
+
color: #fff;
|
30 |
+
background: #338850;
|
31 |
+
background: -moz-linear-gradient(left, #338850 0%, #2f867e 51%, #2e6e8a 100%);
|
32 |
+
background: -webkit-linear-gradient(left, #338850 0%,#2f867e 51%,#2e6e8a 100%);
|
33 |
+
background: linear-gradient(to right, #338850 0%,#2f867e 51%,#2e6e8a 100%);
|
34 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#338850', endColorstr='#2e6e8a',GradientType=1 );
|
35 |
+
border: 1px solid #276573 !important;
|
36 |
+
}
|
37 |
#wpbody-content .ta-settings > form {
|
38 |
position: relative;
|
39 |
float:left;
|
js/app/advance_link_picker/dist/advance-link-picker.js
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*
|
12 |
* Date: 2017-03-20T18:59Z
|
13 |
*/
|
14 |
-
!function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):De.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(He)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){se.removeEventListener("DOMContentLoaded",m),o.removeEventListener("load",m),xe.ready()}function v(){this.expando=xe.expando+v.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:We.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Ie.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&ze.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ge[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ge[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Re.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ue(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Re.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function k(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;n<r;n++)Re.set(e[n],"globalEval",!t||Re.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[s]||Ke._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=k(f.appendChild(o),"script"),l&&C(a),n)for(c=0;o=a[c++];)Je.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function P(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Re.hasData(e)&&(o=Re.access(e),a=Re.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Ie.hasData(e)&&(s=Ie.access(e),u=xe.extend({},s),Ie.set(t,u))}}function H(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),O(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(k(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,k(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Je.test(l.type||"")&&!Re.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(ut,""),c))}return e}function _(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(k(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&C(k(r,"script")),r.parentNode.removeChild(r));return e}function F(e,t,n){var r,i,o,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&ct.test(a)&<.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in vt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in vt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=R(e)||e),t}function W(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+Xe[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+Xe[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+Xe[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+Xe[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+Xe[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=ft(e),o=F(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return ct.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){xt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){yt=void 0}),yt=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Ue(e),m=Re.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],bt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}p[r]=m&&m[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=m&&m.display,null==l&&(l=Re.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(m?"hidden"in m&&(g=m.hidden):m=Re.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Re.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?m[r]:0,r,d),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(He)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Lt.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(He)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,me=ge.toString,ve=me.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,we=/^-ms-/,Te=/-([a-z])/g,ke=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&me.call(n)===ve)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(we,"ms-").replace(Te,ke)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(be,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var Ce=/*!
|
15 |
* Sizzle CSS Selector Engine v2.3.3
|
16 |
* https://sizzlejs.com/
|
17 |
*
|
@@ -21,4 +21,4 @@
|
|
21 |
*
|
22 |
* Date: 2016-08-08
|
23 |
*/
|
24 |
-
function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==L&&A(t),t=t||L,P)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!H||!H.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=C(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=me.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,t,n,i,o,a){return i&&!i[M]&&(i=m(i)),o&&!o[M]&&(o=m(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],m=a.length,v=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,d,e,s,u),x=n?o||(r?e:m||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",m=r&&[],v=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!P);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=G.call(u));v=g(v)}Q.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),m};return i?r(a):a}var x,b,w,T,k,C,S,E,j,N,D,A,L,q,P,H,O,_,F,M="sizzle"+1*new Date,R=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,P=!k(L),R!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&P)return t.getElementsByClassName(e)},O=[],H=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||H.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(b.matchesSelector=he.test(_=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),O.push("!=",re)}),H=H.length&&new RegExp(H.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(q.compareDocumentPosition),F=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===R&&F(R,e)?-1:t===L||t.ownerDocument===R&&F(R,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&P&&!z[n+" "]&&(!O||!O.test(n))&&(!H||!H.test(n)))try{var r=_.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:b.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(d=m,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,C=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=v(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&C(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&P&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(ve,ye),me.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!P,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=Ce,xe.expr=Ce.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=Ce.uniqueSort,xe.text=Ce.getText,xe.isXMLDoc=Ce.isXML,xe.contains=Ce.contains,xe.escapeSelector=Ce.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},je=xe.expr.match.needsContext,Ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,De=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&je.test(e)?xe(e):e||[],!1).length}});var Ae,Le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Le.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ne.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,Ae=xe(se);var qe=/^(?:parents|prev(?:Until|All))/,Pe={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!je.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ee((e.parentNode||{}).firstChild,e)},children:function(e){return Ee(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Pe[e]||xe.uniqueSort(i),qe.test(e)&&i.reverse()),this.pushStack(i)}});var He=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&Oe.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var _e=xe.Deferred();xe.fn.ready=function(e){return _e.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||_e.resolveWith(se,[xe]))}}),xe.ready.then=_e.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",m),o.addEventListener("load",m));var Fe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};v.uid=1,v.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(He)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Re=new v,Ie=new v,We=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/[A-Z]/g;xe.extend({hasData:function(e){return Ie.hasData(e)||Re.hasData(e)},data:function(e,t,n){return Ie.access(e,t,n)},removeData:function(e,t){Ie.remove(e,t)},_data:function(e,t,n){return Re.access(e,t,n)},_removeData:function(e,t){Re.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Ie.get(a),1===a.nodeType&&!Re.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Re.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Ie.set(this,e)}):Fe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Ie.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Re.get(e,t),n&&(!r||Array.isArray(n)?r=Re.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Re.get(e,n)||Re.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Re.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Re.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ze=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},Ve=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ge={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?xe(this).show():xe(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var Ze=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=se.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(et,i),n.guid||(n.guid=xe.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(He)||[""],l=t.length;l--;)s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.hasData(e)&&Re.get(e);if(m&&(u=m.events)){for(t=(t||"").match(He)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||xe.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Re.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Re.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=k(s),o=k(e),r=0,i=o.length;r<i;r++)H(o[r],a[r]);if(t)if(n)for(o=o||k(e),a=a||k(s),r=0,i=o.length;r<i;r++)P(o[r],a[r]);else P(e,s);return a=k(s,"script"),a.length>0&&C(a,!u&&k(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[Re.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Re.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return _(this,e,!0)},remove:function(e){return _(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(k(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(k(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(k(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var lt=/^margin/,ct=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",et.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,et.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var dt=/^(none|table(?!-c[ea]).+)/,pt=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],vt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=F(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=pt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=ze.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return pt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=F(e,t,r)),"normal"===i&&t in gt&&(i=gt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!dt.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):Ve(e,ht,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&ft(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=ze.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(F(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ft(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var yt,xt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(He);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Re.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Re.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Re.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(yt=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),yt=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){xt||(xt=!0,X())},xe.fx.stop=function(){xt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Tt,kt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Fe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(He);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=kt[t]||xe.find.attr;kt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=kt[a],kt[a]=i,i=null!=n(e,t,r)?a:null,kt[a]=o),i}});var Ct=/^(?:input|select|textarea|button)$/i,St=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Fe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(He)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(He)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(He)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Re.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Re.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var jt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!jt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,jt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Re.get(s,"events")||{})[e.type]&&Re.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Me(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Me(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Re.access(r,t);i||r.addEventListener(e,n,!0),Re.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Re.access(r,t)-1;i?Re.access(r,t,i):(r.removeEventListener(e,n,!0),Re.remove(r,t))}}});var Nt=o.location,Dt=xe.now(),At=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Lt=/\[\]$/,qt=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Ht.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ot=/%20/g,_t=/#.*$/,Ft=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Bt={},zt="*/".concat("*"),Xt=se.createElement("a");Xt.href=Nt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:Rt.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te($t),ajaxTransport:te(Bt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",C.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,C,n)),h=oe(g,h,C,u),u?(g.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=C.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",u?y.resolveWith(m,[c,T,C]):y.rejectWith(m,[C,T,p]),C.statusCode(b),b=void 0,d&&v.trigger(u?"ajaxSuccess":"ajaxError",[C,g,u?c:p]),x.fireWith(m,[C,T]),d&&(v.trigger("ajaxComplete",[C,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),m=g.context||g,v=g.context&&(m.nodeType||m.jquery)?xe(m):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},k="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Mt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),n(0,t),this}};if(y.promise(C),g.url=((e||g.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(He)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne($t,g,t,C),f)return C;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!It.test(g.type),a=g.url.replace(_t,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ot,"+")):(h=g.url.slice(a.length),g.data&&(a+=(At.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(Ft,"$1"),h=(At.test(a)?"&":"?")+"_="+Dt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&C.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)C.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(m,C,g)||f))return C.abort();if(k="abort",x.add(g.complete),C.done(g.success),C.fail(g.error),r=ne(Bt,g,t,C)){if(C.readyState=1,d&&v.trigger("ajaxSend",[C,g]),f)return C;g.async&&g.timeout>0&&(l=o.setTimeout(function(){C.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=xe.ajaxSettings.xhr();ye.cors=!!Vt&&"withCredentials"in Vt,ye.ajax=Vt=!!Vt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Vt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||xe.expando+"_"+Dt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ne.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||et})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Fe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=F(e,t),ct.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Fe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var Qt=o.jQuery,Jt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Jt),e&&o.jQuery===xe&&(o.jQuery=Qt),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(4)(e))},function(e,t,n){"use strict";function r(){var e,t,n,r=(0,o.default)("#advanced_add_affiliate_link"),i=r.find(".search-panel"),a=r.find(".results-panel"),s=a.find("ul.results-list"),u=2,l=!0,c=void 0;i.on("keyup","#thirstylink-search",function(){var r=(0,o.default)(this),i=a.find(".load-more-results");if(!(l&&r.val().length<3)){if(c&&n!==r.val()&&(c.abort(),c=null),e||(e=s.html()),s.html("<li class='spinner'><i style='background-image: url("+Options.spinner_image+");'></i><span>"+Options.searching_text+"</span></li>"),(""==r.val()||r.val().length<3)&&!l)return u=2,s.html(e).show(),void i.show();if(n===r.val())return u=2,s.html(t).show(),void i.show();u=1,i.hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:r.val(),paged:u,advance:!0,post_id:Options.post_id},function(e){n=r.val(),l=!1,"success"==e.status&&(t=e.search_query_markup,s.html(e.search_query_markup).show(),u++,e.count<1?i.hide():i.show())},"json")}}),a.on("click",".load-more-results",function(){var e=(0,o.default)(this),t=i.find("#thirstylink-search");e.hasClass("fetching")||(e.addClass("fetching").css("padding-top","4px").find(".spinner").show(),e.find(".button-text").hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:t.val(),paged:u,advance:!0},function(t){if(e.removeClass("fetching").find(".spinner").hide(),e.find(".button-text").show(),"success"==t.status){if(u++,t.count<1)return void e.hide();s.append(t.search_query_markup)}},"json"))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(){var e,t,r,o,s,u,l,c,f,d,p,h,g,m,v,y=(0,a.default)(this).closest("li.thirstylink"),x=(0,a.default)(this).data("type"),b=n.data("htmleditor"),w="";if(parent.ThirstyLinkPicker.linkNode||b){if(e=b?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),t=y.data("linkid"),r=y.data("class"),o=r?' class="'+r+'"':"",s=y.data("href"),u=y.data("title"),l=u?' title="'+u+'"':"",c=y.find("span.name").text(),f=y.data("rel"),d=y.data("target"),m=y.data("other-atts"),!/^(?:[a-z]+:|#|\?|\.|\/)/.test(s))return;if("object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(var T in m)w+=T+'="'+m[T]+'" ';if("shortcode"==x)c=e.trim()?e:c,p='[thirstylink ids="'+t+'"]'+c+"[/thirstylink]",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(p):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(p),parent.ThirstyLinkPicker.inputInstance.reset());else if("image"==x)""!=r&&(o=' class="thirstylinkimg"'),g=(0,a.default)(this).data("imgid"),a.default.post(parent.ajaxurl,{action:"ta_get_image_markup_by_id",imgid:g},function(e){"success"==e.status&&(h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e.image_markup+"</a>",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(h):(parent.ThirstyLinkPicker.close_thickbox(),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,""),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,h),parent.ThirstyLinkPicker.inputInstance.reset())),parent.ThirstyLinkPicker.close_thickbox()},"json");else if(c=e.trim()?e:c,b)h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(h);else{if(v={class:r,title:u,href:s,rel:f,target:d,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(T in m)v[T]=m[T];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,v),e.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(c),parent.ThirstyLinkPicker.inputInstance.reset()}g||parent.ThirstyLinkPicker.close_thickbox()}}var t=(0,a.default)("#advanced_add_affiliate_link"),n=t.find(".results-panel ul.results-list");n.on("click",".actions .insert-link-button",e),n.on("click",".actions .insert-shortcode-button",e),n.on("click",".images-block .images img",e),n.on("click",".actions .insert-image-button",function(){var e=(0,a.default)(this).closest(".thirstylink"),t=e.find(".images-block"),n=e.hasClass("show");(0,a.default)(".results-panel").find(".images-block").removeClass("show").hide(),n||t.slideDown("fast").addClass("show")})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u);n(3),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)()})}]);
|
11 |
*
|
12 |
* Date: 2017-03-20T18:59Z
|
13 |
*/
|
14 |
+
!function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):De.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){se.removeEventListener("DOMContentLoaded",m),o.removeEventListener("load",m),xe.ready()}function v(){this.expando=xe.expando+v.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:We.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Ie.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&ze.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ge[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ge[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Re.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ue(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Re.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function k(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;n<r;n++)Re.set(e[n],"globalEval",!t||Re.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[s]||Ke._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=k(f.appendChild(o),"script"),l&&C(a),n)for(c=0;o=a[c++];)Je.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function P(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Re.hasData(e)&&(o=Re.access(e),a=Re.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Ie.hasData(e)&&(s=Ie.access(e),u=xe.extend({},s),Ie.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function H(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),H(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(k(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,k(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Je.test(l.type||"")&&!Re.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(ut,""),c))}return e}function _(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(k(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&C(k(r,"script")),r.parentNode.removeChild(r));return e}function F(e,t,n){var r,i,o,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&ct.test(a)&<.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in vt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in vt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=R(e)||e),t}function W(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+Xe[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+Xe[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+Xe[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+Xe[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+Xe[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=ft(e),o=F(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return ct.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){xt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){yt=void 0}),yt=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Ue(e),m=Re.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],bt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}p[r]=m&&m[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=m&&m.display,null==l&&(l=Re.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(m?"hidden"in m&&(g=m.hidden):m=Re.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Re.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?m[r]:0,r,d),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Oe)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Lt.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Oe)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,me=ge.toString,ve=me.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,we=/^-ms-/,Te=/-([a-z])/g,ke=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&me.call(n)===ve)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(we,"ms-").replace(Te,ke)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(be,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var Ce=/*!
|
15 |
* Sizzle CSS Selector Engine v2.3.3
|
16 |
* https://sizzlejs.com/
|
17 |
*
|
21 |
*
|
22 |
* Date: 2016-08-08
|
23 |
*/
|
24 |
+
function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==L&&A(t),t=t||L,P)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=C(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=me.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,t,n,i,o,a){return i&&!i[M]&&(i=m(i)),o&&!o[M]&&(o=m(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],m=a.length,v=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,d,e,s,u),x=n?o||(r?e:m||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",m=r&&[],v=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!P);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=G.call(u));v=g(v)}Q.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),m};return i?r(a):a}var x,b,w,T,k,C,S,E,j,N,D,A,L,q,P,O,H,_,F,M="sizzle"+1*new Date,R=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,P=!k(L),R!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&P)return t.getElementsByClassName(e)},H=[],O=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||O.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=he.test(_=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),H.push("!=",re)}),O=O.length&&new RegExp(O.join("|")),H=H.length&&new RegExp(H.join("|")),t=he.test(q.compareDocumentPosition),F=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===R&&F(R,e)?-1:t===L||t.ownerDocument===R&&F(R,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&P&&!z[n+" "]&&(!H||!H.test(n))&&(!O||!O.test(n)))try{var r=_.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:b.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(d=m,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,C=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=v(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&C(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&P&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(ve,ye),me.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!P,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=Ce,xe.expr=Ce.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=Ce.uniqueSort,xe.text=Ce.getText,xe.isXMLDoc=Ce.isXML,xe.contains=Ce.contains,xe.escapeSelector=Ce.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},je=xe.expr.match.needsContext,Ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,De=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&je.test(e)?xe(e):e||[],!1).length}});var Ae,Le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Le.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ne.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,Ae=xe(se);var qe=/^(?:parents|prev(?:Until|All))/,Pe={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!je.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ee((e.parentNode||{}).firstChild,e)},children:function(e){return Ee(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Pe[e]||xe.uniqueSort(i),qe.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var He=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&He.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var _e=xe.Deferred();xe.fn.ready=function(e){return _e.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||_e.resolveWith(se,[xe]))}}),xe.ready.then=_e.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",m),o.addEventListener("load",m));var Fe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};v.uid=1,v.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(Oe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Re=new v,Ie=new v,We=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/[A-Z]/g;xe.extend({hasData:function(e){return Ie.hasData(e)||Re.hasData(e)},data:function(e,t,n){return Ie.access(e,t,n)},removeData:function(e,t){Ie.remove(e,t)},_data:function(e,t,n){return Re.access(e,t,n)},_removeData:function(e,t){Re.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Ie.get(a),1===a.nodeType&&!Re.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Re.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Ie.set(this,e)}):Fe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Ie.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Re.get(e,t),n&&(!r||Array.isArray(n)?r=Re.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Re.get(e,n)||Re.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Re.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Re.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ze=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},Ve=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ge={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?xe(this).show():xe(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var Ze=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=se.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(et,i),n.guid||(n.guid=xe.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],l=t.length;l--;)s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.hasData(e)&&Re.get(e);if(m&&(u=m.events)){for(t=(t||"").match(Oe)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||xe.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Re.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Re.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=k(s),o=k(e),r=0,i=o.length;r<i;r++)O(o[r],a[r]);if(t)if(n)for(o=o||k(e),a=a||k(s),r=0,i=o.length;r<i;r++)P(o[r],a[r]);else P(e,s);return a=k(s,"script"),a.length>0&&C(a,!u&&k(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[Re.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Re.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return _(this,e,!0)},remove:function(e){return _(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(k(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(k(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return H(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(k(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var lt=/^margin/,ct=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",et.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,et.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var dt=/^(none|table(?!-c[ea]).+)/,pt=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],vt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=F(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=pt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=ze.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return pt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=F(e,t,r)),"normal"===i&&t in gt&&(i=gt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!dt.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):Ve(e,ht,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&ft(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=ze.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(F(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ft(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var yt,xt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Re.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Re.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Re.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(yt=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),yt=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){xt||(xt=!0,X())},xe.fx.stop=function(){xt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Tt,kt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Fe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=kt[t]||xe.find.attr;kt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=kt[a],kt[a]=i,i=null!=n(e,t,r)?a:null,kt[a]=o),i}});var Ct=/^(?:input|select|textarea|button)$/i,St=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Fe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(Oe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Re.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Re.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var jt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!jt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,jt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Re.get(s,"events")||{})[e.type]&&Re.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Me(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Me(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Re.access(r,t);i||r.addEventListener(e,n,!0),Re.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Re.access(r,t)-1;i?Re.access(r,t,i):(r.removeEventListener(e,n,!0),Re.remove(r,t))}}});var Nt=o.location,Dt=xe.now(),At=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Lt=/\[\]$/,qt=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Ot.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ht=/%20/g,_t=/#.*$/,Ft=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Bt={},zt="*/".concat("*"),Xt=se.createElement("a");Xt.href=Nt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:Rt.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te($t),ajaxTransport:te(Bt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",C.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,C,n)),h=oe(g,h,C,u),u?(g.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=C.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",u?y.resolveWith(m,[c,T,C]):y.rejectWith(m,[C,T,p]),C.statusCode(b),b=void 0,d&&v.trigger(u?"ajaxSuccess":"ajaxError",[C,g,u?c:p]),x.fireWith(m,[C,T]),d&&(v.trigger("ajaxComplete",[C,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),m=g.context||g,v=g.context&&(m.nodeType||m.jquery)?xe(m):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},k="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Mt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),n(0,t),this}};if(y.promise(C),g.url=((e||g.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Oe)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne($t,g,t,C),f)return C;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!It.test(g.type),a=g.url.replace(_t,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ht,"+")):(h=g.url.slice(a.length),g.data&&(a+=(At.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(Ft,"$1"),h=(At.test(a)?"&":"?")+"_="+Dt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&C.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)C.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(m,C,g)||f))return C.abort();if(k="abort",x.add(g.complete),C.done(g.success),C.fail(g.error),r=ne(Bt,g,t,C)){if(C.readyState=1,d&&v.trigger("ajaxSend",[C,g]),f)return C;g.async&&g.timeout>0&&(l=o.setTimeout(function(){C.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=xe.ajaxSettings.xhr();ye.cors=!!Vt&&"withCredentials"in Vt,ye.ajax=Vt=!!Vt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Vt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||xe.expando+"_"+Dt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ne.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||et})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Fe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=F(e,t),ct.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Fe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var Qt=o.jQuery,Jt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Jt),e&&o.jQuery===xe&&(o.jQuery=Qt),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(4)(e))},function(e,t,n){"use strict";function r(){var e,t,n,r=(0,o.default)("#advanced_add_affiliate_link"),i=r.find(".search-panel"),a=r.find(".results-panel"),s=a.find("ul.results-list"),u=2,l=!0,c=void 0;i.on("keyup","#thirstylink-search",function(){var r=(0,o.default)(this),i=a.find(".load-more-results");if(!(l&&r.val().length<3)){if(c&&n!==r.val()&&(c.abort(),c=null),e||(e=s.html()),s.html("<li class='spinner'><i style='background-image: url("+Options.spinner_image+");'></i><span>"+Options.searching_text+"</span></li>"),(""==r.val()||r.val().length<3)&&!l)return u=2,s.html(e).show(),void i.show();if(n===r.val())return u=2,s.html(t).show(),void i.show();u=1,i.hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:r.val(),paged:u,advance:!0,post_id:Options.post_id},function(e){n=r.val(),l=!1,"success"==e.status&&(t=e.search_query_markup,s.html(e.search_query_markup).show(),u++,e.count<1?i.hide():i.show())},"json")}}),a.on("click",".load-more-results",function(){var e=(0,o.default)(this),t=i.find("#thirstylink-search");e.hasClass("fetching")||(e.addClass("fetching").css("padding-top","4px").find(".spinner").show(),e.find(".button-text").hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:t.val(),paged:u,advance:!0},function(t){if(e.removeClass("fetching").find(".spinner").hide(),e.find(".button-text").show(),"success"==t.status){if(u++,t.count<1)return void e.hide();s.append(t.search_query_markup)}},"json"))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(){var e,t,r,o,s,u,l,c,f,d,p,h,g,m,v,y=(0,a.default)(this).closest("li.thirstylink"),x=(0,a.default)(this).data("type"),b=n.data("htmleditor"),w="";if(parent.ThirstyLinkPicker.linkNode||b){if(e=b?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),t=y.data("linkid"),r=y.data("class"),o=r?' class="'+r+'"':"",s=y.data("href"),u=y.data("title"),l=u?' title="'+u+'"':"",c=y.find("span.name").text(),f=y.data("rel"),d=y.data("target"),m=y.data("other-atts"),!/^(?:[a-z]+:|#|\?|\.|\/)/.test(s))return;if("object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(var T in m)w+=T+'="'+m[T]+'" ';if("shortcode"==x)c=e.trim()?e:c,p='[thirstylink ids="'+t+'"]'+c+"[/thirstylink]",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(p):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(p),parent.ThirstyLinkPicker.inputInstance.reset());else if("image"==x)""!=r&&(o=' class="thirstylinkimg"'),g=(0,a.default)(this).data("imgid"),a.default.post(parent.ajaxurl,{action:"ta_get_image_markup_by_id",imgid:g},function(e){"success"==e.status&&(h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e.image_markup+"</a>",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(h):(parent.ThirstyLinkPicker.close_thickbox(),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,""),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,h),parent.ThirstyLinkPicker.inputInstance.reset())),parent.ThirstyLinkPicker.close_thickbox()},"json");else if(c=e.trim()?e:c,b)h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(h);else{if(v={class:r,title:u,href:s,rel:f,target:d,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(T in m)v[T]=m[T];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,v),e.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(c),parent.ThirstyLinkPicker.inputInstance.reset()}g||parent.ThirstyLinkPicker.close_thickbox(),!b&&e.indexOf("<img")>-1&&parent.ThirstyLinkPicker.editor.selection.collapse()}}var t=(0,a.default)("#advanced_add_affiliate_link"),n=t.find(".results-panel ul.results-list");n.on("click",".actions .insert-link-button",e),n.on("click",".actions .insert-shortcode-button",e),n.on("click",".images-block .images img",e),n.on("click",".actions .insert-image-button",function(){var e=(0,a.default)(this).closest(".thirstylink"),t=e.find(".images-block"),n=e.hasClass("show");(0,a.default)(".results-panel").find(".images-block").removeClass("show").hide(),n||t.slideDown("fast").addClass("show")})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u);n(3),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)()})}]);
|
js/app/quick_add_affiliate_link/dist/quick-add-affiliate-link.js
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*
|
12 |
* Date: 2017-03-20T18:59Z
|
13 |
*/
|
14 |
-
!function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):Ee.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function v(){se.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),xe.ready()}function m(){this.expando=xe.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(_e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Re.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&We.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Xe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Xe[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Fe.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Be(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Fe.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function C(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Qe.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Ve.exec(o)||["",""])[1].toLowerCase(),u=Ye[s]||Ye._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=C(f.appendChild(o),"script"),l&&k(a),n)for(c=0;o=a[c++];)Ge.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function H(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Re.hasData(e)&&(s=Re.access(e),u=xe.extend({},s),Re.set(t,u))}}function P(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&nt.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),O(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(C(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,C(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Ge.test(l.type||"")&&!Fe.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(it,""),c))}return e}function F(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(C(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&k(C(r,"script")),r.parentNode.removeChild(r));return e}function R(e,t,n){var r,i,o,a,s=e.style;return n=n||st(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&at.test(a)&&ot.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function _(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=dt.length;n--;)if((e=dt[n]+t)in pt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=_(e)||e),t}function W(e,t,n){var r=We.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+$e[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+$e[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+$e[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+$e[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+$e[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=st(e),o=R(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return at.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){gt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){ht=void 0}),ht=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=$e[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Be(e),v=Fe.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=Fe.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(v?"hidden"in v&&(g=v.hidden):v=Fe.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Fe.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?v[r]:0,r,d),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=ht||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Le)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Et.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Le)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Ht;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,ve=ge.toString,me=ve.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&ve.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(/^-ms-/,"ms-").replace(/-([a-z])/g,be)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var we=/*!
|
15 |
* Sizzle CSS Selector Engine v2.3.3
|
16 |
* https://sizzlejs.com/
|
17 |
*
|
@@ -21,4 +21,4 @@
|
|
21 |
*
|
22 |
* Date: 2016-08-08
|
23 |
*/
|
24 |
-
function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:_)!==L&&A(t),t=t||L,H)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!P||!P.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=k(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=ve.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[M]&&(i=v(i)),o&&!o[M]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],v=a.length,m=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:g(m,d,e,s,u),x=n?o||(r?e:v||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",v=r&&[],m=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!H);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&v.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(v,m,a,s);if(r){if(p>0)for(;h--;)v[h]||m[h]||(m[h]=G.call(u));m=g(m)}Q.apply(u,m),l&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),v};return i?r(a):a}var x,b,w,T,C,k,S,E,j,N,D,A,L,q,H,P,O,F,R,M="sizzle"+1*new Date,_=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(_.childNodes),_.childNodes),V[_.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:_;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,H=!C(L),_!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},O=[],P=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||P.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(b.matchesSelector=he.test(F=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),O.push("!=",re)}),P=P.length&&new RegExp(P.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(q.compareDocumentPosition),R=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===_&&R(_,e)?-1:t===L||t.ownerDocument===_&&R(_,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===_?-1:u[r]===_?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&H&&!z[n+" "]&&(!O||!O.test(n))&&(!P||!P.test(n)))try{var r=F.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(d=v,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(me,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ye).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,k=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=m(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&k(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ye),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!H,n,!t||ve.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=we,xe.expr=we.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=we.uniqueSort,xe.text=we.getText,xe.isXMLDoc=we.isXML,xe.contains=we.contains,xe.escapeSelector=we.escape;var Te=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ke=xe.expr.match.needsContext,Se=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ee=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&ke.test(e)?xe(e):e||[],!1).length}});var je,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||je,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ne.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Se.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,je=xe(se);var De=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!ke.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return Ce((e.parentNode||{}).firstChild,e)},children:function(e){return Ce(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Ae[e]||xe.uniqueSort(i),De.test(e)&&i.reverse()),this.pushStack(i)}});var Le=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var qe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&qe.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var He=xe.Deferred();xe.fn.ready=function(e){return He.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||He.resolveWith(se,[xe]))}}),xe.ready.then=He.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var Pe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Oe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Oe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(Le)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Fe=new m,Re=new m,Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/[A-Z]/g;xe.extend({hasData:function(e){return Re.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Re.access(e,t,n)},removeData:function(e,t){Re.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Re.get(a),1===a.nodeType&&!Fe.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Fe.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Re.set(this,e)}):Pe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Re.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Re.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Re.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||Array.isArray(n)?r=Fe.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Fe.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,We=new RegExp("^(?:([+-])=|)("+Ie+")([a-z%]*)$","i"),$e=["Top","Right","Bottom","Left"],Be=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},ze=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Xe={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Be(this)?xe(this).show():xe(this).hide()})}});var Ue=/^(?:checkbox|radio)$/i,Ve=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ge=/^$|\/(?:java|ecma)script/i,Ye={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Qe=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Je=se.documentElement,Ke=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Fe.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(Je,i),n.guid||(n.guid=xe.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Le)||[""],l=t.length;l--;)s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Fe.hasData(e)&&Fe.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Le)||[""],l=t.length;l--;)if(s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||xe.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Fe.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,it=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=C(s),o=C(e),r=0,i=o.length;r<i;r++)P(o[r],a[r]);if(t)if(n)for(o=o||C(e),a=a||C(s),r=0,i=o.length;r<i;r++)H(o[r],a[r]);else H(e,s);return a=C(s,"script"),a.length>0&&k(a,!u&&C(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Oe(n)){if(t=n[Fe.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Fe.expando]=void 0}n[Re.expando]&&(n[Re.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return F(this,e,!0)},remove:function(e){return F(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(C(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ye[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(C(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(C(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var ot=/^margin/,at=new RegExp("^("+Ie+")(?!px)[a-z%]+$","i"),st=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Je.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,Je.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var ut=/^(none|table(?!-c[ea]).+)/,lt=/^--/,ct={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","Moz","ms"],pt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=R(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=lt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=We.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return lt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=R(e,t,r)),"normal"===i&&t in ft&&(i=ft[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!ut.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):ze(e,ct,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&st(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=We.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(R(e,"marginLeft"))||e.getBoundingClientRect().left-ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+$e[r]+t]=o[r]||o[r-2]||o[0];return i}},ot.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=st(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Be).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Fe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Fe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&mt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(ht=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),ht=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){gt||(gt=!0,X())},xe.fx.stop=function(){gt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var yt,xt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Pe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Le);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||xe.find.attr;xt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=xt[a],xt[a]=i,i=null!=n(e,t,r)?a:null,xt[a]=o),i}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Pe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(Le)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(/\r/g,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,Tt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Fe.get(s,"events")||{})[e.type]&&Fe.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Oe(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Oe(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Fe.access(r,t);i||r.addEventListener(e,n,!0),Fe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Fe.access(r,t)-1;i?Fe.access(r,t,i):(r.removeEventListener(e,n,!0),Fe.remove(r,t))}}});var Ct=o.location,kt=xe.now(),St=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Et=/\[\]$/,jt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Nt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(/\r?\n/g,"\r\n")}}):{name:t.name,value:n.replace(/\r?\n/g,"\r\n")}}).get()}});var Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lt=/^(?:GET|HEAD)$/,qt={},Ht={},Pt="*/".concat("*"),Ot=se.createElement("a");Ot.href=Ct.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:At.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te(qt),ajaxTransport:te(Ht),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,k,n)),h=oe(g,h,k,u),u?(g.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(t||T)+"",u?y.resolveWith(v,[c,T,k]):y.rejectWith(v,[k,T,p]),k.statusCode(b),b=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,g,u?c:p]),x.fireWith(v,[k,T]),d&&(m.trigger("ajaxComplete",[k,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?xe(v):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},C="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Dt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),n(0,t),this}};if(y.promise(k),g.url=((e||g.url||Ct.href)+"").replace(/^\/\//,Ct.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Le)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Ot.protocol+"//"+Ot.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne(qt,g,t,k),f)return k;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Lt.test(g.type),a=g.url.replace(/#.*$/,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(/%20/g,"+")):(h=g.url.slice(a.length),g.data&&(a+=(St.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(/([?&])_=[^&]*/,"$1"),h=(St.test(a)?"&":"?")+"_="+kt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&k.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&k.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&k.setRequestHeader("Content-Type",g.contentType),k.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Pt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)k.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(v,k,g)||f))return k.abort();if(C="abort",x.add(g.complete),k.done(g.success),k.fail(g.error),r=ne(Ht,g,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,g]),f)return k;g.async&&g.timeout>0&&(l=o.setTimeout(function(){k.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ft={0:200,1223:204},Rt=xe.ajaxSettings.xhr();ye.cors=!!Rt&&"withCredentials"in Rt,ye.ajax=Rt=!!Rt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Rt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ft[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Mt=[],_t=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||xe.expando+"_"+kt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(_t.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&_t.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(_t,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Se.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||Je})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Pe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=R(e,t),at.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Pe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var It=o.jQuery,Wt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Wt),e&&o.jQuery===xe&&(o.jQuery=It),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(3)(e))},function(e,t,n){"use strict";function r(){var e=(0,a.default)("#quick_add_affiliate_link"),t=e.find("form");e.on("click","button[type='submit']",function(){if(t[0].checkValidity()){var n=(0,a.default)(this).prop("name"),r=t.serializeArray(),o=e.data("htmleditor"),s=o?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),u=void 0,l=void 0,c=void 0;t.find(".submit-row .ta_spinner").css("display","inline-block"),a.default.post(parent.ajaxurl,r,function(e){if("success"==e.status)if(t[0].reset(),t.find(".submit-row .ta_spinner").hide(),"add_link_and_insert"==n){if("shortcode"===e.link_insertion_type){var r=s||e.content,a='[thirstylink ids="'+e.link_id+'"]'+r+"[/thirstylink]";o?parent.ThirstyLinkPicker.replace_html_editor_selected_text(a):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(a))}else{var f=e.other_atts,d=" ",p=void 0,h=void 0;if(o){for(h in f)d+=h+'="'+f[h]+'" ';l=e.class?' class="'+e.class+'"':"",c=e.title?' title="'+e.title+'"':"",s=s.trim()?s:e.name,u="<a"+l+c+' href="'+e.href+'" rel="'+e.rel+'" target="'+e.target+'" '+d+">"+s+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(u)}else{if(p={class:e.class,title:e.title,href:e.href,rel:e.rel,target:e.target,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===f?"undefined":i(f))&&Object.keys(f).length>0)for(h in f)p[h]=f[h];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,p),s.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(e.content)}}parent.ThirstyLinkPicker.close_thickbox()}else parent.ThirstyLinkPicker.close_thickbox()},"json")}})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a);n(2),(0,o.default)(document).ready(function(){(0,s.default)()})}]);
|
11 |
*
|
12 |
* Date: 2017-03-20T18:59Z
|
13 |
*/
|
14 |
+
!function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):De.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(Pe)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function v(){se.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),xe.ready()}function m(){this.expando=xe.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:We.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Ie.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&ze.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ge[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ge[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=_e.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ue(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",_e.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function C(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)_e.set(e[n],"globalEval",!t||_e.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[s]||Ke._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=C(f.appendChild(o),"script"),l&&k(a),n)for(c=0;o=a[c++];)Je.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function H(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(_e.hasData(e)&&(o=_e.access(e),a=_e.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Ie.hasData(e)&&(s=Ie.access(e),u=xe.extend({},s),Ie.set(t,u))}}function P(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),O(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(C(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,C(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Je.test(l.type||"")&&!_e.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(ut,""),c))}return e}function F(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(C(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&k(C(r,"script")),r.parentNode.removeChild(r));return e}function R(e,t,n){var r,i,o,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&ct.test(a)&<.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function _(e){if(e in mt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=vt.length;n--;)if((e=vt[n]+t)in mt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=_(e)||e),t}function W(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+Xe[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+Xe[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+Xe[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+Xe[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+Xe[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=ft(e),o=R(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return ct.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){xt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){yt=void 0}),yt=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Ue(e),v=_e.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],bt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=_e.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(v?"hidden"in v&&(g=v.hidden):v=_e.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),_e.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?v[r]:0,r,d),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Pe)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Lt.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Pe)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,ve=ge.toString,me=ve.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,we=/^-ms-/,Te=/-([a-z])/g,Ce=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&ve.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(we,"ms-").replace(Te,Ce)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(be,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var ke=/*!
|
15 |
* Sizzle CSS Selector Engine v2.3.3
|
16 |
* https://sizzlejs.com/
|
17 |
*
|
21 |
*
|
22 |
* Date: 2016-08-08
|
23 |
*/
|
24 |
+
function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:_)!==L&&A(t),t=t||L,H)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!P||!P.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=k(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=ve.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[M]&&(i=v(i)),o&&!o[M]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],v=a.length,m=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:g(m,d,e,s,u),x=n?o||(r?e:v||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",v=r&&[],m=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!H);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&v.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(v,m,a,s);if(r){if(p>0)for(;h--;)v[h]||m[h]||(m[h]=G.call(u));m=g(m)}Q.apply(u,m),l&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),v};return i?r(a):a}var x,b,w,T,C,k,S,E,j,N,D,A,L,q,H,P,O,F,R,M="sizzle"+1*new Date,_=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(_.childNodes),_.childNodes),V[_.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:_;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,H=!C(L),_!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},O=[],P=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||P.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(b.matchesSelector=he.test(F=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),O.push("!=",re)}),P=P.length&&new RegExp(P.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(q.compareDocumentPosition),R=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===_&&R(_,e)?-1:t===L||t.ownerDocument===_&&R(_,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===_?-1:u[r]===_?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&H&&!z[n+" "]&&(!O||!O.test(n))&&(!P||!P.test(n)))try{var r=F.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(d=v,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(me,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ye).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,k=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=m(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&k(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ye),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!H,n,!t||ve.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=ke,xe.expr=ke.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=ke.uniqueSort,xe.text=ke.getText,xe.isXMLDoc=ke.isXML,xe.contains=ke.contains,xe.escapeSelector=ke.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},je=xe.expr.match.needsContext,Ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,De=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&je.test(e)?xe(e):e||[],!1).length}});var Ae,Le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Le.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ne.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,Ae=xe(se);var qe=/^(?:parents|prev(?:Until|All))/,He={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!je.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ee((e.parentNode||{}).firstChild,e)},children:function(e){return Ee(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(He[e]||xe.uniqueSort(i),qe.test(e)&&i.reverse()),this.pushStack(i)}});var Pe=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&Oe.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var Fe=xe.Deferred();xe.fn.ready=function(e){return Fe.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||Fe.resolveWith(se,[xe]))}}),xe.ready.then=Fe.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var Re=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(Pe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var _e=new m,Ie=new m,We=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/[A-Z]/g;xe.extend({hasData:function(e){return Ie.hasData(e)||_e.hasData(e)},data:function(e,t,n){return Ie.access(e,t,n)},removeData:function(e,t){Ie.remove(e,t)},_data:function(e,t,n){return _e.access(e,t,n)},_removeData:function(e,t){_e.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Ie.get(a),1===a.nodeType&&!_e.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));_e.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Ie.set(this,e)}):Re(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Ie.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_e.get(e,t),n&&(!r||Array.isArray(n)?r=_e.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _e.get(e,n)||_e.access(e,n,{empty:xe.Callbacks("once memory").add(function(){_e.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=_e.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ze=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},Ve=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ge={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?xe(this).show():xe(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var Ze=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=se.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=_e.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(et,i),n.guid||(n.guid=xe.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Pe)||[""],l=t.length;l--;)s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=_e.hasData(e)&&_e.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Pe)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||xe.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&_e.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(_e.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=C(s),o=C(e),r=0,i=o.length;r<i;r++)P(o[r],a[r]);if(t)if(n)for(o=o||C(e),a=a||C(s),r=0,i=o.length;r<i;r++)H(o[r],a[r]);else H(e,s);return a=C(s,"script"),a.length>0&&k(a,!u&&C(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[_e.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[_e.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return F(this,e,!0)},remove:function(e){return F(this,e)},text:function(e){return Re(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(C(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Re(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(C(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(C(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var lt=/^margin/,ct=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",et.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,et.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var dt=/^(none|table(?!-c[ea]).+)/,pt=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},vt=["Webkit","Moz","ms"],mt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=R(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=pt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=ze.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return pt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=R(e,t,r)),"normal"===i&&t in gt&&(i=gt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!dt.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):Ve(e,ht,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&ft(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=ze.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(R(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Re(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ft(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var yt,xt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(Pe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||_e.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=_e.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=_e.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(yt=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),yt=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){xt||(xt=!0,X())},xe.fx.stop=function(){xt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Tt,Ct=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Re(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Pe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ct[t]||xe.find.attr;Ct[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Ct[a],Ct[a]=i,i=null!=n(e,t,r)?a:null,Ct[a]=o),i}});var kt=/^(?:input|select|textarea|button)$/i,St=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Re(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(Pe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Pe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(Pe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&_e.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":_e.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var jt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!jt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,jt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(_e.get(s,"events")||{})[e.type]&&_e.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Me(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Me(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=_e.access(r,t);i||r.addEventListener(e,n,!0),_e.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=_e.access(r,t)-1;i?_e.access(r,t,i):(r.removeEventListener(e,n,!0),_e.remove(r,t))}}});var Nt=o.location,Dt=xe.now(),At=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Lt=/\[\]$/,qt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ot=/%20/g,Ft=/#.*$/,Rt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,_t=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Bt={},zt="*/".concat("*"),Xt=se.createElement("a");Xt.href=Nt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:_t.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te($t),ajaxTransport:te(Bt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,k,n)),h=oe(g,h,k,u),u?(g.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(t||T)+"",u?y.resolveWith(v,[c,T,k]):y.rejectWith(v,[k,T,p]),k.statusCode(b),b=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,g,u?c:p]),x.fireWith(v,[k,T]),d&&(m.trigger("ajaxComplete",[k,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?xe(v):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},C="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Mt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),n(0,t),this}};if(y.promise(k),g.url=((e||g.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Pe)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne($t,g,t,k),f)return k;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!It.test(g.type),a=g.url.replace(Ft,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ot,"+")):(h=g.url.slice(a.length),g.data&&(a+=(At.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(Rt,"$1"),h=(At.test(a)?"&":"?")+"_="+Dt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&k.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&k.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&k.setRequestHeader("Content-Type",g.contentType),k.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)k.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(v,k,g)||f))return k.abort();if(C="abort",x.add(g.complete),k.done(g.success),k.fail(g.error),r=ne(Bt,g,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,g]),f)return k;g.async&&g.timeout>0&&(l=o.setTimeout(function(){k.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=xe.ajaxSettings.xhr();ye.cors=!!Vt&&"withCredentials"in Vt,ye.ajax=Vt=!!Vt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Vt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||xe.expando+"_"+Dt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ne.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||et})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Re(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=R(e,t),ct.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Re(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var Qt=o.jQuery,Jt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Jt),e&&o.jQuery===xe&&(o.jQuery=Qt),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(3)(e))},function(e,t,n){"use strict";function r(){var e=(0,a.default)("#quick_add_affiliate_link"),t=e.find("form");e.on("click","button[type='submit']",function(){if(t[0].checkValidity()){var n=(0,a.default)(this).prop("name"),r=t.serializeArray(),o=e.data("htmleditor"),s=o?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),u=void 0,l=void 0,c=void 0;t.find(".submit-row .ta_spinner").css("display","inline-block"),a.default.post(parent.ajaxurl,r,function(e){if("success"==e.status)if(t[0].reset(),t.find(".submit-row .ta_spinner").hide(),"add_link_and_insert"==n){if("shortcode"===e.link_insertion_type){var r=s||e.content,a='[thirstylink ids="'+e.link_id+'"]'+r+"[/thirstylink]";o?parent.ThirstyLinkPicker.replace_html_editor_selected_text(a):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(a))}else{var f=e.other_atts,d=" ",p=void 0,h=void 0;if(o){for(h in f)d+=h+'="'+f[h]+'" ';l=e.class?' class="'+e.class+'"':"",c=e.title?' title="'+e.title+'"':"",s=s.trim()?s:e.name,u="<a"+l+c+' href="'+e.href+'" rel="'+e.rel+'" target="'+e.target+'" '+d+">"+s+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(u)}else{if(p={class:e.class,title:e.title,href:e.href,rel:e.rel,target:e.target,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===f?"undefined":i(f))&&Object.keys(f).length>0)for(h in f)p[h]=f[h];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,p),s.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(e.content)}}parent.ThirstyLinkPicker.close_thickbox(),!o&&s.indexOf("<img")>-1&&parent.ThirstyLinkPicker.editor.selection.collapse()}else parent.ThirstyLinkPicker.close_thickbox()},"json")}})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a);n(2),(0,o.default)(document).ready(function(){(0,s.default)()})}]);
|
js/app/ta-reports.js
CHANGED
@@ -214,9 +214,9 @@ jQuery( document ).ready( function($){
|
|
214 |
} );
|
215 |
|
216 |
// apply link data to search input on click of single search result
|
217 |
-
$results_list.on( 'click' , 'li' , function() {
|
218 |
|
219 |
-
|
220 |
|
221 |
var $link = $(this),
|
222 |
$input = $link.closest( '.input-wrap' ).find( 'input' );
|
@@ -275,7 +275,7 @@ jQuery( document ).ready( function($){
|
|
275 |
// add new legend
|
276 |
$chart_sidebar.find( 'ul li.single-link' ).remove();
|
277 |
$chart_sidebar.find( 'ul.chart-legend' )
|
278 |
-
.append( '<li class="single-link" style="border-color:#e74c3c;">' + response.label + '<span>' + response.slug + '</span></li>' );
|
279 |
|
280 |
// redraw the graph
|
281 |
thirstyReports.series = [];
|
214 |
} );
|
215 |
|
216 |
// apply link data to search input on click of single search result
|
217 |
+
$results_list.on( 'click' , 'li' , function(e) {
|
218 |
|
219 |
+
e.preventDefault();
|
220 |
|
221 |
var $link = $(this),
|
222 |
$input = $link.closest( '.input-wrap' ).find( 'input' );
|
275 |
// add new legend
|
276 |
$chart_sidebar.find( 'ul li.single-link' ).remove();
|
277 |
$chart_sidebar.find( 'ul.chart-legend' )
|
278 |
+
.append( '<li class="single-link" style="border-color:#e74c3c;">' + response.label + '<em class="count">' + response.total_clicks + '</em><span>' + response.slug + '</span></li>' );
|
279 |
|
280 |
// redraw the graph
|
281 |
thirstyReports.series = [];
|
js/lib/select2/select2.js
DELETED
@@ -1,5725 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Select2 4.0.3
|
3 |
-
* https://select2.github.io
|
4 |
-
*
|
5 |
-
* Released under the MIT license
|
6 |
-
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
-
*/
|
8 |
-
(function (factory) {
|
9 |
-
if (typeof define === 'function' && define.amd) {
|
10 |
-
// AMD. Register as an anonymous module.
|
11 |
-
define(['jquery'], factory);
|
12 |
-
} else if (typeof exports === 'object') {
|
13 |
-
// Node/CommonJS
|
14 |
-
factory(require('jquery'));
|
15 |
-
} else {
|
16 |
-
// Browser globals
|
17 |
-
factory(jQuery);
|
18 |
-
}
|
19 |
-
}(function (jQuery) {
|
20 |
-
// This is needed so we can catch the AMD loader configuration and use it
|
21 |
-
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
22 |
-
// returns the AMD loader references.
|
23 |
-
var S2 =
|
24 |
-
(function () {
|
25 |
-
// Restore the Select2 AMD loader so it can be used
|
26 |
-
// Needed mostly in the language files, where the loader is not inserted
|
27 |
-
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
28 |
-
var S2 = jQuery.fn.select2.amd;
|
29 |
-
}
|
30 |
-
var S2;(function () { if (!S2 || !S2.requirejs) {
|
31 |
-
if (!S2) { S2 = {}; } else { require = S2; }
|
32 |
-
/**
|
33 |
-
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
|
34 |
-
* Available via the MIT or new BSD license.
|
35 |
-
* see: http://github.com/jrburke/almond for details
|
36 |
-
*/
|
37 |
-
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
38 |
-
//be followed.
|
39 |
-
/*jslint sloppy: true */
|
40 |
-
/*global setTimeout: false */
|
41 |
-
|
42 |
-
var requirejs, require, define;
|
43 |
-
(function (undef) {
|
44 |
-
var main, req, makeMap, handlers,
|
45 |
-
defined = {},
|
46 |
-
waiting = {},
|
47 |
-
config = {},
|
48 |
-
defining = {},
|
49 |
-
hasOwn = Object.prototype.hasOwnProperty,
|
50 |
-
aps = [].slice,
|
51 |
-
jsSuffixRegExp = /\.js$/;
|
52 |
-
|
53 |
-
function hasProp(obj, prop) {
|
54 |
-
return hasOwn.call(obj, prop);
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Given a relative module name, like ./something, normalize it to
|
59 |
-
* a real name that can be mapped to a path.
|
60 |
-
* @param {String} name the relative name
|
61 |
-
* @param {String} baseName a real name that the name arg is relative
|
62 |
-
* to.
|
63 |
-
* @returns {String} normalized name
|
64 |
-
*/
|
65 |
-
function normalize(name, baseName) {
|
66 |
-
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
67 |
-
foundI, foundStarMap, starI, i, j, part,
|
68 |
-
baseParts = baseName && baseName.split("/"),
|
69 |
-
map = config.map,
|
70 |
-
starMap = (map && map['*']) || {};
|
71 |
-
|
72 |
-
//Adjust any relative paths.
|
73 |
-
if (name && name.charAt(0) === ".") {
|
74 |
-
//If have a base name, try to normalize against it,
|
75 |
-
//otherwise, assume it is a top-level require that will
|
76 |
-
//be relative to baseUrl in the end.
|
77 |
-
if (baseName) {
|
78 |
-
name = name.split('/');
|
79 |
-
lastIndex = name.length - 1;
|
80 |
-
|
81 |
-
// Node .js allowance:
|
82 |
-
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
83 |
-
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
84 |
-
}
|
85 |
-
|
86 |
-
//Lop off the last part of baseParts, so that . matches the
|
87 |
-
//"directory" and not name of the baseName's module. For instance,
|
88 |
-
//baseName of "one/two/three", maps to "one/two/three.js", but we
|
89 |
-
//want the directory, "one/two" for this normalization.
|
90 |
-
name = baseParts.slice(0, baseParts.length - 1).concat(name);
|
91 |
-
|
92 |
-
//start trimDots
|
93 |
-
for (i = 0; i < name.length; i += 1) {
|
94 |
-
part = name[i];
|
95 |
-
if (part === ".") {
|
96 |
-
name.splice(i, 1);
|
97 |
-
i -= 1;
|
98 |
-
} else if (part === "..") {
|
99 |
-
if (i === 1 && (name[2] === '..' || name[0] === '..')) {
|
100 |
-
//End of the line. Keep at least one non-dot
|
101 |
-
//path segment at the front so it can be mapped
|
102 |
-
//correctly to disk. Otherwise, there is likely
|
103 |
-
//no path mapping for a path starting with '..'.
|
104 |
-
//This can still fail, but catches the most reasonable
|
105 |
-
//uses of ..
|
106 |
-
break;
|
107 |
-
} else if (i > 0) {
|
108 |
-
name.splice(i - 1, 2);
|
109 |
-
i -= 2;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
//end trimDots
|
114 |
-
|
115 |
-
name = name.join("/");
|
116 |
-
} else if (name.indexOf('./') === 0) {
|
117 |
-
// No baseName, so this is ID is resolved relative
|
118 |
-
// to baseUrl, pull off the leading dot.
|
119 |
-
name = name.substring(2);
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
//Apply map config if available.
|
124 |
-
if ((baseParts || starMap) && map) {
|
125 |
-
nameParts = name.split('/');
|
126 |
-
|
127 |
-
for (i = nameParts.length; i > 0; i -= 1) {
|
128 |
-
nameSegment = nameParts.slice(0, i).join("/");
|
129 |
-
|
130 |
-
if (baseParts) {
|
131 |
-
//Find the longest baseName segment match in the config.
|
132 |
-
//So, do joins on the biggest to smallest lengths of baseParts.
|
133 |
-
for (j = baseParts.length; j > 0; j -= 1) {
|
134 |
-
mapValue = map[baseParts.slice(0, j).join('/')];
|
135 |
-
|
136 |
-
//baseName segment has config, find if it has one for
|
137 |
-
//this name.
|
138 |
-
if (mapValue) {
|
139 |
-
mapValue = mapValue[nameSegment];
|
140 |
-
if (mapValue) {
|
141 |
-
//Match, update name to the new value.
|
142 |
-
foundMap = mapValue;
|
143 |
-
foundI = i;
|
144 |
-
break;
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
if (foundMap) {
|
151 |
-
break;
|
152 |
-
}
|
153 |
-
|
154 |
-
//Check for a star map match, but just hold on to it,
|
155 |
-
//if there is a shorter segment match later in a matching
|
156 |
-
//config, then favor over this star map.
|
157 |
-
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
158 |
-
foundStarMap = starMap[nameSegment];
|
159 |
-
starI = i;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
if (!foundMap && foundStarMap) {
|
164 |
-
foundMap = foundStarMap;
|
165 |
-
foundI = starI;
|
166 |
-
}
|
167 |
-
|
168 |
-
if (foundMap) {
|
169 |
-
nameParts.splice(0, foundI, foundMap);
|
170 |
-
name = nameParts.join('/');
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
return name;
|
175 |
-
}
|
176 |
-
|
177 |
-
function makeRequire(relName, forceSync) {
|
178 |
-
return function () {
|
179 |
-
//A version of a require function that passes a moduleName
|
180 |
-
//value for items that may need to
|
181 |
-
//look up paths relative to the moduleName
|
182 |
-
var args = aps.call(arguments, 0);
|
183 |
-
|
184 |
-
//If first arg is not require('string'), and there is only
|
185 |
-
//one arg, it is the array form without a callback. Insert
|
186 |
-
//a null so that the following concat is correct.
|
187 |
-
if (typeof args[0] !== 'string' && args.length === 1) {
|
188 |
-
args.push(null);
|
189 |
-
}
|
190 |
-
return req.apply(undef, args.concat([relName, forceSync]));
|
191 |
-
};
|
192 |
-
}
|
193 |
-
|
194 |
-
function makeNormalize(relName) {
|
195 |
-
return function (name) {
|
196 |
-
return normalize(name, relName);
|
197 |
-
};
|
198 |
-
}
|
199 |
-
|
200 |
-
function makeLoad(depName) {
|
201 |
-
return function (value) {
|
202 |
-
defined[depName] = value;
|
203 |
-
};
|
204 |
-
}
|
205 |
-
|
206 |
-
function callDep(name) {
|
207 |
-
if (hasProp(waiting, name)) {
|
208 |
-
var args = waiting[name];
|
209 |
-
delete waiting[name];
|
210 |
-
defining[name] = true;
|
211 |
-
main.apply(undef, args);
|
212 |
-
}
|
213 |
-
|
214 |
-
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
215 |
-
throw new Error('No ' + name);
|
216 |
-
}
|
217 |
-
return defined[name];
|
218 |
-
}
|
219 |
-
|
220 |
-
//Turns a plugin!resource to [plugin, resource]
|
221 |
-
//with the plugin being undefined if the name
|
222 |
-
//did not have a plugin prefix.
|
223 |
-
function splitPrefix(name) {
|
224 |
-
var prefix,
|
225 |
-
index = name ? name.indexOf('!') : -1;
|
226 |
-
if (index > -1) {
|
227 |
-
prefix = name.substring(0, index);
|
228 |
-
name = name.substring(index + 1, name.length);
|
229 |
-
}
|
230 |
-
return [prefix, name];
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Makes a name map, normalizing the name, and using a plugin
|
235 |
-
* for normalization if necessary. Grabs a ref to plugin
|
236 |
-
* too, as an optimization.
|
237 |
-
*/
|
238 |
-
makeMap = function (name, relName) {
|
239 |
-
var plugin,
|
240 |
-
parts = splitPrefix(name),
|
241 |
-
prefix = parts[0];
|
242 |
-
|
243 |
-
name = parts[1];
|
244 |
-
|
245 |
-
if (prefix) {
|
246 |
-
prefix = normalize(prefix, relName);
|
247 |
-
plugin = callDep(prefix);
|
248 |
-
}
|
249 |
-
|
250 |
-
//Normalize according
|
251 |
-
if (prefix) {
|
252 |
-
if (plugin && plugin.normalize) {
|
253 |
-
name = plugin.normalize(name, makeNormalize(relName));
|
254 |
-
} else {
|
255 |
-
name = normalize(name, relName);
|
256 |
-
}
|
257 |
-
} else {
|
258 |
-
name = normalize(name, relName);
|
259 |
-
parts = splitPrefix(name);
|
260 |
-
prefix = parts[0];
|
261 |
-
name = parts[1];
|
262 |
-
if (prefix) {
|
263 |
-
plugin = callDep(prefix);
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
//Using ridiculous property names for space reasons
|
268 |
-
return {
|
269 |
-
f: prefix ? prefix + '!' + name : name, //fullName
|
270 |
-
n: name,
|
271 |
-
pr: prefix,
|
272 |
-
p: plugin
|
273 |
-
};
|
274 |
-
};
|
275 |
-
|
276 |
-
function makeConfig(name) {
|
277 |
-
return function () {
|
278 |
-
return (config && config.config && config.config[name]) || {};
|
279 |
-
};
|
280 |
-
}
|
281 |
-
|
282 |
-
handlers = {
|
283 |
-
require: function (name) {
|
284 |
-
return makeRequire(name);
|
285 |
-
},
|
286 |
-
exports: function (name) {
|
287 |
-
var e = defined[name];
|
288 |
-
if (typeof e !== 'undefined') {
|
289 |
-
return e;
|
290 |
-
} else {
|
291 |
-
return (defined[name] = {});
|
292 |
-
}
|
293 |
-
},
|
294 |
-
module: function (name) {
|
295 |
-
return {
|
296 |
-
id: name,
|
297 |
-
uri: '',
|
298 |
-
exports: defined[name],
|
299 |
-
config: makeConfig(name)
|
300 |
-
};
|
301 |
-
}
|
302 |
-
};
|
303 |
-
|
304 |
-
main = function (name, deps, callback, relName) {
|
305 |
-
var cjsModule, depName, ret, map, i,
|
306 |
-
args = [],
|
307 |
-
callbackType = typeof callback,
|
308 |
-
usingExports;
|
309 |
-
|
310 |
-
//Use name if no relName
|
311 |
-
relName = relName || name;
|
312 |
-
|
313 |
-
//Call the callback to define the module, if necessary.
|
314 |
-
if (callbackType === 'undefined' || callbackType === 'function') {
|
315 |
-
//Pull out the defined dependencies and pass the ordered
|
316 |
-
//values to the callback.
|
317 |
-
//Default to [require, exports, module] if no deps
|
318 |
-
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
319 |
-
for (i = 0; i < deps.length; i += 1) {
|
320 |
-
map = makeMap(deps[i], relName);
|
321 |
-
depName = map.f;
|
322 |
-
|
323 |
-
//Fast path CommonJS standard dependencies.
|
324 |
-
if (depName === "require") {
|
325 |
-
args[i] = handlers.require(name);
|
326 |
-
} else if (depName === "exports") {
|
327 |
-
//CommonJS module spec 1.1
|
328 |
-
args[i] = handlers.exports(name);
|
329 |
-
usingExports = true;
|
330 |
-
} else if (depName === "module") {
|
331 |
-
//CommonJS module spec 1.1
|
332 |
-
cjsModule = args[i] = handlers.module(name);
|
333 |
-
} else if (hasProp(defined, depName) ||
|
334 |
-
hasProp(waiting, depName) ||
|
335 |
-
hasProp(defining, depName)) {
|
336 |
-
args[i] = callDep(depName);
|
337 |
-
} else if (map.p) {
|
338 |
-
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
339 |
-
args[i] = defined[depName];
|
340 |
-
} else {
|
341 |
-
throw new Error(name + ' missing ' + depName);
|
342 |
-
}
|
343 |
-
}
|
344 |
-
|
345 |
-
ret = callback ? callback.apply(defined[name], args) : undefined;
|
346 |
-
|
347 |
-
if (name) {
|
348 |
-
//If setting exports via "module" is in play,
|
349 |
-
//favor that over return value and exports. After that,
|
350 |
-
//favor a non-undefined return value over exports use.
|
351 |
-
if (cjsModule && cjsModule.exports !== undef &&
|
352 |
-
cjsModule.exports !== defined[name]) {
|
353 |
-
defined[name] = cjsModule.exports;
|
354 |
-
} else if (ret !== undef || !usingExports) {
|
355 |
-
//Use the return value from the function.
|
356 |
-
defined[name] = ret;
|
357 |
-
}
|
358 |
-
}
|
359 |
-
} else if (name) {
|
360 |
-
//May just be an object definition for the module. Only
|
361 |
-
//worry about defining if have a module name.
|
362 |
-
defined[name] = callback;
|
363 |
-
}
|
364 |
-
};
|
365 |
-
|
366 |
-
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
367 |
-
if (typeof deps === "string") {
|
368 |
-
if (handlers[deps]) {
|
369 |
-
//callback in this case is really relName
|
370 |
-
return handlers[deps](callback);
|
371 |
-
}
|
372 |
-
//Just return the module wanted. In this scenario, the
|
373 |
-
//deps arg is the module name, and second arg (if passed)
|
374 |
-
//is just the relName.
|
375 |
-
//Normalize module name, if it contains . or ..
|
376 |
-
return callDep(makeMap(deps, callback).f);
|
377 |
-
} else if (!deps.splice) {
|
378 |
-
//deps is a config object, not an array.
|
379 |
-
config = deps;
|
380 |
-
if (config.deps) {
|
381 |
-
req(config.deps, config.callback);
|
382 |
-
}
|
383 |
-
if (!callback) {
|
384 |
-
return;
|
385 |
-
}
|
386 |
-
|
387 |
-
if (callback.splice) {
|
388 |
-
//callback is an array, which means it is a dependency list.
|
389 |
-
//Adjust args if there are dependencies
|
390 |
-
deps = callback;
|
391 |
-
callback = relName;
|
392 |
-
relName = null;
|
393 |
-
} else {
|
394 |
-
deps = undef;
|
395 |
-
}
|
396 |
-
}
|
397 |
-
|
398 |
-
//Support require(['a'])
|
399 |
-
callback = callback || function () {};
|
400 |
-
|
401 |
-
//If relName is a function, it is an errback handler,
|
402 |
-
//so remove it.
|
403 |
-
if (typeof relName === 'function') {
|
404 |
-
relName = forceSync;
|
405 |
-
forceSync = alt;
|
406 |
-
}
|
407 |
-
|
408 |
-
//Simulate async callback;
|
409 |
-
if (forceSync) {
|
410 |
-
main(undef, deps, callback, relName);
|
411 |
-
} else {
|
412 |
-
//Using a non-zero value because of concern for what old browsers
|
413 |
-
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
414 |
-
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
415 |
-
//If want a value immediately, use require('id') instead -- something
|
416 |
-
//that works in almond on the global level, but not guaranteed and
|
417 |
-
//unlikely to work in other AMD implementations.
|
418 |
-
setTimeout(function () {
|
419 |
-
main(undef, deps, callback, relName);
|
420 |
-
}, 4);
|
421 |
-
}
|
422 |
-
|
423 |
-
return req;
|
424 |
-
};
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Just drops the config on the floor, but returns req in case
|
428 |
-
* the config return value is used.
|
429 |
-
*/
|
430 |
-
req.config = function (cfg) {
|
431 |
-
return req(cfg);
|
432 |
-
};
|
433 |
-
|
434 |
-
/**
|
435 |
-
* Expose module registry for debugging and tooling
|
436 |
-
*/
|
437 |
-
requirejs._defined = defined;
|
438 |
-
|
439 |
-
define = function (name, deps, callback) {
|
440 |
-
if (typeof name !== 'string') {
|
441 |
-
throw new Error('See almond README: incorrect module build, no module name');
|
442 |
-
}
|
443 |
-
|
444 |
-
//This module may not have dependencies
|
445 |
-
if (!deps.splice) {
|
446 |
-
//deps is not an array, so probably means
|
447 |
-
//an object literal or factory function for
|
448 |
-
//the value. Adjust args.
|
449 |
-
callback = deps;
|
450 |
-
deps = [];
|
451 |
-
}
|
452 |
-
|
453 |
-
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
454 |
-
waiting[name] = [name, deps, callback];
|
455 |
-
}
|
456 |
-
};
|
457 |
-
|
458 |
-
define.amd = {
|
459 |
-
jQuery: true
|
460 |
-
};
|
461 |
-
}());
|
462 |
-
|
463 |
-
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
464 |
-
}
|
465 |
-
}());
|
466 |
-
S2.define("almond", function(){});
|
467 |
-
|
468 |
-
/* global jQuery:false, $:false */
|
469 |
-
S2.define('jquery',[],function () {
|
470 |
-
var _$ = jQuery || $;
|
471 |
-
|
472 |
-
if (_$ == null && console && console.error) {
|
473 |
-
console.error(
|
474 |
-
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
475 |
-
'found. Make sure that you are including jQuery before Select2 on your ' +
|
476 |
-
'web page.'
|
477 |
-
);
|
478 |
-
}
|
479 |
-
|
480 |
-
return _$;
|
481 |
-
});
|
482 |
-
|
483 |
-
S2.define('select2/utils',[
|
484 |
-
'jquery'
|
485 |
-
], function ($) {
|
486 |
-
var Utils = {};
|
487 |
-
|
488 |
-
Utils.Extend = function (ChildClass, SuperClass) {
|
489 |
-
var __hasProp = {}.hasOwnProperty;
|
490 |
-
|
491 |
-
function BaseConstructor () {
|
492 |
-
this.constructor = ChildClass;
|
493 |
-
}
|
494 |
-
|
495 |
-
for (var key in SuperClass) {
|
496 |
-
if (__hasProp.call(SuperClass, key)) {
|
497 |
-
ChildClass[key] = SuperClass[key];
|
498 |
-
}
|
499 |
-
}
|
500 |
-
|
501 |
-
BaseConstructor.prototype = SuperClass.prototype;
|
502 |
-
ChildClass.prototype = new BaseConstructor();
|
503 |
-
ChildClass.__super__ = SuperClass.prototype;
|
504 |
-
|
505 |
-
return ChildClass;
|
506 |
-
};
|
507 |
-
|
508 |
-
function getMethods (theClass) {
|
509 |
-
var proto = theClass.prototype;
|
510 |
-
|
511 |
-
var methods = [];
|
512 |
-
|
513 |
-
for (var methodName in proto) {
|
514 |
-
var m = proto[methodName];
|
515 |
-
|
516 |
-
if (typeof m !== 'function') {
|
517 |
-
continue;
|
518 |
-
}
|
519 |
-
|
520 |
-
if (methodName === 'constructor') {
|
521 |
-
continue;
|
522 |
-
}
|
523 |
-
|
524 |
-
methods.push(methodName);
|
525 |
-
}
|
526 |
-
|
527 |
-
return methods;
|
528 |
-
}
|
529 |
-
|
530 |
-
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
531 |
-
var decoratedMethods = getMethods(DecoratorClass);
|
532 |
-
var superMethods = getMethods(SuperClass);
|
533 |
-
|
534 |
-
function DecoratedClass () {
|
535 |
-
var unshift = Array.prototype.unshift;
|
536 |
-
|
537 |
-
var argCount = DecoratorClass.prototype.constructor.length;
|
538 |
-
|
539 |
-
var calledConstructor = SuperClass.prototype.constructor;
|
540 |
-
|
541 |
-
if (argCount > 0) {
|
542 |
-
unshift.call(arguments, SuperClass.prototype.constructor);
|
543 |
-
|
544 |
-
calledConstructor = DecoratorClass.prototype.constructor;
|
545 |
-
}
|
546 |
-
|
547 |
-
calledConstructor.apply(this, arguments);
|
548 |
-
}
|
549 |
-
|
550 |
-
DecoratorClass.displayName = SuperClass.displayName;
|
551 |
-
|
552 |
-
function ctr () {
|
553 |
-
this.constructor = DecoratedClass;
|
554 |
-
}
|
555 |
-
|
556 |
-
DecoratedClass.prototype = new ctr();
|
557 |
-
|
558 |
-
for (var m = 0; m < superMethods.length; m++) {
|
559 |
-
var superMethod = superMethods[m];
|
560 |
-
|
561 |
-
DecoratedClass.prototype[superMethod] =
|
562 |
-
SuperClass.prototype[superMethod];
|
563 |
-
}
|
564 |
-
|
565 |
-
var calledMethod = function (methodName) {
|
566 |
-
// Stub out the original method if it's not decorating an actual method
|
567 |
-
var originalMethod = function () {};
|
568 |
-
|
569 |
-
if (methodName in DecoratedClass.prototype) {
|
570 |
-
originalMethod = DecoratedClass.prototype[methodName];
|
571 |
-
}
|
572 |
-
|
573 |
-
var decoratedMethod = DecoratorClass.prototype[methodName];
|
574 |
-
|
575 |
-
return function () {
|
576 |
-
var unshift = Array.prototype.unshift;
|
577 |
-
|
578 |
-
unshift.call(arguments, originalMethod);
|
579 |
-
|
580 |
-
return decoratedMethod.apply(this, arguments);
|
581 |
-
};
|
582 |
-
};
|
583 |
-
|
584 |
-
for (var d = 0; d < decoratedMethods.length; d++) {
|
585 |
-
var decoratedMethod = decoratedMethods[d];
|
586 |
-
|
587 |
-
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
588 |
-
}
|
589 |
-
|
590 |
-
return DecoratedClass;
|
591 |
-
};
|
592 |
-
|
593 |
-
var Observable = function () {
|
594 |
-
this.listeners = {};
|
595 |
-
};
|
596 |
-
|
597 |
-
Observable.prototype.on = function (event, callback) {
|
598 |
-
this.listeners = this.listeners || {};
|
599 |
-
|
600 |
-
if (event in this.listeners) {
|
601 |
-
this.listeners[event].push(callback);
|
602 |
-
} else {
|
603 |
-
this.listeners[event] = [callback];
|
604 |
-
}
|
605 |
-
};
|
606 |
-
|
607 |
-
Observable.prototype.trigger = function (event) {
|
608 |
-
var slice = Array.prototype.slice;
|
609 |
-
var params = slice.call(arguments, 1);
|
610 |
-
|
611 |
-
this.listeners = this.listeners || {};
|
612 |
-
|
613 |
-
// Params should always come in as an array
|
614 |
-
if (params == null) {
|
615 |
-
params = [];
|
616 |
-
}
|
617 |
-
|
618 |
-
// If there are no arguments to the event, use a temporary object
|
619 |
-
if (params.length === 0) {
|
620 |
-
params.push({});
|
621 |
-
}
|
622 |
-
|
623 |
-
// Set the `_type` of the first object to the event
|
624 |
-
params[0]._type = event;
|
625 |
-
|
626 |
-
if (event in this.listeners) {
|
627 |
-
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
628 |
-
}
|
629 |
-
|
630 |
-
if ('*' in this.listeners) {
|
631 |
-
this.invoke(this.listeners['*'], arguments);
|
632 |
-
}
|
633 |
-
};
|
634 |
-
|
635 |
-
Observable.prototype.invoke = function (listeners, params) {
|
636 |
-
for (var i = 0, len = listeners.length; i < len; i++) {
|
637 |
-
listeners[i].apply(this, params);
|
638 |
-
}
|
639 |
-
};
|
640 |
-
|
641 |
-
Utils.Observable = Observable;
|
642 |
-
|
643 |
-
Utils.generateChars = function (length) {
|
644 |
-
var chars = '';
|
645 |
-
|
646 |
-
for (var i = 0; i < length; i++) {
|
647 |
-
var randomChar = Math.floor(Math.random() * 36);
|
648 |
-
chars += randomChar.toString(36);
|
649 |
-
}
|
650 |
-
|
651 |
-
return chars;
|
652 |
-
};
|
653 |
-
|
654 |
-
Utils.bind = function (func, context) {
|
655 |
-
return function () {
|
656 |
-
func.apply(context, arguments);
|
657 |
-
};
|
658 |
-
};
|
659 |
-
|
660 |
-
Utils._convertData = function (data) {
|
661 |
-
for (var originalKey in data) {
|
662 |
-
var keys = originalKey.split('-');
|
663 |
-
|
664 |
-
var dataLevel = data;
|
665 |
-
|
666 |
-
if (keys.length === 1) {
|
667 |
-
continue;
|
668 |
-
}
|
669 |
-
|
670 |
-
for (var k = 0; k < keys.length; k++) {
|
671 |
-
var key = keys[k];
|
672 |
-
|
673 |
-
// Lowercase the first letter
|
674 |
-
// By default, dash-separated becomes camelCase
|
675 |
-
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
676 |
-
|
677 |
-
if (!(key in dataLevel)) {
|
678 |
-
dataLevel[key] = {};
|
679 |
-
}
|
680 |
-
|
681 |
-
if (k == keys.length - 1) {
|
682 |
-
dataLevel[key] = data[originalKey];
|
683 |
-
}
|
684 |
-
|
685 |
-
dataLevel = dataLevel[key];
|
686 |
-
}
|
687 |
-
|
688 |
-
delete data[originalKey];
|
689 |
-
}
|
690 |
-
|
691 |
-
return data;
|
692 |
-
};
|
693 |
-
|
694 |
-
Utils.hasScroll = function (index, el) {
|
695 |
-
// Adapted from the function created by @ShadowScripter
|
696 |
-
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
697 |
-
// The original code can be found at
|
698 |
-
// http://codereview.stackexchange.com/q/13338
|
699 |
-
// and was designed to be used with the Sizzle selector engine.
|
700 |
-
|
701 |
-
var $el = $(el);
|
702 |
-
var overflowX = el.style.overflowX;
|
703 |
-
var overflowY = el.style.overflowY;
|
704 |
-
|
705 |
-
//Check both x and y declarations
|
706 |
-
if (overflowX === overflowY &&
|
707 |
-
(overflowY === 'hidden' || overflowY === 'visible')) {
|
708 |
-
return false;
|
709 |
-
}
|
710 |
-
|
711 |
-
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
712 |
-
return true;
|
713 |
-
}
|
714 |
-
|
715 |
-
return ($el.innerHeight() < el.scrollHeight ||
|
716 |
-
$el.innerWidth() < el.scrollWidth);
|
717 |
-
};
|
718 |
-
|
719 |
-
Utils.escapeMarkup = function (markup) {
|
720 |
-
var replaceMap = {
|
721 |
-
'\\': '\',
|
722 |
-
'&': '&',
|
723 |
-
'<': '<',
|
724 |
-
'>': '>',
|
725 |
-
'"': '"',
|
726 |
-
'\'': ''',
|
727 |
-
'/': '/'
|
728 |
-
};
|
729 |
-
|
730 |
-
// Do not try to escape the markup if it's not a string
|
731 |
-
if (typeof markup !== 'string') {
|
732 |
-
return markup;
|
733 |
-
}
|
734 |
-
|
735 |
-
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
736 |
-
return replaceMap[match];
|
737 |
-
});
|
738 |
-
};
|
739 |
-
|
740 |
-
// Append an array of jQuery nodes to a given element.
|
741 |
-
Utils.appendMany = function ($element, $nodes) {
|
742 |
-
// jQuery 1.7.x does not support $.fn.append() with an array
|
743 |
-
// Fall back to a jQuery object collection using $.fn.add()
|
744 |
-
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
745 |
-
var $jqNodes = $();
|
746 |
-
|
747 |
-
$.map($nodes, function (node) {
|
748 |
-
$jqNodes = $jqNodes.add(node);
|
749 |
-
});
|
750 |
-
|
751 |
-
$nodes = $jqNodes;
|
752 |
-
}
|
753 |
-
|
754 |
-
$element.append($nodes);
|
755 |
-
};
|
756 |
-
|
757 |
-
return Utils;
|
758 |
-
});
|
759 |
-
|
760 |
-
S2.define('select2/results',[
|
761 |
-
'jquery',
|
762 |
-
'./utils'
|
763 |
-
], function ($, Utils) {
|
764 |
-
function Results ($element, options, dataAdapter) {
|
765 |
-
this.$element = $element;
|
766 |
-
this.data = dataAdapter;
|
767 |
-
this.options = options;
|
768 |
-
|
769 |
-
Results.__super__.constructor.call(this);
|
770 |
-
}
|
771 |
-
|
772 |
-
Utils.Extend(Results, Utils.Observable);
|
773 |
-
|
774 |
-
Results.prototype.render = function () {
|
775 |
-
var $results = $(
|
776 |
-
'<ul class="select2-results__options" role="tree"></ul>'
|
777 |
-
);
|
778 |
-
|
779 |
-
if (this.options.get('multiple')) {
|
780 |
-
$results.attr('aria-multiselectable', 'true');
|
781 |
-
}
|
782 |
-
|
783 |
-
this.$results = $results;
|
784 |
-
|
785 |
-
return $results;
|
786 |
-
};
|
787 |
-
|
788 |
-
Results.prototype.clear = function () {
|
789 |
-
this.$results.empty();
|
790 |
-
};
|
791 |
-
|
792 |
-
Results.prototype.displayMessage = function (params) {
|
793 |
-
var escapeMarkup = this.options.get('escapeMarkup');
|
794 |
-
|
795 |
-
this.clear();
|
796 |
-
this.hideLoading();
|
797 |
-
|
798 |
-
var $message = $(
|
799 |
-
'<li role="treeitem" aria-live="assertive"' +
|
800 |
-
' class="select2-results__option"></li>'
|
801 |
-
);
|
802 |
-
|
803 |
-
var message = this.options.get('translations').get(params.message);
|
804 |
-
|
805 |
-
$message.append(
|
806 |
-
escapeMarkup(
|
807 |
-
message(params.args)
|
808 |
-
)
|
809 |
-
);
|
810 |
-
|
811 |
-
$message[0].className += ' select2-results__message';
|
812 |
-
|
813 |
-
this.$results.append($message);
|
814 |
-
};
|
815 |
-
|
816 |
-
Results.prototype.hideMessages = function () {
|
817 |
-
this.$results.find('.select2-results__message').remove();
|
818 |
-
};
|
819 |
-
|
820 |
-
Results.prototype.append = function (data) {
|
821 |
-
this.hideLoading();
|
822 |
-
|
823 |
-
var $options = [];
|
824 |
-
|
825 |
-
if (data.results == null || data.results.length === 0) {
|
826 |
-
if (this.$results.children().length === 0) {
|
827 |
-
this.trigger('results:message', {
|
828 |
-
message: 'noResults'
|
829 |
-
});
|
830 |
-
}
|
831 |
-
|
832 |
-
return;
|
833 |
-
}
|
834 |
-
|
835 |
-
data.results = this.sort(data.results);
|
836 |
-
|
837 |
-
for (var d = 0; d < data.results.length; d++) {
|
838 |
-
var item = data.results[d];
|
839 |
-
|
840 |
-
var $option = this.option(item);
|
841 |
-
|
842 |
-
$options.push($option);
|
843 |
-
}
|
844 |
-
|
845 |
-
this.$results.append($options);
|
846 |
-
};
|
847 |
-
|
848 |
-
Results.prototype.position = function ($results, $dropdown) {
|
849 |
-
var $resultsContainer = $dropdown.find('.select2-results');
|
850 |
-
$resultsContainer.append($results);
|
851 |
-
};
|
852 |
-
|
853 |
-
Results.prototype.sort = function (data) {
|
854 |
-
var sorter = this.options.get('sorter');
|
855 |
-
|
856 |
-
return sorter(data);
|
857 |
-
};
|
858 |
-
|
859 |
-
Results.prototype.highlightFirstItem = function () {
|
860 |
-
var $options = this.$results
|
861 |
-
.find('.select2-results__option[aria-selected]');
|
862 |
-
|
863 |
-
var $selected = $options.filter('[aria-selected=true]');
|
864 |
-
|
865 |
-
// Check if there are any selected options
|
866 |
-
if ($selected.length > 0) {
|
867 |
-
// If there are selected options, highlight the first
|
868 |
-
$selected.first().trigger('mouseenter');
|
869 |
-
} else {
|
870 |
-
// If there are no selected options, highlight the first option
|
871 |
-
// in the dropdown
|
872 |
-
$options.first().trigger('mouseenter');
|
873 |
-
}
|
874 |
-
|
875 |
-
this.ensureHighlightVisible();
|
876 |
-
};
|
877 |
-
|
878 |
-
Results.prototype.setClasses = function () {
|
879 |
-
var self = this;
|
880 |
-
|
881 |
-
this.data.current(function (selected) {
|
882 |
-
var selectedIds = $.map(selected, function (s) {
|
883 |
-
return s.id.toString();
|
884 |
-
});
|
885 |
-
|
886 |
-
var $options = self.$results
|
887 |
-
.find('.select2-results__option[aria-selected]');
|
888 |
-
|
889 |
-
$options.each(function () {
|
890 |
-
var $option = $(this);
|
891 |
-
|
892 |
-
var item = $.data(this, 'data');
|
893 |
-
|
894 |
-
// id needs to be converted to a string when comparing
|
895 |
-
var id = '' + item.id;
|
896 |
-
|
897 |
-
if ((item.element != null && item.element.selected) ||
|
898 |
-
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
899 |
-
$option.attr('aria-selected', 'true');
|
900 |
-
} else {
|
901 |
-
$option.attr('aria-selected', 'false');
|
902 |
-
}
|
903 |
-
});
|
904 |
-
|
905 |
-
});
|
906 |
-
};
|
907 |
-
|
908 |
-
Results.prototype.showLoading = function (params) {
|
909 |
-
this.hideLoading();
|
910 |
-
|
911 |
-
var loadingMore = this.options.get('translations').get('searching');
|
912 |
-
|
913 |
-
var loading = {
|
914 |
-
disabled: true,
|
915 |
-
loading: true,
|
916 |
-
text: loadingMore(params)
|
917 |
-
};
|
918 |
-
var $loading = this.option(loading);
|
919 |
-
$loading.className += ' loading-results';
|
920 |
-
|
921 |
-
this.$results.prepend($loading);
|
922 |
-
};
|
923 |
-
|
924 |
-
Results.prototype.hideLoading = function () {
|
925 |
-
this.$results.find('.loading-results').remove();
|
926 |
-
};
|
927 |
-
|
928 |
-
Results.prototype.option = function (data) {
|
929 |
-
var option = document.createElement('li');
|
930 |
-
option.className = 'select2-results__option';
|
931 |
-
|
932 |
-
var attrs = {
|
933 |
-
'role': 'treeitem',
|
934 |
-
'aria-selected': 'false'
|
935 |
-
};
|
936 |
-
|
937 |
-
if (data.disabled) {
|
938 |
-
delete attrs['aria-selected'];
|
939 |
-
attrs['aria-disabled'] = 'true';
|
940 |
-
}
|
941 |
-
|
942 |
-
if (data.id == null) {
|
943 |
-
delete attrs['aria-selected'];
|
944 |
-
}
|
945 |
-
|
946 |
-
if (data._resultId != null) {
|
947 |
-
option.id = data._resultId;
|
948 |
-
}
|
949 |
-
|
950 |
-
if (data.title) {
|
951 |
-
option.title = data.title;
|
952 |
-
}
|
953 |
-
|
954 |
-
if (data.children) {
|
955 |
-
attrs.role = 'group';
|
956 |
-
attrs['aria-label'] = data.text;
|
957 |
-
delete attrs['aria-selected'];
|
958 |
-
}
|
959 |
-
|
960 |
-
for (var attr in attrs) {
|
961 |
-
var val = attrs[attr];
|
962 |
-
|
963 |
-
option.setAttribute(attr, val);
|
964 |
-
}
|
965 |
-
|
966 |
-
if (data.children) {
|
967 |
-
var $option = $(option);
|
968 |
-
|
969 |
-
var label = document.createElement('strong');
|
970 |
-
label.className = 'select2-results__group';
|
971 |
-
|
972 |
-
var $label = $(label);
|
973 |
-
this.template(data, label);
|
974 |
-
|
975 |
-
var $children = [];
|
976 |
-
|
977 |
-
for (var c = 0; c < data.children.length; c++) {
|
978 |
-
var child = data.children[c];
|
979 |
-
|
980 |
-
var $child = this.option(child);
|
981 |
-
|
982 |
-
$children.push($child);
|
983 |
-
}
|
984 |
-
|
985 |
-
var $childrenContainer = $('<ul></ul>', {
|
986 |
-
'class': 'select2-results__options select2-results__options--nested'
|
987 |
-
});
|
988 |
-
|
989 |
-
$childrenContainer.append($children);
|
990 |
-
|
991 |
-
$option.append(label);
|
992 |
-
$option.append($childrenContainer);
|
993 |
-
} else {
|
994 |
-
this.template(data, option);
|
995 |
-
}
|
996 |
-
|
997 |
-
$.data(option, 'data', data);
|
998 |
-
|
999 |
-
return option;
|
1000 |
-
};
|
1001 |
-
|
1002 |
-
Results.prototype.bind = function (container, $container) {
|
1003 |
-
var self = this;
|
1004 |
-
|
1005 |
-
var id = container.id + '-results';
|
1006 |
-
|
1007 |
-
this.$results.attr('id', id);
|
1008 |
-
|
1009 |
-
container.on('results:all', function (params) {
|
1010 |
-
self.clear();
|
1011 |
-
self.append(params.data);
|
1012 |
-
|
1013 |
-
if (container.isOpen()) {
|
1014 |
-
self.setClasses();
|
1015 |
-
self.highlightFirstItem();
|
1016 |
-
}
|
1017 |
-
});
|
1018 |
-
|
1019 |
-
container.on('results:append', function (params) {
|
1020 |
-
self.append(params.data);
|
1021 |
-
|
1022 |
-
if (container.isOpen()) {
|
1023 |
-
self.setClasses();
|
1024 |
-
}
|
1025 |
-
});
|
1026 |
-
|
1027 |
-
container.on('query', function (params) {
|
1028 |
-
self.hideMessages();
|
1029 |
-
self.showLoading(params);
|
1030 |
-
});
|
1031 |
-
|
1032 |
-
container.on('select', function () {
|
1033 |
-
if (!container.isOpen()) {
|
1034 |
-
return;
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
self.setClasses();
|
1038 |
-
self.highlightFirstItem();
|
1039 |
-
});
|
1040 |
-
|
1041 |
-
container.on('unselect', function () {
|
1042 |
-
if (!container.isOpen()) {
|
1043 |
-
return;
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
self.setClasses();
|
1047 |
-
self.highlightFirstItem();
|
1048 |
-
});
|
1049 |
-
|
1050 |
-
container.on('open', function () {
|
1051 |
-
// When the dropdown is open, aria-expended="true"
|
1052 |
-
self.$results.attr('aria-expanded', 'true');
|
1053 |
-
self.$results.attr('aria-hidden', 'false');
|
1054 |
-
|
1055 |
-
self.setClasses();
|
1056 |
-
self.ensureHighlightVisible();
|
1057 |
-
});
|
1058 |
-
|
1059 |
-
container.on('close', function () {
|
1060 |
-
// When the dropdown is closed, aria-expended="false"
|
1061 |
-
self.$results.attr('aria-expanded', 'false');
|
1062 |
-
self.$results.attr('aria-hidden', 'true');
|
1063 |
-
self.$results.removeAttr('aria-activedescendant');
|
1064 |
-
});
|
1065 |
-
|
1066 |
-
container.on('results:toggle', function () {
|
1067 |
-
var $highlighted = self.getHighlightedResults();
|
1068 |
-
|
1069 |
-
if ($highlighted.length === 0) {
|
1070 |
-
return;
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
$highlighted.trigger('mouseup');
|
1074 |
-
});
|
1075 |
-
|
1076 |
-
container.on('results:select', function () {
|
1077 |
-
var $highlighted = self.getHighlightedResults();
|
1078 |
-
|
1079 |
-
if ($highlighted.length === 0) {
|
1080 |
-
return;
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
var data = $highlighted.data('data');
|
1084 |
-
|
1085 |
-
if ($highlighted.attr('aria-selected') == 'true') {
|
1086 |
-
self.trigger('close', {});
|
1087 |
-
} else {
|
1088 |
-
self.trigger('select', {
|
1089 |
-
data: data
|
1090 |
-
});
|
1091 |
-
}
|
1092 |
-
});
|
1093 |
-
|
1094 |
-
container.on('results:previous', function () {
|
1095 |
-
var $highlighted = self.getHighlightedResults();
|
1096 |
-
|
1097 |
-
var $options = self.$results.find('[aria-selected]');
|
1098 |
-
|
1099 |
-
var currentIndex = $options.index($highlighted);
|
1100 |
-
|
1101 |
-
// If we are already at te top, don't move further
|
1102 |
-
if (currentIndex === 0) {
|
1103 |
-
return;
|
1104 |
-
}
|
1105 |
-
|
1106 |
-
var nextIndex = currentIndex - 1;
|
1107 |
-
|
1108 |
-
// If none are highlighted, highlight the first
|
1109 |
-
if ($highlighted.length === 0) {
|
1110 |
-
nextIndex = 0;
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
var $next = $options.eq(nextIndex);
|
1114 |
-
|
1115 |
-
$next.trigger('mouseenter');
|
1116 |
-
|
1117 |
-
var currentOffset = self.$results.offset().top;
|
1118 |
-
var nextTop = $next.offset().top;
|
1119 |
-
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
|
1120 |
-
|
1121 |
-
if (nextIndex === 0) {
|
1122 |
-
self.$results.scrollTop(0);
|
1123 |
-
} else if (nextTop - currentOffset < 0) {
|
1124 |
-
self.$results.scrollTop(nextOffset);
|
1125 |
-
}
|
1126 |
-
});
|
1127 |
-
|
1128 |
-
container.on('results:next', function () {
|
1129 |
-
var $highlighted = self.getHighlightedResults();
|
1130 |
-
|
1131 |
-
var $options = self.$results.find('[aria-selected]');
|
1132 |
-
|
1133 |
-
var currentIndex = $options.index($highlighted);
|
1134 |
-
|
1135 |
-
var nextIndex = currentIndex + 1;
|
1136 |
-
|
1137 |
-
// If we are at the last option, stay there
|
1138 |
-
if (nextIndex >= $options.length) {
|
1139 |
-
return;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
var $next = $options.eq(nextIndex);
|
1143 |
-
|
1144 |
-
$next.trigger('mouseenter');
|
1145 |
-
|
1146 |
-
var currentOffset = self.$results.offset().top +
|
1147 |
-
self.$results.outerHeight(false);
|
1148 |
-
var nextBottom = $next.offset().top + $next.outerHeight(false);
|
1149 |
-
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
|
1150 |
-
|
1151 |
-
if (nextIndex === 0) {
|
1152 |
-
self.$results.scrollTop(0);
|
1153 |
-
} else if (nextBottom > currentOffset) {
|
1154 |
-
self.$results.scrollTop(nextOffset);
|
1155 |
-
}
|
1156 |
-
});
|
1157 |
-
|
1158 |
-
container.on('results:focus', function (params) {
|
1159 |
-
params.element.addClass('select2-results__option--highlighted');
|
1160 |
-
});
|
1161 |
-
|
1162 |
-
container.on('results:message', function (params) {
|
1163 |
-
self.displayMessage(params);
|
1164 |
-
});
|
1165 |
-
|
1166 |
-
if ($.fn.mousewheel) {
|
1167 |
-
this.$results.on('mousewheel', function (e) {
|
1168 |
-
var top = self.$results.scrollTop();
|
1169 |
-
|
1170 |
-
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
|
1171 |
-
|
1172 |
-
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
|
1173 |
-
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
|
1174 |
-
|
1175 |
-
if (isAtTop) {
|
1176 |
-
self.$results.scrollTop(0);
|
1177 |
-
|
1178 |
-
e.preventDefault();
|
1179 |
-
e.stopPropagation();
|
1180 |
-
} else if (isAtBottom) {
|
1181 |
-
self.$results.scrollTop(
|
1182 |
-
self.$results.get(0).scrollHeight - self.$results.height()
|
1183 |
-
);
|
1184 |
-
|
1185 |
-
e.preventDefault();
|
1186 |
-
e.stopPropagation();
|
1187 |
-
}
|
1188 |
-
});
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
|
1192 |
-
function (evt) {
|
1193 |
-
var $this = $(this);
|
1194 |
-
|
1195 |
-
var data = $this.data('data');
|
1196 |
-
|
1197 |
-
if ($this.attr('aria-selected') === 'true') {
|
1198 |
-
if (self.options.get('multiple')) {
|
1199 |
-
self.trigger('unselect', {
|
1200 |
-
originalEvent: evt,
|
1201 |
-
data: data
|
1202 |
-
});
|
1203 |
-
} else {
|
1204 |
-
self.trigger('close', {});
|
1205 |
-
}
|
1206 |
-
|
1207 |
-
return;
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
self.trigger('select', {
|
1211 |
-
originalEvent: evt,
|
1212 |
-
data: data
|
1213 |
-
});
|
1214 |
-
});
|
1215 |
-
|
1216 |
-
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1217 |
-
function (evt) {
|
1218 |
-
var data = $(this).data('data');
|
1219 |
-
|
1220 |
-
self.getHighlightedResults()
|
1221 |
-
.removeClass('select2-results__option--highlighted');
|
1222 |
-
|
1223 |
-
self.trigger('results:focus', {
|
1224 |
-
data: data,
|
1225 |
-
element: $(this)
|
1226 |
-
});
|
1227 |
-
});
|
1228 |
-
};
|
1229 |
-
|
1230 |
-
Results.prototype.getHighlightedResults = function () {
|
1231 |
-
var $highlighted = this.$results
|
1232 |
-
.find('.select2-results__option--highlighted');
|
1233 |
-
|
1234 |
-
return $highlighted;
|
1235 |
-
};
|
1236 |
-
|
1237 |
-
Results.prototype.destroy = function () {
|
1238 |
-
this.$results.remove();
|
1239 |
-
};
|
1240 |
-
|
1241 |
-
Results.prototype.ensureHighlightVisible = function () {
|
1242 |
-
var $highlighted = this.getHighlightedResults();
|
1243 |
-
|
1244 |
-
if ($highlighted.length === 0) {
|
1245 |
-
return;
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
var $options = this.$results.find('[aria-selected]');
|
1249 |
-
|
1250 |
-
var currentIndex = $options.index($highlighted);
|
1251 |
-
|
1252 |
-
var currentOffset = this.$results.offset().top;
|
1253 |
-
var nextTop = $highlighted.offset().top;
|
1254 |
-
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
|
1255 |
-
|
1256 |
-
var offsetDelta = nextTop - currentOffset;
|
1257 |
-
nextOffset -= $highlighted.outerHeight(false) * 2;
|
1258 |
-
|
1259 |
-
if (currentIndex <= 2) {
|
1260 |
-
this.$results.scrollTop(0);
|
1261 |
-
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
|
1262 |
-
this.$results.scrollTop(nextOffset);
|
1263 |
-
}
|
1264 |
-
};
|
1265 |
-
|
1266 |
-
Results.prototype.template = function (result, container) {
|
1267 |
-
var template = this.options.get('templateResult');
|
1268 |
-
var escapeMarkup = this.options.get('escapeMarkup');
|
1269 |
-
|
1270 |
-
var content = template(result, container);
|
1271 |
-
|
1272 |
-
if (content == null) {
|
1273 |
-
container.style.display = 'none';
|
1274 |
-
} else if (typeof content === 'string') {
|
1275 |
-
container.innerHTML = escapeMarkup(content);
|
1276 |
-
} else {
|
1277 |
-
$(container).append(content);
|
1278 |
-
}
|
1279 |
-
};
|
1280 |
-
|
1281 |
-
return Results;
|
1282 |
-
});
|
1283 |
-
|
1284 |
-
S2.define('select2/keys',[
|
1285 |
-
|
1286 |
-
], function () {
|
1287 |
-
var KEYS = {
|
1288 |
-
BACKSPACE: 8,
|
1289 |
-
TAB: 9,
|
1290 |
-
ENTER: 13,
|
1291 |
-
SHIFT: 16,
|
1292 |
-
CTRL: 17,
|
1293 |
-
ALT: 18,
|
1294 |
-
ESC: 27,
|
1295 |
-
SPACE: 32,
|
1296 |
-
PAGE_UP: 33,
|
1297 |
-
PAGE_DOWN: 34,
|
1298 |
-
END: 35,
|
1299 |
-
HOME: 36,
|
1300 |
-
LEFT: 37,
|
1301 |
-
UP: 38,
|
1302 |
-
RIGHT: 39,
|
1303 |
-
DOWN: 40,
|
1304 |
-
DELETE: 46
|
1305 |
-
};
|
1306 |
-
|
1307 |
-
return KEYS;
|
1308 |
-
});
|
1309 |
-
|
1310 |
-
S2.define('select2/selection/base',[
|
1311 |
-
'jquery',
|
1312 |
-
'../utils',
|
1313 |
-
'../keys'
|
1314 |
-
], function ($, Utils, KEYS) {
|
1315 |
-
function BaseSelection ($element, options) {
|
1316 |
-
this.$element = $element;
|
1317 |
-
this.options = options;
|
1318 |
-
|
1319 |
-
BaseSelection.__super__.constructor.call(this);
|
1320 |
-
}
|
1321 |
-
|
1322 |
-
Utils.Extend(BaseSelection, Utils.Observable);
|
1323 |
-
|
1324 |
-
BaseSelection.prototype.render = function () {
|
1325 |
-
var $selection = $(
|
1326 |
-
'<span class="select2-selection" role="combobox" ' +
|
1327 |
-
' aria-haspopup="true" aria-expanded="false">' +
|
1328 |
-
'</span>'
|
1329 |
-
);
|
1330 |
-
|
1331 |
-
this._tabindex = 0;
|
1332 |
-
|
1333 |
-
if (this.$element.data('old-tabindex') != null) {
|
1334 |
-
this._tabindex = this.$element.data('old-tabindex');
|
1335 |
-
} else if (this.$element.attr('tabindex') != null) {
|
1336 |
-
this._tabindex = this.$element.attr('tabindex');
|
1337 |
-
}
|
1338 |
-
|
1339 |
-
$selection.attr('title', this.$element.attr('title'));
|
1340 |
-
$selection.attr('tabindex', this._tabindex);
|
1341 |
-
|
1342 |
-
this.$selection = $selection;
|
1343 |
-
|
1344 |
-
return $selection;
|
1345 |
-
};
|
1346 |
-
|
1347 |
-
BaseSelection.prototype.bind = function (container, $container) {
|
1348 |
-
var self = this;
|
1349 |
-
|
1350 |
-
var id = container.id + '-container';
|
1351 |
-
var resultsId = container.id + '-results';
|
1352 |
-
|
1353 |
-
this.container = container;
|
1354 |
-
|
1355 |
-
this.$selection.on('focus', function (evt) {
|
1356 |
-
self.trigger('focus', evt);
|
1357 |
-
});
|
1358 |
-
|
1359 |
-
this.$selection.on('blur', function (evt) {
|
1360 |
-
self._handleBlur(evt);
|
1361 |
-
});
|
1362 |
-
|
1363 |
-
this.$selection.on('keydown', function (evt) {
|
1364 |
-
self.trigger('keypress', evt);
|
1365 |
-
|
1366 |
-
if (evt.which === KEYS.SPACE) {
|
1367 |
-
evt.preventDefault();
|
1368 |
-
}
|
1369 |
-
});
|
1370 |
-
|
1371 |
-
container.on('results:focus', function (params) {
|
1372 |
-
self.$selection.attr('aria-activedescendant', params.data._resultId);
|
1373 |
-
});
|
1374 |
-
|
1375 |
-
container.on('selection:update', function (params) {
|
1376 |
-
self.update(params.data);
|
1377 |
-
});
|
1378 |
-
|
1379 |
-
container.on('open', function () {
|
1380 |
-
// When the dropdown is open, aria-expanded="true"
|
1381 |
-
self.$selection.attr('aria-expanded', 'true');
|
1382 |
-
self.$selection.attr('aria-owns', resultsId);
|
1383 |
-
|
1384 |
-
self._attachCloseHandler(container);
|
1385 |
-
});
|
1386 |
-
|
1387 |
-
container.on('close', function () {
|
1388 |
-
// When the dropdown is closed, aria-expanded="false"
|
1389 |
-
self.$selection.attr('aria-expanded', 'false');
|
1390 |
-
self.$selection.removeAttr('aria-activedescendant');
|
1391 |
-
self.$selection.removeAttr('aria-owns');
|
1392 |
-
|
1393 |
-
self.$selection.focus();
|
1394 |
-
|
1395 |
-
self._detachCloseHandler(container);
|
1396 |
-
});
|
1397 |
-
|
1398 |
-
container.on('enable', function () {
|
1399 |
-
self.$selection.attr('tabindex', self._tabindex);
|
1400 |
-
});
|
1401 |
-
|
1402 |
-
container.on('disable', function () {
|
1403 |
-
self.$selection.attr('tabindex', '-1');
|
1404 |
-
});
|
1405 |
-
};
|
1406 |
-
|
1407 |
-
BaseSelection.prototype._handleBlur = function (evt) {
|
1408 |
-
var self = this;
|
1409 |
-
|
1410 |
-
// This needs to be delayed as the active element is the body when the tab
|
1411 |
-
// key is pressed, possibly along with others.
|
1412 |
-
window.setTimeout(function () {
|
1413 |
-
// Don't trigger `blur` if the focus is still in the selection
|
1414 |
-
if (
|
1415 |
-
(document.activeElement == self.$selection[0]) ||
|
1416 |
-
($.contains(self.$selection[0], document.activeElement))
|
1417 |
-
) {
|
1418 |
-
return;
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
self.trigger('blur', evt);
|
1422 |
-
}, 1);
|
1423 |
-
};
|
1424 |
-
|
1425 |
-
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1426 |
-
var self = this;
|
1427 |
-
|
1428 |
-
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1429 |
-
var $target = $(e.target);
|
1430 |
-
|
1431 |
-
var $select = $target.closest('.select2');
|
1432 |
-
|
1433 |
-
var $all = $('.select2.select2-container--open');
|
1434 |
-
|
1435 |
-
$all.each(function () {
|
1436 |
-
var $this = $(this);
|
1437 |
-
|
1438 |
-
if (this == $select[0]) {
|
1439 |
-
return;
|
1440 |
-
}
|
1441 |
-
|
1442 |
-
var $element = $this.data('element');
|
1443 |
-
|
1444 |
-
$element.select2('close');
|
1445 |
-
});
|
1446 |
-
});
|
1447 |
-
};
|
1448 |
-
|
1449 |
-
BaseSelection.prototype._detachCloseHandler = function (container) {
|
1450 |
-
$(document.body).off('mousedown.select2.' + container.id);
|
1451 |
-
};
|
1452 |
-
|
1453 |
-
BaseSelection.prototype.position = function ($selection, $container) {
|
1454 |
-
var $selectionContainer = $container.find('.selection');
|
1455 |
-
$selectionContainer.append($selection);
|
1456 |
-
};
|
1457 |
-
|
1458 |
-
BaseSelection.prototype.destroy = function () {
|
1459 |
-
this._detachCloseHandler(this.container);
|
1460 |
-
};
|
1461 |
-
|
1462 |
-
BaseSelection.prototype.update = function (data) {
|
1463 |
-
throw new Error('The `update` method must be defined in child classes.');
|
1464 |
-
};
|
1465 |
-
|
1466 |
-
return BaseSelection;
|
1467 |
-
});
|
1468 |
-
|
1469 |
-
S2.define('select2/selection/single',[
|
1470 |
-
'jquery',
|
1471 |
-
'./base',
|
1472 |
-
'../utils',
|
1473 |
-
'../keys'
|
1474 |
-
], function ($, BaseSelection, Utils, KEYS) {
|
1475 |
-
function SingleSelection () {
|
1476 |
-
SingleSelection.__super__.constructor.apply(this, arguments);
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
Utils.Extend(SingleSelection, BaseSelection);
|
1480 |
-
|
1481 |
-
SingleSelection.prototype.render = function () {
|
1482 |
-
var $selection = SingleSelection.__super__.render.call(this);
|
1483 |
-
|
1484 |
-
$selection.addClass('select2-selection--single');
|
1485 |
-
|
1486 |
-
$selection.html(
|
1487 |
-
'<span class="select2-selection__rendered"></span>' +
|
1488 |
-
'<span class="select2-selection__arrow" role="presentation">' +
|
1489 |
-
'<b role="presentation"></b>' +
|
1490 |
-
'</span>'
|
1491 |
-
);
|
1492 |
-
|
1493 |
-
return $selection;
|
1494 |
-
};
|
1495 |
-
|
1496 |
-
SingleSelection.prototype.bind = function (container, $container) {
|
1497 |
-
var self = this;
|
1498 |
-
|
1499 |
-
SingleSelection.__super__.bind.apply(this, arguments);
|
1500 |
-
|
1501 |
-
var id = container.id + '-container';
|
1502 |
-
|
1503 |
-
this.$selection.find('.select2-selection__rendered').attr('id', id);
|
1504 |
-
this.$selection.attr('aria-labelledby', id);
|
1505 |
-
|
1506 |
-
this.$selection.on('mousedown', function (evt) {
|
1507 |
-
// Only respond to left clicks
|
1508 |
-
if (evt.which !== 1) {
|
1509 |
-
return;
|
1510 |
-
}
|
1511 |
-
|
1512 |
-
self.trigger('toggle', {
|
1513 |
-
originalEvent: evt
|
1514 |
-
});
|
1515 |
-
});
|
1516 |
-
|
1517 |
-
this.$selection.on('focus', function (evt) {
|
1518 |
-
// User focuses on the container
|
1519 |
-
});
|
1520 |
-
|
1521 |
-
this.$selection.on('blur', function (evt) {
|
1522 |
-
// User exits the container
|
1523 |
-
});
|
1524 |
-
|
1525 |
-
container.on('focus', function (evt) {
|
1526 |
-
if (!container.isOpen()) {
|
1527 |
-
self.$selection.focus();
|
1528 |
-
}
|
1529 |
-
});
|
1530 |
-
|
1531 |
-
container.on('selection:update', function (params) {
|
1532 |
-
self.update(params.data);
|
1533 |
-
});
|
1534 |
-
};
|
1535 |
-
|
1536 |
-
SingleSelection.prototype.clear = function () {
|
1537 |
-
this.$selection.find('.select2-selection__rendered').empty();
|
1538 |
-
};
|
1539 |
-
|
1540 |
-
SingleSelection.prototype.display = function (data, container) {
|
1541 |
-
var template = this.options.get('templateSelection');
|
1542 |
-
var escapeMarkup = this.options.get('escapeMarkup');
|
1543 |
-
|
1544 |
-
return escapeMarkup(template(data, container));
|
1545 |
-
};
|
1546 |
-
|
1547 |
-
SingleSelection.prototype.selectionContainer = function () {
|
1548 |
-
return $('<span></span>');
|
1549 |
-
};
|
1550 |
-
|
1551 |
-
SingleSelection.prototype.update = function (data) {
|
1552 |
-
if (data.length === 0) {
|
1553 |
-
this.clear();
|
1554 |
-
return;
|
1555 |
-
}
|
1556 |
-
|
1557 |
-
var selection = data[0];
|
1558 |
-
|
1559 |
-
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1560 |
-
var formatted = this.display(selection, $rendered);
|
1561 |
-
|
1562 |
-
$rendered.empty().append(formatted);
|
1563 |
-
$rendered.prop('title', selection.title || selection.text);
|
1564 |
-
};
|
1565 |
-
|
1566 |
-
return SingleSelection;
|
1567 |
-
});
|
1568 |
-
|
1569 |
-
S2.define('select2/selection/multiple',[
|
1570 |
-
'jquery',
|
1571 |
-
'./base',
|
1572 |
-
'../utils'
|
1573 |
-
], function ($, BaseSelection, Utils) {
|
1574 |
-
function MultipleSelection ($element, options) {
|
1575 |
-
MultipleSelection.__super__.constructor.apply(this, arguments);
|
1576 |
-
}
|
1577 |
-
|
1578 |
-
Utils.Extend(MultipleSelection, BaseSelection);
|
1579 |
-
|
1580 |
-
MultipleSelection.prototype.render = function () {
|
1581 |
-
var $selection = MultipleSelection.__super__.render.call(this);
|
1582 |
-
|
1583 |
-
$selection.addClass('select2-selection--multiple');
|
1584 |
-
|
1585 |
-
$selection.html(
|
1586 |
-
'<ul class="select2-selection__rendered"></ul>'
|
1587 |
-
);
|
1588 |
-
|
1589 |
-
return $selection;
|
1590 |
-
};
|
1591 |
-
|
1592 |
-
MultipleSelection.prototype.bind = function (container, $container) {
|
1593 |
-
var self = this;
|
1594 |
-
|
1595 |
-
MultipleSelection.__super__.bind.apply(this, arguments);
|
1596 |
-
|
1597 |
-
this.$selection.on('click', function (evt) {
|
1598 |
-
self.trigger('toggle', {
|
1599 |
-
originalEvent: evt
|
1600 |
-
});
|
1601 |
-
});
|
1602 |
-
|
1603 |
-
this.$selection.on(
|
1604 |
-
'click',
|
1605 |
-
'.select2-selection__choice__remove',
|
1606 |
-
function (evt) {
|
1607 |
-
// Ignore the event if it is disabled
|
1608 |
-
if (self.options.get('disabled')) {
|
1609 |
-
return;
|
1610 |
-
}
|
1611 |
-
|
1612 |
-
var $remove = $(this);
|
1613 |
-
var $selection = $remove.parent();
|
1614 |
-
|
1615 |
-
var data = $selection.data('data');
|
1616 |
-
|
1617 |
-
self.trigger('unselect', {
|
1618 |
-
originalEvent: evt,
|
1619 |
-
data: data
|
1620 |
-
});
|
1621 |
-
}
|
1622 |
-
);
|
1623 |
-
};
|
1624 |
-
|
1625 |
-
MultipleSelection.prototype.clear = function () {
|
1626 |
-
this.$selection.find('.select2-selection__rendered').empty();
|
1627 |
-
};
|
1628 |
-
|
1629 |
-
MultipleSelection.prototype.display = function (data, container) {
|
1630 |
-
var template = this.options.get('templateSelection');
|
1631 |
-
var escapeMarkup = this.options.get('escapeMarkup');
|
1632 |
-
|
1633 |
-
return escapeMarkup(template(data, container));
|
1634 |
-
};
|
1635 |
-
|
1636 |
-
MultipleSelection.prototype.selectionContainer = function () {
|
1637 |
-
var $container = $(
|
1638 |
-
'<li class="select2-selection__choice">' +
|
1639 |
-
'<span class="select2-selection__choice__remove" role="presentation">' +
|
1640 |
-
'×' +
|
1641 |
-
'</span>' +
|
1642 |
-
'</li>'
|
1643 |
-
);
|
1644 |
-
|
1645 |
-
return $container;
|
1646 |
-
};
|
1647 |
-
|
1648 |
-
MultipleSelection.prototype.update = function (data) {
|
1649 |
-
this.clear();
|
1650 |
-
|
1651 |
-
if (data.length === 0) {
|
1652 |
-
return;
|
1653 |
-
}
|
1654 |
-
|
1655 |
-
var $selections = [];
|
1656 |
-
|
1657 |
-
for (var d = 0; d < data.length; d++) {
|
1658 |
-
var selection = data[d];
|
1659 |
-
|
1660 |
-
var $selection = this.selectionContainer();
|
1661 |
-
var formatted = this.display(selection, $selection);
|
1662 |
-
|
1663 |
-
$selection.append(formatted);
|
1664 |
-
$selection.prop('title', selection.title || selection.text);
|
1665 |
-
|
1666 |
-
$selection.data('data', selection);
|
1667 |
-
|
1668 |
-
$selections.push($selection);
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1672 |
-
|
1673 |
-
Utils.appendMany($rendered, $selections);
|
1674 |
-
};
|
1675 |
-
|
1676 |
-
return MultipleSelection;
|
1677 |
-
});
|
1678 |
-
|
1679 |
-
S2.define('select2/selection/placeholder',[
|
1680 |
-
'../utils'
|
1681 |
-
], function (Utils) {
|
1682 |
-
function Placeholder (decorated, $element, options) {
|
1683 |
-
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
1684 |
-
|
1685 |
-
decorated.call(this, $element, options);
|
1686 |
-
}
|
1687 |
-
|
1688 |
-
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
1689 |
-
if (typeof placeholder === 'string') {
|
1690 |
-
placeholder = {
|
1691 |
-
id: '',
|
1692 |
-
text: placeholder
|
1693 |
-
};
|
1694 |
-
}
|
1695 |
-
|
1696 |
-
return placeholder;
|
1697 |
-
};
|
1698 |
-
|
1699 |
-
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
|
1700 |
-
var $placeholder = this.selectionContainer();
|
1701 |
-
|
1702 |
-
$placeholder.html(this.display(placeholder));
|
1703 |
-
$placeholder.addClass('select2-selection__placeholder')
|
1704 |
-
.removeClass('select2-selection__choice');
|
1705 |
-
|
1706 |
-
return $placeholder;
|
1707 |
-
};
|
1708 |
-
|
1709 |
-
Placeholder.prototype.update = function (decorated, data) {
|
1710 |
-
var singlePlaceholder = (
|
1711 |
-
data.length == 1 && data[0].id != this.placeholder.id
|
1712 |
-
);
|
1713 |
-
var multipleSelections = data.length > 1;
|
1714 |
-
|
1715 |
-
if (multipleSelections || singlePlaceholder) {
|
1716 |
-
return decorated.call(this, data);
|
1717 |
-
}
|
1718 |
-
|
1719 |
-
this.clear();
|
1720 |
-
|
1721 |
-
var $placeholder = this.createPlaceholder(this.placeholder);
|
1722 |
-
|
1723 |
-
this.$selection.find('.select2-selection__rendered').append($placeholder);
|
1724 |
-
};
|
1725 |
-
|
1726 |
-
return Placeholder;
|
1727 |
-
});
|
1728 |
-
|
1729 |
-
S2.define('select2/selection/allowClear',[
|
1730 |
-
'jquery',
|
1731 |
-
'../keys'
|
1732 |
-
], function ($, KEYS) {
|
1733 |
-
function AllowClear () { }
|
1734 |
-
|
1735 |
-
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1736 |
-
var self = this;
|
1737 |
-
|
1738 |
-
decorated.call(this, container, $container);
|
1739 |
-
|
1740 |
-
if (this.placeholder == null) {
|
1741 |
-
if (this.options.get('debug') && window.console && console.error) {
|
1742 |
-
console.error(
|
1743 |
-
'Select2: The `allowClear` option should be used in combination ' +
|
1744 |
-
'with the `placeholder` option.'
|
1745 |
-
);
|
1746 |
-
}
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
this.$selection.on('mousedown', '.select2-selection__clear',
|
1750 |
-
function (evt) {
|
1751 |
-
self._handleClear(evt);
|
1752 |
-
});
|
1753 |
-
|
1754 |
-
container.on('keypress', function (evt) {
|
1755 |
-
self._handleKeyboardClear(evt, container);
|
1756 |
-
});
|
1757 |
-
};
|
1758 |
-
|
1759 |
-
AllowClear.prototype._handleClear = function (_, evt) {
|
1760 |
-
// Ignore the event if it is disabled
|
1761 |
-
if (this.options.get('disabled')) {
|
1762 |
-
return;
|
1763 |
-
}
|
1764 |
-
|
1765 |
-
var $clear = this.$selection.find('.select2-selection__clear');
|
1766 |
-
|
1767 |
-
// Ignore the event if nothing has been selected
|
1768 |
-
if ($clear.length === 0) {
|
1769 |
-
return;
|
1770 |
-
}
|
1771 |
-
|
1772 |
-
evt.stopPropagation();
|
1773 |
-
|
1774 |
-
var data = $clear.data('data');
|
1775 |
-
|
1776 |
-
for (var d = 0; d < data.length; d++) {
|
1777 |
-
var unselectData = {
|
1778 |
-
data: data[d]
|
1779 |
-
};
|
1780 |
-
|
1781 |
-
// Trigger the `unselect` event, so people can prevent it from being
|
1782 |
-
// cleared.
|
1783 |
-
this.trigger('unselect', unselectData);
|
1784 |
-
|
1785 |
-
// If the event was prevented, don't clear it out.
|
1786 |
-
if (unselectData.prevented) {
|
1787 |
-
return;
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
|
1791 |
-
this.$element.val(this.placeholder.id).trigger('change');
|
1792 |
-
|
1793 |
-
this.trigger('toggle', {});
|
1794 |
-
};
|
1795 |
-
|
1796 |
-
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
|
1797 |
-
if (container.isOpen()) {
|
1798 |
-
return;
|
1799 |
-
}
|
1800 |
-
|
1801 |
-
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
|
1802 |
-
this._handleClear(evt);
|
1803 |
-
}
|
1804 |
-
};
|
1805 |
-
|
1806 |
-
AllowClear.prototype.update = function (decorated, data) {
|
1807 |
-
decorated.call(this, data);
|
1808 |
-
|
1809 |
-
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
|
1810 |
-
data.length === 0) {
|
1811 |
-
return;
|
1812 |
-
}
|
1813 |
-
|
1814 |
-
var $remove = $(
|
1815 |
-
'<span class="select2-selection__clear">' +
|
1816 |
-
'×' +
|
1817 |
-
'</span>'
|
1818 |
-
);
|
1819 |
-
$remove.data('data', data);
|
1820 |
-
|
1821 |
-
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1822 |
-
};
|
1823 |
-
|
1824 |
-
return AllowClear;
|
1825 |
-
});
|
1826 |
-
|
1827 |
-
S2.define('select2/selection/search',[
|
1828 |
-
'jquery',
|
1829 |
-
'../utils',
|
1830 |
-
'../keys'
|
1831 |
-
], function ($, Utils, KEYS) {
|
1832 |
-
function Search (decorated, $element, options) {
|
1833 |
-
decorated.call(this, $element, options);
|
1834 |
-
}
|
1835 |
-
|
1836 |
-
Search.prototype.render = function (decorated) {
|
1837 |
-
var $search = $(
|
1838 |
-
'<li class="select2-search select2-search--inline">' +
|
1839 |
-
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1840 |
-
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
1841 |
-
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
1842 |
-
'</li>'
|
1843 |
-
);
|
1844 |
-
|
1845 |
-
this.$searchContainer = $search;
|
1846 |
-
this.$search = $search.find('input');
|
1847 |
-
|
1848 |
-
var $rendered = decorated.call(this);
|
1849 |
-
|
1850 |
-
this._transferTabIndex();
|
1851 |
-
|
1852 |
-
return $rendered;
|
1853 |
-
};
|
1854 |
-
|
1855 |
-
Search.prototype.bind = function (decorated, container, $container) {
|
1856 |
-
var self = this;
|
1857 |
-
|
1858 |
-
decorated.call(this, container, $container);
|
1859 |
-
|
1860 |
-
container.on('open', function () {
|
1861 |
-
self.$search.trigger('focus');
|
1862 |
-
});
|
1863 |
-
|
1864 |
-
container.on('close', function () {
|
1865 |
-
self.$search.val('');
|
1866 |
-
self.$search.removeAttr('aria-activedescendant');
|
1867 |
-
self.$search.trigger('focus');
|
1868 |
-
});
|
1869 |
-
|
1870 |
-
container.on('enable', function () {
|
1871 |
-
self.$search.prop('disabled', false);
|
1872 |
-
|
1873 |
-
self._transferTabIndex();
|
1874 |
-
});
|
1875 |
-
|
1876 |
-
container.on('disable', function () {
|
1877 |
-
self.$search.prop('disabled', true);
|
1878 |
-
});
|
1879 |
-
|
1880 |
-
container.on('focus', function (evt) {
|
1881 |
-
self.$search.trigger('focus');
|
1882 |
-
});
|
1883 |
-
|
1884 |
-
container.on('results:focus', function (params) {
|
1885 |
-
self.$search.attr('aria-activedescendant', params.id);
|
1886 |
-
});
|
1887 |
-
|
1888 |
-
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
1889 |
-
self.trigger('focus', evt);
|
1890 |
-
});
|
1891 |
-
|
1892 |
-
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
|
1893 |
-
self._handleBlur(evt);
|
1894 |
-
});
|
1895 |
-
|
1896 |
-
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
|
1897 |
-
evt.stopPropagation();
|
1898 |
-
|
1899 |
-
self.trigger('keypress', evt);
|
1900 |
-
|
1901 |
-
self._keyUpPrevented = evt.isDefaultPrevented();
|
1902 |
-
|
1903 |
-
var key = evt.which;
|
1904 |
-
|
1905 |
-
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
|
1906 |
-
var $previousChoice = self.$searchContainer
|
1907 |
-
.prev('.select2-selection__choice');
|
1908 |
-
|
1909 |
-
if ($previousChoice.length > 0) {
|
1910 |
-
var item = $previousChoice.data('data');
|
1911 |
-
|
1912 |
-
self.searchRemoveChoice(item);
|
1913 |
-
|
1914 |
-
evt.preventDefault();
|
1915 |
-
}
|
1916 |
-
}
|
1917 |
-
});
|
1918 |
-
|
1919 |
-
// Try to detect the IE version should the `documentMode` property that
|
1920 |
-
// is stored on the document. This is only implemented in IE and is
|
1921 |
-
// slightly cleaner than doing a user agent check.
|
1922 |
-
// This property is not available in Edge, but Edge also doesn't have
|
1923 |
-
// this bug.
|
1924 |
-
var msie = document.documentMode;
|
1925 |
-
var disableInputEvents = msie && msie <= 11;
|
1926 |
-
|
1927 |
-
// Workaround for browsers which do not support the `input` event
|
1928 |
-
// This will prevent double-triggering of events for browsers which support
|
1929 |
-
// both the `keyup` and `input` events.
|
1930 |
-
this.$selection.on(
|
1931 |
-
'input.searchcheck',
|
1932 |
-
'.select2-search--inline',
|
1933 |
-
function (evt) {
|
1934 |
-
// IE will trigger the `input` event when a placeholder is used on a
|
1935 |
-
// search box. To get around this issue, we are forced to ignore all
|
1936 |
-
// `input` events in IE and keep using `keyup`.
|
1937 |
-
if (disableInputEvents) {
|
1938 |
-
self.$selection.off('input.search input.searchcheck');
|
1939 |
-
return;
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
// Unbind the duplicated `keyup` event
|
1943 |
-
self.$selection.off('keyup.search');
|
1944 |
-
}
|
1945 |
-
);
|
1946 |
-
|
1947 |
-
this.$selection.on(
|
1948 |
-
'keyup.search input.search',
|
1949 |
-
'.select2-search--inline',
|
1950 |
-
function (evt) {
|
1951 |
-
// IE will trigger the `input` event when a placeholder is used on a
|
1952 |
-
// search box. To get around this issue, we are forced to ignore all
|
1953 |
-
// `input` events in IE and keep using `keyup`.
|
1954 |
-
if (disableInputEvents && evt.type === 'input') {
|
1955 |
-
self.$selection.off('input.search input.searchcheck');
|
1956 |
-
return;
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
var key = evt.which;
|
1960 |
-
|
1961 |
-
// We can freely ignore events from modifier keys
|
1962 |
-
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
|
1963 |
-
return;
|
1964 |
-
}
|
1965 |
-
|
1966 |
-
// Tabbing will be handled during the `keydown` phase
|
1967 |
-
if (key == KEYS.TAB) {
|
1968 |
-
return;
|
1969 |
-
}
|
1970 |
-
|
1971 |
-
self.handleSearch(evt);
|
1972 |
-
}
|
1973 |
-
);
|
1974 |
-
};
|
1975 |
-
|
1976 |
-
/**
|
1977 |
-
* This method will transfer the tabindex attribute from the rendered
|
1978 |
-
* selection to the search box. This allows for the search box to be used as
|
1979 |
-
* the primary focus instead of the selection container.
|
1980 |
-
*
|
1981 |
-
* @private
|
1982 |
-
*/
|
1983 |
-
Search.prototype._transferTabIndex = function (decorated) {
|
1984 |
-
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
|
1985 |
-
this.$selection.attr('tabindex', '-1');
|
1986 |
-
};
|
1987 |
-
|
1988 |
-
Search.prototype.createPlaceholder = function (decorated, placeholder) {
|
1989 |
-
this.$search.attr('placeholder', placeholder.text);
|
1990 |
-
};
|
1991 |
-
|
1992 |
-
Search.prototype.update = function (decorated, data) {
|
1993 |
-
var searchHadFocus = this.$search[0] == document.activeElement;
|
1994 |
-
|
1995 |
-
this.$search.attr('placeholder', '');
|
1996 |
-
|
1997 |
-
decorated.call(this, data);
|
1998 |
-
|
1999 |
-
this.$selection.find('.select2-selection__rendered')
|
2000 |
-
.append(this.$searchContainer);
|
2001 |
-
|
2002 |
-
this.resizeSearch();
|
2003 |
-
if (searchHadFocus) {
|
2004 |
-
this.$search.focus();
|
2005 |
-
}
|
2006 |
-
};
|
2007 |
-
|
2008 |
-
Search.prototype.handleSearch = function () {
|
2009 |
-
this.resizeSearch();
|
2010 |
-
|
2011 |
-
if (!this._keyUpPrevented) {
|
2012 |
-
var input = this.$search.val();
|
2013 |
-
|
2014 |
-
this.trigger('query', {
|
2015 |
-
term: input
|
2016 |
-
});
|
2017 |
-
}
|
2018 |
-
|
2019 |
-
this._keyUpPrevented = false;
|
2020 |
-
};
|
2021 |
-
|
2022 |
-
Search.prototype.searchRemoveChoice = function (decorated, item) {
|
2023 |
-
this.trigger('unselect', {
|
2024 |
-
data: item
|
2025 |
-
});
|
2026 |
-
|
2027 |
-
this.$search.val(item.text);
|
2028 |
-
this.handleSearch();
|
2029 |
-
};
|
2030 |
-
|
2031 |
-
Search.prototype.resizeSearch = function () {
|
2032 |
-
this.$search.css('width', '25px');
|
2033 |
-
|
2034 |
-
var width = '';
|
2035 |
-
|
2036 |
-
if (this.$search.attr('placeholder') !== '') {
|
2037 |
-
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
2038 |
-
} else {
|
2039 |
-
var minimumWidth = this.$search.val().length + 1;
|
2040 |
-
|
2041 |
-
width = (minimumWidth * 0.75) + 'em';
|
2042 |
-
}
|
2043 |
-
|
2044 |
-
this.$search.css('width', width);
|
2045 |
-
};
|
2046 |
-
|
2047 |
-
return Search;
|
2048 |
-
});
|
2049 |
-
|
2050 |
-
S2.define('select2/selection/eventRelay',[
|
2051 |
-
'jquery'
|
2052 |
-
], function ($) {
|
2053 |
-
function EventRelay () { }
|
2054 |
-
|
2055 |
-
EventRelay.prototype.bind = function (decorated, container, $container) {
|
2056 |
-
var self = this;
|
2057 |
-
var relayEvents = [
|
2058 |
-
'open', 'opening',
|
2059 |
-
'close', 'closing',
|
2060 |
-
'select', 'selecting',
|
2061 |
-
'unselect', 'unselecting'
|
2062 |
-
];
|
2063 |
-
|
2064 |
-
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
|
2065 |
-
|
2066 |
-
decorated.call(this, container, $container);
|
2067 |
-
|
2068 |
-
container.on('*', function (name, params) {
|
2069 |
-
// Ignore events that should not be relayed
|
2070 |
-
if ($.inArray(name, relayEvents) === -1) {
|
2071 |
-
return;
|
2072 |
-
}
|
2073 |
-
|
2074 |
-
// The parameters should always be an object
|
2075 |
-
params = params || {};
|
2076 |
-
|
2077 |
-
// Generate the jQuery event for the Select2 event
|
2078 |
-
var evt = $.Event('select2:' + name, {
|
2079 |
-
params: params
|
2080 |
-
});
|
2081 |
-
|
2082 |
-
self.$element.trigger(evt);
|
2083 |
-
|
2084 |
-
// Only handle preventable events if it was one
|
2085 |
-
if ($.inArray(name, preventableEvents) === -1) {
|
2086 |
-
return;
|
2087 |
-
}
|
2088 |
-
|
2089 |
-
params.prevented = evt.isDefaultPrevented();
|
2090 |
-
});
|
2091 |
-
};
|
2092 |
-
|
2093 |
-
return EventRelay;
|
2094 |
-
});
|
2095 |
-
|
2096 |
-
S2.define('select2/translation',[
|
2097 |
-
'jquery',
|
2098 |
-
'require'
|
2099 |
-
], function ($, require) {
|
2100 |
-
function Translation (dict) {
|
2101 |
-
this.dict = dict || {};
|
2102 |
-
}
|
2103 |
-
|
2104 |
-
Translation.prototype.all = function () {
|
2105 |
-
return this.dict;
|
2106 |
-
};
|
2107 |
-
|
2108 |
-
Translation.prototype.get = function (key) {
|
2109 |
-
return this.dict[key];
|
2110 |
-
};
|
2111 |
-
|
2112 |
-
Translation.prototype.extend = function (translation) {
|
2113 |
-
this.dict = $.extend({}, translation.all(), this.dict);
|
2114 |
-
};
|
2115 |
-
|
2116 |
-
// Static functions
|
2117 |
-
|
2118 |
-
Translation._cache = {};
|
2119 |
-
|
2120 |
-
Translation.loadPath = function (path) {
|
2121 |
-
if (!(path in Translation._cache)) {
|
2122 |
-
var translations = require(path);
|
2123 |
-
|
2124 |
-
Translation._cache[path] = translations;
|
2125 |
-
}
|
2126 |
-
|
2127 |
-
return new Translation(Translation._cache[path]);
|
2128 |
-
};
|
2129 |
-
|
2130 |
-
return Translation;
|
2131 |
-
});
|
2132 |
-
|
2133 |
-
S2.define('select2/diacritics',[
|
2134 |
-
|
2135 |
-
], function () {
|
2136 |
-
var diacritics = {
|
2137 |
-
'\u24B6': 'A',
|
2138 |
-
'\uFF21': 'A',
|
2139 |
-
'\u00C0': 'A',
|
2140 |
-
'\u00C1': 'A',
|
2141 |
-
'\u00C2': 'A',
|
2142 |
-
'\u1EA6': 'A',
|
2143 |
-
'\u1EA4': 'A',
|
2144 |
-
'\u1EAA': 'A',
|
2145 |
-
'\u1EA8': 'A',
|
2146 |
-
'\u00C3': 'A',
|
2147 |
-
'\u0100': 'A',
|
2148 |
-
'\u0102': 'A',
|
2149 |
-
'\u1EB0': 'A',
|
2150 |
-
'\u1EAE': 'A',
|
2151 |
-
'\u1EB4': 'A',
|
2152 |
-
'\u1EB2': 'A',
|
2153 |
-
'\u0226': 'A',
|
2154 |
-
'\u01E0': 'A',
|
2155 |
-
'\u00C4': 'A',
|
2156 |
-
'\u01DE': 'A',
|
2157 |
-
'\u1EA2': 'A',
|
2158 |
-
'\u00C5': 'A',
|
2159 |
-
'\u01FA': 'A',
|
2160 |
-
'\u01CD': 'A',
|
2161 |
-
'\u0200': 'A',
|
2162 |
-
'\u0202': 'A',
|
2163 |
-
'\u1EA0': 'A',
|
2164 |
-
'\u1EAC': 'A',
|
2165 |
-
'\u1EB6': 'A',
|
2166 |
-
'\u1E00': 'A',
|
2167 |
-
'\u0104': 'A',
|
2168 |
-
'\u023A': 'A',
|
2169 |
-
'\u2C6F': 'A',
|
2170 |
-
'\uA732': 'AA',
|
2171 |
-
'\u00C6': 'AE',
|
2172 |
-
'\u01FC': 'AE',
|
2173 |
-
'\u01E2': 'AE',
|
2174 |
-
'\uA734': 'AO',
|
2175 |
-
'\uA736': 'AU',
|
2176 |
-
'\uA738': 'AV',
|
2177 |
-
'\uA73A': 'AV',
|
2178 |
-
'\uA73C': 'AY',
|
2179 |
-
'\u24B7': 'B',
|
2180 |
-
'\uFF22': 'B',
|
2181 |
-
'\u1E02': 'B',
|
2182 |
-
'\u1E04': 'B',
|
2183 |
-
'\u1E06': 'B',
|
2184 |
-
'\u0243': 'B',
|
2185 |
-
'\u0182': 'B',
|
2186 |
-
'\u0181': 'B',
|
2187 |
-
'\u24B8': 'C',
|
2188 |
-
'\uFF23': 'C',
|
2189 |
-
'\u0106': 'C',
|
2190 |
-
'\u0108': 'C',
|
2191 |
-
'\u010A': 'C',
|
2192 |
-
'\u010C': 'C',
|
2193 |
-
'\u00C7': 'C',
|
2194 |
-
'\u1E08': 'C',
|
2195 |
-
'\u0187': 'C',
|
2196 |
-
'\u023B': 'C',
|
2197 |
-
'\uA73E': 'C',
|
2198 |
-
'\u24B9': 'D',
|
2199 |
-
'\uFF24': 'D',
|
2200 |
-
'\u1E0A': 'D',
|
2201 |
-
'\u010E': 'D',
|
2202 |
-
'\u1E0C': 'D',
|
2203 |
-
'\u1E10': 'D',
|
2204 |
-
'\u1E12': 'D',
|
2205 |
-
'\u1E0E': 'D',
|
2206 |
-
'\u0110': 'D',
|
2207 |
-
'\u018B': 'D',
|
2208 |
-
'\u018A': 'D',
|
2209 |
-
'\u0189': 'D',
|
2210 |
-
'\uA779': 'D',
|
2211 |
-
'\u01F1': 'DZ',
|
2212 |
-
'\u01C4': 'DZ',
|
2213 |
-
'\u01F2': 'Dz',
|
2214 |
-
'\u01C5': 'Dz',
|
2215 |
-
'\u24BA': 'E',
|
2216 |
-
'\uFF25': 'E',
|
2217 |
-
'\u00C8': 'E',
|
2218 |
-
'\u00C9': 'E',
|
2219 |
-
'\u00CA': 'E',
|
2220 |
-
'\u1EC0': 'E',
|
2221 |
-
'\u1EBE': 'E',
|
2222 |
-
'\u1EC4': 'E',
|
2223 |
-
'\u1EC2': 'E',
|
2224 |
-
'\u1EBC': 'E',
|
2225 |
-
'\u0112': 'E',
|
2226 |
-
'\u1E14': 'E',
|
2227 |
-
'\u1E16': 'E',
|
2228 |
-
'\u0114': 'E',
|
2229 |
-
'\u0116': 'E',
|
2230 |
-
'\u00CB': 'E',
|
2231 |
-
'\u1EBA': 'E',
|
2232 |
-
'\u011A': 'E',
|
2233 |
-
'\u0204': 'E',
|
2234 |
-
'\u0206': 'E',
|
2235 |
-
'\u1EB8': 'E',
|
2236 |
-
'\u1EC6': 'E',
|
2237 |
-
'\u0228': 'E',
|
2238 |
-
'\u1E1C': 'E',
|
2239 |
-
'\u0118': 'E',
|
2240 |
-
'\u1E18': 'E',
|
2241 |
-
'\u1E1A': 'E',
|
2242 |
-
'\u0190': 'E',
|
2243 |
-
'\u018E': 'E',
|
2244 |
-
'\u24BB': 'F',
|
2245 |
-
'\uFF26': 'F',
|
2246 |
-
'\u1E1E': 'F',
|
2247 |
-
'\u0191': 'F',
|
2248 |
-
'\uA77B': 'F',
|
2249 |
-
'\u24BC': 'G',
|
2250 |
-
'\uFF27': 'G',
|
2251 |
-
'\u01F4': 'G',
|
2252 |
-
'\u011C': 'G',
|
2253 |
-
'\u1E20': 'G',
|
2254 |
-
'\u011E': 'G',
|
2255 |
-
'\u0120': 'G',
|
2256 |
-
'\u01E6': 'G',
|
2257 |
-
'\u0122': 'G',
|
2258 |
-
'\u01E4': 'G',
|
2259 |
-
'\u0193': 'G',
|
2260 |
-
'\uA7A0': 'G',
|
2261 |
-
'\uA77D': 'G',
|
2262 |
-
'\uA77E': 'G',
|
2263 |
-
'\u24BD': 'H',
|
2264 |
-
'\uFF28': 'H',
|
2265 |
-
'\u0124': 'H',
|
2266 |
-
'\u1E22': 'H',
|
2267 |
-
'\u1E26': 'H',
|
2268 |
-
'\u021E': 'H',
|
2269 |
-
'\u1E24': 'H',
|
2270 |
-
'\u1E28': 'H',
|
2271 |
-
'\u1E2A': 'H',
|
2272 |
-
'\u0126': 'H',
|
2273 |
-
'\u2C67': 'H',
|
2274 |
-
'\u2C75': 'H',
|
2275 |
-
'\uA78D': 'H',
|
2276 |
-
'\u24BE': 'I',
|
2277 |
-
'\uFF29': 'I',
|
2278 |
-
'\u00CC': 'I',
|
2279 |
-
'\u00CD': 'I',
|
2280 |
-
'\u00CE': 'I',
|
2281 |
-
'\u0128': 'I',
|
2282 |
-
'\u012A': 'I',
|
2283 |
-
'\u012C': 'I',
|
2284 |
-
'\u0130': 'I',
|
2285 |
-
'\u00CF': 'I',
|
2286 |
-
'\u1E2E': 'I',
|
2287 |
-
'\u1EC8': 'I',
|
2288 |
-
'\u01CF': 'I',
|
2289 |
-
'\u0208': 'I',
|
2290 |
-
'\u020A': 'I',
|
2291 |
-
'\u1ECA': 'I',
|
2292 |
-
'\u012E': 'I',
|
2293 |
-
'\u1E2C': 'I',
|
2294 |
-
'\u0197': 'I',
|
2295 |
-
'\u24BF': 'J',
|
2296 |
-
'\uFF2A': 'J',
|
2297 |
-
'\u0134': 'J',
|
2298 |
-
'\u0248': 'J',
|
2299 |
-
'\u24C0': 'K',
|
2300 |
-
'\uFF2B': 'K',
|
2301 |
-
'\u1E30': 'K',
|
2302 |
-
'\u01E8': 'K',
|
2303 |
-
'\u1E32': 'K',
|
2304 |
-
'\u0136': 'K',
|
2305 |
-
'\u1E34': 'K',
|
2306 |
-
'\u0198': 'K',
|
2307 |
-
'\u2C69': 'K',
|
2308 |
-
'\uA740': 'K',
|
2309 |
-
'\uA742': 'K',
|
2310 |
-
'\uA744': 'K',
|
2311 |
-
'\uA7A2': 'K',
|
2312 |
-
'\u24C1': 'L',
|
2313 |
-
'\uFF2C': 'L',
|
2314 |
-
'\u013F': 'L',
|
2315 |
-
'\u0139': 'L',
|
2316 |
-
'\u013D': 'L',
|
2317 |
-
'\u1E36': 'L',
|
2318 |
-
'\u1E38': 'L',
|
2319 |
-
'\u013B': 'L',
|
2320 |
-
'\u1E3C': 'L',
|
2321 |
-
'\u1E3A': 'L',
|
2322 |
-
'\u0141': 'L',
|
2323 |
-
'\u023D': 'L',
|
2324 |
-
'\u2C62': 'L',
|
2325 |
-
'\u2C60': 'L',
|
2326 |
-
'\uA748': 'L',
|
2327 |
-
'\uA746': 'L',
|
2328 |
-
'\uA780': 'L',
|
2329 |
-
'\u01C7': 'LJ',
|
2330 |
-
'\u01C8': 'Lj',
|
2331 |
-
'\u24C2': 'M',
|
2332 |
-
'\uFF2D': 'M',
|
2333 |
-
'\u1E3E': 'M',
|
2334 |
-
'\u1E40': 'M',
|
2335 |
-
'\u1E42': 'M',
|
2336 |
-
'\u2C6E': 'M',
|
2337 |
-
'\u019C': 'M',
|
2338 |
-
'\u24C3': 'N',
|
2339 |
-
'\uFF2E': 'N',
|
2340 |
-
'\u01F8': 'N',
|
2341 |
-
'\u0143': 'N',
|
2342 |
-
'\u00D1': 'N',
|
2343 |
-
'\u1E44': 'N',
|
2344 |
-
'\u0147': 'N',
|
2345 |
-
'\u1E46': 'N',
|
2346 |
-
'\u0145': 'N',
|
2347 |
-
'\u1E4A': 'N',
|
2348 |
-
'\u1E48': 'N',
|
2349 |
-
'\u0220': 'N',
|
2350 |
-
'\u019D': 'N',
|
2351 |
-
'\uA790': 'N',
|
2352 |
-
'\uA7A4': 'N',
|
2353 |
-
'\u01CA': 'NJ',
|
2354 |
-
'\u01CB': 'Nj',
|
2355 |
-
'\u24C4': 'O',
|
2356 |
-
'\uFF2F': 'O',
|
2357 |
-
'\u00D2': 'O',
|
2358 |
-
'\u00D3': 'O',
|
2359 |
-
'\u00D4': 'O',
|
2360 |
-
'\u1ED2': 'O',
|
2361 |
-
'\u1ED0': 'O',
|
2362 |
-
'\u1ED6': 'O',
|
2363 |
-
'\u1ED4': 'O',
|
2364 |
-
'\u00D5': 'O',
|
2365 |
-
'\u1E4C': 'O',
|
2366 |
-
'\u022C': 'O',
|
2367 |
-
'\u1E4E': 'O',
|
2368 |
-
'\u014C': 'O',
|
2369 |
-
'\u1E50': 'O',
|
2370 |
-
'\u1E52': 'O',
|
2371 |
-
'\u014E': 'O',
|
2372 |
-
'\u022E': 'O',
|
2373 |
-
'\u0230': 'O',
|
2374 |
-
'\u00D6': 'O',
|
2375 |
-
'\u022A': 'O',
|
2376 |
-
'\u1ECE': 'O',
|
2377 |
-
'\u0150': 'O',
|
2378 |
-
'\u01D1': 'O',
|
2379 |
-
'\u020C': 'O',
|
2380 |
-
'\u020E': 'O',
|
2381 |
-
'\u01A0': 'O',
|
2382 |
-
'\u1EDC': 'O',
|
2383 |
-
'\u1EDA': 'O',
|
2384 |
-
'\u1EE0': 'O',
|
2385 |
-
'\u1EDE': 'O',
|
2386 |
-
'\u1EE2': 'O',
|
2387 |
-
'\u1ECC': 'O',
|
2388 |
-
'\u1ED8': 'O',
|
2389 |
-
'\u01EA': 'O',
|
2390 |
-
'\u01EC': 'O',
|
2391 |
-
'\u00D8': 'O',
|
2392 |
-
'\u01FE': 'O',
|
2393 |
-
'\u0186': 'O',
|
2394 |
-
'\u019F': 'O',
|
2395 |
-
'\uA74A': 'O',
|
2396 |
-
'\uA74C': 'O',
|
2397 |
-
'\u01A2': 'OI',
|
2398 |
-
'\uA74E': 'OO',
|
2399 |
-
'\u0222': 'OU',
|
2400 |
-
'\u24C5': 'P',
|
2401 |
-
'\uFF30': 'P',
|
2402 |
-
'\u1E54': 'P',
|
2403 |
-
'\u1E56': 'P',
|
2404 |
-
'\u01A4': 'P',
|
2405 |
-
'\u2C63': 'P',
|
2406 |
-
'\uA750': 'P',
|
2407 |
-
'\uA752': 'P',
|
2408 |
-
'\uA754': 'P',
|
2409 |
-
'\u24C6': 'Q',
|
2410 |
-
'\uFF31': 'Q',
|
2411 |
-
'\uA756': 'Q',
|
2412 |
-
'\uA758': 'Q',
|
2413 |
-
'\u024A': 'Q',
|
2414 |
-
'\u24C7': 'R',
|
2415 |
-
'\uFF32': 'R',
|
2416 |
-
'\u0154': 'R',
|
2417 |
-
'\u1E58': 'R',
|
2418 |
-
'\u0158': 'R',
|
2419 |
-
'\u0210': 'R',
|
2420 |
-
'\u0212': 'R',
|
2421 |
-
'\u1E5A': 'R',
|
2422 |
-
'\u1E5C': 'R',
|
2423 |
-
'\u0156': 'R',
|
2424 |
-
'\u1E5E': 'R',
|
2425 |
-
'\u024C': 'R',
|
2426 |
-
'\u2C64': 'R',
|
2427 |
-
'\uA75A': 'R',
|
2428 |
-
'\uA7A6': 'R',
|
2429 |
-
'\uA782': 'R',
|
2430 |
-
'\u24C8': 'S',
|
2431 |
-
'\uFF33': 'S',
|
2432 |
-
'\u1E9E': 'S',
|
2433 |
-
'\u015A': 'S',
|
2434 |
-
'\u1E64': 'S',
|
2435 |
-
'\u015C': 'S',
|
2436 |
-
'\u1E60': 'S',
|
2437 |
-
'\u0160': 'S',
|
2438 |
-
'\u1E66': 'S',
|
2439 |
-
'\u1E62': 'S',
|
2440 |
-
'\u1E68': 'S',
|
2441 |
-
'\u0218': 'S',
|
2442 |
-
'\u015E': 'S',
|
2443 |
-
'\u2C7E': 'S',
|
2444 |
-
'\uA7A8': 'S',
|
2445 |
-
'\uA784': 'S',
|
2446 |
-
'\u24C9': 'T',
|
2447 |
-
'\uFF34': 'T',
|
2448 |
-
'\u1E6A': 'T',
|
2449 |
-
'\u0164': 'T',
|
2450 |
-
'\u1E6C': 'T',
|
2451 |
-
'\u021A': 'T',
|
2452 |
-
'\u0162': 'T',
|
2453 |
-
'\u1E70': 'T',
|
2454 |
-
'\u1E6E': 'T',
|
2455 |
-
'\u0166': 'T',
|
2456 |
-
'\u01AC': 'T',
|
2457 |
-
'\u01AE': 'T',
|
2458 |
-
'\u023E': 'T',
|
2459 |
-
'\uA786': 'T',
|
2460 |
-
'\uA728': 'TZ',
|
2461 |
-
'\u24CA': 'U',
|
2462 |
-
'\uFF35': 'U',
|
2463 |
-
'\u00D9': 'U',
|
2464 |
-
'\u00DA': 'U',
|
2465 |
-
'\u00DB': 'U',
|
2466 |
-
'\u0168': 'U',
|
2467 |
-
'\u1E78': 'U',
|
2468 |
-
'\u016A': 'U',
|
2469 |
-
'\u1E7A': 'U',
|
2470 |
-
'\u016C': 'U',
|
2471 |
-
'\u00DC': 'U',
|
2472 |
-
'\u01DB': 'U',
|
2473 |
-
'\u01D7': 'U',
|
2474 |
-
'\u01D5': 'U',
|
2475 |
-
'\u01D9': 'U',
|
2476 |
-
'\u1EE6': 'U',
|
2477 |
-
'\u016E': 'U',
|
2478 |
-
'\u0170': 'U',
|
2479 |
-
'\u01D3': 'U',
|
2480 |
-
'\u0214': 'U',
|
2481 |
-
'\u0216': 'U',
|
2482 |
-
'\u01AF': 'U',
|
2483 |
-
'\u1EEA': 'U',
|
2484 |
-
'\u1EE8': 'U',
|
2485 |
-
'\u1EEE': 'U',
|
2486 |
-
'\u1EEC': 'U',
|
2487 |
-
'\u1EF0': 'U',
|
2488 |
-
'\u1EE4': 'U',
|
2489 |
-
'\u1E72': 'U',
|
2490 |
-
'\u0172': 'U',
|
2491 |
-
'\u1E76': 'U',
|
2492 |
-
'\u1E74': 'U',
|
2493 |
-
'\u0244': 'U',
|
2494 |
-
'\u24CB': 'V',
|
2495 |
-
'\uFF36': 'V',
|
2496 |
-
'\u1E7C': 'V',
|
2497 |
-
'\u1E7E': 'V',
|
2498 |
-
'\u01B2': 'V',
|
2499 |
-
'\uA75E': 'V',
|
2500 |
-
'\u0245': 'V',
|
2501 |
-
'\uA760': 'VY',
|
2502 |
-
'\u24CC': 'W',
|
2503 |
-
'\uFF37': 'W',
|
2504 |
-
'\u1E80': 'W',
|
2505 |
-
'\u1E82': 'W',
|
2506 |
-
'\u0174': 'W',
|
2507 |
-
'\u1E86': 'W',
|
2508 |
-
'\u1E84': 'W',
|
2509 |
-
'\u1E88': 'W',
|
2510 |
-
'\u2C72': 'W',
|
2511 |
-
'\u24CD': 'X',
|
2512 |
-
'\uFF38': 'X',
|
2513 |
-
'\u1E8A': 'X',
|
2514 |
-
'\u1E8C': 'X',
|
2515 |
-
'\u24CE': 'Y',
|
2516 |
-
'\uFF39': 'Y',
|
2517 |
-
'\u1EF2': 'Y',
|
2518 |
-
'\u00DD': 'Y',
|
2519 |
-
'\u0176': 'Y',
|
2520 |
-
'\u1EF8': 'Y',
|
2521 |
-
'\u0232': 'Y',
|
2522 |
-
'\u1E8E': 'Y',
|
2523 |
-
'\u0178': 'Y',
|
2524 |
-
'\u1EF6': 'Y',
|
2525 |
-
'\u1EF4': 'Y',
|
2526 |
-
'\u01B3': 'Y',
|
2527 |
-
'\u024E': 'Y',
|
2528 |
-
'\u1EFE': 'Y',
|
2529 |
-
'\u24CF': 'Z',
|
2530 |
-
'\uFF3A': 'Z',
|
2531 |
-
'\u0179': 'Z',
|
2532 |
-
'\u1E90': 'Z',
|
2533 |
-
'\u017B': 'Z',
|
2534 |
-
'\u017D': 'Z',
|
2535 |
-
'\u1E92': 'Z',
|
2536 |
-
'\u1E94': 'Z',
|
2537 |
-
'\u01B5': 'Z',
|
2538 |
-
'\u0224': 'Z',
|
2539 |
-
'\u2C7F': 'Z',
|
2540 |
-
'\u2C6B': 'Z',
|
2541 |
-
'\uA762': 'Z',
|
2542 |
-
'\u24D0': 'a',
|
2543 |
-
'\uFF41': 'a',
|
2544 |
-
'\u1E9A': 'a',
|
2545 |
-
'\u00E0': 'a',
|
2546 |
-
'\u00E1': 'a',
|
2547 |
-
'\u00E2': 'a',
|
2548 |
-
'\u1EA7': 'a',
|
2549 |
-
'\u1EA5': 'a',
|
2550 |
-
'\u1EAB': 'a',
|
2551 |
-
'\u1EA9': 'a',
|
2552 |
-
'\u00E3': 'a',
|
2553 |
-
'\u0101': 'a',
|
2554 |
-
'\u0103': 'a',
|
2555 |
-
'\u1EB1': 'a',
|
2556 |
-
'\u1EAF': 'a',
|
2557 |
-
'\u1EB5': 'a',
|
2558 |
-
'\u1EB3': 'a',
|
2559 |
-
'\u0227': 'a',
|
2560 |
-
'\u01E1': 'a',
|
2561 |
-
'\u00E4': 'a',
|
2562 |
-
'\u01DF': 'a',
|
2563 |
-
'\u1EA3': 'a',
|
2564 |
-
'\u00E5': 'a',
|
2565 |
-
'\u01FB': 'a',
|
2566 |
-
'\u01CE': 'a',
|
2567 |
-
'\u0201': 'a',
|
2568 |
-
'\u0203': 'a',
|
2569 |
-
'\u1EA1': 'a',
|
2570 |
-
'\u1EAD': 'a',
|
2571 |
-
'\u1EB7': 'a',
|
2572 |
-
'\u1E01': 'a',
|
2573 |
-
'\u0105': 'a',
|
2574 |
-
'\u2C65': 'a',
|
2575 |
-
'\u0250': 'a',
|
2576 |
-
'\uA733': 'aa',
|
2577 |
-
'\u00E6': 'ae',
|
2578 |
-
'\u01FD': 'ae',
|
2579 |
-
'\u01E3': 'ae',
|
2580 |
-
'\uA735': 'ao',
|
2581 |
-
'\uA737': 'au',
|
2582 |
-
'\uA739': 'av',
|
2583 |
-
'\uA73B': 'av',
|
2584 |
-
'\uA73D': 'ay',
|
2585 |
-
'\u24D1': 'b',
|
2586 |
-
'\uFF42': 'b',
|
2587 |
-
'\u1E03': 'b',
|
2588 |
-
'\u1E05': 'b',
|
2589 |
-
'\u1E07': 'b',
|
2590 |
-
'\u0180': 'b',
|
2591 |
-
'\u0183': 'b',
|
2592 |
-
'\u0253': 'b',
|
2593 |
-
'\u24D2': 'c',
|
2594 |
-
'\uFF43': 'c',
|
2595 |
-
'\u0107': 'c',
|
2596 |
-
'\u0109': 'c',
|
2597 |
-
'\u010B': 'c',
|
2598 |
-
'\u010D': 'c',
|
2599 |
-
'\u00E7': 'c',
|
2600 |
-
'\u1E09': 'c',
|
2601 |
-
'\u0188': 'c',
|
2602 |
-
'\u023C': 'c',
|
2603 |
-
'\uA73F': 'c',
|
2604 |
-
'\u2184': 'c',
|
2605 |
-
'\u24D3': 'd',
|
2606 |
-
'\uFF44': 'd',
|
2607 |
-
'\u1E0B': 'd',
|
2608 |
-
'\u010F': 'd',
|
2609 |
-
'\u1E0D': 'd',
|
2610 |
-
'\u1E11': 'd',
|
2611 |
-
'\u1E13': 'd',
|
2612 |
-
'\u1E0F': 'd',
|
2613 |
-
'\u0111': 'd',
|
2614 |
-
'\u018C': 'd',
|
2615 |
-
'\u0256': 'd',
|
2616 |
-
'\u0257': 'd',
|
2617 |
-
'\uA77A': 'd',
|
2618 |
-
'\u01F3': 'dz',
|
2619 |
-
'\u01C6': 'dz',
|
2620 |
-
'\u24D4': 'e',
|
2621 |
-
'\uFF45': 'e',
|
2622 |
-
'\u00E8': 'e',
|
2623 |
-
'\u00E9': 'e',
|
2624 |
-
'\u00EA': 'e',
|
2625 |
-
'\u1EC1': 'e',
|
2626 |
-
'\u1EBF': 'e',
|
2627 |
-
'\u1EC5': 'e',
|
2628 |
-
'\u1EC3': 'e',
|
2629 |
-
'\u1EBD': 'e',
|
2630 |
-
'\u0113': 'e',
|
2631 |
-
'\u1E15': 'e',
|
2632 |
-
'\u1E17': 'e',
|
2633 |
-
'\u0115': 'e',
|
2634 |
-
'\u0117': 'e',
|
2635 |
-
'\u00EB': 'e',
|
2636 |
-
'\u1EBB': 'e',
|
2637 |
-
'\u011B': 'e',
|
2638 |
-
'\u0205': 'e',
|
2639 |
-
'\u0207': 'e',
|
2640 |
-
'\u1EB9': 'e',
|
2641 |
-
'\u1EC7': 'e',
|
2642 |
-
'\u0229': 'e',
|
2643 |
-
'\u1E1D': 'e',
|
2644 |
-
'\u0119': 'e',
|
2645 |
-
'\u1E19': 'e',
|
2646 |
-
'\u1E1B': 'e',
|
2647 |
-
'\u0247': 'e',
|
2648 |
-
'\u025B': 'e',
|
2649 |
-
'\u01DD': 'e',
|
2650 |
-
'\u24D5': 'f',
|
2651 |
-
'\uFF46': 'f',
|
2652 |
-
'\u1E1F': 'f',
|
2653 |
-
'\u0192': 'f',
|
2654 |
-
'\uA77C': 'f',
|
2655 |
-
'\u24D6': 'g',
|
2656 |
-
'\uFF47': 'g',
|
2657 |
-
'\u01F5': 'g',
|
2658 |
-
'\u011D': 'g',
|
2659 |
-
'\u1E21': 'g',
|
2660 |
-
'\u011F': 'g',
|
2661 |
-
'\u0121': 'g',
|
2662 |
-
'\u01E7': 'g',
|
2663 |
-
'\u0123': 'g',
|
2664 |
-
'\u01E5': 'g',
|
2665 |
-
'\u0260': 'g',
|
2666 |
-
'\uA7A1': 'g',
|
2667 |
-
'\u1D79': 'g',
|
2668 |
-
'\uA77F': 'g',
|
2669 |
-
'\u24D7': 'h',
|
2670 |
-
'\uFF48': 'h',
|
2671 |
-
'\u0125': 'h',
|
2672 |
-
'\u1E23': 'h',
|
2673 |
-
'\u1E27': 'h',
|
2674 |
-
'\u021F': 'h',
|
2675 |
-
'\u1E25': 'h',
|
2676 |
-
'\u1E29': 'h',
|
2677 |
-
'\u1E2B': 'h',
|
2678 |
-
'\u1E96': 'h',
|
2679 |
-
'\u0127': 'h',
|
2680 |
-
'\u2C68': 'h',
|
2681 |
-
'\u2C76': 'h',
|
2682 |
-
'\u0265': 'h',
|
2683 |
-
'\u0195': 'hv',
|
2684 |
-
'\u24D8': 'i',
|
2685 |
-
'\uFF49': 'i',
|
2686 |
-
'\u00EC': 'i',
|
2687 |
-
'\u00ED': 'i',
|
2688 |
-
'\u00EE': 'i',
|
2689 |
-
'\u0129': 'i',
|
2690 |
-
'\u012B': 'i',
|
2691 |
-
'\u012D': 'i',
|
2692 |
-
'\u00EF': 'i',
|
2693 |
-
'\u1E2F': 'i',
|
2694 |
-
'\u1EC9': 'i',
|
2695 |
-
'\u01D0': 'i',
|
2696 |
-
'\u0209': 'i',
|
2697 |
-
'\u020B': 'i',
|
2698 |
-
'\u1ECB': 'i',
|
2699 |
-
'\u012F': 'i',
|
2700 |
-
'\u1E2D': 'i',
|
2701 |
-
'\u0268': 'i',
|
2702 |
-
'\u0131': 'i',
|
2703 |
-
'\u24D9': 'j',
|
2704 |
-
'\uFF4A': 'j',
|
2705 |
-
'\u0135': 'j',
|
2706 |
-
'\u01F0': 'j',
|
2707 |
-
'\u0249': 'j',
|
2708 |
-
'\u24DA': 'k',
|
2709 |
-
'\uFF4B': 'k',
|
2710 |
-
'\u1E31': 'k',
|
2711 |
-
'\u01E9': 'k',
|
2712 |
-
'\u1E33': 'k',
|
2713 |
-
'\u0137': 'k',
|
2714 |
-
'\u1E35': 'k',
|
2715 |
-
'\u0199': 'k',
|
2716 |
-
'\u2C6A': 'k',
|
2717 |
-
'\uA741': 'k',
|
2718 |
-
'\uA743': 'k',
|
2719 |
-
'\uA745': 'k',
|
2720 |
-
'\uA7A3': 'k',
|
2721 |
-
'\u24DB': 'l',
|
2722 |
-
'\uFF4C': 'l',
|
2723 |
-
'\u0140': 'l',
|
2724 |
-
'\u013A': 'l',
|
2725 |
-
'\u013E': 'l',
|
2726 |
-
'\u1E37': 'l',
|
2727 |
-
'\u1E39': 'l',
|
2728 |
-
'\u013C': 'l',
|
2729 |
-
'\u1E3D': 'l',
|
2730 |
-
'\u1E3B': 'l',
|
2731 |
-
'\u017F': 'l',
|
2732 |
-
'\u0142': 'l',
|
2733 |
-
'\u019A': 'l',
|
2734 |
-
'\u026B': 'l',
|
2735 |
-
'\u2C61': 'l',
|
2736 |
-
'\uA749': 'l',
|
2737 |
-
'\uA781': 'l',
|
2738 |
-
'\uA747': 'l',
|
2739 |
-
'\u01C9': 'lj',
|
2740 |
-
'\u24DC': 'm',
|
2741 |
-
'\uFF4D': 'm',
|
2742 |
-
'\u1E3F': 'm',
|
2743 |
-
'\u1E41': 'm',
|
2744 |
-
'\u1E43': 'm',
|
2745 |
-
'\u0271': 'm',
|
2746 |
-
'\u026F': 'm',
|
2747 |
-
'\u24DD': 'n',
|
2748 |
-
'\uFF4E': 'n',
|
2749 |
-
'\u01F9': 'n',
|
2750 |
-
'\u0144': 'n',
|
2751 |
-
'\u00F1': 'n',
|
2752 |
-
'\u1E45': 'n',
|
2753 |
-
'\u0148': 'n',
|
2754 |
-
'\u1E47': 'n',
|
2755 |
-
'\u0146': 'n',
|
2756 |
-
'\u1E4B': 'n',
|
2757 |
-
'\u1E49': 'n',
|
2758 |
-
'\u019E': 'n',
|
2759 |
-
'\u0272': 'n',
|
2760 |
-
'\u0149': 'n',
|
2761 |
-
'\uA791': 'n',
|
2762 |
-
'\uA7A5': 'n',
|
2763 |
-
'\u01CC': 'nj',
|
2764 |
-
'\u24DE': 'o',
|
2765 |
-
'\uFF4F': 'o',
|
2766 |
-
'\u00F2': 'o',
|
2767 |
-
'\u00F3': 'o',
|
2768 |
-
'\u00F4': 'o',
|
2769 |
-
'\u1ED3': 'o',
|
2770 |
-
'\u1ED1': 'o',
|
2771 |
-
'\u1ED7': 'o',
|
2772 |
-
'\u1ED5': 'o',
|
2773 |
-
'\u00F5': 'o',
|
2774 |
-
'\u1E4D': 'o',
|
2775 |
-
'\u022D': 'o',
|
2776 |
-
'\u1E4F': 'o',
|
2777 |
-
'\u014D': 'o',
|
2778 |
-
'\u1E51': 'o',
|
2779 |
-
'\u1E53': 'o',
|
2780 |
-
'\u014F': 'o',
|
2781 |
-
'\u022F': 'o',
|
2782 |
-
'\u0231': 'o',
|
2783 |
-
'\u00F6': 'o',
|
2784 |
-
'\u022B': 'o',
|
2785 |
-
'\u1ECF': 'o',
|
2786 |
-
'\u0151': 'o',
|
2787 |
-
'\u01D2': 'o',
|
2788 |
-
'\u020D': 'o',
|
2789 |
-
'\u020F': 'o',
|
2790 |
-
'\u01A1': 'o',
|
2791 |
-
'\u1EDD': 'o',
|
2792 |
-
'\u1EDB': 'o',
|
2793 |
-
'\u1EE1': 'o',
|
2794 |
-
'\u1EDF': 'o',
|
2795 |
-
'\u1EE3': 'o',
|
2796 |
-
'\u1ECD': 'o',
|
2797 |
-
'\u1ED9': 'o',
|
2798 |
-
'\u01EB': 'o',
|
2799 |
-
'\u01ED': 'o',
|
2800 |
-
'\u00F8': 'o',
|
2801 |
-
'\u01FF': 'o',
|
2802 |
-
'\u0254': 'o',
|
2803 |
-
'\uA74B': 'o',
|
2804 |
-
'\uA74D': 'o',
|
2805 |
-
'\u0275': 'o',
|
2806 |
-
'\u01A3': 'oi',
|
2807 |
-
'\u0223': 'ou',
|
2808 |
-
'\uA74F': 'oo',
|
2809 |
-
'\u24DF': 'p',
|
2810 |
-
'\uFF50': 'p',
|
2811 |
-
'\u1E55': 'p',
|
2812 |
-
'\u1E57': 'p',
|
2813 |
-
'\u01A5': 'p',
|
2814 |
-
'\u1D7D': 'p',
|
2815 |
-
'\uA751': 'p',
|
2816 |
-
'\uA753': 'p',
|
2817 |
-
'\uA755': 'p',
|
2818 |
-
'\u24E0': 'q',
|
2819 |
-
'\uFF51': 'q',
|
2820 |
-
'\u024B': 'q',
|
2821 |
-
'\uA757': 'q',
|
2822 |
-
'\uA759': 'q',
|
2823 |
-
'\u24E1': 'r',
|
2824 |
-
'\uFF52': 'r',
|
2825 |
-
'\u0155': 'r',
|
2826 |
-
'\u1E59': 'r',
|
2827 |
-
'\u0159': 'r',
|
2828 |
-
'\u0211': 'r',
|
2829 |
-
'\u0213': 'r',
|
2830 |
-
'\u1E5B': 'r',
|
2831 |
-
'\u1E5D': 'r',
|
2832 |
-
'\u0157': 'r',
|
2833 |
-
'\u1E5F': 'r',
|
2834 |
-
'\u024D': 'r',
|
2835 |
-
'\u027D': 'r',
|
2836 |
-
'\uA75B': 'r',
|
2837 |
-
'\uA7A7': 'r',
|
2838 |
-
'\uA783': 'r',
|
2839 |
-
'\u24E2': 's',
|
2840 |
-
'\uFF53': 's',
|
2841 |
-
'\u00DF': 's',
|
2842 |
-
'\u015B': 's',
|
2843 |
-
'\u1E65': 's',
|
2844 |
-
'\u015D': 's',
|
2845 |
-
'\u1E61': 's',
|
2846 |
-
'\u0161': 's',
|
2847 |
-
'\u1E67': 's',
|
2848 |
-
'\u1E63': 's',
|
2849 |
-
'\u1E69': 's',
|
2850 |
-
'\u0219': 's',
|
2851 |
-
'\u015F': 's',
|
2852 |
-
'\u023F': 's',
|
2853 |
-
'\uA7A9': 's',
|
2854 |
-
'\uA785': 's',
|
2855 |
-
'\u1E9B': 's',
|
2856 |
-
'\u24E3': 't',
|
2857 |
-
'\uFF54': 't',
|
2858 |
-
'\u1E6B': 't',
|
2859 |
-
'\u1E97': 't',
|
2860 |
-
'\u0165': 't',
|
2861 |
-
'\u1E6D': 't',
|
2862 |
-
'\u021B': 't',
|
2863 |
-
'\u0163': 't',
|
2864 |
-
'\u1E71': 't',
|
2865 |
-
'\u1E6F': 't',
|
2866 |
-
'\u0167': 't',
|
2867 |
-
'\u01AD': 't',
|
2868 |
-
'\u0288': 't',
|
2869 |
-
'\u2C66': 't',
|
2870 |
-
'\uA787': 't',
|
2871 |
-
'\uA729': 'tz',
|
2872 |
-
'\u24E4': 'u',
|
2873 |
-
'\uFF55': 'u',
|
2874 |
-
'\u00F9': 'u',
|
2875 |
-
'\u00FA': 'u',
|
2876 |
-
'\u00FB': 'u',
|
2877 |
-
'\u0169': 'u',
|
2878 |
-
'\u1E79': 'u',
|
2879 |
-
'\u016B': 'u',
|
2880 |
-
'\u1E7B': 'u',
|
2881 |
-
'\u016D': 'u',
|
2882 |
-
'\u00FC': 'u',
|
2883 |
-
'\u01DC': 'u',
|
2884 |
-
'\u01D8': 'u',
|
2885 |
-
'\u01D6': 'u',
|
2886 |
-
'\u01DA': 'u',
|
2887 |
-
'\u1EE7': 'u',
|
2888 |
-
'\u016F': 'u',
|
2889 |
-
'\u0171': 'u',
|
2890 |
-
'\u01D4': 'u',
|
2891 |
-
'\u0215': 'u',
|
2892 |
-
'\u0217': 'u',
|
2893 |
-
'\u01B0': 'u',
|
2894 |
-
'\u1EEB': 'u',
|
2895 |
-
'\u1EE9': 'u',
|
2896 |
-
'\u1EEF': 'u',
|
2897 |
-
'\u1EED': 'u',
|
2898 |
-
'\u1EF1': 'u',
|
2899 |
-
'\u1EE5': 'u',
|
2900 |
-
'\u1E73': 'u',
|
2901 |
-
'\u0173': 'u',
|
2902 |
-
'\u1E77': 'u',
|
2903 |
-
'\u1E75': 'u',
|
2904 |
-
'\u0289': 'u',
|
2905 |
-
'\u24E5': 'v',
|
2906 |
-
'\uFF56': 'v',
|
2907 |
-
'\u1E7D': 'v',
|
2908 |
-
'\u1E7F': 'v',
|
2909 |
-
'\u028B': 'v',
|
2910 |
-
'\uA75F': 'v',
|
2911 |
-
'\u028C': 'v',
|
2912 |
-
'\uA761': 'vy',
|
2913 |
-
'\u24E6': 'w',
|
2914 |
-
'\uFF57': 'w',
|
2915 |
-
'\u1E81': 'w',
|
2916 |
-
'\u1E83': 'w',
|
2917 |
-
'\u0175': 'w',
|
2918 |
-
'\u1E87': 'w',
|
2919 |
-
'\u1E85': 'w',
|
2920 |
-
'\u1E98': 'w',
|
2921 |
-
'\u1E89': 'w',
|
2922 |
-
'\u2C73': 'w',
|
2923 |
-
'\u24E7': 'x',
|
2924 |
-
'\uFF58': 'x',
|
2925 |
-
'\u1E8B': 'x',
|
2926 |
-
'\u1E8D': 'x',
|
2927 |
-
'\u24E8': 'y',
|
2928 |
-
'\uFF59': 'y',
|
2929 |
-
'\u1EF3': 'y',
|
2930 |
-
'\u00FD': 'y',
|
2931 |
-
'\u0177': 'y',
|
2932 |
-
'\u1EF9': 'y',
|
2933 |
-
'\u0233': 'y',
|
2934 |
-
'\u1E8F': 'y',
|
2935 |
-
'\u00FF': 'y',
|
2936 |
-
'\u1EF7': 'y',
|
2937 |
-
'\u1E99': 'y',
|
2938 |
-
'\u1EF5': 'y',
|
2939 |
-
'\u01B4': 'y',
|
2940 |
-
'\u024F': 'y',
|
2941 |
-
'\u1EFF': 'y',
|
2942 |
-
'\u24E9': 'z',
|
2943 |
-
'\uFF5A': 'z',
|
2944 |
-
'\u017A': 'z',
|
2945 |
-
'\u1E91': 'z',
|
2946 |
-
'\u017C': 'z',
|
2947 |
-
'\u017E': 'z',
|
2948 |
-
'\u1E93': 'z',
|
2949 |
-
'\u1E95': 'z',
|
2950 |
-
'\u01B6': 'z',
|
2951 |
-
'\u0225': 'z',
|
2952 |
-
'\u0240': 'z',
|
2953 |
-
'\u2C6C': 'z',
|
2954 |
-
'\uA763': 'z',
|
2955 |
-
'\u0386': '\u0391',
|
2956 |
-
'\u0388': '\u0395',
|
2957 |
-
'\u0389': '\u0397',
|
2958 |
-
'\u038A': '\u0399',
|
2959 |
-
'\u03AA': '\u0399',
|
2960 |
-
'\u038C': '\u039F',
|
2961 |
-
'\u038E': '\u03A5',
|
2962 |
-
'\u03AB': '\u03A5',
|
2963 |
-
'\u038F': '\u03A9',
|
2964 |
-
'\u03AC': '\u03B1',
|
2965 |
-
'\u03AD': '\u03B5',
|
2966 |
-
'\u03AE': '\u03B7',
|
2967 |
-
'\u03AF': '\u03B9',
|
2968 |
-
'\u03CA': '\u03B9',
|
2969 |
-
'\u0390': '\u03B9',
|
2970 |
-
'\u03CC': '\u03BF',
|
2971 |
-
'\u03CD': '\u03C5',
|
2972 |
-
'\u03CB': '\u03C5',
|
2973 |
-
'\u03B0': '\u03C5',
|
2974 |
-
'\u03C9': '\u03C9',
|
2975 |
-
'\u03C2': '\u03C3'
|
2976 |
-
};
|
2977 |
-
|
2978 |
-
return diacritics;
|
2979 |
-
});
|
2980 |
-
|
2981 |
-
S2.define('select2/data/base',[
|
2982 |
-
'../utils'
|
2983 |
-
], function (Utils) {
|
2984 |
-
function BaseAdapter ($element, options) {
|
2985 |
-
BaseAdapter.__super__.constructor.call(this);
|
2986 |
-
}
|
2987 |
-
|
2988 |
-
Utils.Extend(BaseAdapter, Utils.Observable);
|
2989 |
-
|
2990 |
-
BaseAdapter.prototype.current = function (callback) {
|
2991 |
-
throw new Error('The `current` method must be defined in child classes.');
|
2992 |
-
};
|
2993 |
-
|
2994 |
-
BaseAdapter.prototype.query = function (params, callback) {
|
2995 |
-
throw new Error('The `query` method must be defined in child classes.');
|
2996 |
-
};
|
2997 |
-
|
2998 |
-
BaseAdapter.prototype.bind = function (container, $container) {
|
2999 |
-
// Can be implemented in subclasses
|
3000 |
-
};
|
3001 |
-
|
3002 |
-
BaseAdapter.prototype.destroy = function () {
|
3003 |
-
// Can be implemented in subclasses
|
3004 |
-
};
|
3005 |
-
|
3006 |
-
BaseAdapter.prototype.generateResultId = function (container, data) {
|
3007 |
-
var id = container.id + '-result-';
|
3008 |
-
|
3009 |
-
id += Utils.generateChars(4);
|
3010 |
-
|
3011 |
-
if (data.id != null) {
|
3012 |
-
id += '-' + data.id.toString();
|
3013 |
-
} else {
|
3014 |
-
id += '-' + Utils.generateChars(4);
|
3015 |
-
}
|
3016 |
-
return id;
|
3017 |
-
};
|
3018 |
-
|
3019 |
-
return BaseAdapter;
|
3020 |
-
});
|
3021 |
-
|
3022 |
-
S2.define('select2/data/select',[
|
3023 |
-
'./base',
|
3024 |
-
'../utils',
|
3025 |
-
'jquery'
|
3026 |
-
], function (BaseAdapter, Utils, $) {
|
3027 |
-
function SelectAdapter ($element, options) {
|
3028 |
-
this.$element = $element;
|
3029 |
-
this.options = options;
|
3030 |
-
|
3031 |
-
SelectAdapter.__super__.constructor.call(this);
|
3032 |
-
}
|
3033 |
-
|
3034 |
-
Utils.Extend(SelectAdapter, BaseAdapter);
|
3035 |
-
|
3036 |
-
SelectAdapter.prototype.current = function (callback) {
|
3037 |
-
var data = [];
|
3038 |
-
var self = this;
|
3039 |
-
|
3040 |
-
this.$element.find(':selected').each(function () {
|
3041 |
-
var $option = $(this);
|
3042 |
-
|
3043 |
-
var option = self.item($option);
|
3044 |
-
|
3045 |
-
data.push(option);
|
3046 |
-
});
|
3047 |
-
|
3048 |
-
callback(data);
|
3049 |
-
};
|
3050 |
-
|
3051 |
-
SelectAdapter.prototype.select = function (data) {
|
3052 |
-
var self = this;
|
3053 |
-
|
3054 |
-
data.selected = true;
|
3055 |
-
|
3056 |
-
// If data.element is a DOM node, use it instead
|
3057 |
-
if ($(data.element).is('option')) {
|
3058 |
-
data.element.selected = true;
|
3059 |
-
|
3060 |
-
this.$element.trigger('change');
|
3061 |
-
|
3062 |
-
return;
|
3063 |
-
}
|
3064 |
-
|
3065 |
-
if (this.$element.prop('multiple')) {
|
3066 |
-
this.current(function (currentData) {
|
3067 |
-
var val = [];
|
3068 |
-
|
3069 |
-
data = [data];
|
3070 |
-
data.push.apply(data, currentData);
|
3071 |
-
|
3072 |
-
for (var d = 0; d < data.length; d++) {
|
3073 |
-
var id = data[d].id;
|
3074 |
-
|
3075 |
-
if ($.inArray(id, val) === -1) {
|
3076 |
-
val.push(id);
|
3077 |
-
}
|
3078 |
-
}
|
3079 |
-
|
3080 |
-
self.$element.val(val);
|
3081 |
-
self.$element.trigger('change');
|
3082 |
-
});
|
3083 |
-
} else {
|
3084 |
-
var val = data.id;
|
3085 |
-
|
3086 |
-
this.$element.val(val);
|
3087 |
-
this.$element.trigger('change');
|
3088 |
-
}
|
3089 |
-
};
|
3090 |
-
|
3091 |
-
SelectAdapter.prototype.unselect = function (data) {
|
3092 |
-
var self = this;
|
3093 |
-
|
3094 |
-
if (!this.$element.prop('multiple')) {
|
3095 |
-
return;
|
3096 |
-
}
|
3097 |
-
|
3098 |
-
data.selected = false;
|
3099 |
-
|
3100 |
-
if ($(data.element).is('option')) {
|
3101 |
-
data.element.selected = false;
|
3102 |
-
|
3103 |
-
this.$element.trigger('change');
|
3104 |
-
|
3105 |
-
return;
|
3106 |
-
}
|
3107 |
-
|
3108 |
-
this.current(function (currentData) {
|
3109 |
-
var val = [];
|
3110 |
-
|
3111 |
-
for (var d = 0; d < currentData.length; d++) {
|
3112 |
-
var id = currentData[d].id;
|
3113 |
-
|
3114 |
-
if (id !== data.id && $.inArray(id, val) === -1) {
|
3115 |
-
val.push(id);
|
3116 |
-
}
|
3117 |
-
}
|
3118 |
-
|
3119 |
-
self.$element.val(val);
|
3120 |
-
|
3121 |
-
self.$element.trigger('change');
|
3122 |
-
});
|
3123 |
-
};
|
3124 |
-
|
3125 |
-
SelectAdapter.prototype.bind = function (container, $container) {
|
3126 |
-
var self = this;
|
3127 |
-
|
3128 |
-
this.container = container;
|
3129 |
-
|
3130 |
-
container.on('select', function (params) {
|
3131 |
-
self.select(params.data);
|
3132 |
-
});
|
3133 |
-
|
3134 |
-
container.on('unselect', function (params) {
|
3135 |
-
self.unselect(params.data);
|
3136 |
-
});
|
3137 |
-
};
|
3138 |
-
|
3139 |
-
SelectAdapter.prototype.destroy = function () {
|
3140 |
-
// Remove anything added to child elements
|
3141 |
-
this.$element.find('*').each(function () {
|
3142 |
-
// Remove any custom data set by Select2
|
3143 |
-
$.removeData(this, 'data');
|
3144 |
-
});
|
3145 |
-
};
|
3146 |
-
|
3147 |
-
SelectAdapter.prototype.query = function (params, callback) {
|
3148 |
-
var data = [];
|
3149 |
-
var self = this;
|
3150 |
-
|
3151 |
-
var $options = this.$element.children();
|
3152 |
-
|
3153 |
-
$options.each(function () {
|
3154 |
-
var $option = $(this);
|
3155 |
-
|
3156 |
-
if (!$option.is('option') && !$option.is('optgroup')) {
|
3157 |
-
return;
|
3158 |
-
}
|
3159 |
-
|
3160 |
-
var option = self.item($option);
|
3161 |
-
|
3162 |
-
var matches = self.matches(params, option);
|
3163 |
-
|
3164 |
-
if (matches !== null) {
|
3165 |
-
data.push(matches);
|
3166 |
-
}
|
3167 |
-
});
|
3168 |
-
|
3169 |
-
callback({
|
3170 |
-
results: data
|
3171 |
-
});
|
3172 |
-
};
|
3173 |
-
|
3174 |
-
SelectAdapter.prototype.addOptions = function ($options) {
|
3175 |
-
Utils.appendMany(this.$element, $options);
|
3176 |
-
};
|
3177 |
-
|
3178 |
-
SelectAdapter.prototype.option = function (data) {
|
3179 |
-
var option;
|
3180 |
-
|
3181 |
-
if (data.children) {
|
3182 |
-
option = document.createElement('optgroup');
|
3183 |
-
option.label = data.text;
|
3184 |
-
} else {
|
3185 |
-
option = document.createElement('option');
|
3186 |
-
|
3187 |
-
if (option.textContent !== undefined) {
|
3188 |
-
option.textContent = data.text;
|
3189 |
-
} else {
|
3190 |
-
option.innerText = data.text;
|
3191 |
-
}
|
3192 |
-
}
|
3193 |
-
|
3194 |
-
if (data.id) {
|
3195 |
-
option.value = data.id;
|
3196 |
-
}
|
3197 |
-
|
3198 |
-
if (data.disabled) {
|
3199 |
-
option.disabled = true;
|
3200 |
-
}
|
3201 |
-
|
3202 |
-
if (data.selected) {
|
3203 |
-
option.selected = true;
|
3204 |
-
}
|
3205 |
-
|
3206 |
-
if (data.title) {
|
3207 |
-
option.title = data.title;
|
3208 |
-
}
|
3209 |
-
|
3210 |
-
var $option = $(option);
|
3211 |
-
|
3212 |
-
var normalizedData = this._normalizeItem(data);
|
3213 |
-
normalizedData.element = option;
|
3214 |
-
|
3215 |
-
// Override the option's data with the combined data
|
3216 |
-
$.data(option, 'data', normalizedData);
|
3217 |
-
|
3218 |
-
return $option;
|
3219 |
-
};
|
3220 |
-
|
3221 |
-
SelectAdapter.prototype.item = function ($option) {
|
3222 |
-
var data = {};
|
3223 |
-
|
3224 |
-
data = $.data($option[0], 'data');
|
3225 |
-
|
3226 |
-
if (data != null) {
|
3227 |
-
return data;
|
3228 |
-
}
|
3229 |
-
|
3230 |
-
if ($option.is('option')) {
|
3231 |
-
data = {
|
3232 |
-
id: $option.val(),
|
3233 |
-
text: $option.text(),
|
3234 |
-
disabled: $option.prop('disabled'),
|
3235 |
-
selected: $option.prop('selected'),
|
3236 |
-
title: $option.prop('title')
|
3237 |
-
};
|
3238 |
-
} else if ($option.is('optgroup')) {
|
3239 |
-
data = {
|
3240 |
-
text: $option.prop('label'),
|
3241 |
-
children: [],
|
3242 |
-
title: $option.prop('title')
|
3243 |
-
};
|
3244 |
-
|
3245 |
-
var $children = $option.children('option');
|
3246 |
-
var children = [];
|
3247 |
-
|
3248 |
-
for (var c = 0; c < $children.length; c++) {
|
3249 |
-
var $child = $($children[c]);
|
3250 |
-
|
3251 |
-
var child = this.item($child);
|
3252 |
-
|
3253 |
-
children.push(child);
|
3254 |
-
}
|
3255 |
-
|
3256 |
-
data.children = children;
|
3257 |
-
}
|
3258 |
-
|
3259 |
-
data = this._normalizeItem(data);
|
3260 |
-
data.element = $option[0];
|
3261 |
-
|
3262 |
-
$.data($option[0], 'data', data);
|
3263 |
-
|
3264 |
-
return data;
|
3265 |
-
};
|
3266 |
-
|
3267 |
-
SelectAdapter.prototype._normalizeItem = function (item) {
|
3268 |
-
if (!$.isPlainObject(item)) {
|
3269 |
-
item = {
|
3270 |
-
id: item,
|
3271 |
-
text: item
|
3272 |
-
};
|
3273 |
-
}
|
3274 |
-
|
3275 |
-
item = $.extend({}, {
|
3276 |
-
text: ''
|
3277 |
-
}, item);
|
3278 |
-
|
3279 |
-
var defaults = {
|
3280 |
-
selected: false,
|
3281 |
-
disabled: false
|
3282 |
-
};
|
3283 |
-
|
3284 |
-
if (item.id != null) {
|
3285 |
-
item.id = item.id.toString();
|
3286 |
-
}
|
3287 |
-
|
3288 |
-
if (item.text != null) {
|
3289 |
-
item.text = item.text.toString();
|
3290 |
-
}
|
3291 |
-
|
3292 |
-
if (item._resultId == null && item.id && this.container != null) {
|
3293 |
-
item._resultId = this.generateResultId(this.container, item);
|
3294 |
-
}
|
3295 |
-
|
3296 |
-
return $.extend({}, defaults, item);
|
3297 |
-
};
|
3298 |
-
|
3299 |
-
SelectAdapter.prototype.matches = function (params, data) {
|
3300 |
-
var matcher = this.options.get('matcher');
|
3301 |
-
|
3302 |
-
return matcher(params, data);
|
3303 |
-
};
|
3304 |
-
|
3305 |
-
return SelectAdapter;
|
3306 |
-
});
|
3307 |
-
|
3308 |
-
S2.define('select2/data/array',[
|
3309 |
-
'./select',
|
3310 |
-
'../utils',
|
3311 |
-
'jquery'
|
3312 |
-
], function (SelectAdapter, Utils, $) {
|
3313 |
-
function ArrayAdapter ($element, options) {
|
3314 |
-
var data = options.get('data') || [];
|
3315 |
-
|
3316 |
-
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3317 |
-
|
3318 |
-
this.addOptions(this.convertToOptions(data));
|
3319 |
-
}
|
3320 |
-
|
3321 |
-
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3322 |
-
|
3323 |
-
ArrayAdapter.prototype.select = function (data) {
|
3324 |
-
var $option = this.$element.find('option').filter(function (i, elm) {
|
3325 |
-
return elm.value == data.id.toString();
|
3326 |
-
});
|
3327 |
-
|
3328 |
-
if ($option.length === 0) {
|
3329 |
-
$option = this.option(data);
|
3330 |
-
|
3331 |
-
this.addOptions($option);
|
3332 |
-
}
|
3333 |
-
|
3334 |
-
ArrayAdapter.__super__.select.call(this, data);
|
3335 |
-
};
|
3336 |
-
|
3337 |
-
ArrayAdapter.prototype.convertToOptions = function (data) {
|
3338 |
-
var self = this;
|
3339 |
-
|
3340 |
-
var $existing = this.$element.find('option');
|
3341 |
-
var existingIds = $existing.map(function () {
|
3342 |
-
return self.item($(this)).id;
|
3343 |
-
}).get();
|
3344 |
-
|
3345 |
-
var $options = [];
|
3346 |
-
|
3347 |
-
// Filter out all items except for the one passed in the argument
|
3348 |
-
function onlyItem (item) {
|
3349 |
-
return function () {
|
3350 |
-
return $(this).val() == item.id;
|
3351 |
-
};
|
3352 |
-
}
|
3353 |
-
|
3354 |
-
for (var d = 0; d < data.length; d++) {
|
3355 |
-
var item = this._normalizeItem(data[d]);
|
3356 |
-
|
3357 |
-
// Skip items which were pre-loaded, only merge the data
|
3358 |
-
if ($.inArray(item.id, existingIds) >= 0) {
|
3359 |
-
var $existingOption = $existing.filter(onlyItem(item));
|
3360 |
-
|
3361 |
-
var existingData = this.item($existingOption);
|
3362 |
-
var newData = $.extend(true, {}, item, existingData);
|
3363 |
-
|
3364 |
-
var $newOption = this.option(newData);
|
3365 |
-
|
3366 |
-
$existingOption.replaceWith($newOption);
|
3367 |
-
|
3368 |
-
continue;
|
3369 |
-
}
|
3370 |
-
|
3371 |
-
var $option = this.option(item);
|
3372 |
-
|
3373 |
-
if (item.children) {
|
3374 |
-
var $children = this.convertToOptions(item.children);
|
3375 |
-
|
3376 |
-
Utils.appendMany($option, $children);
|
3377 |
-
}
|
3378 |
-
|
3379 |
-
$options.push($option);
|
3380 |
-
}
|
3381 |
-
|
3382 |
-
return $options;
|
3383 |
-
};
|
3384 |
-
|
3385 |
-
return ArrayAdapter;
|
3386 |
-
});
|
3387 |
-
|
3388 |
-
S2.define('select2/data/ajax',[
|
3389 |
-
'./array',
|
3390 |
-
'../utils',
|
3391 |
-
'jquery'
|
3392 |
-
], function (ArrayAdapter, Utils, $) {
|
3393 |
-
function AjaxAdapter ($element, options) {
|
3394 |
-
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
|
3395 |
-
|
3396 |
-
if (this.ajaxOptions.processResults != null) {
|
3397 |
-
this.processResults = this.ajaxOptions.processResults;
|
3398 |
-
}
|
3399 |
-
|
3400 |
-
AjaxAdapter.__super__.constructor.call(this, $element, options);
|
3401 |
-
}
|
3402 |
-
|
3403 |
-
Utils.Extend(AjaxAdapter, ArrayAdapter);
|
3404 |
-
|
3405 |
-
AjaxAdapter.prototype._applyDefaults = function (options) {
|
3406 |
-
var defaults = {
|
3407 |
-
data: function (params) {
|
3408 |
-
return $.extend({}, params, {
|
3409 |
-
q: params.term
|
3410 |
-
});
|
3411 |
-
},
|
3412 |
-
transport: function (params, success, failure) {
|
3413 |
-
var $request = $.ajax(params);
|
3414 |
-
|
3415 |
-
$request.then(success);
|
3416 |
-
$request.fail(failure);
|
3417 |
-
|
3418 |
-
return $request;
|
3419 |
-
}
|
3420 |
-
};
|
3421 |
-
|
3422 |
-
return $.extend({}, defaults, options, true);
|
3423 |
-
};
|
3424 |
-
|
3425 |
-
AjaxAdapter.prototype.processResults = function (results) {
|
3426 |
-
return results;
|
3427 |
-
};
|
3428 |
-
|
3429 |
-
AjaxAdapter.prototype.query = function (params, callback) {
|
3430 |
-
var matches = [];
|
3431 |
-
var self = this;
|
3432 |
-
|
3433 |
-
if (this._request != null) {
|
3434 |
-
// JSONP requests cannot always be aborted
|
3435 |
-
if ($.isFunction(this._request.abort)) {
|
3436 |
-
this._request.abort();
|
3437 |
-
}
|
3438 |
-
|
3439 |
-
this._request = null;
|
3440 |
-
}
|
3441 |
-
|
3442 |
-
var options = $.extend({
|
3443 |
-
type: 'GET'
|
3444 |
-
}, this.ajaxOptions);
|
3445 |
-
|
3446 |
-
if (typeof options.url === 'function') {
|
3447 |
-
options.url = options.url.call(this.$element, params);
|
3448 |
-
}
|
3449 |
-
|
3450 |
-
if (typeof options.data === 'function') {
|
3451 |
-
options.data = options.data.call(this.$element, params);
|
3452 |
-
}
|
3453 |
-
|
3454 |
-
function request () {
|
3455 |
-
var $request = options.transport(options, function (data) {
|
3456 |
-
var results = self.processResults(data, params);
|
3457 |
-
|
3458 |
-
if (self.options.get('debug') && window.console && console.error) {
|
3459 |
-
// Check to make sure that the response included a `results` key.
|
3460 |
-
if (!results || !results.results || !$.isArray(results.results)) {
|
3461 |
-
console.error(
|
3462 |
-
'Select2: The AJAX results did not return an array in the ' +
|
3463 |
-
'`results` key of the response.'
|
3464 |
-
);
|
3465 |
-
}
|
3466 |
-
}
|
3467 |
-
|
3468 |
-
callback(results);
|
3469 |
-
}, function () {
|
3470 |
-
// Attempt to detect if a request was aborted
|
3471 |
-
// Only works if the transport exposes a status property
|
3472 |
-
if ($request.status && $request.status === '0') {
|
3473 |
-
return;
|
3474 |
-
}
|
3475 |
-
|
3476 |
-
self.trigger('results:message', {
|
3477 |
-
message: 'errorLoading'
|
3478 |
-
});
|
3479 |
-
});
|
3480 |
-
|
3481 |
-
self._request = $request;
|
3482 |
-
}
|
3483 |
-
|
3484 |
-
if (this.ajaxOptions.delay && params.term != null) {
|
3485 |
-
if (this._queryTimeout) {
|
3486 |
-
window.clearTimeout(this._queryTimeout);
|
3487 |
-
}
|
3488 |
-
|
3489 |
-
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
|
3490 |
-
} else {
|
3491 |
-
request();
|
3492 |
-
}
|
3493 |
-
};
|
3494 |
-
|
3495 |
-
return AjaxAdapter;
|
3496 |
-
});
|
3497 |
-
|
3498 |
-
S2.define('select2/data/tags',[
|
3499 |
-
'jquery'
|
3500 |
-
], function ($) {
|
3501 |
-
function Tags (decorated, $element, options) {
|
3502 |
-
var tags = options.get('tags');
|
3503 |
-
|
3504 |
-
var createTag = options.get('createTag');
|
3505 |
-
|
3506 |
-
if (createTag !== undefined) {
|
3507 |
-
this.createTag = createTag;
|
3508 |
-
}
|
3509 |
-
|
3510 |
-
var insertTag = options.get('insertTag');
|
3511 |
-
|
3512 |
-
if (insertTag !== undefined) {
|
3513 |
-
this.insertTag = insertTag;
|
3514 |
-
}
|
3515 |
-
|
3516 |
-
decorated.call(this, $element, options);
|
3517 |
-
|
3518 |
-
if ($.isArray(tags)) {
|
3519 |
-
for (var t = 0; t < tags.length; t++) {
|
3520 |
-
var tag = tags[t];
|
3521 |
-
var item = this._normalizeItem(tag);
|
3522 |
-
|
3523 |
-
var $option = this.option(item);
|
3524 |
-
|
3525 |
-
this.$element.append($option);
|
3526 |
-
}
|
3527 |
-
}
|
3528 |
-
}
|
3529 |
-
|
3530 |
-
Tags.prototype.query = function (decorated, params, callback) {
|
3531 |
-
var self = this;
|
3532 |
-
|
3533 |
-
this._removeOldTags();
|
3534 |
-
|
3535 |
-
if (params.term == null || params.page != null) {
|
3536 |
-
decorated.call(this, params, callback);
|
3537 |
-
return;
|
3538 |
-
}
|
3539 |
-
|
3540 |
-
function wrapper (obj, child) {
|
3541 |
-
var data = obj.results;
|
3542 |
-
|
3543 |
-
for (var i = 0; i < data.length; i++) {
|
3544 |
-
var option = data[i];
|
3545 |
-
|
3546 |
-
var checkChildren = (
|
3547 |
-
option.children != null &&
|
3548 |
-
!wrapper({
|
3549 |
-
results: option.children
|
3550 |
-
}, true)
|
3551 |
-
);
|
3552 |
-
|
3553 |
-
var checkText = option.text === params.term;
|
3554 |
-
|
3555 |
-
if (checkText || checkChildren) {
|
3556 |
-
if (child) {
|
3557 |
-
return false;
|
3558 |
-
}
|
3559 |
-
|
3560 |
-
obj.data = data;
|
3561 |
-
callback(obj);
|
3562 |
-
|
3563 |
-
return;
|
3564 |
-
}
|
3565 |
-
}
|
3566 |
-
|
3567 |
-
if (child) {
|
3568 |
-
return true;
|
3569 |
-
}
|
3570 |
-
|
3571 |
-
var tag = self.createTag(params);
|
3572 |
-
|
3573 |
-
if (tag != null) {
|
3574 |
-
var $option = self.option(tag);
|
3575 |
-
$option.attr('data-select2-tag', true);
|
3576 |
-
|
3577 |
-
self.addOptions([$option]);
|
3578 |
-
|
3579 |
-
self.insertTag(data, tag);
|
3580 |
-
}
|
3581 |
-
|
3582 |
-
obj.results = data;
|
3583 |
-
|
3584 |
-
callback(obj);
|
3585 |
-
}
|
3586 |
-
|
3587 |
-
decorated.call(this, params, wrapper);
|
3588 |
-
};
|
3589 |
-
|
3590 |
-
Tags.prototype.createTag = function (decorated, params) {
|
3591 |
-
var term = $.trim(params.term);
|
3592 |
-
|
3593 |
-
if (term === '') {
|
3594 |
-
return null;
|
3595 |
-
}
|
3596 |
-
|
3597 |
-
return {
|
3598 |
-
id: term,
|
3599 |
-
text: term
|
3600 |
-
};
|
3601 |
-
};
|
3602 |
-
|
3603 |
-
Tags.prototype.insertTag = function (_, data, tag) {
|
3604 |
-
data.unshift(tag);
|
3605 |
-
};
|
3606 |
-
|
3607 |
-
Tags.prototype._removeOldTags = function (_) {
|
3608 |
-
var tag = this._lastTag;
|
3609 |
-
|
3610 |
-
var $options = this.$element.find('option[data-select2-tag]');
|
3611 |
-
|
3612 |
-
$options.each(function () {
|
3613 |
-
if (this.selected) {
|
3614 |
-
return;
|
3615 |
-
}
|
3616 |
-
|
3617 |
-
$(this).remove();
|
3618 |
-
});
|
3619 |
-
};
|
3620 |
-
|
3621 |
-
return Tags;
|
3622 |
-
});
|
3623 |
-
|
3624 |
-
S2.define('select2/data/tokenizer',[
|
3625 |
-
'jquery'
|
3626 |
-
], function ($) {
|
3627 |
-
function Tokenizer (decorated, $element, options) {
|
3628 |
-
var tokenizer = options.get('tokenizer');
|
3629 |
-
|
3630 |
-
if (tokenizer !== undefined) {
|
3631 |
-
this.tokenizer = tokenizer;
|
3632 |
-
}
|
3633 |
-
|
3634 |
-
decorated.call(this, $element, options);
|
3635 |
-
}
|
3636 |
-
|
3637 |
-
Tokenizer.prototype.bind = function (decorated, container, $container) {
|
3638 |
-
decorated.call(this, container, $container);
|
3639 |
-
|
3640 |
-
this.$search = container.dropdown.$search || container.selection.$search ||
|
3641 |
-
$container.find('.select2-search__field');
|
3642 |
-
};
|
3643 |
-
|
3644 |
-
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3645 |
-
var self = this;
|
3646 |
-
|
3647 |
-
function createAndSelect (data) {
|
3648 |
-
// Normalize the data object so we can use it for checks
|
3649 |
-
var item = self._normalizeItem(data);
|
3650 |
-
|
3651 |
-
// Check if the data object already exists as a tag
|
3652 |
-
// Select it if it doesn't
|
3653 |
-
var $existingOptions = self.$element.find('option').filter(function () {
|
3654 |
-
return $(this).val() === item.id;
|
3655 |
-
});
|
3656 |
-
|
3657 |
-
// If an existing option wasn't found for it, create the option
|
3658 |
-
if (!$existingOptions.length) {
|
3659 |
-
var $option = self.option(item);
|
3660 |
-
$option.attr('data-select2-tag', true);
|
3661 |
-
|
3662 |
-
self._removeOldTags();
|
3663 |
-
self.addOptions([$option]);
|
3664 |
-
}
|
3665 |
-
|
3666 |
-
// Select the item, now that we know there is an option for it
|
3667 |
-
select(item);
|
3668 |
-
}
|
3669 |
-
|
3670 |
-
function select (data) {
|
3671 |
-
self.trigger('select', {
|
3672 |
-
data: data
|
3673 |
-
});
|
3674 |
-
}
|
3675 |
-
|
3676 |
-
params.term = params.term || '';
|
3677 |
-
|
3678 |
-
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3679 |
-
|
3680 |
-
if (tokenData.term !== params.term) {
|
3681 |
-
// Replace the search term if we have the search box
|
3682 |
-
if (this.$search.length) {
|
3683 |
-
this.$search.val(tokenData.term);
|
3684 |
-
this.$search.focus();
|
3685 |
-
}
|
3686 |
-
|
3687 |
-
params.term = tokenData.term;
|
3688 |
-
}
|
3689 |
-
|
3690 |
-
decorated.call(this, params, callback);
|
3691 |
-
};
|
3692 |
-
|
3693 |
-
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
|
3694 |
-
var separators = options.get('tokenSeparators') || [];
|
3695 |
-
var term = params.term;
|
3696 |
-
var i = 0;
|
3697 |
-
|
3698 |
-
var createTag = this.createTag || function (params) {
|
3699 |
-
return {
|
3700 |
-
id: params.term,
|
3701 |
-
text: params.term
|
3702 |
-
};
|
3703 |
-
};
|
3704 |
-
|
3705 |
-
while (i < term.length) {
|
3706 |
-
var termChar = term[i];
|
3707 |
-
|
3708 |
-
if ($.inArray(termChar, separators) === -1) {
|
3709 |
-
i++;
|
3710 |
-
|
3711 |
-
continue;
|
3712 |
-
}
|
3713 |
-
|
3714 |
-
var part = term.substr(0, i);
|
3715 |
-
var partParams = $.extend({}, params, {
|
3716 |
-
term: part
|
3717 |
-
});
|
3718 |
-
|
3719 |
-
var data = createTag(partParams);
|
3720 |
-
|
3721 |
-
if (data == null) {
|
3722 |
-
i++;
|
3723 |
-
continue;
|
3724 |
-
}
|
3725 |
-
|
3726 |
-
callback(data);
|
3727 |
-
|
3728 |
-
// Reset the term to not include the tokenized portion
|
3729 |
-
term = term.substr(i + 1) || '';
|
3730 |
-
i = 0;
|
3731 |
-
}
|
3732 |
-
|
3733 |
-
return {
|
3734 |
-
term: term
|
3735 |
-
};
|
3736 |
-
};
|
3737 |
-
|
3738 |
-
return Tokenizer;
|
3739 |
-
});
|
3740 |
-
|
3741 |
-
S2.define('select2/data/minimumInputLength',[
|
3742 |
-
|
3743 |
-
], function () {
|
3744 |
-
function MinimumInputLength (decorated, $e, options) {
|
3745 |
-
this.minimumInputLength = options.get('minimumInputLength');
|
3746 |
-
|
3747 |
-
decorated.call(this, $e, options);
|
3748 |
-
}
|
3749 |
-
|
3750 |
-
MinimumInputLength.prototype.query = function (decorated, params, callback) {
|
3751 |
-
params.term = params.term || '';
|
3752 |
-
|
3753 |
-
if (params.term.length < this.minimumInputLength) {
|
3754 |
-
this.trigger('results:message', {
|
3755 |
-
message: 'inputTooShort',
|
3756 |
-
args: {
|
3757 |
-
minimum: this.minimumInputLength,
|
3758 |
-
input: params.term,
|
3759 |
-
params: params
|
3760 |
-
}
|
3761 |
-
});
|
3762 |
-
|
3763 |
-
return;
|
3764 |
-
}
|
3765 |
-
|
3766 |
-
decorated.call(this, params, callback);
|
3767 |
-
};
|
3768 |
-
|
3769 |
-
return MinimumInputLength;
|
3770 |
-
});
|
3771 |
-
|
3772 |
-
S2.define('select2/data/maximumInputLength',[
|
3773 |
-
|
3774 |
-
], function () {
|
3775 |
-
function MaximumInputLength (decorated, $e, options) {
|
3776 |
-
this.maximumInputLength = options.get('maximumInputLength');
|
3777 |
-
|
3778 |
-
decorated.call(this, $e, options);
|
3779 |
-
}
|
3780 |
-
|
3781 |
-
MaximumInputLength.prototype.query = function (decorated, params, callback) {
|
3782 |
-
params.term = params.term || '';
|
3783 |
-
|
3784 |
-
if (this.maximumInputLength > 0 &&
|
3785 |
-
params.term.length > this.maximumInputLength) {
|
3786 |
-
this.trigger('results:message', {
|
3787 |
-
message: 'inputTooLong',
|
3788 |
-
args: {
|
3789 |
-
maximum: this.maximumInputLength,
|
3790 |
-
input: params.term,
|
3791 |
-
params: params
|
3792 |
-
}
|
3793 |
-
});
|
3794 |
-
|
3795 |
-
return;
|
3796 |
-
}
|
3797 |
-
|
3798 |
-
decorated.call(this, params, callback);
|
3799 |
-
};
|
3800 |
-
|
3801 |
-
return MaximumInputLength;
|
3802 |
-
});
|
3803 |
-
|
3804 |
-
S2.define('select2/data/maximumSelectionLength',[
|
3805 |
-
|
3806 |
-
], function (){
|
3807 |
-
function MaximumSelectionLength (decorated, $e, options) {
|
3808 |
-
this.maximumSelectionLength = options.get('maximumSelectionLength');
|
3809 |
-
|
3810 |
-
decorated.call(this, $e, options);
|
3811 |
-
}
|
3812 |
-
|
3813 |
-
MaximumSelectionLength.prototype.query =
|
3814 |
-
function (decorated, params, callback) {
|
3815 |
-
var self = this;
|
3816 |
-
|
3817 |
-
this.current(function (currentData) {
|
3818 |
-
var count = currentData != null ? currentData.length : 0;
|
3819 |
-
if (self.maximumSelectionLength > 0 &&
|
3820 |
-
count >= self.maximumSelectionLength) {
|
3821 |
-
self.trigger('results:message', {
|
3822 |
-
message: 'maximumSelected',
|
3823 |
-
args: {
|
3824 |
-
maximum: self.maximumSelectionLength
|
3825 |
-
}
|
3826 |
-
});
|
3827 |
-
return;
|
3828 |
-
}
|
3829 |
-
decorated.call(self, params, callback);
|
3830 |
-
});
|
3831 |
-
};
|
3832 |
-
|
3833 |
-
return MaximumSelectionLength;
|
3834 |
-
});
|
3835 |
-
|
3836 |
-
S2.define('select2/dropdown',[
|
3837 |
-
'jquery',
|
3838 |
-
'./utils'
|
3839 |
-
], function ($, Utils) {
|
3840 |
-
function Dropdown ($element, options) {
|
3841 |
-
this.$element = $element;
|
3842 |
-
this.options = options;
|
3843 |
-
|
3844 |
-
Dropdown.__super__.constructor.call(this);
|
3845 |
-
}
|
3846 |
-
|
3847 |
-
Utils.Extend(Dropdown, Utils.Observable);
|
3848 |
-
|
3849 |
-
Dropdown.prototype.render = function () {
|
3850 |
-
var $dropdown = $(
|
3851 |
-
'<span class="select2-dropdown">' +
|
3852 |
-
'<span class="select2-results"></span>' +
|
3853 |
-
'</span>'
|
3854 |
-
);
|
3855 |
-
|
3856 |
-
$dropdown.attr('dir', this.options.get('dir'));
|
3857 |
-
|
3858 |
-
this.$dropdown = $dropdown;
|
3859 |
-
|
3860 |
-
return $dropdown;
|
3861 |
-
};
|
3862 |
-
|
3863 |
-
Dropdown.prototype.bind = function () {
|
3864 |
-
// Should be implemented in subclasses
|
3865 |
-
};
|
3866 |
-
|
3867 |
-
Dropdown.prototype.position = function ($dropdown, $container) {
|
3868 |
-
// Should be implmented in subclasses
|
3869 |
-
};
|
3870 |
-
|
3871 |
-
Dropdown.prototype.destroy = function () {
|
3872 |
-
// Remove the dropdown from the DOM
|
3873 |
-
this.$dropdown.remove();
|
3874 |
-
};
|
3875 |
-
|
3876 |
-
return Dropdown;
|
3877 |
-
});
|
3878 |
-
|
3879 |
-
S2.define('select2/dropdown/search',[
|
3880 |
-
'jquery',
|
3881 |
-
'../utils'
|
3882 |
-
], function ($, Utils) {
|
3883 |
-
function Search () { }
|
3884 |
-
|
3885 |
-
Search.prototype.render = function (decorated) {
|
3886 |
-
var $rendered = decorated.call(this);
|
3887 |
-
|
3888 |
-
var $search = $(
|
3889 |
-
'<span class="select2-search select2-search--dropdown">' +
|
3890 |
-
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
3891 |
-
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
3892 |
-
' spellcheck="false" role="textbox" />' +
|
3893 |
-
'</span>'
|
3894 |
-
);
|
3895 |
-
|
3896 |
-
this.$searchContainer = $search;
|
3897 |
-
this.$search = $search.find('input');
|
3898 |
-
|
3899 |
-
$rendered.prepend($search);
|
3900 |
-
|
3901 |
-
return $rendered;
|
3902 |
-
};
|
3903 |
-
|
3904 |
-
Search.prototype.bind = function (decorated, container, $container) {
|
3905 |
-
var self = this;
|
3906 |
-
|
3907 |
-
decorated.call(this, container, $container);
|
3908 |
-
|
3909 |
-
this.$search.on('keydown', function (evt) {
|
3910 |
-
self.trigger('keypress', evt);
|
3911 |
-
|
3912 |
-
self._keyUpPrevented = evt.isDefaultPrevented();
|
3913 |
-
});
|
3914 |
-
|
3915 |
-
// Workaround for browsers which do not support the `input` event
|
3916 |
-
// This will prevent double-triggering of events for browsers which support
|
3917 |
-
// both the `keyup` and `input` events.
|
3918 |
-
this.$search.on('input', function (evt) {
|
3919 |
-
// Unbind the duplicated `keyup` event
|
3920 |
-
$(this).off('keyup');
|
3921 |
-
});
|
3922 |
-
|
3923 |
-
this.$search.on('keyup input', function (evt) {
|
3924 |
-
self.handleSearch(evt);
|
3925 |
-
});
|
3926 |
-
|
3927 |
-
container.on('open', function () {
|
3928 |
-
self.$search.attr('tabindex', 0);
|
3929 |
-
|
3930 |
-
self.$search.focus();
|
3931 |
-
|
3932 |
-
window.setTimeout(function () {
|
3933 |
-
self.$search.focus();
|
3934 |
-
}, 0);
|
3935 |
-
});
|
3936 |
-
|
3937 |
-
container.on('close', function () {
|
3938 |
-
self.$search.attr('tabindex', -1);
|
3939 |
-
|
3940 |
-
self.$search.val('');
|
3941 |
-
});
|
3942 |
-
|
3943 |
-
container.on('focus', function () {
|
3944 |
-
if (container.isOpen()) {
|
3945 |
-
self.$search.focus();
|
3946 |
-
}
|
3947 |
-
});
|
3948 |
-
|
3949 |
-
container.on('results:all', function (params) {
|
3950 |
-
if (params.query.term == null || params.query.term === '') {
|
3951 |
-
var showSearch = self.showSearch(params);
|
3952 |
-
|
3953 |
-
if (showSearch) {
|
3954 |
-
self.$searchContainer.removeClass('select2-search--hide');
|
3955 |
-
} else {
|
3956 |
-
self.$searchContainer.addClass('select2-search--hide');
|
3957 |
-
}
|
3958 |
-
}
|
3959 |
-
});
|
3960 |
-
};
|
3961 |
-
|
3962 |
-
Search.prototype.handleSearch = function (evt) {
|
3963 |
-
if (!this._keyUpPrevented) {
|
3964 |
-
var input = this.$search.val();
|
3965 |
-
|
3966 |
-
this.trigger('query', {
|
3967 |
-
term: input
|
3968 |
-
});
|
3969 |
-
}
|
3970 |
-
|
3971 |
-
this._keyUpPrevented = false;
|
3972 |
-
};
|
3973 |
-
|
3974 |
-
Search.prototype.showSearch = function (_, params) {
|
3975 |
-
return true;
|
3976 |
-
};
|
3977 |
-
|
3978 |
-
return Search;
|
3979 |
-
});
|
3980 |
-
|
3981 |
-
S2.define('select2/dropdown/hidePlaceholder',[
|
3982 |
-
|
3983 |
-
], function () {
|
3984 |
-
function HidePlaceholder (decorated, $element, options, dataAdapter) {
|
3985 |
-
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
3986 |
-
|
3987 |
-
decorated.call(this, $element, options, dataAdapter);
|
3988 |
-
}
|
3989 |
-
|
3990 |
-
HidePlaceholder.prototype.append = function (decorated, data) {
|
3991 |
-
data.results = this.removePlaceholder(data.results);
|
3992 |
-
|
3993 |
-
decorated.call(this, data);
|
3994 |
-
};
|
3995 |
-
|
3996 |
-
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
3997 |
-
if (typeof placeholder === 'string') {
|
3998 |
-
placeholder = {
|
3999 |
-
id: '',
|
4000 |
-
text: placeholder
|
4001 |
-
};
|
4002 |
-
}
|
4003 |
-
|
4004 |
-
return placeholder;
|
4005 |
-
};
|
4006 |
-
|
4007 |
-
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
|
4008 |
-
var modifiedData = data.slice(0);
|
4009 |
-
|
4010 |
-
for (var d = data.length - 1; d >= 0; d--) {
|
4011 |
-
var item = data[d];
|
4012 |
-
|
4013 |
-
if (this.placeholder.id === item.id) {
|
4014 |
-
modifiedData.splice(d, 1);
|
4015 |
-
}
|
4016 |
-
}
|
4017 |
-
|
4018 |
-
return modifiedData;
|
4019 |
-
};
|
4020 |
-
|
4021 |
-
return HidePlaceholder;
|
4022 |
-
});
|
4023 |
-
|
4024 |
-
S2.define('select2/dropdown/infiniteScroll',[
|
4025 |
-
'jquery'
|
4026 |
-
], function ($) {
|
4027 |
-
function InfiniteScroll (decorated, $element, options, dataAdapter) {
|
4028 |
-
this.lastParams = {};
|
4029 |
-
|
4030 |
-
decorated.call(this, $element, options, dataAdapter);
|
4031 |
-
|
4032 |
-
this.$loadingMore = this.createLoadingMore();
|
4033 |
-
this.loading = false;
|
4034 |
-
}
|
4035 |
-
|
4036 |
-
InfiniteScroll.prototype.append = function (decorated, data) {
|
4037 |
-
this.$loadingMore.remove();
|
4038 |
-
this.loading = false;
|
4039 |
-
|
4040 |
-
decorated.call(this, data);
|
4041 |
-
|
4042 |
-
if (this.showLoadingMore(data)) {
|
4043 |
-
this.$results.append(this.$loadingMore);
|
4044 |
-
}
|
4045 |
-
};
|
4046 |
-
|
4047 |
-
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
|
4048 |
-
var self = this;
|
4049 |
-
|
4050 |
-
decorated.call(this, container, $container);
|
4051 |
-
|
4052 |
-
container.on('query', function (params) {
|
4053 |
-
self.lastParams = params;
|
4054 |
-
self.loading = true;
|
4055 |
-
});
|
4056 |
-
|
4057 |
-
container.on('query:append', function (params) {
|
4058 |
-
self.lastParams = params;
|
4059 |
-
self.loading = true;
|
4060 |
-
});
|
4061 |
-
|
4062 |
-
this.$results.on('scroll', function () {
|
4063 |
-
var isLoadMoreVisible = $.contains(
|
4064 |
-
document.documentElement,
|
4065 |
-
self.$loadingMore[0]
|
4066 |
-
);
|
4067 |
-
|
4068 |
-
if (self.loading || !isLoadMoreVisible) {
|
4069 |
-
return;
|
4070 |
-
}
|
4071 |
-
|
4072 |
-
var currentOffset = self.$results.offset().top +
|
4073 |
-
self.$results.outerHeight(false);
|
4074 |
-
var loadingMoreOffset = self.$loadingMore.offset().top +
|
4075 |
-
self.$loadingMore.outerHeight(false);
|
4076 |
-
|
4077 |
-
if (currentOffset + 50 >= loadingMoreOffset) {
|
4078 |
-
self.loadMore();
|
4079 |
-
}
|
4080 |
-
});
|
4081 |
-
};
|
4082 |
-
|
4083 |
-
InfiniteScroll.prototype.loadMore = function () {
|
4084 |
-
this.loading = true;
|
4085 |
-
|
4086 |
-
var params = $.extend({}, {page: 1}, this.lastParams);
|
4087 |
-
|
4088 |
-
params.page++;
|
4089 |
-
|
4090 |
-
this.trigger('query:append', params);
|
4091 |
-
};
|
4092 |
-
|
4093 |
-
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
|
4094 |
-
return data.pagination && data.pagination.more;
|
4095 |
-
};
|
4096 |
-
|
4097 |
-
InfiniteScroll.prototype.createLoadingMore = function () {
|
4098 |
-
var $option = $(
|
4099 |
-
'<li ' +
|
4100 |
-
'class="select2-results__option select2-results__option--load-more"' +
|
4101 |
-
'role="treeitem" aria-disabled="true"></li>'
|
4102 |
-
);
|
4103 |
-
|
4104 |
-
var message = this.options.get('translations').get('loadingMore');
|
4105 |
-
|
4106 |
-
$option.html(message(this.lastParams));
|
4107 |
-
|
4108 |
-
return $option;
|
4109 |
-
};
|
4110 |
-
|
4111 |
-
return InfiniteScroll;
|
4112 |
-
});
|
4113 |
-
|
4114 |
-
S2.define('select2/dropdown/attachBody',[
|
4115 |
-
'jquery',
|
4116 |
-
'../utils'
|
4117 |
-
], function ($, Utils) {
|
4118 |
-
function AttachBody (decorated, $element, options) {
|
4119 |
-
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
4120 |
-
|
4121 |
-
decorated.call(this, $element, options);
|
4122 |
-
}
|
4123 |
-
|
4124 |
-
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4125 |
-
var self = this;
|
4126 |
-
|
4127 |
-
var setupResultsEvents = false;
|
4128 |
-
|
4129 |
-
decorated.call(this, container, $container);
|
4130 |
-
|
4131 |
-
container.on('open', function () {
|
4132 |
-
self._showDropdown();
|
4133 |
-
self._attachPositioningHandler(container);
|
4134 |
-
|
4135 |
-
if (!setupResultsEvents) {
|
4136 |
-
setupResultsEvents = true;
|
4137 |
-
|
4138 |
-
container.on('results:all', function () {
|
4139 |
-
self._positionDropdown();
|
4140 |
-
self._resizeDropdown();
|
4141 |
-
});
|
4142 |
-
|
4143 |
-
container.on('results:append', function () {
|
4144 |
-
self._positionDropdown();
|
4145 |
-
self._resizeDropdown();
|
4146 |
-
});
|
4147 |
-
}
|
4148 |
-
});
|
4149 |
-
|
4150 |
-
container.on('close', function () {
|
4151 |
-
self._hideDropdown();
|
4152 |
-
self._detachPositioningHandler(container);
|
4153 |
-
});
|
4154 |
-
|
4155 |
-
this.$dropdownContainer.on('mousedown', function (evt) {
|
4156 |
-
evt.stopPropagation();
|
4157 |
-
});
|
4158 |
-
};
|
4159 |
-
|
4160 |
-
AttachBody.prototype.destroy = function (decorated) {
|
4161 |
-
decorated.call(this);
|
4162 |
-
|
4163 |
-
this.$dropdownContainer.remove();
|
4164 |
-
};
|
4165 |
-
|
4166 |
-
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
|
4167 |
-
// Clone all of the container classes
|
4168 |
-
$dropdown.attr('class', $container.attr('class'));
|
4169 |
-
|
4170 |
-
$dropdown.removeClass('select2');
|
4171 |
-
$dropdown.addClass('select2-container--open');
|
4172 |
-
|
4173 |
-
$dropdown.css({
|
4174 |
-
position: 'absolute',
|
4175 |
-
top: -999999
|
4176 |
-
});
|
4177 |
-
|
4178 |
-
this.$container = $container;
|
4179 |
-
};
|
4180 |
-
|
4181 |
-
AttachBody.prototype.render = function (decorated) {
|
4182 |
-
var $container = $('<span></span>');
|
4183 |
-
|
4184 |
-
var $dropdown = decorated.call(this);
|
4185 |
-
$container.append($dropdown);
|
4186 |
-
|
4187 |
-
this.$dropdownContainer = $container;
|
4188 |
-
|
4189 |
-
return $container;
|
4190 |
-
};
|
4191 |
-
|
4192 |
-
AttachBody.prototype._hideDropdown = function (decorated) {
|
4193 |
-
this.$dropdownContainer.detach();
|
4194 |
-
};
|
4195 |
-
|
4196 |
-
AttachBody.prototype._attachPositioningHandler =
|
4197 |
-
function (decorated, container) {
|
4198 |
-
var self = this;
|
4199 |
-
|
4200 |
-
var scrollEvent = 'scroll.select2.' + container.id;
|
4201 |
-
var resizeEvent = 'resize.select2.' + container.id;
|
4202 |
-
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4203 |
-
|
4204 |
-
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4205 |
-
$watchers.each(function () {
|
4206 |
-
$(this).data('select2-scroll-position', {
|
4207 |
-
x: $(this).scrollLeft(),
|
4208 |
-
y: $(this).scrollTop()
|
4209 |
-
});
|
4210 |
-
});
|
4211 |
-
|
4212 |
-
$watchers.on(scrollEvent, function (ev) {
|
4213 |
-
var position = $(this).data('select2-scroll-position');
|
4214 |
-
$(this).scrollTop(position.y);
|
4215 |
-
});
|
4216 |
-
|
4217 |
-
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
|
4218 |
-
function (e) {
|
4219 |
-
self._positionDropdown();
|
4220 |
-
self._resizeDropdown();
|
4221 |
-
});
|
4222 |
-
};
|
4223 |
-
|
4224 |
-
AttachBody.prototype._detachPositioningHandler =
|
4225 |
-
function (decorated, container) {
|
4226 |
-
var scrollEvent = 'scroll.select2.' + container.id;
|
4227 |
-
var resizeEvent = 'resize.select2.' + container.id;
|
4228 |
-
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4229 |
-
|
4230 |
-
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4231 |
-
$watchers.off(scrollEvent);
|
4232 |
-
|
4233 |
-
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
|
4234 |
-
};
|
4235 |
-
|
4236 |
-
AttachBody.prototype._positionDropdown = function () {
|
4237 |
-
var $window = $(window);
|
4238 |
-
|
4239 |
-
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
|
4240 |
-
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
|
4241 |
-
|
4242 |
-
var newDirection = null;
|
4243 |
-
|
4244 |
-
var offset = this.$container.offset();
|
4245 |
-
|
4246 |
-
offset.bottom = offset.top + this.$container.outerHeight(false);
|
4247 |
-
|
4248 |
-
var container = {
|
4249 |
-
height: this.$container.outerHeight(false)
|
4250 |
-
};
|
4251 |
-
|
4252 |
-
container.top = offset.top;
|
4253 |
-
container.bottom = offset.top + container.height;
|
4254 |
-
|
4255 |
-
var dropdown = {
|
4256 |
-
height: this.$dropdown.outerHeight(false)
|
4257 |
-
};
|
4258 |
-
|
4259 |
-
var viewport = {
|
4260 |
-
top: $window.scrollTop(),
|
4261 |
-
bottom: $window.scrollTop() + $window.height()
|
4262 |
-
};
|
4263 |
-
|
4264 |
-
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
|
4265 |
-
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
|
4266 |
-
|
4267 |
-
var css = {
|
4268 |
-
left: offset.left,
|
4269 |
-
top: container.bottom
|
4270 |
-
};
|
4271 |
-
|
4272 |
-
// Determine what the parent element is to use for calciulating the offset
|
4273 |
-
var $offsetParent = this.$dropdownParent;
|
4274 |
-
|
4275 |
-
// For statically positoned elements, we need to get the element
|
4276 |
-
// that is determining the offset
|
4277 |
-
if ($offsetParent.css('position') === 'static') {
|
4278 |
-
$offsetParent = $offsetParent.offsetParent();
|
4279 |
-
}
|
4280 |
-
|
4281 |
-
var parentOffset = $offsetParent.offset();
|
4282 |
-
|
4283 |
-
css.top -= parentOffset.top;
|
4284 |
-
css.left -= parentOffset.left;
|
4285 |
-
|
4286 |
-
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
4287 |
-
newDirection = 'below';
|
4288 |
-
}
|
4289 |
-
|
4290 |
-
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
|
4291 |
-
newDirection = 'above';
|
4292 |
-
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
|
4293 |
-
newDirection = 'below';
|
4294 |
-
}
|
4295 |
-
|
4296 |
-
if (newDirection == 'above' ||
|
4297 |
-
(isCurrentlyAbove && newDirection !== 'below')) {
|
4298 |
-
css.top = container.top - parentOffset.top - dropdown.height;
|
4299 |
-
}
|
4300 |
-
|
4301 |
-
if (newDirection != null) {
|
4302 |
-
this.$dropdown
|
4303 |
-
.removeClass('select2-dropdown--below select2-dropdown--above')
|
4304 |
-
.addClass('select2-dropdown--' + newDirection);
|
4305 |
-
this.$container
|
4306 |
-
.removeClass('select2-container--below select2-container--above')
|
4307 |
-
.addClass('select2-container--' + newDirection);
|
4308 |
-
}
|
4309 |
-
|
4310 |
-
this.$dropdownContainer.css(css);
|
4311 |
-
};
|
4312 |
-
|
4313 |
-
AttachBody.prototype._resizeDropdown = function () {
|
4314 |
-
var css = {
|
4315 |
-
width: this.$container.outerWidth(false) + 'px'
|
4316 |
-
};
|
4317 |
-
|
4318 |
-
if (this.options.get('dropdownAutoWidth')) {
|
4319 |
-
css.minWidth = css.width;
|
4320 |
-
css.position = 'relative';
|
4321 |
-
css.width = 'auto';
|
4322 |
-
}
|
4323 |
-
|
4324 |
-
this.$dropdown.css(css);
|
4325 |
-
};
|
4326 |
-
|
4327 |
-
AttachBody.prototype._showDropdown = function (decorated) {
|
4328 |
-
this.$dropdownContainer.appendTo(this.$dropdownParent);
|
4329 |
-
|
4330 |
-
this._positionDropdown();
|
4331 |
-
this._resizeDropdown();
|
4332 |
-
};
|
4333 |
-
|
4334 |
-
return AttachBody;
|
4335 |
-
});
|
4336 |
-
|
4337 |
-
S2.define('select2/dropdown/minimumResultsForSearch',[
|
4338 |
-
|
4339 |
-
], function () {
|
4340 |
-
function countResults (data) {
|
4341 |
-
var count = 0;
|
4342 |
-
|
4343 |
-
for (var d = 0; d < data.length; d++) {
|
4344 |
-
var item = data[d];
|
4345 |
-
|
4346 |
-
if (item.children) {
|
4347 |
-
count += countResults(item.children);
|
4348 |
-
} else {
|
4349 |
-
count++;
|
4350 |
-
}
|
4351 |
-
}
|
4352 |
-
|
4353 |
-
return count;
|
4354 |
-
}
|
4355 |
-
|
4356 |
-
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
|
4357 |
-
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
|
4358 |
-
|
4359 |
-
if (this.minimumResultsForSearch < 0) {
|
4360 |
-
this.minimumResultsForSearch = Infinity;
|
4361 |
-
}
|
4362 |
-
|
4363 |
-
decorated.call(this, $element, options, dataAdapter);
|
4364 |
-
}
|
4365 |
-
|
4366 |
-
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
|
4367 |
-
if (countResults(params.data.results) < this.minimumResultsForSearch) {
|
4368 |
-
return false;
|
4369 |
-
}
|
4370 |
-
|
4371 |
-
return decorated.call(this, params);
|
4372 |
-
};
|
4373 |
-
|
4374 |
-
return MinimumResultsForSearch;
|
4375 |
-
});
|
4376 |
-
|
4377 |
-
S2.define('select2/dropdown/selectOnClose',[
|
4378 |
-
|
4379 |
-
], function () {
|
4380 |
-
function SelectOnClose () { }
|
4381 |
-
|
4382 |
-
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4383 |
-
var self = this;
|
4384 |
-
|
4385 |
-
decorated.call(this, container, $container);
|
4386 |
-
|
4387 |
-
container.on('close', function (params) {
|
4388 |
-
self._handleSelectOnClose(params);
|
4389 |
-
});
|
4390 |
-
};
|
4391 |
-
|
4392 |
-
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4393 |
-
if (params && params.originalSelect2Event != null) {
|
4394 |
-
var event = params.originalSelect2Event;
|
4395 |
-
|
4396 |
-
// Don't select an item if the close event was triggered from a select or
|
4397 |
-
// unselect event
|
4398 |
-
if (event._type === 'select' || event._type === 'unselect') {
|
4399 |
-
return;
|
4400 |
-
}
|
4401 |
-
}
|
4402 |
-
|
4403 |
-
var $highlightedResults = this.getHighlightedResults();
|
4404 |
-
|
4405 |
-
// Only select highlighted results
|
4406 |
-
if ($highlightedResults.length < 1) {
|
4407 |
-
return;
|
4408 |
-
}
|
4409 |
-
|
4410 |
-
var data = $highlightedResults.data('data');
|
4411 |
-
|
4412 |
-
// Don't re-select already selected resulte
|
4413 |
-
if (
|
4414 |
-
(data.element != null && data.element.selected) ||
|
4415 |
-
(data.element == null && data.selected)
|
4416 |
-
) {
|
4417 |
-
return;
|
4418 |
-
}
|
4419 |
-
|
4420 |
-
this.trigger('select', {
|
4421 |
-
data: data
|
4422 |
-
});
|
4423 |
-
};
|
4424 |
-
|
4425 |
-
return SelectOnClose;
|
4426 |
-
});
|
4427 |
-
|
4428 |
-
S2.define('select2/dropdown/closeOnSelect',[
|
4429 |
-
|
4430 |
-
], function () {
|
4431 |
-
function CloseOnSelect () { }
|
4432 |
-
|
4433 |
-
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
|
4434 |
-
var self = this;
|
4435 |
-
|
4436 |
-
decorated.call(this, container, $container);
|
4437 |
-
|
4438 |
-
container.on('select', function (evt) {
|
4439 |
-
self._selectTriggered(evt);
|
4440 |
-
});
|
4441 |
-
|
4442 |
-
container.on('unselect', function (evt) {
|
4443 |
-
self._selectTriggered(evt);
|
4444 |
-
});
|
4445 |
-
};
|
4446 |
-
|
4447 |
-
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
|
4448 |
-
var originalEvent = evt.originalEvent;
|
4449 |
-
|
4450 |
-
// Don't close if the control key is being held
|
4451 |
-
if (originalEvent && originalEvent.ctrlKey) {
|
4452 |
-
return;
|
4453 |
-
}
|
4454 |
-
|
4455 |
-
this.trigger('close', {
|
4456 |
-
originalEvent: originalEvent,
|
4457 |
-
originalSelect2Event: evt
|
4458 |
-
});
|
4459 |
-
};
|
4460 |
-
|
4461 |
-
return CloseOnSelect;
|
4462 |
-
});
|
4463 |
-
|
4464 |
-
S2.define('select2/i18n/en',[],function () {
|
4465 |
-
// English
|
4466 |
-
return {
|
4467 |
-
errorLoading: function () {
|
4468 |
-
return 'The results could not be loaded.';
|
4469 |
-
},
|
4470 |
-
inputTooLong: function (args) {
|
4471 |
-
var overChars = args.input.length - args.maximum;
|
4472 |
-
|
4473 |
-
var message = 'Please delete ' + overChars + ' character';
|
4474 |
-
|
4475 |
-
if (overChars != 1) {
|
4476 |
-
message += 's';
|
4477 |
-
}
|
4478 |
-
|
4479 |
-
return message;
|
4480 |
-
},
|
4481 |
-
inputTooShort: function (args) {
|
4482 |
-
var remainingChars = args.minimum - args.input.length;
|
4483 |
-
|
4484 |
-
var message = 'Please enter ' + remainingChars + ' or more characters';
|
4485 |
-
|
4486 |
-
return message;
|
4487 |
-
},
|
4488 |
-
loadingMore: function () {
|
4489 |
-
return 'Loading more results…';
|
4490 |
-
},
|
4491 |
-
maximumSelected: function (args) {
|
4492 |
-
var message = 'You can only select ' + args.maximum + ' item';
|
4493 |
-
|
4494 |
-
if (args.maximum != 1) {
|
4495 |
-
message += 's';
|
4496 |
-
}
|
4497 |
-
|
4498 |
-
return message;
|
4499 |
-
},
|
4500 |
-
noResults: function () {
|
4501 |
-
return 'No results found';
|
4502 |
-
},
|
4503 |
-
searching: function () {
|
4504 |
-
return 'Searching…';
|
4505 |
-
}
|
4506 |
-
};
|
4507 |
-
});
|
4508 |
-
|
4509 |
-
S2.define('select2/defaults',[
|
4510 |
-
'jquery',
|
4511 |
-
'require',
|
4512 |
-
|
4513 |
-
'./results',
|
4514 |
-
|
4515 |
-
'./selection/single',
|
4516 |
-
'./selection/multiple',
|
4517 |
-
'./selection/placeholder',
|
4518 |
-
'./selection/allowClear',
|
4519 |
-
'./selection/search',
|
4520 |
-
'./selection/eventRelay',
|
4521 |
-
|
4522 |
-
'./utils',
|
4523 |
-
'./translation',
|
4524 |
-
'./diacritics',
|
4525 |
-
|
4526 |
-
'./data/select',
|
4527 |
-
'./data/array',
|
4528 |
-
'./data/ajax',
|
4529 |
-
'./data/tags',
|
4530 |
-
'./data/tokenizer',
|
4531 |
-
'./data/minimumInputLength',
|
4532 |
-
'./data/maximumInputLength',
|
4533 |
-
'./data/maximumSelectionLength',
|
4534 |
-
|
4535 |
-
'./dropdown',
|
4536 |
-
'./dropdown/search',
|
4537 |
-
'./dropdown/hidePlaceholder',
|
4538 |
-
'./dropdown/infiniteScroll',
|
4539 |
-
'./dropdown/attachBody',
|
4540 |
-
'./dropdown/minimumResultsForSearch',
|
4541 |
-
'./dropdown/selectOnClose',
|
4542 |
-
'./dropdown/closeOnSelect',
|
4543 |
-
|
4544 |
-
'./i18n/en'
|
4545 |
-
], function ($, require,
|
4546 |
-
|
4547 |
-
ResultsList,
|
4548 |
-
|
4549 |
-
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
4550 |
-
SelectionSearch, EventRelay,
|
4551 |
-
|
4552 |
-
Utils, Translation, DIACRITICS,
|
4553 |
-
|
4554 |
-
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
|
4555 |
-
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
|
4556 |
-
|
4557 |
-
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
|
4558 |
-
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
|
4559 |
-
|
4560 |
-
EnglishTranslation) {
|
4561 |
-
function Defaults () {
|
4562 |
-
this.reset();
|
4563 |
-
}
|
4564 |
-
|
4565 |
-
Defaults.prototype.apply = function (options) {
|
4566 |
-
options = $.extend(true, {}, this.defaults, options);
|
4567 |
-
|
4568 |
-
if (options.dataAdapter == null) {
|
4569 |
-
if (options.ajax != null) {
|
4570 |
-
options.dataAdapter = AjaxData;
|
4571 |
-
} else if (options.data != null) {
|
4572 |
-
options.dataAdapter = ArrayData;
|
4573 |
-
} else {
|
4574 |
-
options.dataAdapter = SelectData;
|
4575 |
-
}
|
4576 |
-
|
4577 |
-
if (options.minimumInputLength > 0) {
|
4578 |
-
options.dataAdapter = Utils.Decorate(
|
4579 |
-
options.dataAdapter,
|
4580 |
-
MinimumInputLength
|
4581 |
-
);
|
4582 |
-
}
|
4583 |
-
|
4584 |
-
if (options.maximumInputLength > 0) {
|
4585 |
-
options.dataAdapter = Utils.Decorate(
|
4586 |
-
options.dataAdapter,
|
4587 |
-
MaximumInputLength
|
4588 |
-
);
|
4589 |
-
}
|
4590 |
-
|
4591 |
-
if (options.maximumSelectionLength > 0) {
|
4592 |
-
options.dataAdapter = Utils.Decorate(
|
4593 |
-
options.dataAdapter,
|
4594 |
-
MaximumSelectionLength
|
4595 |
-
);
|
4596 |
-
}
|
4597 |
-
|
4598 |
-
if (options.tags) {
|
4599 |
-
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
|
4600 |
-
}
|
4601 |
-
|
4602 |
-
if (options.tokenSeparators != null || options.tokenizer != null) {
|
4603 |
-
options.dataAdapter = Utils.Decorate(
|
4604 |
-
options.dataAdapter,
|
4605 |
-
Tokenizer
|
4606 |
-
);
|
4607 |
-
}
|
4608 |
-
|
4609 |
-
if (options.query != null) {
|
4610 |
-
var Query = require(options.amdBase + 'compat/query');
|
4611 |
-
|
4612 |
-
options.dataAdapter = Utils.Decorate(
|
4613 |
-
options.dataAdapter,
|
4614 |
-
Query
|
4615 |
-
);
|
4616 |
-
}
|
4617 |
-
|
4618 |
-
if (options.initSelection != null) {
|
4619 |
-
var InitSelection = require(options.amdBase + 'compat/initSelection');
|
4620 |
-
|
4621 |
-
options.dataAdapter = Utils.Decorate(
|
4622 |
-
options.dataAdapter,
|
4623 |
-
InitSelection
|
4624 |
-
);
|
4625 |
-
}
|
4626 |
-
}
|
4627 |
-
|
4628 |
-
if (options.resultsAdapter == null) {
|
4629 |
-
options.resultsAdapter = ResultsList;
|
4630 |
-
|
4631 |
-
if (options.ajax != null) {
|
4632 |
-
options.resultsAdapter = Utils.Decorate(
|
4633 |
-
options.resultsAdapter,
|
4634 |
-
InfiniteScroll
|
4635 |
-
);
|
4636 |
-
}
|
4637 |
-
|
4638 |
-
if (options.placeholder != null) {
|
4639 |
-
options.resultsAdapter = Utils.Decorate(
|
4640 |
-
options.resultsAdapter,
|
4641 |
-
HidePlaceholder
|
4642 |
-
);
|
4643 |
-
}
|
4644 |
-
|
4645 |
-
if (options.selectOnClose) {
|
4646 |
-
options.resultsAdapter = Utils.Decorate(
|
4647 |
-
options.resultsAdapter,
|
4648 |
-
SelectOnClose
|
4649 |
-
);
|
4650 |
-
}
|
4651 |
-
}
|
4652 |
-
|
4653 |
-
if (options.dropdownAdapter == null) {
|
4654 |
-
if (options.multiple) {
|
4655 |
-
options.dropdownAdapter = Dropdown;
|
4656 |
-
} else {
|
4657 |
-
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
|
4658 |
-
|
4659 |
-
options.dropdownAdapter = SearchableDropdown;
|
4660 |
-
}
|
4661 |
-
|
4662 |
-
if (options.minimumResultsForSearch !== 0) {
|
4663 |
-
options.dropdownAdapter = Utils.Decorate(
|
4664 |
-
options.dropdownAdapter,
|
4665 |
-
MinimumResultsForSearch
|
4666 |
-
);
|
4667 |
-
}
|
4668 |
-
|
4669 |
-
if (options.closeOnSelect) {
|
4670 |
-
options.dropdownAdapter = Utils.Decorate(
|
4671 |
-
options.dropdownAdapter,
|
4672 |
-
CloseOnSelect
|
4673 |
-
);
|
4674 |
-
}
|
4675 |
-
|
4676 |
-
if (
|
4677 |
-
options.dropdownCssClass != null ||
|
4678 |
-
options.dropdownCss != null ||
|
4679 |
-
options.adaptDropdownCssClass != null
|
4680 |
-
) {
|
4681 |
-
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
4682 |
-
|
4683 |
-
options.dropdownAdapter = Utils.Decorate(
|
4684 |
-
options.dropdownAdapter,
|
4685 |
-
DropdownCSS
|
4686 |
-
);
|
4687 |
-
}
|
4688 |
-
|
4689 |
-
options.dropdownAdapter = Utils.Decorate(
|
4690 |
-
options.dropdownAdapter,
|
4691 |
-
AttachBody
|
4692 |
-
);
|
4693 |
-
}
|
4694 |
-
|
4695 |
-
if (options.selectionAdapter == null) {
|
4696 |
-
if (options.multiple) {
|
4697 |
-
options.selectionAdapter = MultipleSelection;
|
4698 |
-
} else {
|
4699 |
-
options.selectionAdapter = SingleSelection;
|
4700 |
-
}
|
4701 |
-
|
4702 |
-
// Add the placeholder mixin if a placeholder was specified
|
4703 |
-
if (options.placeholder != null) {
|
4704 |
-
options.selectionAdapter = Utils.Decorate(
|
4705 |
-
options.selectionAdapter,
|
4706 |
-
Placeholder
|
4707 |
-
);
|
4708 |
-
}
|
4709 |
-
|
4710 |
-
if (options.allowClear) {
|
4711 |
-
options.selectionAdapter = Utils.Decorate(
|
4712 |
-
options.selectionAdapter,
|
4713 |
-
AllowClear
|
4714 |
-
);
|
4715 |
-
}
|
4716 |
-
|
4717 |
-
if (options.multiple) {
|
4718 |
-
options.selectionAdapter = Utils.Decorate(
|
4719 |
-
options.selectionAdapter,
|
4720 |
-
SelectionSearch
|
4721 |
-
);
|
4722 |
-
}
|
4723 |
-
|
4724 |
-
if (
|
4725 |
-
options.containerCssClass != null ||
|
4726 |
-
options.containerCss != null ||
|
4727 |
-
options.adaptContainerCssClass != null
|
4728 |
-
) {
|
4729 |
-
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
4730 |
-
|
4731 |
-
options.selectionAdapter = Utils.Decorate(
|
4732 |
-
options.selectionAdapter,
|
4733 |
-
ContainerCSS
|
4734 |
-
);
|
4735 |
-
}
|
4736 |
-
|
4737 |
-
options.selectionAdapter = Utils.Decorate(
|
4738 |
-
options.selectionAdapter,
|
4739 |
-
EventRelay
|
4740 |
-
);
|
4741 |
-
}
|
4742 |
-
|
4743 |
-
if (typeof options.language === 'string') {
|
4744 |
-
// Check if the language is specified with a region
|
4745 |
-
if (options.language.indexOf('-') > 0) {
|
4746 |
-
// Extract the region information if it is included
|
4747 |
-
var languageParts = options.language.split('-');
|
4748 |
-
var baseLanguage = languageParts[0];
|
4749 |
-
|
4750 |
-
options.language = [options.language, baseLanguage];
|
4751 |
-
} else {
|
4752 |
-
options.language = [options.language];
|
4753 |
-
}
|
4754 |
-
}
|
4755 |
-
|
4756 |
-
if ($.isArray(options.language)) {
|
4757 |
-
var languages = new Translation();
|
4758 |
-
options.language.push('en');
|
4759 |
-
|
4760 |
-
var languageNames = options.language;
|
4761 |
-
|
4762 |
-
for (var l = 0; l < languageNames.length; l++) {
|
4763 |
-
var name = languageNames[l];
|
4764 |
-
var language = {};
|
4765 |
-
|
4766 |
-
try {
|
4767 |
-
// Try to load it with the original name
|
4768 |
-
language = Translation.loadPath(name);
|
4769 |
-
} catch (e) {
|
4770 |
-
try {
|
4771 |
-
// If we couldn't load it, check if it wasn't the full path
|
4772 |
-
name = this.defaults.amdLanguageBase + name;
|
4773 |
-
language = Translation.loadPath(name);
|
4774 |
-
} catch (ex) {
|
4775 |
-
// The translation could not be loaded at all. Sometimes this is
|
4776 |
-
// because of a configuration problem, other times this can be
|
4777 |
-
// because of how Select2 helps load all possible translation files.
|
4778 |
-
if (options.debug && window.console && console.warn) {
|
4779 |
-
console.warn(
|
4780 |
-
'Select2: The language file for "' + name + '" could not be ' +
|
4781 |
-
'automatically loaded. A fallback will be used instead.'
|
4782 |
-
);
|
4783 |
-
}
|
4784 |
-
|
4785 |
-
continue;
|
4786 |
-
}
|
4787 |
-
}
|
4788 |
-
|
4789 |
-
languages.extend(language);
|
4790 |
-
}
|
4791 |
-
|
4792 |
-
options.translations = languages;
|
4793 |
-
} else {
|
4794 |
-
var baseTranslation = Translation.loadPath(
|
4795 |
-
this.defaults.amdLanguageBase + 'en'
|
4796 |
-
);
|
4797 |
-
var customTranslation = new Translation(options.language);
|
4798 |
-
|
4799 |
-
customTranslation.extend(baseTranslation);
|
4800 |
-
|
4801 |
-
options.translations = customTranslation;
|
4802 |
-
}
|
4803 |
-
|
4804 |
-
return options;
|
4805 |
-
};
|
4806 |
-
|
4807 |
-
Defaults.prototype.reset = function () {
|
4808 |
-
function stripDiacritics (text) {
|
4809 |
-
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
4810 |
-
function match(a) {
|
4811 |
-
return DIACRITICS[a] || a;
|
4812 |
-
}
|
4813 |
-
|
4814 |
-
return text.replace(/[^\u0000-\u007E]/g, match);
|
4815 |
-
}
|
4816 |
-
|
4817 |
-
function matcher (params, data) {
|
4818 |
-
// Always return the object if there is nothing to compare
|
4819 |
-
if ($.trim(params.term) === '') {
|
4820 |
-
return data;
|
4821 |
-
}
|
4822 |
-
|
4823 |
-
// Do a recursive check for options with children
|
4824 |
-
if (data.children && data.children.length > 0) {
|
4825 |
-
// Clone the data object if there are children
|
4826 |
-
// This is required as we modify the object to remove any non-matches
|
4827 |
-
var match = $.extend(true, {}, data);
|
4828 |
-
|
4829 |
-
// Check each child of the option
|
4830 |
-
for (var c = data.children.length - 1; c >= 0; c--) {
|
4831 |
-
var child = data.children[c];
|
4832 |
-
|
4833 |
-
var matches = matcher(params, child);
|
4834 |
-
|
4835 |
-
// If there wasn't a match, remove the object in the array
|
4836 |
-
if (matches == null) {
|
4837 |
-
match.children.splice(c, 1);
|
4838 |
-
}
|
4839 |
-
}
|
4840 |
-
|
4841 |
-
// If any children matched, return the new object
|
4842 |
-
if (match.children.length > 0) {
|
4843 |
-
return match;
|
4844 |
-
}
|
4845 |
-
|
4846 |
-
// If there were no matching children, check just the plain object
|
4847 |
-
return matcher(params, match);
|
4848 |
-
}
|
4849 |
-
|
4850 |
-
var original = stripDiacritics(data.text).toUpperCase();
|
4851 |
-
var term = stripDiacritics(params.term).toUpperCase();
|
4852 |
-
|
4853 |
-
// Check if the text contains the term
|
4854 |
-
if (original.indexOf(term) > -1) {
|
4855 |
-
return data;
|
4856 |
-
}
|
4857 |
-
|
4858 |
-
// If it doesn't contain the term, don't return anything
|
4859 |
-
return null;
|
4860 |
-
}
|
4861 |
-
|
4862 |
-
this.defaults = {
|
4863 |
-
amdBase: './',
|
4864 |
-
amdLanguageBase: './i18n/',
|
4865 |
-
closeOnSelect: true,
|
4866 |
-
debug: false,
|
4867 |
-
dropdownAutoWidth: false,
|
4868 |
-
escapeMarkup: Utils.escapeMarkup,
|
4869 |
-
language: EnglishTranslation,
|
4870 |
-
matcher: matcher,
|
4871 |
-
minimumInputLength: 0,
|
4872 |
-
maximumInputLength: 0,
|
4873 |
-
maximumSelectionLength: 0,
|
4874 |
-
minimumResultsForSearch: 0,
|
4875 |
-
selectOnClose: false,
|
4876 |
-
sorter: function (data) {
|
4877 |
-
return data;
|
4878 |
-
},
|
4879 |
-
templateResult: function (result) {
|
4880 |
-
return result.text;
|
4881 |
-
},
|
4882 |
-
templateSelection: function (selection) {
|
4883 |
-
return selection.text;
|
4884 |
-
},
|
4885 |
-
theme: 'default',
|
4886 |
-
width: 'resolve'
|
4887 |
-
};
|
4888 |
-
};
|
4889 |
-
|
4890 |
-
Defaults.prototype.set = function (key, value) {
|
4891 |
-
var camelKey = $.camelCase(key);
|
4892 |
-
|
4893 |
-
var data = {};
|
4894 |
-
data[camelKey] = value;
|
4895 |
-
|
4896 |
-
var convertedData = Utils._convertData(data);
|
4897 |
-
|
4898 |
-
$.extend(this.defaults, convertedData);
|
4899 |
-
};
|
4900 |
-
|
4901 |
-
var defaults = new Defaults();
|
4902 |
-
|
4903 |
-
return defaults;
|
4904 |
-
});
|
4905 |
-
|
4906 |
-
S2.define('select2/options',[
|
4907 |
-
'require',
|
4908 |
-
'jquery',
|
4909 |
-
'./defaults',
|
4910 |
-
'./utils'
|
4911 |
-
], function (require, $, Defaults, Utils) {
|
4912 |
-
function Options (options, $element) {
|
4913 |
-
this.options = options;
|
4914 |
-
|
4915 |
-
if ($element != null) {
|
4916 |
-
this.fromElement($element);
|
4917 |
-
}
|
4918 |
-
|
4919 |
-
this.options = Defaults.apply(this.options);
|
4920 |
-
|
4921 |
-
if ($element && $element.is('input')) {
|
4922 |
-
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
|
4923 |
-
|
4924 |
-
this.options.dataAdapter = Utils.Decorate(
|
4925 |
-
this.options.dataAdapter,
|
4926 |
-
InputCompat
|
4927 |
-
);
|
4928 |
-
}
|
4929 |
-
}
|
4930 |
-
|
4931 |
-
Options.prototype.fromElement = function ($e) {
|
4932 |
-
var excludedData = ['select2'];
|
4933 |
-
|
4934 |
-
if (this.options.multiple == null) {
|
4935 |
-
this.options.multiple = $e.prop('multiple');
|
4936 |
-
}
|
4937 |
-
|
4938 |
-
if (this.options.disabled == null) {
|
4939 |
-
this.options.disabled = $e.prop('disabled');
|
4940 |
-
}
|
4941 |
-
|
4942 |
-
if (this.options.language == null) {
|
4943 |
-
if ($e.prop('lang')) {
|
4944 |
-
this.options.language = $e.prop('lang').toLowerCase();
|
4945 |
-
} else if ($e.closest('[lang]').prop('lang')) {
|
4946 |
-
this.options.language = $e.closest('[lang]').prop('lang');
|
4947 |
-
}
|
4948 |
-
}
|
4949 |
-
|
4950 |
-
if (this.options.dir == null) {
|
4951 |
-
if ($e.prop('dir')) {
|
4952 |
-
this.options.dir = $e.prop('dir');
|
4953 |
-
} else if ($e.closest('[dir]').prop('dir')) {
|
4954 |
-
this.options.dir = $e.closest('[dir]').prop('dir');
|
4955 |
-
} else {
|
4956 |
-
this.options.dir = 'ltr';
|
4957 |
-
}
|
4958 |
-
}
|
4959 |
-
|
4960 |
-
$e.prop('disabled', this.options.disabled);
|
4961 |
-
$e.prop('multiple', this.options.multiple);
|
4962 |
-
|
4963 |
-
if ($e.data('select2Tags')) {
|
4964 |
-
if (this.options.debug && window.console && console.warn) {
|
4965 |
-
console.warn(
|
4966 |
-
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
4967 |
-
'use the `data-data` and `data-tags="true"` attributes and will be ' +
|
4968 |
-
'removed in future versions of Select2.'
|
4969 |
-
);
|
4970 |
-
}
|
4971 |
-
|
4972 |
-
$e.data('data', $e.data('select2Tags'));
|
4973 |
-
$e.data('tags', true);
|
4974 |
-
}
|
4975 |
-
|
4976 |
-
if ($e.data('ajaxUrl')) {
|
4977 |
-
if (this.options.debug && window.console && console.warn) {
|
4978 |
-
console.warn(
|
4979 |
-
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
4980 |
-
'`data-ajax--url` and support for the old attribute will be removed' +
|
4981 |
-
' in future versions of Select2.'
|
4982 |
-
);
|
4983 |
-
}
|
4984 |
-
|
4985 |
-
$e.attr('ajax--url', $e.data('ajaxUrl'));
|
4986 |
-
$e.data('ajax--url', $e.data('ajaxUrl'));
|
4987 |
-
}
|
4988 |
-
|
4989 |
-
var dataset = {};
|
4990 |
-
|
4991 |
-
// Prefer the element's `dataset` attribute if it exists
|
4992 |
-
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
4993 |
-
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
4994 |
-
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
4995 |
-
} else {
|
4996 |
-
dataset = $e.data();
|
4997 |
-
}
|
4998 |
-
|
4999 |
-
var data = $.extend(true, {}, dataset);
|
5000 |
-
|
5001 |
-
data = Utils._convertData(data);
|
5002 |
-
|
5003 |
-
for (var key in data) {
|
5004 |
-
if ($.inArray(key, excludedData) > -1) {
|
5005 |
-
continue;
|
5006 |
-
}
|
5007 |
-
|
5008 |
-
if ($.isPlainObject(this.options[key])) {
|
5009 |
-
$.extend(this.options[key], data[key]);
|
5010 |
-
} else {
|
5011 |
-
this.options[key] = data[key];
|
5012 |
-
}
|
5013 |
-
}
|
5014 |
-
|
5015 |
-
return this;
|
5016 |
-
};
|
5017 |
-
|
5018 |
-
Options.prototype.get = function (key) {
|
5019 |
-
return this.options[key];
|
5020 |
-
};
|
5021 |
-
|
5022 |
-
Options.prototype.set = function (key, val) {
|
5023 |
-
this.options[key] = val;
|
5024 |
-
};
|
5025 |
-
|
5026 |
-
return Options;
|
5027 |
-
});
|
5028 |
-
|
5029 |
-
S2.define('select2/core',[
|
5030 |
-
'jquery',
|
5031 |
-
'./options',
|
5032 |
-
'./utils',
|
5033 |
-
'./keys'
|
5034 |
-
], function ($, Options, Utils, KEYS) {
|
5035 |
-
var Select2 = function ($element, options) {
|
5036 |
-
if ($element.data('select2') != null) {
|
5037 |
-
$element.data('select2').destroy();
|
5038 |
-
}
|
5039 |
-
|
5040 |
-
this.$element = $element;
|
5041 |
-
|
5042 |
-
this.id = this._generateId($element);
|
5043 |
-
|
5044 |
-
options = options || {};
|
5045 |
-
|
5046 |
-
this.options = new Options(options, $element);
|
5047 |
-
|
5048 |
-
Select2.__super__.constructor.call(this);
|
5049 |
-
|
5050 |
-
// Set up the tabindex
|
5051 |
-
|
5052 |
-
var tabindex = $element.attr('tabindex') || 0;
|
5053 |
-
$element.data('old-tabindex', tabindex);
|
5054 |
-
$element.attr('tabindex', '-1');
|
5055 |
-
|
5056 |
-
// Set up containers and adapters
|
5057 |
-
|
5058 |
-
var DataAdapter = this.options.get('dataAdapter');
|
5059 |
-
this.dataAdapter = new DataAdapter($element, this.options);
|
5060 |
-
|
5061 |
-
var $container = this.render();
|
5062 |
-
|
5063 |
-
this._placeContainer($container);
|
5064 |
-
|
5065 |
-
var SelectionAdapter = this.options.get('selectionAdapter');
|
5066 |
-
this.selection = new SelectionAdapter($element, this.options);
|
5067 |
-
this.$selection = this.selection.render();
|
5068 |
-
|
5069 |
-
this.selection.position(this.$selection, $container);
|
5070 |
-
|
5071 |
-
var DropdownAdapter = this.options.get('dropdownAdapter');
|
5072 |
-
this.dropdown = new DropdownAdapter($element, this.options);
|
5073 |
-
this.$dropdown = this.dropdown.render();
|
5074 |
-
|
5075 |
-
this.dropdown.position(this.$dropdown, $container);
|
5076 |
-
|
5077 |
-
var ResultsAdapter = this.options.get('resultsAdapter');
|
5078 |
-
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
5079 |
-
this.$results = this.results.render();
|
5080 |
-
|
5081 |
-
this.results.position(this.$results, this.$dropdown);
|
5082 |
-
|
5083 |
-
// Bind events
|
5084 |
-
|
5085 |
-
var self = this;
|
5086 |
-
|
5087 |
-
// Bind the container to all of the adapters
|
5088 |
-
this._bindAdapters();
|
5089 |
-
|
5090 |
-
// Register any DOM event handlers
|
5091 |
-
this._registerDomEvents();
|
5092 |
-
|
5093 |
-
// Register any internal event handlers
|
5094 |
-
this._registerDataEvents();
|
5095 |
-
this._registerSelectionEvents();
|
5096 |
-
this._registerDropdownEvents();
|
5097 |
-
this._registerResultsEvents();
|
5098 |
-
this._registerEvents();
|
5099 |
-
|
5100 |
-
// Set the initial state
|
5101 |
-
this.dataAdapter.current(function (initialData) {
|
5102 |
-
self.trigger('selection:update', {
|
5103 |
-
data: initialData
|
5104 |
-
});
|
5105 |
-
});
|
5106 |
-
|
5107 |
-
// Hide the original select
|
5108 |
-
$element.addClass('select2-hidden-accessible');
|
5109 |
-
$element.attr('aria-hidden', 'true');
|
5110 |
-
|
5111 |
-
// Synchronize any monitored attributes
|
5112 |
-
this._syncAttributes();
|
5113 |
-
|
5114 |
-
$element.data('select2', this);
|
5115 |
-
};
|
5116 |
-
|
5117 |
-
Utils.Extend(Select2, Utils.Observable);
|
5118 |
-
|
5119 |
-
Select2.prototype._generateId = function ($element) {
|
5120 |
-
var id = '';
|
5121 |
-
|
5122 |
-
if ($element.attr('id') != null) {
|
5123 |
-
id = $element.attr('id');
|
5124 |
-
} else if ($element.attr('name') != null) {
|
5125 |
-
id = $element.attr('name') + '-' + Utils.generateChars(2);
|
5126 |
-
} else {
|
5127 |
-
id = Utils.generateChars(4);
|
5128 |
-
}
|
5129 |
-
|
5130 |
-
id = id.replace(/(:|\.|\[|\]|,)/g, '');
|
5131 |
-
id = 'select2-' + id;
|
5132 |
-
|
5133 |
-
return id;
|
5134 |
-
};
|
5135 |
-
|
5136 |
-
Select2.prototype._placeContainer = function ($container) {
|
5137 |
-
$container.insertAfter(this.$element);
|
5138 |
-
|
5139 |
-
var width = this._resolveWidth(this.$element, this.options.get('width'));
|
5140 |
-
|
5141 |
-
if (width != null) {
|
5142 |
-
$container.css('width', width);
|
5143 |
-
}
|
5144 |
-
};
|
5145 |
-
|
5146 |
-
Select2.prototype._resolveWidth = function ($element, method) {
|
5147 |
-
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
|
5148 |
-
|
5149 |
-
if (method == 'resolve') {
|
5150 |
-
var styleWidth = this._resolveWidth($element, 'style');
|
5151 |
-
|
5152 |
-
if (styleWidth != null) {
|
5153 |
-
return styleWidth;
|
5154 |
-
}
|
5155 |
-
|
5156 |
-
return this._resolveWidth($element, 'element');
|
5157 |
-
}
|
5158 |
-
|
5159 |
-
if (method == 'element') {
|
5160 |
-
var elementWidth = $element.outerWidth(false);
|
5161 |
-
|
5162 |
-
if (elementWidth <= 0) {
|
5163 |
-
return 'auto';
|
5164 |
-
}
|
5165 |
-
|
5166 |
-
return elementWidth + 'px';
|
5167 |
-
}
|
5168 |
-
|
5169 |
-
if (method == 'style') {
|
5170 |
-
var style = $element.attr('style');
|
5171 |
-
|
5172 |
-
if (typeof(style) !== 'string') {
|
5173 |
-
return null;
|
5174 |
-
}
|
5175 |
-
|
5176 |
-
var attrs = style.split(';');
|
5177 |
-
|
5178 |
-
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
|
5179 |
-
var attr = attrs[i].replace(/\s/g, '');
|
5180 |
-
var matches = attr.match(WIDTH);
|
5181 |
-
|
5182 |
-
if (matches !== null && matches.length >= 1) {
|
5183 |
-
return matches[1];
|
5184 |
-
}
|
5185 |
-
}
|
5186 |
-
|
5187 |
-
return null;
|
5188 |
-
}
|
5189 |
-
|
5190 |
-
return method;
|
5191 |
-
};
|
5192 |
-
|
5193 |
-
Select2.prototype._bindAdapters = function () {
|
5194 |
-
this.dataAdapter.bind(this, this.$container);
|
5195 |
-
this.selection.bind(this, this.$container);
|
5196 |
-
|
5197 |
-
this.dropdown.bind(this, this.$container);
|
5198 |
-
this.results.bind(this, this.$container);
|
5199 |
-
};
|
5200 |
-
|
5201 |
-
Select2.prototype._registerDomEvents = function () {
|
5202 |
-
var self = this;
|
5203 |
-
|
5204 |
-
this.$element.on('change.select2', function () {
|
5205 |
-
self.dataAdapter.current(function (data) {
|
5206 |
-
self.trigger('selection:update', {
|
5207 |
-
data: data
|
5208 |
-
});
|
5209 |
-
});
|
5210 |
-
});
|
5211 |
-
|
5212 |
-
this.$element.on('focus.select2', function (evt) {
|
5213 |
-
self.trigger('focus', evt);
|
5214 |
-
});
|
5215 |
-
|
5216 |
-
this._syncA = Utils.bind(this._syncAttributes, this);
|
5217 |
-
this._syncS = Utils.bind(this._syncSubtree, this);
|
5218 |
-
|
5219 |
-
if (this.$element[0].attachEvent) {
|
5220 |
-
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5221 |
-
}
|
5222 |
-
|
5223 |
-
var observer = window.MutationObserver ||
|
5224 |
-
window.WebKitMutationObserver ||
|
5225 |
-
window.MozMutationObserver
|
5226 |
-
;
|
5227 |
-
|
5228 |
-
if (observer != null) {
|
5229 |
-
this._observer = new observer(function (mutations) {
|
5230 |
-
$.each(mutations, self._syncA);
|
5231 |
-
$.each(mutations, self._syncS);
|
5232 |
-
});
|
5233 |
-
this._observer.observe(this.$element[0], {
|
5234 |
-
attributes: true,
|
5235 |
-
childList: true,
|
5236 |
-
subtree: false
|
5237 |
-
});
|
5238 |
-
} else if (this.$element[0].addEventListener) {
|
5239 |
-
this.$element[0].addEventListener(
|
5240 |
-
'DOMAttrModified',
|
5241 |
-
self._syncA,
|
5242 |
-
false
|
5243 |
-
);
|
5244 |
-
this.$element[0].addEventListener(
|
5245 |
-
'DOMNodeInserted',
|
5246 |
-
self._syncS,
|
5247 |
-
false
|
5248 |
-
);
|
5249 |
-
this.$element[0].addEventListener(
|
5250 |
-
'DOMNodeRemoved',
|
5251 |
-
self._syncS,
|
5252 |
-
false
|
5253 |
-
);
|
5254 |
-
}
|
5255 |
-
};
|
5256 |
-
|
5257 |
-
Select2.prototype._registerDataEvents = function () {
|
5258 |
-
var self = this;
|
5259 |
-
|
5260 |
-
this.dataAdapter.on('*', function (name, params) {
|
5261 |
-
self.trigger(name, params);
|
5262 |
-
});
|
5263 |
-
};
|
5264 |
-
|
5265 |
-
Select2.prototype._registerSelectionEvents = function () {
|
5266 |
-
var self = this;
|
5267 |
-
var nonRelayEvents = ['toggle', 'focus'];
|
5268 |
-
|
5269 |
-
this.selection.on('toggle', function () {
|
5270 |
-
self.toggleDropdown();
|
5271 |
-
});
|
5272 |
-
|
5273 |
-
this.selection.on('focus', function (params) {
|
5274 |
-
self.focus(params);
|
5275 |
-
});
|
5276 |
-
|
5277 |
-
this.selection.on('*', function (name, params) {
|
5278 |
-
if ($.inArray(name, nonRelayEvents) !== -1) {
|
5279 |
-
return;
|
5280 |
-
}
|
5281 |
-
|
5282 |
-
self.trigger(name, params);
|
5283 |
-
});
|
5284 |
-
};
|
5285 |
-
|
5286 |
-
Select2.prototype._registerDropdownEvents = function () {
|
5287 |
-
var self = this;
|
5288 |
-
|
5289 |
-
this.dropdown.on('*', function (name, params) {
|
5290 |
-
self.trigger(name, params);
|
5291 |
-
});
|
5292 |
-
};
|
5293 |
-
|
5294 |
-
Select2.prototype._registerResultsEvents = function () {
|
5295 |
-
var self = this;
|
5296 |
-
|
5297 |
-
this.results.on('*', function (name, params) {
|
5298 |
-
self.trigger(name, params);
|
5299 |
-
});
|
5300 |
-
};
|
5301 |
-
|
5302 |
-
Select2.prototype._registerEvents = function () {
|
5303 |
-
var self = this;
|
5304 |
-
|
5305 |
-
this.on('open', function () {
|
5306 |
-
self.$container.addClass('select2-container--open');
|
5307 |
-
});
|
5308 |
-
|
5309 |
-
this.on('close', function () {
|
5310 |
-
self.$container.removeClass('select2-container--open');
|
5311 |
-
});
|
5312 |
-
|
5313 |
-
this.on('enable', function () {
|
5314 |
-
self.$container.removeClass('select2-container--disabled');
|
5315 |
-
});
|
5316 |
-
|
5317 |
-
this.on('disable', function () {
|
5318 |
-
self.$container.addClass('select2-container--disabled');
|
5319 |
-
});
|
5320 |
-
|
5321 |
-
this.on('blur', function () {
|
5322 |
-
self.$container.removeClass('select2-container--focus');
|
5323 |
-
});
|
5324 |
-
|
5325 |
-
this.on('query', function (params) {
|
5326 |
-
if (!self.isOpen()) {
|
5327 |
-
self.trigger('open', {});
|
5328 |
-
}
|
5329 |
-
|
5330 |
-
this.dataAdapter.query(params, function (data) {
|
5331 |
-
self.trigger('results:all', {
|
5332 |
-
data: data,
|
5333 |
-
query: params
|
5334 |
-
});
|
5335 |
-
});
|
5336 |
-
});
|
5337 |
-
|
5338 |
-
this.on('query:append', function (params) {
|
5339 |
-
this.dataAdapter.query(params, function (data) {
|
5340 |
-
self.trigger('results:append', {
|
5341 |
-
data: data,
|
5342 |
-
query: params
|
5343 |
-
});
|
5344 |
-
});
|
5345 |
-
});
|
5346 |
-
|
5347 |
-
this.on('keypress', function (evt) {
|
5348 |
-
var key = evt.which;
|
5349 |
-
|
5350 |
-
if (self.isOpen()) {
|
5351 |
-
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5352 |
-
(key === KEYS.UP && evt.altKey)) {
|
5353 |
-
self.close();
|
5354 |
-
|
5355 |
-
evt.preventDefault();
|
5356 |
-
} else if (key === KEYS.ENTER) {
|
5357 |
-
self.trigger('results:select', {});
|
5358 |
-
|
5359 |
-
evt.preventDefault();
|
5360 |
-
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
|
5361 |
-
self.trigger('results:toggle', {});
|
5362 |
-
|
5363 |
-
evt.preventDefault();
|
5364 |
-
} else if (key === KEYS.UP) {
|
5365 |
-
self.trigger('results:previous', {});
|
5366 |
-
|
5367 |
-
evt.preventDefault();
|
5368 |
-
} else if (key === KEYS.DOWN) {
|
5369 |
-
self.trigger('results:next', {});
|
5370 |
-
|
5371 |
-
evt.preventDefault();
|
5372 |
-
}
|
5373 |
-
} else {
|
5374 |
-
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
5375 |
-
(key === KEYS.DOWN && evt.altKey)) {
|
5376 |
-
self.open();
|
5377 |
-
|
5378 |
-
evt.preventDefault();
|
5379 |
-
}
|
5380 |
-
}
|
5381 |
-
});
|
5382 |
-
};
|
5383 |
-
|
5384 |
-
Select2.prototype._syncAttributes = function () {
|
5385 |
-
this.options.set('disabled', this.$element.prop('disabled'));
|
5386 |
-
|
5387 |
-
if (this.options.get('disabled')) {
|
5388 |
-
if (this.isOpen()) {
|
5389 |
-
this.close();
|
5390 |
-
}
|
5391 |
-
|
5392 |
-
this.trigger('disable', {});
|
5393 |
-
} else {
|
5394 |
-
this.trigger('enable', {});
|
5395 |
-
}
|
5396 |
-
};
|
5397 |
-
|
5398 |
-
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5399 |
-
var changed = false;
|
5400 |
-
var self = this;
|
5401 |
-
|
5402 |
-
// Ignore any mutation events raised for elements that aren't options or
|
5403 |
-
// optgroups. This handles the case when the select element is destroyed
|
5404 |
-
if (
|
5405 |
-
evt && evt.target && (
|
5406 |
-
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5407 |
-
)
|
5408 |
-
) {
|
5409 |
-
return;
|
5410 |
-
}
|
5411 |
-
|
5412 |
-
if (!mutations) {
|
5413 |
-
// If mutation events aren't supported, then we can only assume that the
|
5414 |
-
// change affected the selections
|
5415 |
-
changed = true;
|
5416 |
-
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5417 |
-
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5418 |
-
var node = mutations.addedNodes[n];
|
5419 |
-
|
5420 |
-
if (node.selected) {
|
5421 |
-
changed = true;
|
5422 |
-
}
|
5423 |
-
}
|
5424 |
-
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5425 |
-
changed = true;
|
5426 |
-
}
|
5427 |
-
|
5428 |
-
// Only re-pull the data if we think there is a change
|
5429 |
-
if (changed) {
|
5430 |
-
this.dataAdapter.current(function (currentData) {
|
5431 |
-
self.trigger('selection:update', {
|
5432 |
-
data: currentData
|
5433 |
-
});
|
5434 |
-
});
|
5435 |
-
}
|
5436 |
-
};
|
5437 |
-
|
5438 |
-
/**
|
5439 |
-
* Override the trigger method to automatically trigger pre-events when
|
5440 |
-
* there are events that can be prevented.
|
5441 |
-
*/
|
5442 |
-
Select2.prototype.trigger = function (name, args) {
|
5443 |
-
var actualTrigger = Select2.__super__.trigger;
|
5444 |
-
var preTriggerMap = {
|
5445 |
-
'open': 'opening',
|
5446 |
-
'close': 'closing',
|
5447 |
-
'select': 'selecting',
|
5448 |
-
'unselect': 'unselecting'
|
5449 |
-
};
|
5450 |
-
|
5451 |
-
if (args === undefined) {
|
5452 |
-
args = {};
|
5453 |
-
}
|
5454 |
-
|
5455 |
-
if (name in preTriggerMap) {
|
5456 |
-
var preTriggerName = preTriggerMap[name];
|
5457 |
-
var preTriggerArgs = {
|
5458 |
-
prevented: false,
|
5459 |
-
name: name,
|
5460 |
-
args: args
|
5461 |
-
};
|
5462 |
-
|
5463 |
-
actualTrigger.call(this, preTriggerName, preTriggerArgs);
|
5464 |
-
|
5465 |
-
if (preTriggerArgs.prevented) {
|
5466 |
-
args.prevented = true;
|
5467 |
-
|
5468 |
-
return;
|
5469 |
-
}
|
5470 |
-
}
|
5471 |
-
|
5472 |
-
actualTrigger.call(this, name, args);
|
5473 |
-
};
|
5474 |
-
|
5475 |
-
Select2.prototype.toggleDropdown = function () {
|
5476 |
-
if (this.options.get('disabled')) {
|
5477 |
-
return;
|
5478 |
-
}
|
5479 |
-
|
5480 |
-
if (this.isOpen()) {
|
5481 |
-
this.close();
|
5482 |
-
} else {
|
5483 |
-
this.open();
|
5484 |
-
}
|
5485 |
-
};
|
5486 |
-
|
5487 |
-
Select2.prototype.open = function () {
|
5488 |
-
if (this.isOpen()) {
|
5489 |
-
return;
|
5490 |
-
}
|
5491 |
-
|
5492 |
-
this.trigger('query', {});
|
5493 |
-
};
|
5494 |
-
|
5495 |
-
Select2.prototype.close = function () {
|
5496 |
-
if (!this.isOpen()) {
|
5497 |
-
return;
|
5498 |
-
}
|
5499 |
-
|
5500 |
-
this.trigger('close', {});
|
5501 |
-
};
|
5502 |
-
|
5503 |
-
Select2.prototype.isOpen = function () {
|
5504 |
-
return this.$container.hasClass('select2-container--open');
|
5505 |
-
};
|
5506 |
-
|
5507 |
-
Select2.prototype.hasFocus = function () {
|
5508 |
-
return this.$container.hasClass('select2-container--focus');
|
5509 |
-
};
|
5510 |
-
|
5511 |
-
Select2.prototype.focus = function (data) {
|
5512 |
-
// No need to re-trigger focus events if we are already focused
|
5513 |
-
if (this.hasFocus()) {
|
5514 |
-
return;
|
5515 |
-
}
|
5516 |
-
|
5517 |
-
this.$container.addClass('select2-container--focus');
|
5518 |
-
this.trigger('focus', {});
|
5519 |
-
};
|
5520 |
-
|
5521 |
-
Select2.prototype.enable = function (args) {
|
5522 |
-
if (this.options.get('debug') && window.console && console.warn) {
|
5523 |
-
console.warn(
|
5524 |
-
'Select2: The `select2("enable")` method has been deprecated and will' +
|
5525 |
-
' be removed in later Select2 versions. Use $element.prop("disabled")' +
|
5526 |
-
' instead.'
|
5527 |
-
);
|
5528 |
-
}
|
5529 |
-
|
5530 |
-
if (args == null || args.length === 0) {
|
5531 |
-
args = [true];
|
5532 |
-
}
|
5533 |
-
|
5534 |
-
var disabled = !args[0];
|
5535 |
-
|
5536 |
-
this.$element.prop('disabled', disabled);
|
5537 |
-
};
|
5538 |
-
|
5539 |
-
Select2.prototype.data = function () {
|
5540 |
-
if (this.options.get('debug') &&
|
5541 |
-
arguments.length > 0 && window.console && console.warn) {
|
5542 |
-
console.warn(
|
5543 |
-
'Select2: Data can no longer be set using `select2("data")`. You ' +
|
5544 |
-
'should consider setting the value instead using `$element.val()`.'
|
5545 |
-
);
|
5546 |
-
}
|
5547 |
-
|
5548 |
-
var data = [];
|
5549 |
-
|
5550 |
-
this.dataAdapter.current(function (currentData) {
|
5551 |
-
data = currentData;
|
5552 |
-
});
|
5553 |
-
|
5554 |
-
return data;
|
5555 |
-
};
|
5556 |
-
|
5557 |
-
Select2.prototype.val = function (args) {
|
5558 |
-
if (this.options.get('debug') && window.console && console.warn) {
|
5559 |
-
console.warn(
|
5560 |
-
'Select2: The `select2("val")` method has been deprecated and will be' +
|
5561 |
-
' removed in later Select2 versions. Use $element.val() instead.'
|
5562 |
-
);
|
5563 |
-
}
|
5564 |
-
|
5565 |
-
if (args == null || args.length === 0) {
|
5566 |
-
return this.$element.val();
|
5567 |
-
}
|
5568 |
-
|
5569 |
-
var newVal = args[0];
|
5570 |
-
|
5571 |
-
if ($.isArray(newVal)) {
|
5572 |
-
newVal = $.map(newVal, function (obj) {
|
5573 |
-
return obj.toString();
|
5574 |
-
});
|
5575 |
-
}
|
5576 |
-
|
5577 |
-
this.$element.val(newVal).trigger('change');
|
5578 |
-
};
|
5579 |
-
|
5580 |
-
Select2.prototype.destroy = function () {
|
5581 |
-
this.$container.remove();
|
5582 |
-
|
5583 |
-
if (this.$element[0].detachEvent) {
|
5584 |
-
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5585 |
-
}
|
5586 |
-
|
5587 |
-
if (this._observer != null) {
|
5588 |
-
this._observer.disconnect();
|
5589 |
-
this._observer = null;
|
5590 |
-
} else if (this.$element[0].removeEventListener) {
|
5591 |
-
this.$element[0]
|
5592 |
-
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5593 |
-
this.$element[0]
|
5594 |
-
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5595 |
-
this.$element[0]
|
5596 |
-
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5597 |
-
}
|
5598 |
-
|
5599 |
-
this._syncA = null;
|
5600 |
-
this._syncS = null;
|
5601 |
-
|
5602 |
-
this.$element.off('.select2');
|
5603 |
-
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
|
5604 |
-
|
5605 |
-
this.$element.removeClass('select2-hidden-accessible');
|
5606 |
-
this.$element.attr('aria-hidden', 'false');
|
5607 |
-
this.$element.removeData('select2');
|
5608 |
-
|
5609 |
-
this.dataAdapter.destroy();
|
5610 |
-
this.selection.destroy();
|
5611 |
-
this.dropdown.destroy();
|
5612 |
-
this.results.destroy();
|
5613 |
-
|
5614 |
-
this.dataAdapter = null;
|
5615 |
-
this.selection = null;
|
5616 |
-
this.dropdown = null;
|
5617 |
-
this.results = null;
|
5618 |
-
};
|
5619 |
-
|
5620 |
-
Select2.prototype.render = function () {
|
5621 |
-
var $container = $(
|
5622 |
-
'<span class="select2 select2-container">' +
|
5623 |
-
'<span class="selection"></span>' +
|
5624 |
-
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
|
5625 |
-
'</span>'
|
5626 |
-
);
|
5627 |
-
|
5628 |
-
$container.attr('dir', this.options.get('dir'));
|
5629 |
-
|
5630 |
-
this.$container = $container;
|
5631 |
-
|
5632 |
-
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5633 |
-
|
5634 |
-
$container.data('element', this.$element);
|
5635 |
-
|
5636 |
-
return $container;
|
5637 |
-
};
|
5638 |
-
|
5639 |
-
return Select2;
|
5640 |
-
});
|
5641 |
-
|
5642 |
-
S2.define('jquery-mousewheel',[
|
5643 |
-
'jquery'
|
5644 |
-
], function ($) {
|
5645 |
-
// Used to shim jQuery.mousewheel for non-full builds.
|
5646 |
-
return $;
|
5647 |
-
});
|
5648 |
-
|
5649 |
-
S2.define('jquery.select2',[
|
5650 |
-
'jquery',
|
5651 |
-
'jquery-mousewheel',
|
5652 |
-
|
5653 |
-
'./select2/core',
|
5654 |
-
'./select2/defaults'
|
5655 |
-
], function ($, _, Select2, Defaults) {
|
5656 |
-
if ($.fn.select2 == null) {
|
5657 |
-
// All methods that should return the element
|
5658 |
-
var thisMethods = ['open', 'close', 'destroy'];
|
5659 |
-
|
5660 |
-
$.fn.select2 = function (options) {
|
5661 |
-
options = options || {};
|
5662 |
-
|
5663 |
-
if (typeof options === 'object') {
|
5664 |
-
this.each(function () {
|
5665 |
-
var instanceOptions = $.extend(true, {}, options);
|
5666 |
-
|
5667 |
-
var instance = new Select2($(this), instanceOptions);
|
5668 |
-
});
|
5669 |
-
|
5670 |
-
return this;
|
5671 |
-
} else if (typeof options === 'string') {
|
5672 |
-
var ret;
|
5673 |
-
var args = Array.prototype.slice.call(arguments, 1);
|
5674 |
-
|
5675 |
-
this.each(function () {
|
5676 |
-
var instance = $(this).data('select2');
|
5677 |
-
|
5678 |
-
if (instance == null && window.console && console.error) {
|
5679 |
-
console.error(
|
5680 |
-
'The select2(\'' + options + '\') method was called on an ' +
|
5681 |
-
'element that is not using Select2.'
|
5682 |
-
);
|
5683 |
-
}
|
5684 |
-
|
5685 |
-
ret = instance[options].apply(instance, args);
|
5686 |
-
});
|
5687 |
-
|
5688 |
-
// Check if we should be returning `this`
|
5689 |
-
if ($.inArray(options, thisMethods) > -1) {
|
5690 |
-
return this;
|
5691 |
-
}
|
5692 |
-
|
5693 |
-
return ret;
|
5694 |
-
} else {
|
5695 |
-
throw new Error('Invalid arguments for Select2: ' + options);
|
5696 |
-
}
|
5697 |
-
};
|
5698 |
-
}
|
5699 |
-
|
5700 |
-
if ($.fn.select2.defaults == null) {
|
5701 |
-
$.fn.select2.defaults = Defaults;
|
5702 |
-
}
|
5703 |
-
|
5704 |
-
return Select2;
|
5705 |
-
});
|
5706 |
-
|
5707 |
-
// Return the AMD loader configuration so it can be used outside of this file
|
5708 |
-
return {
|
5709 |
-
define: S2.define,
|
5710 |
-
require: S2.require
|
5711 |
-
};
|
5712 |
-
}());
|
5713 |
-
|
5714 |
-
// Autoload the jQuery bindings
|
5715 |
-
// We know that all of the modules exist above this, so we're safe
|
5716 |
-
var select2 = S2.require('jquery.select2');
|
5717 |
-
|
5718 |
-
// Hold the AMD module references on the jQuery function that was just loaded
|
5719 |
-
// This allows Select2 to use the internal loader outside of this file, such
|
5720 |
-
// as in the language files.
|
5721 |
-
jQuery.fn.select2.amd = S2;
|
5722 |
-
|
5723 |
-
// Return the Select2 instance for anyone who is importing it.
|
5724 |
-
return select2;
|
5725 |
-
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/lib/select2/select2.min.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):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 u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[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=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[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 function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&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."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(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<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};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}),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('<ul class="select2-results__options" role="tree"></ul>');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('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),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;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?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()}),e=b.$results.find(".select2-results__option[aria-selected]");e.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("aria-selected","true"):b.attr("aria-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:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-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";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}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("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-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):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-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")}),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[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-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),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&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(){var a={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 a}),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('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');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+"-container",a.id+"-results");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"),d.$selection.focus(),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"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.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('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),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),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),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"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},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('<ul class="select2-selection__rendered"></ul>'),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"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},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;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');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('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');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;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),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.id)}),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){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"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{var b=this.$search.val().length+1;a=.75*b+"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(){var 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","Ⓓ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),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=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},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");
|
2 |
-
if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=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)},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;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void 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;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void 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('<span class="select2-dropdown"><span class="select2-results"></span></span>');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('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;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.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),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){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},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){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&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('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),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("<span></span>"),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,h=this.$container.parents().filter(b.hasScroll);h.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.top<f.top-h.height,k=i.bottom>f.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;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.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(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(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;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-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)};var E=new D;return E}),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 0>=e?"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;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=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 a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},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;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(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;
|
3 |
-
},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');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.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof 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.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
|
|
|
|
|
|
js/lib/thirstymce/editor-plugin.js
CHANGED
@@ -229,6 +229,9 @@
|
|
229 |
if ( ! tinymce.trim( linkNode.innerHTML ) )
|
230 |
editor.$( linkNode ).text( content );
|
231 |
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
}
|
229 |
if ( ! tinymce.trim( linkNode.innerHTML ) )
|
230 |
editor.$( linkNode ).text( content );
|
231 |
|
232 |
+
// if inserting link to an image, then collapse selection.
|
233 |
+
if ( $( linkNode ).prop( 'outerHTML' ).indexOf( '<img' ) > -1 )
|
234 |
+
editor.selection.collapse();
|
235 |
}
|
236 |
|
237 |
}
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link:
|
|
4 |
Tags: affiliate, link, affiliate link management, link cloaker, link redirect, shortlink, thirstyaffiliates, thirsty affiliates
|
5 |
Requires at least: 3.4
|
6 |
Requires PHP: 5.6
|
7 |
-
Tested up to: 4.9.
|
8 |
-
Stable tag: 3.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -159,6 +159,14 @@ See our [Knowledge Base](https://thirstyaffiliates.com/knowledge-base/?utm_sourc
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
= 3.2.0 =
|
163 |
* Feature: Feature to determine what pages the current affiliate link is added to
|
164 |
* Feature: Hide currently attached images from the media box to avoid inserting duplicate image to a thirsty link
|
4 |
Tags: affiliate, link, affiliate link management, link cloaker, link redirect, shortlink, thirstyaffiliates, thirsty affiliates
|
5 |
Requires at least: 3.4
|
6 |
Requires PHP: 5.6
|
7 |
+
Tested up to: 4.9.2
|
8 |
+
Stable tag: 3.2.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 3.2.1 =
|
163 |
+
* Improvement: Set post type and taxonomy to non-public facing
|
164 |
+
* Improvement: Rename the Link Performance report to Link Overview
|
165 |
+
* Improvement: Improve codebase
|
166 |
+
* Bug Fix: Shortcode issue with WPML
|
167 |
+
* Bug Fix: Issue with inserting thirsty affiliate link into an existing image and hitting enter key right after
|
168 |
+
* Bug Fix: Affiliate link category pages are accessible on the front end
|
169 |
+
|
170 |
= 3.2.0 =
|
171 |
* Feature: Feature to determine what pages the current affiliate link is added to
|
172 |
* Feature: Hide currently attached images from the media box to avoid inserting duplicate image to a thirsty link
|
thirstyaffiliates.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: ThirstyAffiliates
|
4 |
* Plugin URI: http://thirstyaffiliates.com/
|
5 |
* Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Rymera Web Co
|
8 |
* Author URI: https://rymera.com.au/
|
9 |
* Requires at least: 4.4.2
|
3 |
* Plugin Name: ThirstyAffiliates
|
4 |
* Plugin URI: http://thirstyaffiliates.com/
|
5 |
* Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
|
6 |
+
* Version: 3.2.1
|
7 |
* Author: Rymera Web Co
|
8 |
* Author URI: https://rymera.com.au/
|
9 |
* Requires at least: 4.4.2
|
views/reports/link-performance-report.php
CHANGED
@@ -37,6 +37,7 @@
|
|
37 |
<ul class="chart-legend">
|
38 |
<li style="border-color: #3498db">
|
39 |
<?php _e( 'General' , 'thirstyaffiliates' ); ?>
|
|
|
40 |
<span><?php _e( 'All links' , 'thirstyaffiliates' ); ?></span>
|
41 |
</li>
|
42 |
</ul>
|
@@ -79,7 +80,8 @@
|
|
79 |
label : '<?php echo _e( 'All links' , 'thirstyaffiliates' ); ?>',
|
80 |
timeformat : '<?php echo ( $range[ 'type' ] == 'year' ) ? '%b' : '%d %b'; ?>',
|
81 |
minTickSize : [ 1 , "<?php echo ( $range[ 'type' ] == 'year' ) ? 'month' : 'day'; ?>" ],
|
82 |
-
clicksLabel : '<?php _e( 'Clicks: ' , 'thirstyaffiliates' ); ?>'
|
|
|
83 |
},
|
84 |
main_chart;
|
85 |
</script>
|
37 |
<ul class="chart-legend">
|
38 |
<li style="border-color: #3498db">
|
39 |
<?php _e( 'General' , 'thirstyaffiliates' ); ?>
|
40 |
+
<em class="count"><?php echo number_format( $total_clicks ); ?></em>
|
41 |
<span><?php _e( 'All links' , 'thirstyaffiliates' ); ?></span>
|
42 |
</li>
|
43 |
</ul>
|
80 |
label : '<?php echo _e( 'All links' , 'thirstyaffiliates' ); ?>',
|
81 |
timeformat : '<?php echo ( $range[ 'type' ] == 'year' ) ? '%b' : '%d %b'; ?>',
|
82 |
minTickSize : [ 1 , "<?php echo ( $range[ 'type' ] == 'year' ) ? 'month' : 'day'; ?>" ],
|
83 |
+
clicksLabel : '<?php _e( 'Clicks: ' , 'thirstyaffiliates' ); ?>',
|
84 |
+
totalClicks : '<?php echo number_format( $total_clicks ); ?>'
|
85 |
},
|
86 |
main_chart;
|
87 |
</script>
|