Advanced AJAX Product Filters - Version 1.6.3.4

Version Description

  • Enhancement - Additional tables generation to not change collation
  • Enhancement - Additional tables check is tables exist
  • Enhancement - Additional tables clear tables instead remove
  • Fix - Barn2 Product table new check
Download this release

Release Info

Developer RazyRx
Plugin Icon wp plugin Advanced AJAX Product Filters
Version 1.6.3.4
Comparing to
See all releases

Code changes from version 1.6.3.3 to 1.6.3.4

addons/additional_tables/additional_tables.php CHANGED
@@ -52,7 +52,7 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
52
  $create_position = $this->get_current_create_position();
53
  }
54
  if( strpos($create_position, 'ended') !== FALSE && $create_position != $this->get_end_position() ) {
55
- $this->destroy_table();
56
  $create_position = false;
57
  }
58
  if( strpos($create_position, 'ended') === FALSE ) {
@@ -90,31 +90,32 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
90
  if( strpos($create_position, 'ended') !== FALSE ) {
91
  global $wpdb;
92
  $result = $wpdb->get_col("SHOW TABLES;");
93
- $tables = array(
94
  'braapf_product_stock_status_parent',
95
  'braapf_product_variation_attributes',
96
  'braapf_variable_attributes',
97
  'braapf_term_taxonomy_hierarchical'
98
- );
99
  foreach($tables as $table) {
100
  $table_name = $wpdb->prefix . $table;
101
  if( ! in_array($table_name, $result) ) {
102
- $this->destroy_table();
 
103
  }
104
  }
105
  }
106
  }
107
  function get_charset_collate() {
108
  global $wpdb;
109
- /*$result = $wpdb->get_row("SHOW TABLE STATUS where name like '{$wpdb->posts}'");
 
110
  if( ! empty($result) && ! empty($result->Collation) ) {
111
  $collate = 'DEFAULT CHARACTER SET ' . $wpdb->charset . ' COLLATE ' . $result->Collation;
112
  } else {
113
- }*/
114
- $collate = '';
115
- if ( $wpdb->has_cap( 'collation' ) ) {
116
- $collate = $wpdb->get_charset_collate();
117
- }
118
  return $collate;
119
  }
120
  function cron() {
@@ -382,13 +383,22 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
382
  }
383
  }
384
  }
 
 
 
 
 
 
 
 
 
 
385
  function create_table_braapf_term_taxonomy_hierarchical() {
386
  global $wpdb;
387
- $charset_collate = $this->get_charset_collate();
388
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
389
  $table_name = $wpdb->prefix . 'braapf_term_taxonomy_hierarchical';
390
- $sql = "DROP TABLE IF EXISTS {$table_name};";
391
- $wpdb->query($sql);
392
  $sql = "CREATE TABLE $table_name (
393
  term_taxonomy_id bigint(20) NOT NULL,
394
  term_id bigint(20) NOT NULL,
@@ -399,51 +409,48 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
399
  INDEX term_taxonomy_child_id (term_taxonomy_child_id),
400
  INDEX child_parent_id (term_taxonomy_id, term_taxonomy_child_id),
401
  UNIQUE uniqueid (term_taxonomy_id, term_id, term_taxonomy_child_id, term_child_id)
402
- ) $charset_collate;";
403
  $query_status = dbDelta( $sql );
404
  $this->save_query_error($sql, $query_status);
405
  }
406
  function create_table_braapf_product_stock_status_parent() {
407
  global $wpdb;
408
- $charset_collate = $this->get_charset_collate();
409
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
410
  $table_name = $wpdb->prefix . 'braapf_product_stock_status_parent';
411
- $sql = "DROP TABLE IF EXISTS {$table_name};";
412
- $wpdb->query($sql);
413
  $sql = "CREATE TABLE $table_name (
414
  post_id bigint(20) NOT NULL,
415
  parent_id bigint(20) NOT NULL,
416
  stock_status tinyint(2),
417
  PRIMARY KEY (post_id),
418
  INDEX stock_status (stock_status)
419
- ) $charset_collate;";
420
  $query_status = dbDelta( $sql );
421
  $this->save_query_error($sql, $query_status);
422
  }
423
  function create_table_braapf_variable_attributes() {
424
  global $wpdb;
425
- $charset_collate = $this->get_charset_collate();
426
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
427
  $table_name = $wpdb->prefix . 'braapf_variable_attributes';
428
- $sql = "DROP TABLE IF EXISTS {$table_name};";
429
- $wpdb->query($sql);
430
  $sql = "CREATE TABLE $table_name (
431
  post_id bigint(20) NOT NULL,
432
  attribute varchar(32) NOT NULL,
433
  INDEX post_id (post_id),
434
  INDEX attribute (attribute),
435
  UNIQUE uniqueid (post_id, attribute)
436
- ) $charset_collate;";
437
  $query_status = dbDelta( $sql );
438
  $this->save_query_error($sql, $query_status);
439
  }
440
  function create_table_braapf_product_variation_attributes() {
441
  global $wpdb;
442
- $charset_collate = $this->get_charset_collate();
443
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
444
  $table_name = $wpdb->prefix . 'braapf_product_variation_attributes';
445
- $sql = "DROP TABLE IF EXISTS {$table_name};";
446
- $wpdb->query($sql);
447
  $sql = "CREATE TABLE $table_name (
448
  post_id bigint(20) NOT NULL,
449
  parent_id bigint(20) NOT NULL,
@@ -454,7 +461,7 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
454
  INDEX meta_key (meta_key),
455
  INDEX meta_value_id (meta_value_id),
456
  UNIQUE uniqueid (post_id, meta_key, meta_value_id)
457
- ) $charset_collate;";
458
  $query_status = dbDelta( $sql );
459
  $this->save_query_error($sql, $query_status);
460
  }
@@ -475,7 +482,6 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
475
  ));
476
  global $wpdb;
477
  $table_name = $wpdb->prefix . 'braapf_product_stock_status_parent';
478
- $charset_collate = $this->get_charset_collate();
479
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
480
  $sql_select = "SELECT {$wpdb->posts}.ID as post_id, {$wpdb->posts}.post_parent as parent_id, IF({$wpdb->prefix}wc_product_meta_lookup.stock_status = 'instock', 1, 0) as stock_status FROM {$wpdb->prefix}wc_product_meta_lookup
481
  JOIN {$wpdb->posts} ON {$wpdb->prefix}wc_product_meta_lookup.product_id = {$wpdb->posts}.ID
@@ -543,7 +549,6 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
543
  $end_id = $start_id + apply_filters('berocket_insert_table_braapf_product_variation_attributes_end', 10000);
544
  global $wpdb;
545
  $table_name = $wpdb->prefix . 'braapf_product_variation_attributes';
546
- $charset_collate = $this->get_charset_collate();
547
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
548
  $sql_select = "SELECT meta_key FROM {$wpdb->postmeta}
549
  WHERE meta_key LIKE 'attribute_pa_%'
@@ -642,7 +647,6 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
642
  ));
643
  global $wpdb;
644
  $table_name = $wpdb->prefix . 'braapf_variable_attributes';
645
- $charset_collate = $this->get_charset_collate();
646
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
647
  $sql_select = "SELECT {$wpdb->posts}.ID as id, {$wpdb->postmeta}.meta_value as value FROM {$wpdb->posts}
648
  JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id
@@ -686,15 +690,18 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
686
  ));
687
  }
688
  }
689
- function deactivate() {
690
- global $wpdb;
691
- $tables_drop = array(
692
  'braapf_product_stock_status_parent',
693
  'braapf_product_variation_attributes',
694
  'braapf_variation_attributes',
695
  'braapf_variable_attributes',
696
  'braapf_term_taxonomy_hierarchical'
697
- );
 
 
 
 
698
  foreach($tables_drop as $table_drop) {
699
  $table_name = $wpdb->prefix . $table_drop;
700
  $sql = "DROP TABLE IF EXISTS {$table_name};";
@@ -710,7 +717,7 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
710
  }
711
  function destroy_table_wc_regeneration() {
712
  if ( apply_filters( 'br-filters/addon/add-table/wc-regenerate-destroy', function_exists('wc_update_product_lookup_tables_is_running') && wc_update_product_lookup_tables_is_running() ) ) {
713
- $this->destroy_table();
714
  }
715
  }
716
  function destroy_table() {
@@ -718,5 +725,14 @@ class BeRocket_aapf_variations_tables_addon extends BeRocket_framework_addon_lib
718
  delete_option('BeRocket_aapf_additional_tables_addon_position_data');
719
  $this->deactivate();
720
  }
 
 
 
 
 
 
 
 
 
721
  }
722
  new BeRocket_aapf_variations_tables_addon();
52
  $create_position = $this->get_current_create_position();
53
  }
54
  if( strpos($create_position, 'ended') !== FALSE && $create_position != $this->get_end_position() ) {
55
+ $this->reset_all_table();
56
  $create_position = false;
57
  }
58
  if( strpos($create_position, 'ended') === FALSE ) {
90
  if( strpos($create_position, 'ended') !== FALSE ) {
91
  global $wpdb;
92
  $result = $wpdb->get_col("SHOW TABLES;");
93
+ $tables = apply_filters('BeRocket_aapf_variations_tables_addon_check_table_list', array(
94
  'braapf_product_stock_status_parent',
95
  'braapf_product_variation_attributes',
96
  'braapf_variable_attributes',
97
  'braapf_term_taxonomy_hierarchical'
98
+ ));
99
  foreach($tables as $table) {
100
  $table_name = $wpdb->prefix . $table;
101
  if( ! in_array($table_name, $result) ) {
102
+ $this->reset_all_table();
103
+ break;
104
  }
105
  }
106
  }
107
  }
108
  function get_charset_collate() {
109
  global $wpdb;
110
+ $collate = '';
111
+ $result = $wpdb->get_row("SHOW TABLE STATUS where name like '{$wpdb->posts}'");
112
  if( ! empty($result) && ! empty($result->Collation) ) {
113
  $collate = 'DEFAULT CHARACTER SET ' . $wpdb->charset . ' COLLATE ' . $result->Collation;
114
  } else {
115
+ if ( $wpdb->has_cap( 'collation' ) ) {
116
+ $collate = $wpdb->get_charset_collate();
117
+ }
118
+ }
 
119
  return $collate;
120
  }
121
  function cron() {
383
  }
384
  }
385
  }
386
+ function reset_table($table_name) {
387
+ global $wpdb;
388
+ $result = $wpdb->get_col("SHOW TABLES;");
389
+ if( in_array($table_name, $result) ) {
390
+ $sql = "TRUNCATE TABLE {$table_name};";
391
+ $wpdb->query($sql);
392
+ $sql = "ALTER TABLE {$table_name} AUTO_INCREMENT = 1;";
393
+ $wpdb->query($sql);
394
+ }
395
+ }
396
  function create_table_braapf_term_taxonomy_hierarchical() {
397
  global $wpdb;
398
+ $collate = $this->get_charset_collate();
399
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
400
  $table_name = $wpdb->prefix . 'braapf_term_taxonomy_hierarchical';
401
+ $this->reset_table($table_name);
 
402
  $sql = "CREATE TABLE $table_name (
403
  term_taxonomy_id bigint(20) NOT NULL,
404
  term_id bigint(20) NOT NULL,
409
  INDEX term_taxonomy_child_id (term_taxonomy_child_id),
410
  INDEX child_parent_id (term_taxonomy_id, term_taxonomy_child_id),
411
  UNIQUE uniqueid (term_taxonomy_id, term_id, term_taxonomy_child_id, term_child_id)
412
+ ) $collate;";
413
  $query_status = dbDelta( $sql );
414
  $this->save_query_error($sql, $query_status);
415
  }
416
  function create_table_braapf_product_stock_status_parent() {
417
  global $wpdb;
418
+ $collate = $this->get_charset_collate();
419
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
420
  $table_name = $wpdb->prefix . 'braapf_product_stock_status_parent';
421
+ $this->reset_table($table_name);
 
422
  $sql = "CREATE TABLE $table_name (
423
  post_id bigint(20) NOT NULL,
424
  parent_id bigint(20) NOT NULL,
425
  stock_status tinyint(2),
426
  PRIMARY KEY (post_id),
427
  INDEX stock_status (stock_status)
428
+ ) $collate;";
429
  $query_status = dbDelta( $sql );
430
  $this->save_query_error($sql, $query_status);
431
  }
432
  function create_table_braapf_variable_attributes() {
433
  global $wpdb;
434
+ $collate = $this->get_charset_collate();
435
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
436
  $table_name = $wpdb->prefix . 'braapf_variable_attributes';
437
+ $this->reset_table($table_name);
 
438
  $sql = "CREATE TABLE $table_name (
439
  post_id bigint(20) NOT NULL,
440
  attribute varchar(32) NOT NULL,
441
  INDEX post_id (post_id),
442
  INDEX attribute (attribute),
443
  UNIQUE uniqueid (post_id, attribute)
444
+ ) $collate;";
445
  $query_status = dbDelta( $sql );
446
  $this->save_query_error($sql, $query_status);
447
  }
448
  function create_table_braapf_product_variation_attributes() {
449
  global $wpdb;
450
+ $collate = $this->get_charset_collate();
451
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
452
  $table_name = $wpdb->prefix . 'braapf_product_variation_attributes';
453
+ $this->reset_table($table_name);
 
454
  $sql = "CREATE TABLE $table_name (
455
  post_id bigint(20) NOT NULL,
456
  parent_id bigint(20) NOT NULL,
461
  INDEX meta_key (meta_key),
462
  INDEX meta_value_id (meta_value_id),
463
  UNIQUE uniqueid (post_id, meta_key, meta_value_id)
464
+ ) $collate;";
465
  $query_status = dbDelta( $sql );
466
  $this->save_query_error($sql, $query_status);
467
  }
482
  ));
483
  global $wpdb;
484
  $table_name = $wpdb->prefix . 'braapf_product_stock_status_parent';
 
485
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
486
  $sql_select = "SELECT {$wpdb->posts}.ID as post_id, {$wpdb->posts}.post_parent as parent_id, IF({$wpdb->prefix}wc_product_meta_lookup.stock_status = 'instock', 1, 0) as stock_status FROM {$wpdb->prefix}wc_product_meta_lookup
487
  JOIN {$wpdb->posts} ON {$wpdb->prefix}wc_product_meta_lookup.product_id = {$wpdb->posts}.ID
549
  $end_id = $start_id + apply_filters('berocket_insert_table_braapf_product_variation_attributes_end', 10000);
550
  global $wpdb;
551
  $table_name = $wpdb->prefix . 'braapf_product_variation_attributes';
 
552
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
553
  $sql_select = "SELECT meta_key FROM {$wpdb->postmeta}
554
  WHERE meta_key LIKE 'attribute_pa_%'
647
  ));
648
  global $wpdb;
649
  $table_name = $wpdb->prefix . 'braapf_variable_attributes';
 
650
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
651
  $sql_select = "SELECT {$wpdb->posts}.ID as id, {$wpdb->postmeta}.meta_value as value FROM {$wpdb->posts}
652
  JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id
690
  ));
691
  }
692
  }
693
+ function get_table_list() {
694
+ return apply_filters('BeRocket_aapf_variations_tables_addon_table_list', array(
 
695
  'braapf_product_stock_status_parent',
696
  'braapf_product_variation_attributes',
697
  'braapf_variation_attributes',
698
  'braapf_variable_attributes',
699
  'braapf_term_taxonomy_hierarchical'
700
+ ));
701
+ }
702
+ function deactivate() {
703
+ global $wpdb;
704
+ $tables_drop = $this->get_table_list();
705
  foreach($tables_drop as $table_drop) {
706
  $table_name = $wpdb->prefix . $table_drop;
707
  $sql = "DROP TABLE IF EXISTS {$table_name};";
717
  }
718
  function destroy_table_wc_regeneration() {
719
  if ( apply_filters( 'br-filters/addon/add-table/wc-regenerate-destroy', function_exists('wc_update_product_lookup_tables_is_running') && wc_update_product_lookup_tables_is_running() ) ) {
720
+ $this->reset_all_table();
721
  }
722
  }
723
  function destroy_table() {
725
  delete_option('BeRocket_aapf_additional_tables_addon_position_data');
726
  $this->deactivate();
727
  }
728
+ function reset_all_table() {
729
+ delete_option('BeRocket_aapf_additional_tables_addon_position');
730
+ delete_option('BeRocket_aapf_additional_tables_addon_position_data');
731
+ $this->set_current_create_position(false);
732
+ $this->set_current_create_position_data(array(
733
+ 'status' => 0,
734
+ 'run' => false,
735
+ ));
736
+ }
737
  }
738
  new BeRocket_aapf_variations_tables_addon();
addons/custom_postmeta/additional_tables.php CHANGED
@@ -8,7 +8,8 @@ if( ! class_exists('BeRocket_aapf_variations_tables_postmeta_addon') ) {
8
  public $post_clauses_number = 1;
9
  function __construct() {
10
  //Generate tables
11
- add_action('BeRocket_aapf_variations_tables_addon_destroy_table', array($this, 'destroy_table'));
 
12
  add_filter('BeRocket_aapf_variations_tables_addon_position_data', array($this, 'position_data'), 100000, 2);
13
  add_action('updated_post_meta', array($this, 'save_filter'), 10, 4);
14
  add_action('added_post_meta', array($this, 'save_filter'), 10, 4);
@@ -41,17 +42,10 @@ if( ! class_exists('BeRocket_aapf_variations_tables_postmeta_addon') ) {
41
  $ended = $ended . ' cpm ';
42
  return $ended;
43
  }
44
- function destroy_table() {
45
- global $wpdb;
46
- $tables_drop = array(
47
- 'braapf_custom_post_meta',
48
- 'braapf_product_post_meta'
49
- );
50
- foreach($tables_drop as $table_drop) {
51
- $table_name = $wpdb->prefix . $table_drop;
52
- $sql = "DROP TABLE IF EXISTS {$table_name};";
53
- $wpdb->query($sql);
54
- }
55
  }
56
  function position_data($position_data, $instance) {
57
  $this->position_last = count($position_data);
@@ -85,12 +79,11 @@ if( ! class_exists('BeRocket_aapf_variations_tables_postmeta_addon') ) {
85
  'run' => true,
86
  ));
87
  global $wpdb;
88
- $charset_collate = $this->get_charset_collate();
89
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
90
  //braapf_custom_post_meta table
91
  $table_name = $wpdb->prefix . 'braapf_custom_post_meta';
92
- $sql = "DROP TABLE IF EXISTS {$table_name};";
93
- $wpdb->query($sql);
94
  $sql = "CREATE TABLE $table_name (
95
  meta_id bigint(20) NOT NULL AUTO_INCREMENT,
96
  meta varchar(120) NOT NULL,
@@ -107,8 +100,7 @@ if( ! class_exists('BeRocket_aapf_variations_tables_postmeta_addon') ) {
107
  $instance->save_query_error($sql, $query_status);
108
  //braapf_product_post_meta table
109
  $table_name = $wpdb->prefix . 'braapf_product_post_meta';
110
- $sql = "DROP TABLE IF EXISTS {$table_name};";
111
- $wpdb->query($sql);
112
  $sql = "CREATE TABLE $table_name (
113
  meta_id bigint(20) NOT NULL,
114
  product_id bigint(20) NOT NULL,
8
  public $post_clauses_number = 1;
9
  function __construct() {
10
  //Generate tables
11
+ add_filter('BeRocket_aapf_variations_tables_addon_table_list', array($this, 'table_list'));
12
+ add_filter('BeRocket_aapf_variations_tables_addon_check_table_list', array($this, 'table_list'));
13
  add_filter('BeRocket_aapf_variations_tables_addon_position_data', array($this, 'position_data'), 100000, 2);
14
  add_action('updated_post_meta', array($this, 'save_filter'), 10, 4);
15
  add_action('added_post_meta', array($this, 'save_filter'), 10, 4);
42
  $ended = $ended . ' cpm ';
43
  return $ended;
44
  }
45
+ function table_list($list) {
46
+ $list[] = 'braapf_custom_post_meta';
47
+ $list[] = 'braapf_product_post_meta';
48
+ return $list;
 
 
 
 
 
 
 
49
  }
50
  function position_data($position_data, $instance) {
51
  $this->position_last = count($position_data);
79
  'run' => true,
80
  ));
81
  global $wpdb;
82
+ $charset_collate = $instance->get_charset_collate();
83
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
84
  //braapf_custom_post_meta table
85
  $table_name = $wpdb->prefix . 'braapf_custom_post_meta';
86
+ $instance->reset_table($table_name);
 
87
  $sql = "CREATE TABLE $table_name (
88
  meta_id bigint(20) NOT NULL AUTO_INCREMENT,
89
  meta varchar(120) NOT NULL,
100
  $instance->save_query_error($sql, $query_status);
101
  //braapf_product_post_meta table
102
  $table_name = $wpdb->prefix . 'braapf_product_post_meta';
103
+ $instance->reset_table($table_name);
 
104
  $sql = "CREATE TABLE $table_name (
105
  meta_id bigint(20) NOT NULL,
106
  product_id bigint(20) NOT NULL,
addons/custom_postmeta/postmeta.php CHANGED
@@ -12,6 +12,7 @@ class BeRocket_aapf_add_postmeta_filters {
12
  add_filter('braapf_get_data_taxonomy_from_post_before', array($this, 'taxonomy_from_post_before'), 10000, 2);
13
  add_filter('bapf_uparse_paid_attr_slider_apply', array($this, 'attr_slider_apply'), 10000, 6);
14
  add_filter('bapf_uparse_paid_attr_slider_taxonomy', array($this, 'attr_slider_taxonomy'), 10000, 2);
 
15
  add_filter('bapf_uparse_add_terms_to_data_each_terms', array($this, 'uparse_terms'), 100, 4);
16
  add_filter('bapf_uparse_func_check_attribute_values_terms', array($this, 'ids_slug'), 100, 6);
17
  //Color save
@@ -447,5 +448,23 @@ GROUP BY meta_value ORDER BY meta_value");
447
  }
448
  return $result;
449
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  }
451
  new BeRocket_aapf_add_postmeta_filters();
12
  add_filter('braapf_get_data_taxonomy_from_post_before', array($this, 'taxonomy_from_post_before'), 10000, 2);
13
  add_filter('bapf_uparse_paid_attr_slider_apply', array($this, 'attr_slider_apply'), 10000, 6);
14
  add_filter('bapf_uparse_paid_attr_slider_taxonomy', array($this, 'attr_slider_taxonomy'), 10000, 2);
15
+ add_filter('BeRocket_AAPF_template_full_content', array($this, 'slider_selected'), 15, 4);
16
  add_filter('bapf_uparse_add_terms_to_data_each_terms', array($this, 'uparse_terms'), 100, 4);
17
  add_filter('bapf_uparse_func_check_attribute_values_terms', array($this, 'ids_slug'), 100, 6);
18
  //Color save
448
  }
449
  return $result;
450
  }
451
+ function slider_selected($template_content, $terms, $berocket_query_var_title) {
452
+ if( in_array($berocket_query_var_title['new_template'], array('slider', 'new_slider')) ) {
453
+ foreach($terms as $term){break;}
454
+ if( count($terms) == 1 ) {
455
+ global $berocket_parse_page_obj;
456
+ $filter_data = $berocket_parse_page_obj->get_current();
457
+ foreach($filter_data['filters'] as $filter) {
458
+ if( (( in_array($filter['type'], array('custom_postmeta')) && $filter['taxonomy'] == $term->taxonomy ) )
459
+ && ! empty($filter['val_arr']['op']) && $filter['val_arr']['op'] == 'SLIDER') {
460
+ $template_content['template']['content']['filter']['content']['slider_all']['content']['slider']['attributes']['data-start'] = floatval($filter['val_arr']['from']);
461
+ $template_content['template']['content']['filter']['content']['slider_all']['content']['slider']['attributes']['data-end'] = floatval($filter['val_arr']['to']);
462
+ break;
463
+ }
464
+ }
465
+ }
466
+ }
467
+ return $template_content;
468
+ }
469
  }
470
  new BeRocket_aapf_add_postmeta_filters();
assets/frontend/js/fullmain.min.js CHANGED
@@ -1,7 +1,7 @@
1
  function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c=[error_exist],d=0;d<arguments.length;d++)c.push(arguments[d]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,c),c[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){function b(a,b){return v.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=t.map,p=o&&o["*"]||{};if(a){for(g=(a=a.split("/")).length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&n&&(a=n.slice(0,n.length-1).concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),--k;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;0<k&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((n||p)&&o){for(k=(c=a.split("/")).length;0<k;--k){if(d=c.slice(0,k).join("/"),n)for(l=n.length;0<l;--l)if(e=(e=o[n.slice(0,l).join("/")])&&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 d(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(m,c.concat([a,b]))}}function e(a){return function(b){r[a]=b}}function f(a){if(b(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(m,c)}if(!b(r,a)&&!b(u,a))throw new Error("No "+a);return r[a]}function g(a){var b,c=a?a.indexOf("!"):-1;return-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function h(a){return a?g(a):[]}if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var i=a.fn.select2.amd;var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return i&&i.requirejs||(i?k=i:i={},r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/,p=function(a,b){var d,e,h=g(a),i=h[0],j=b[1];return a=h[1],i&&(d=f(i=c(i,j))),i?a=d&&d.normalize?d.normalize(a,(e=j,function(a){return c(a,e)})):c(a,j):(i=(h=g(a=c(a,j)))[0],a=h[1],i&&(d=f(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},q={require:function(a){return d(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:(b=a,function(){return t&&t.config&&t.config[b]||{}})};var b}},n=function(a,c,g,i){var j,k,l,n,o,t,v,w=[],x=typeof g;if(t=h(i=i||a),"undefined"==x||"function"==x){for(c=!c.length&&g.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if("require"===(k=(n=p(c[o],t)).f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)j=w[o]=q.module(a);else if(b(r,k)||b(s,k)||b(u,k))w[o]=f(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,d(i,!0),e(k),{}),w[o]=r[k]}l=g?g.apply(r[a],w):void 0,a&&(j&&j.exports!==m&&j.exports!==r[a]?r[a]=j.exports:l===m&&v||(r[a]=l))}else a&&(r[a]=g)},j=k=o=function(a,b,c,d,e){if("string"==typeof a)return q[a]?q[a](b):f(p(a,h(b)).f);if(!a.splice){if((t=a).deps&&o(t.deps,t.callback),!b)return;b.splice?(a=b,b=c,c=null):a=m}return b=b||function(){},"function"==typeof c&&(c=d,d=e),d?n(m,a,b,c):setTimeout(function(){n(m,a,b,c)},4),o},o.config=function(a){return o(a)},j._defined=r,(l=function(a,c,d){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");c.splice||(d=c,c=[]),b(r,a)||b(s,a)||(s[a]=[a,c,d])}).amd={jQuery:!0},i.requirejs=j,i.require=k,i.define=l),i.define("almond",function(){}),i.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}),i.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b)"function"==typeof b[d]&&"constructor"!==d&&c.push(d);return c}function c(){this.listeners={}}var d={};d.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},d.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;0<d&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new function(){this.constructor=d};for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=0;j<f.length;j++){var k=f[j];d.prototype[k]=e(k)}return d},c.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},c.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)in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},c.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},d.Observable=c,d.generateChars=function(a){for(var b="",c=0;c<a;c++)b+=Math.floor(36*Math.random()).toString(36);return b},d.bind=function(a,b){return function(){a.apply(b,arguments)}},d._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))in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},d.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||d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth)},d.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},d.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)},d.__cache={};var e=0;return d.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},d.StoreData=function(a,b,c){var e=d.GetUniqueElementId(a);d.__cache[e]||(d.__cache[e]={}),d.__cache[e][b]=c},d.GetData=function(b,c){var e=d.GetUniqueElementId(b);return c?d.__cache[e]&&null!=d.__cache[e][c]?d.__cache[e][c]:a(b).data(c):d.__cache[e]},d.RemoveData=function(a){var b=d.GetUniqueElementId(a);null!=d.__cache[b]&&delete d.__cache[b],a.removeAttribute("data-select2-id")},d}),i.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="listbox"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=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="alert" 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){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)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");0<b.length?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&-1<a.inArray(f,e)?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(a)},c=this.option(b);c.className+=" loading-results",this.$results.prepend(c)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"option","aria-selected":"false"},f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var g in(null!=c.element&&f.call(c.element,":disabled")||null==c.element&&c.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]),e){var h=e[g];d.setAttribute(g,h)}if(c.children){var i=a(d),j=document.createElement("strong");j.className="select2-results__group",a(j),this.template(c,j);for(var k=[],l=0;l<c.children.length;l++){var m=c.children[l],n=this.option(m);k.push(n)}var o=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});o.append(k),i.append(j),i.append(o)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a)+1;if(!(c>=b.length)){var d=b.eq(c);d.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),g=d.offset().top+d.outerHeight(!1),h=e.$results.scrollTop()+g-f;0===c?e.$results.scrollTop(0):f<g&&e.$results.scrollTop(h)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=0<a.deltaY&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");"true"!==d.attr("aria-selected")?e.trigger("select",{originalEvent:c,data:f}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]").index(a),c=this.$results.offset().top,d=a.offset().top,e=this.$results.scrollTop()+(d-c),f=d-c;e-=2*a.outerHeight(!1),b<=2?this.$results.scrollTop(0):(f>this.$results.outerHeight()||f<0)&&this.$results.scrollTop(e)}},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}),i.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),i.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 c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,e=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.trigger("focus"),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex),d.$selection.attr("aria-disabled","false")}),a.on("disable",function(){d.$selection.attr("tabindex","-1"),d.$selection.attr("aria-disabled","true")})},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(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d}),i.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).attr("role","textbox").attr("aria-readonly","true"),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.trigger("focus")})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0!==a.length){var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d);var e=b.title||b.text;e?c.attr("title",e):c.removeAttr("title")}else this.clear()},e}),i.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,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.isDisabled()){var d=a(this).parent(),e=c.GetData(d[0],"data");f.trigger("unselect",{originalEvent:b,data:e})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},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);var h=e.title||e.text;h&&f.attr("title",h),c.StoreData(f[0],"data",e),b.push(f)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,b)}},d}),i.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;if(1<b.length||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.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)})},d.prototype._handleClear=function(a,b){if(!this.isDisabled()){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)this.$element.val(f);else{for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(0<this.$selection.find(".select2-selection__placeholder").length||0===d.length)){var e=this.options.get("translations").get("removeAllItems"),f=a('<span class="select2-selection__clear" title="'+e()+'">&times;</span>');c.StoreData(f[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(f)}},d}),i.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="none" spellcheck="false" role="searchbox" 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,d,e){var f=this,g=d.id+"-results";a.call(this,d,e),d.on("open",function(){f.$search.attr("aria-controls",g),f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-controls"),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){a.data._resultId?f.$search.attr("aria-activedescendant",a.data._resultId):f.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(0<d.length){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(a){f.$search.val()&&a.stopPropagation()});var h=document.documentMode,i=h&&h<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){i?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(i&&"input"===a.type)f.$selection.off("input.search input.searchcheck");else{var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.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.trigger("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="";a=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",a)},d}),i.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","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];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}),i.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}),i.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"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",
2
  "é":"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","œ":"oe","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),i.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}),i.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("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];(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("input").trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("input").trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("input").trigger("change");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("input").trigger("change")})}},d.prototype.bind=function(a,b){var c=this;(this.container=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(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().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 d;a.children?(d=document.createElement("optgroup")).label=a.text:void 0!==(d=document.createElement("option")).textContent?d.textContent=a.text:d.innerText=a.text,void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return(d=this._normalizeItem(d)).element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){return a!==Object(a)&&(a={id:a,text:a}),null!=(a=c.extend({},{text:""},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({},{selected:!1,disabled:!1},a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),i.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){this._dataToConvert=b.get("data")||[],d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype.bind=function(a,b){d.__super__.bind.call(this,a,b),this.addOptions(this.convertToOptions(this._dataToConvert))},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(0<=c.inArray(j.id,g)){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}),i.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(){"status"in d&&(0===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}),i.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){var d=this;this._removeOldTags(),null!=b.term&&null==b.page?a.call(this,b,function a(e,f){for(var g=e.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!a({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(e.data=g,void c(e))}if(f)return!0;var k=d.createTag(b);if(null!=k){var l=d.option(k);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(g,k)}e.results=g,c(e)}):a.call(this,b,c)},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){this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),i.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){var e=this;c.term=c.term||"";var f=this.tokenizer(c,this.options,function(b){var c,d=e._normalizeItem(b);if(!e.$element.find("option").filter(function(){return a(this).val()===d.id}).length){var f=e.option(d);f.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([f])}c=d,e.trigger("select",{data:c})});f.term!==c.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),c.term=f.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=i(a.extend({},c,{term:k}));null!=l?(e(l),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),i.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){b.term=b.term||"",b.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.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){b.term=b.term||"",0<this.maximumInputLength&&b.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){var d=null!=a?a.length:0;0<c.maximumSelectionLength&&d>=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),i.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},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),i.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="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-controls",f),e.$search.trigger("focus"),window.setTimeout(function(){e.$search.trigger("focus")},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-controls"),e.$search.removeAttr("aria-activedescendant"),e.$search.val(""),e.$search.trigger("blur")}),c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")}),c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide"))}),c.on("results:focus",function(a){a.data._resultId?e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},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}),i.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;0<=d;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),i.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),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("query",function(a){d.lastParams=a,d.loading=!0}),b.on("query:append",function(a){d.lastParams=a,d.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&b){var c=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=c+50&&this.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="option" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),i.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),d._bindContainerResultHandlers(b)}),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.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){if(!this._containerResultsHandlersBound){var c=this;b.on("results:all",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("select",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown(),c._resizeDropdown()}),this._containerResultsHandlersBound=!0}},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(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h=this.$dropdown.outerHeight(!1),i=b.scrollTop(),j=b.scrollTop()+b.height(),k=i<f.top-h,l=j>f.bottom+h,m={left:f.left,top:g.bottom},n=this.$dropdownParent;"static"===n.css("position")&&(n=n.offsetParent());var o={top:0,left:0};(a.contains(document.body,n[0])||n[0].isConnected)&&(o=n.offset()),m.top-=o.top,m.left-=o.left,c||d||(e="below"),l||!k||c?!k&&l&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(m.top=g.top-o.top-h),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(m)},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}),i.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(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}(b.data.results)<this.minimumResultsForSearch)&&a.call(this,b)},a}),i.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),i.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||c.metaKey)||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),i.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){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},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…"},removeAllItems:function(){return"Remove all items"}}}),i.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()}return D.prototype.apply=function(k){if(null==(k=a.extend(!0,{},this.defaults,k)).dataAdapter){if(null!=k.ajax?k.dataAdapter=o:null!=k.data?k.dataAdapter=n:k.dataAdapter=m,0<k.minimumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,r)),0<k.maximumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,s)),0<k.maximumSelectionLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,t)),k.tags&&(k.dataAdapter=j.Decorate(k.dataAdapter,p)),null==k.tokenSeparators&&null==k.tokenizer||(k.dataAdapter=j.Decorate(k.dataAdapter,q)),null!=k.query){var l=b(k.amdBase+"compat/query");k.dataAdapter=j.Decorate(k.dataAdapter,l)}if(null!=k.initSelection){var C=b(k.amdBase+"compat/initSelection");k.dataAdapter=j.Decorate(k.dataAdapter,C)}}if(null==k.resultsAdapter&&(k.resultsAdapter=c,null!=k.ajax&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,x)),null!=k.placeholder&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,w)),k.selectOnClose&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,A))),null==k.dropdownAdapter){if(k.multiple)k.dropdownAdapter=u;else{var D=j.Decorate(u,v);k.dropdownAdapter=D}if(0!==k.minimumResultsForSearch&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,z)),k.closeOnSelect&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,B)),null!=k.dropdownCssClass||null!=k.dropdownCss||null!=k.adaptDropdownCssClass){var E=b(k.amdBase+"compat/dropdownCss");k.dropdownAdapter=j.Decorate(k.dropdownAdapter,E)}k.dropdownAdapter=j.Decorate(k.dropdownAdapter,y)}if(null==k.selectionAdapter){if(k.multiple?k.selectionAdapter=e:k.selectionAdapter=d,null!=k.placeholder&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,f)),k.allowClear&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,g)),k.multiple&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,h)),null!=k.containerCssClass||null!=k.containerCss||null!=k.adaptContainerCssClass){var F=b(k.amdBase+"compat/containerCss");k.selectionAdapter=j.Decorate(k.selectionAdapter,F)}k.selectionAdapter=j.Decorate(k.selectionAdapter,i)}k.language=this._resolveLanguage(k.language),k.language.push("en");for(var G=[],H=0;H<k.language.length;H++){var I=k.language[H];-1===G.indexOf(I)&&G.push(I)}return k.language=G,k.translations=this._processTranslations(k.language,k.debug),k},D.prototype.reset=function(){function b(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return l[a]||a})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:{},matcher:function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&0<e.children.length){for(var f=a.extend(!0,{},e),g=e.children.length-1;0<=g;g--)null==c(d,e.children[g])&&f.children.splice(g,1);return 0<f.children.length?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return-1<h.indexOf(i)?e:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.applyFromElement=function(a,b){var c=a.language,d=this.defaults.language,e=b.prop("lang"),f=b.closest("[lang]").prop("lang"),g=Array.prototype.concat.call(this._resolveLanguage(e),this._resolveLanguage(c),this._resolveLanguage(d),this._resolveLanguage(f));return a.language=g,a},D.prototype._resolveLanguage=function(b){if(!b)return[];if(a.isEmptyObject(b))return[];if(a.isPlainObject(b))return[b];var c;c=a.isArray(b)?b:[b];for(var d=[],e=0;e<c.length;e++)if(d.push(c[e]),"string"==typeof c[e]&&0<c[e].indexOf("-")){var f=c[e].split("-")[0];d.push(f)}return d},D.prototype._processTranslations=function(b,c){for(var d=new k,e=0;e<b.length;e++){var f=new k,g=b[e];if("string"==typeof g)try{f=k.loadPath(g)}catch(a){try{g=this.defaults.amdLanguageBase+g,f=k.loadPath(g)}catch(a){c&&window.console&&console.warn&&console.warn('Select2: The language file for "'+g+'" could not be automatically loaded. A fallback will be used instead.')}}else f=a.isPlainObject(g)?new k(g):g;d.extend(f)}return d},D.prototype.set=function(b,c){var d={};d[a.camelCase(b)]=c;var e=j._convertData(d);a.extend(!0,this.defaults,e)},new D}),i.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),null!=e&&(this.options=c.applyFromElement(this.options,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){function c(a,b){return b.toUpperCase()}var e=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),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),d.GetData(a[0],"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.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"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",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));for(var f={},g=0;g<a[0].attributes.length;g++){var h=a[0].attributes[g].name,i="data-";if(h.substr(0,i.length)==i){var j=h.substring(i.length),k=d.GetData(a[0],j);f[j.replace(/-([a-z])/g,c)]=k}}b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset&&(f=b.extend(!0,{},a[0].dataset,f));var l=b.extend(!0,{},d.GetData(a[0]),f);for(var m in l=d._convertData(l))-1<b.inArray(m,e)||(b.isPlainObject(this.options[m])?b.extend(this.options[m],l[m]):this.options[m]=l[m]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),i.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){return"select2-"+(null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,"").match(c);if(null!==j&&1<=j.length)return j[1]}return null},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 a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(b){
3
- a.trigger("selection:update",{data:b})})}),this.$element.on("focus.select2",function(b){a.trigger("focus",b)}),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 b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=b?(this._observer=new b(function(b){a._syncA(),a._syncS(null,b)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._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),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.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._isChangeMutation=function(b,c){var d=!1,e=this;if(!b||!b.target||"OPTION"===b.target.nodeName||"OPTGROUP"===b.target.nodeName){if(c)if(c.addedNodes&&0<c.addedNodes.length)for(var f=0;f<c.addedNodes.length;f++)c.addedNodes[f].selected&&(d=!0);else c.removedNodes&&0<c.removedNodes.length?d=!0:a.isArray(c)&&a.each(c,function(a,b){if(e._isChangeMutation(a,b))return!(d=!0)});else d=!0;return d}},e.prototype._syncSubtree=function(a,b){var c=this._isChangeMutation(a,b),d=this;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",clear:"clearing"};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.isDisabled()||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},e.prototype.close=function(a){this.isOpen()&&this.trigger("close",{originalEvent:a})},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isDisabled=function(){return this.options.get("disabled")},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")&&0<arguments.length&&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("input").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",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<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")),c.StoreData(b[0],"element",this.$element),b},e}),i.define("select2/compat/utils",["jquery"],function(a){return{syncCssClasses:function(b,c,d){var e,f,g=[];(e=a.trim(b.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)}),(e=a.trim(c.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)}),b.attr("class",g.join(" "))}}}),i.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;this._isInitialized?b.call(this,c):this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),i.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("input").trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("input").trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("input").trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),i.define("select2/compat/matcher",["jquery"],function(a){return function(b){return function(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;0<=f;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(0<e.children.length)return e}return b(c.term,d.text,d)?e:null}}}),i.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),i.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),i.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),i.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),y=function(a){function b(b){var g,h=b||window.event,j=i.call(arguments,1),l=0,m=0,n=0,o=0,p=0;if((b=a.event.fix(h)).type="mousewheel","detail"in h&&(n=-1*h.detail),"wheelDelta"in h&&(n=h.wheelDelta),"wheelDeltaY"in h&&(n=h.wheelDeltaY),"wheelDeltaX"in h&&(m=-1*h.wheelDeltaX),"axis"in h&&h.axis===h.HORIZONTAL_AXIS&&(m=-1*n,n=0),l=0===n?m:n,"deltaY"in h&&(l=n=-1*h.deltaY),"deltaX"in h&&(m=h.deltaX,0===n&&(l=-1*m)),0!==n||0!==m){if(1===h.deltaMode){var q=a.data(this,"mousewheel-line-height");l*=q,n*=q,m*=q}else if(2===h.deltaMode){var r=a.data(this,"mousewheel-page-height");l*=r,n*=r,m*=r}if(g=Math.max(Math.abs(n),Math.abs(m)),(!f||g<f)&&d(h,f=g)&&(f/=40),d(h,g)&&(l/=40,m/=40,n/=40),l=Math[1<=l?"floor":"ceil"](l/f),m=Math[1<=m?"floor":"ceil"](m/f),n=Math[1<=n?"floor":"ceil"](n/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=m,b.deltaY=n,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,j.unshift(b,l,m,n),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,j)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})},"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],y):"object"==typeof exports?module.exports=y:y(a),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"!=typeof b)throw new Error("Invalid arguments for Select2: "+b);var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),-1<a.inArray(b,f)?this:d}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:i.define,require:i.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy,braapf_context_is_update;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}function d(b){var c=berocket_apply_filters("filter_mobile_width",767),d=berocket_apply_filters("filter_tablet_width",1024);return a(window).width()<=c&&b.find(".bapf_sngl_hd_mobile").remove(),a(window).width()>c&&a(window).width()<=d&&b.find(".bapf_sngl_hd_tablet").remove(),a(window).width()>d&&b.find(".bapf_sngl_hd_desktop").remove(),b}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length>a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500),jQuery(document).ready(function(){var c=the_ajax_script.pagination_class;c=c.replace(","," a,"),c=berocket_apply_filters("pagination_links_a_tags",c+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",c,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))})}),jQuery(document).ready(function(){!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)})}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||braapf_context_is_update(b),b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(berocket_apply_filters("before_update_products_context_url_filtered_partial",d,b,c),{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_context_is_update=function(a){return berocket_apply_filters("context_is_update","update"==a||"reset_all"==a||"reset_single"==a,a)},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()};braapf_update_url_history_api_from_current=function(a,b,c,d,e){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered),d!=url_filtered&&the_ajax_script.reload_changed_filters&&setTimeout(function(){braapf_filter_products_by_url(url_filtered)},5))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a('.bapf_sfilter[data-taxonomy="'+g+'"]');m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b=berocket_apply_filters("braapf_remove_pages_from_url_data",b)},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d),args=berocket_apply_filters("replace_current_with_new_args",args,b,c);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c,{type:"pagination"})},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");c=d(c),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).last().is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&window.addEventListener("popstate",function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),
4
- a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&(a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove(),berocket_throw_error("same_filters_multiple_times",b))}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),a(".berocket_aapf_widget_selected_area").parents(".berocket_single_filter_widget").removeClass("bapf_mt_none"),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a('.bapf_sfilter[data-taxonomy="'+a(this).data("taxonomy")+'"]').trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a('.bapf_sfilter[data-taxonomy="'+c.taxonomy+'"]').trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{berocket_apply_filters("the7_compatibility",a(the_ajax_script.products_holder_id+" .iso-lazy-load").length>0)&&a(the_ajax_script.products_holder_id+" .iso-lazy-load").attr("src",function(){return"undefined"!=typeof a(this).data("src")&&a(this).data("src")?a(this).data("src"):a(this).attr("src")}).attr("srcset",function(){return"undefined"!=typeof a(this).data("srcset")&&a(this).data("srcset")?a(this).data("srcset"):a(this).attr("srcset")}).removeClass("iso-lazy-load")}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{if("function"==typeof InfiniteScroll){var c=InfiniteScroll.data(".shop-container .products");if("object"==typeof c&&c.options){var d=c.options;c.destroy(),jQuery(".shop-container .products").data("infiniteScroll","").infiniteScroll(d)}}}catch(a){berocket_throw_error("flatsome_infinitescroll",a)}try{jQuery(".shop-container .products").length&&"object"==typeof jQuery(".shop-container .products").data("packery")&&jQuery(".shop-container .products").packery("reloadItems").packery("layout")}catch(a){berocket_throw_error("flatsome_packery",a)}try{berocket_apply_filters("JetSmartFilters_compatibility","object"==typeof window.JetSmartFilters&&"function"==typeof window.JetSmartFilters.initializeFilters)&&window.JetSmartFilters.initializeFilters()}catch(a){berocket_throw_error("JetSmartFilters_compatibility",a)}a(window).trigger("resize"),a(window).trigger("scroll")}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},a(document).ready(function(){the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading)}),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_check_partial_load_filters,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance,brapf_jet_smart_filters_add,brapf_jet_smart_filters_remove_pages,brapf_jet_smart_filters;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+'[data-taxonomy="'+f+'"]');if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').length;i++)a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},braapf_check_partial_load_filters=function(b,c,d){return a(".berocket_single_filter_widget.bapf_partload").length>0&&(b=!0),b},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button),berocket_add_filter("apply_filters_to_page_partial",braapf_check_partial_load_filters);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}}),brapf_jet_smart_filters=function(b){var c=a("<div><div>"+b+"</div></div>");jQuery("#jet-smart-filters-js-extra").length>0&&c.find("#jet-smart-filters-js-extra").length>0&&jQuery("#jet-smart-filters-js-extra").replaceWith(c.find("#jet-smart-filters-js-extra"))},brapf_jet_smart_filters_remove_pages=function(b){if(Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"pagenum"!=b.name&&c.push(b)}),b.queryargs=c}return b},brapf_jet_smart_filters_add=function(a){return a.done.push(brapf_jet_smart_filters),a},brapf_JetSmartFilter_extra_props=function(){var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split);JetSmartFilterSettings.extra_props.brfilters=c},jQuery(document).ready(function(){berocket_apply_filters("JetSmartFilter_compatibility",jQuery("#jet-smart-filters-js-extra").length>0)&&(jQuery(document).on("berocket_ajax_products_loaded",brapf_JetSmartFilter_extra_props),brapf_JetSmartFilter_extra_props(),berocket_add_filter("ajax_load_from_filters",brapf_jet_smart_filters_add),berocket_add_filter("braapf_remove_pages_from_url_data",brapf_jet_smart_filters_remove_pages))})}(jQuery),jQuery(document).trigger("bapf_js_loaded");var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){function b(){berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_link_arr_attr_price",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_arr_attr,10),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_wc_price,20)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a('.bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),"function"==typeof berocket_add_filter?b():jQuery(document).on("berocket_hooks_ready",function(){b()})}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),"function"==typeof berocket_add_filter?berocket_add_filter("grab_single_filter_default",braapf_grab_single_select):jQuery(document).on("berocket_hooks_ready",function(){berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)})}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){function a(){bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)}bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),"function"==typeof berocket_add_filter?a():jQuery(document).on("berocket_hooks_ready",function(){a()})});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}function d(){berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_arr_attr,10),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_wc_price,20),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr_price",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),
5
- berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a('.bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),"function"==typeof berocket_add_filter?d():jQuery(document).on("berocket_hooks_ready",function(){d()})}(jQuery),!function(a){function b(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var c,d=a.ui.mouse.prototype,e=d._mouseInit,f=d._mouseDestroy;d._touchStart=function(a){var d=this;!c&&d._mouseCapture(a.originalEvent.changedTouches[0])&&(c=!0,d._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))},d._touchMove=function(a){c&&(this._touchMoved=!0,b(a,"mousemove"))},d._touchEnd=function(a){c&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),c=!1)},d._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),e.call(b)},d._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),f.call(b)}}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&W(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=S.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=T.call(this,j[0],"y"),j[1]=T.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ea()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",X(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",X(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&W(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);c.data(d)&&(c.data(d),U.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3]))})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),U.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),_(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),_(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_vertical"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div></div><div class='mCSB_draggerRail'></div></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_horizontal"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div><div class='mCSB_draggerRail'></div></div>"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+f.theme+" "+i+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+f.setTop+"; left:"+f.setLeft+";' dir='"+e.langDir+"' /></div>");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ca(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["<a href='#' class='"+k[13]+"' "+g+" />","<a href='#' class='"+k[14]+"' "+g+" />","<a href='#' class='"+k[15]+"' "+g+" />","<a href='#' class='"+k[16]+"' "+g+" />"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]<j[0]?j[0]:j[1],l=i&&j[3]<j[2]?j[2]:j[3];g[0].css({height:k,"max-height":g[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":j[0]+"px"}),g[1].css({width:l,"max-width":g[1].parent().width()-10})},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[f.outerHeight(!1)-e.height(),f.outerWidth(!1)-e.width()],i=[h[0]/(g[0].parent().height()-g[0].height()),h[1]/(g[1].parent().width()-g[1].width())];c.scrollRatio={y:i[0],x:i[1]}},x=function(a,b,c){var d=c?k[0]+"_expanded":"",e=a.closest(".mCSB_scrollTools");"active"===b?(a.toggleClass(k[0]+" "+d),e.toggleClass(k[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||("hide"===b?(a.removeClass(k[0]),e.removeClass(k[1])):(a.addClass(k[0]),e.addClass(k[1])))},y=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=null==c.overflowed?f.height():f.outerHeight(!1),h=null==c.overflowed?f.width():f.outerWidth(!1),i=f[0].scrollHeight,j=f[0].scrollWidth;return i>g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(W(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),X(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),X(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}M.call(this),O.call(this),f.advanced.autoScrollOnFocus&&N.call(this),f.scrollButtons.enable&&P.call(this),f.keyboard.enable&&Q.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!J()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),_(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),_(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),_(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document&&null!==frameElement?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=J()&&b.target.ownerDocument!==top.document&&null!==frameElement?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a,b,d,e){if(n[0].idleTimer=k.scrollInertia<233?250:0,c.attr("id")===m[1])var f="x",i=(c[0].offsetLeft-b+e)*h.scrollRatio.x;else var f="y",i=(c[0].offsetTop-a+d)*h.scrollRatio.y;X(g,i.toString(),{dir:f,drag:!0})}var c,e,f,g=a(this),h=g.data(d),k=h.opt,l=d+"_"+h.idx,m=["mCSB_"+h.idx+"_dragger_vertical","mCSB_"+h.idx+"_dragger_horizontal"],n=a("#mCSB_"+h.idx+"_container"),o=a("#"+m[0]+",#"+m[1]),p=k.advanced.releaseDraggableSelectors?o.add(a(k.advanced.releaseDraggableSelectors)):o,q=k.advanced.extraDraggableSelectors?a(!J()||top.document).add(a(k.advanced.extraDraggableSelectors)):a(!J()||top.document);o.bind("contextmenu."+l,function(a){a.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,function(b){if(b.stopImmediatePropagation(),b.preventDefault(),aa(b)){j=!0,i&&(document.onselectstart=function(){return!1}),K.call(n,!1),W(g),c=a(this);var d=c.offset(),h=D(b)[0]-d.top,l=D(b)[1]-d.left,m=c.height()+d.top,o=c.width()+d.left;m>h&&h>0&&o>l&&l>0&&(e=h,f=l),x(c,"active",k.autoExpandScrollbar)}}).bind("touchmove."+l,function(a){a.stopImmediatePropagation(),a.preventDefault();var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;b(e,f,g,h)}),a(document).add(q).bind("mousemove."+l+" pointermove."+l+" MSPointerMove."+l,function(a){if(c){var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;if(e===g&&f===h)return;b(e,f,g,h)}}).add(p).bind("mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l,function(){c&&(x(c,"active",k.autoExpandScrollbar),c=null),j=!1,i&&(document.onselectstart=null),K.call(n,!0)})},F=function(){function c(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(ba(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]<L[2]||"yx"===A.axis);if(z.overflowed[1])var h=F[1].parent().width()-F[1].width(),n=m-d>0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]<L[3]||"yx"===A.axis);g||n?(O||a.preventDefault(),w=1):(x=1,y.addClass("mCS_touch_action")),O&&a.preventDefault(),u="yx"===A.axis?[l-c,m-d]:"x"===A.axis?[null,m-d]:[l-c,null],E[0].idleTimer=250,z.overflowed[0]&&i(u[0],I,e,"y","all",!0),z.overflowed[1]&&i(u[1],I,e,"x",K,!0)}}function f(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,a.stopImmediatePropagation(),W(y),p=Z();var c=C.offset();n=D(a)[0]-c.top,o=D(a)[1]-c.left,G=[],H=[]}function g(a){if(ba(a)&&!j&&!D(a)[2]){k=0,a.stopImmediatePropagation(),w=0,x=0,r=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(!(r-q>30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&X(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],I=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,R(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g<n.height()&&j>0&&j<n.width()?k.step&&e("off",null,"stepped"):("x"!==i.axis&&h.overflowed[0]&&(0>g?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(W(c),!L(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r="y"===f.mouseWheel.axis?b.deltaY||d:b.deltaX;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),X(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=new Object,J=function(b){var c=!1,d=!1,e=null;if(void 0===b?d="#empty":void 0!==a(b).attr("id")&&(d=a(b).attr("id")),d!==!1&&void 0!==I[d])return I[d];if(b){try{var f=b.contentDocument||b.contentWindow.document;e=f.body.innerHTML}catch(a){}c=null!==e}else{try{var f=top.document;e=f.body.innerHTML}catch(a){}c=null!==e}return d!==!1&&(I[d]=c),c},K=function(a){var b=this.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}},L=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},M=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);
6
- i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){W(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}X(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},N=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(){var c=a(document.activeElement),d=g.find(".mCustomScrollBox").length,f=0;c.is(e.advanced.autoScrollOnFocus)&&(W(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=d?(f+17)*d:0,b[0]._focusTimeout=setTimeout(function(){var a=[da(c)[0],da(c)[1]],d=[g[0].offsetTop,g[0].offsetLeft],i=[d[0]+a[0]>=0&&d[0]+a[0]<h.height()-c.outerHeight(!1),d[1]+a[1]>=0&&d[0]+a[1]<h.width()-c.outerWidth(!1)],j="yx"!==e.axis||i[0]||i[1]?"all":"none";"x"===e.axis||i[0]||X(b,a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f}),"y"===e.axis||i[1]||X(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f})},b[0]._focusTimer))})},O=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container").parent();f.bind("scroll."+e,function(){0===f.scrollTop()&&0===f.scrollLeft()||a(".mCSB_"+c.idx+"_scrollbar").css("visibility","hidden")})},P=function(){var b=a(this),c=b.data(d),e=c.opt,f=c.sequential,g=d+"_"+c.idx,h=".mCSB_"+c.idx+"_scrollbar",i=a(h+">a");i.bind("contextmenu."+g,function(a){a.preventDefault()}).bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,R(b,a,c)}if(d.preventDefault(),aa(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},Q=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||R(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){W(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},R=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),X(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),_(m,"step"),W(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],W(b),ca(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},S=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},T=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1)-i.width():h.outerHeight(!1)-i.height(),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?da(o)[1]:da(o)[0];case"string":case"number":if(ca(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&ca(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?da(o)[1]:da(o)[0]}return a(b).length?"x"===c?da(a(b))[1]:da(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},U=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void _(m[0],"autoUpdate")):void c()},V=function(a,b,c){return Math.round(a/b)*b-c},W=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){$.call(this)})},X=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?S.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?S.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=V(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),Y(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||Y(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},Y=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Z()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time<s+1&&(v.time=s+1)),v.time<d?v.id=n(h):q.call())}function i(){d>0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Z(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c<b.length;c++){var d=b[c];a._mTween[d].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(a._mTween[d].id):clearTimeout(a._mTween[d].id),a._mTween[d].id=null,a._mTween[d].stop=1)}},_=function(a,b){try{delete a[b]}catch(c){a[b]=null}},aa=function(a){return!(a.which&&1!==a.which)},ba=function(a){var b=a.originalEvent.pointerType;return!(b&&"touch"!==b&&2!==b)},ca=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},da=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]},ea=function(){function a(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)if(a[b]+"Hidden"in document)return a[b]+"Hidden";return null}var b=a();return!!b&&document[b]};a.fn[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c].defaults=f,window[c]=!0,a(window).bind("load",function(){a(e)[c](),a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d,e=a(b),f=e.parents(".mCSB_container");if(f.length)return c=f.parent(),d=[f[0].offsetTop,f[0].offsetLeft],d[0]+da(e)[0]>=0&&d[0]+da(e)[0]<c.height()-e.outerHeight(!1)&&d[1]+da(e)[1]>=0&&d[1]+da(e)[1]<c.width()-e.outerWidth(!1)},mcsInSight:a.expr[":"].mcsInSight||function(b,c,d){var e,f,g,h,i=a(b),j=i.parents(".mCSB_container"),k="exact"===d[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(j.length)return e=[i.outerHeight(!1),i.outerWidth(!1)],g=[j[0].offsetTop+da(i)[0],j[0].offsetLeft+da(i)[1]],f=[j.parent()[0].offsetHeight,j.parent()[0].offsetWidth],h=[e[0]<f[0]?k[0]:k[1],e[1]<f[1]?k[0]:k[1]],g[0]-f[0]*h[0][0]<0&&g[0]+e[0]-f[0]*h[0][1]>=0&&g[1]-f[1]*h[1][0]<0&&g[1]+e[1]-f[1]*h[1][1]>=0},mcsOverflow:a.expr[":"].mcsOverflow||function(b){var c=a(b).data(d);if(c)return c.overflowed[0]||c.overflowed[1]}})})})}),!function(a){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?a(jQuery,document,window,navigator):a(require("jquery"),document,window,navigator):define(["jquery"],function(b){return a(b,document,window,navigator)})}(function(a,b,c,d,e){"use strict";function f(d,f,g){this.VERSION="2.3.1",this.input=d,this.plugin_count=g,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h,i,j,k=this.$cache.input,l=k.prop("value");for(j in h={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==k[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",k[0]),(i={skin:k.data("skin"),type:k.data("type"),min:k.data("min"),max:k.data("max"),from:k.data("from"),to:k.data("to"),step:k.data("step"),min_interval:k.data("minInterval"),max_interval:k.data("maxInterval"),drag_interval:k.data("dragInterval"),values:k.data("values"),from_fixed:k.data("fromFixed"),from_min:k.data("fromMin"),from_max:k.data("fromMax"),from_shadow:k.data("fromShadow"),to_fixed:k.data("toFixed"),to_min:k.data("toMin"),to_max:k.data("toMax"),to_shadow:k.data("toShadow"),prettify_enabled:k.data("prettifyEnabled"),prettify_separator:k.data("prettifySeparator"),force_edges:k.data("forceEdges"),keyboard:k.data("keyboard"),grid:k.data("grid"),grid_margin:k.data("gridMargin"),grid_num:k.data("gridNum"),grid_snap:k.data("gridSnap"),hide_min_max:k.data("hideMinMax"),hide_from_to:k.data("hideFromTo"),prefix:k.data("prefix"),postfix:k.data("postfix"),max_postfix:k.data("maxPostfix"),decorate_both:k.data("decorateBoth"),values_separator:k.data("valuesSeparator"),input_values_separator:k.data("inputValuesSeparator"),disable:k.data("disable"),block:k.data("block"),extra_classes:k.data("extraClasses")}).values=i.values&&i.values.split(","),i)i.hasOwnProperty(j)&&(i[j]!==e&&""!==i[j]||delete i[j]);l!==e&&""!==l&&((l=l.split(i.input_values_separator||f.input_values_separator||";"))[0]&&l[0]==+l[0]&&(l[0]=+l[0]),l[1]&&l[1]==+l[1]&&(l[1]=+l[1]),f&&f.values&&f.values.length?(h.from=l[0]&&f.values.indexOf(l[0]),h.to=l[1]&&f.values.indexOf(l[1])):(h.from=l[0]&&+l[0],h.to=l[1]&&+l[1])),a.extend(h,f),a.extend(h,i),this.options=h,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}var g,h,i=0,j=(g=d.userAgent,h=/msie\s\d+/i,0<g.search(h)&&h.exec(g).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var g=new f,h=b.apply(g,d.concat(c.call(arguments)));return Object(h)===h?h:g}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0==e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),e<=f)return-1;for(c=Math.max(0<=f?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),f.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var a='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(a),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.min,b=this.options.max,c=this.options.from,d=this.options.to;a<c&&d===b?this.$cache.s_from.addClass("type_last"):d<b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),j&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),j&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(a){var b,c;this.target||(b=(c="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,b+=c.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:b}))},pointerMove:function(a){if(this.dragging){var b=a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX;this.coords.x_pointer=b-this.coords.x_gap,this.calc()}},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,j&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b=b||this.target||"from",this.current_plugin=this.plugin_count,this.target=b,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),j&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,c=(this.options.max-this.options.min)/100;c=this.options.step/c,a?b+=c:b-=c,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a,this.result.max_pretty=b,this.$cache.min.html(this.decorate(a,this.options.min)),this.$cache.max.html(this.decorate(b,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;
7
- null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,10!==this.calc_count&&!a||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var b=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,b=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,b=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(b)),this.target){case"base":var c=(this.options.max-this.options.min)/100,d=(this.result.from-this.options.min)/c,e=(this.result.to-this.options.min)/c;this.coords.p_single_real=this.toFixed(d),this.coords.p_from_real=this.toFixed(d),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(b),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(b),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(b),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;b=this.toFixed(b+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(b)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(b)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var f=this.convertToRealPercent(b),g=this.result.from_percent,h=this.result.to_percent-g,i=h/2,j=f-i,k=f+i;j<0&&(k=(j=0)+h),100<k&&(j=(k=100)-h),this.coords.p_from_real=this.calcWithStep(j),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(k),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return b<0?b=0:a<b&&(b=a),b},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=a?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var a,b,c,d,e,f=this.options.values.length,g=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)a=f?this.decorate(g[this.result.from]):(d=this._prettify(this.result.from),this.decorate(d,this.result.from)),this.$cache.single.html(a),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{c=f?(this.options.decorate_both?(a=this.decorate(g[this.result.from]),a+=this.options.values_separator,a+=this.decorate(g[this.result.to])):a=this.decorate(g[this.result.from]+this.options.values_separator+g[this.result.to]),b=this.decorate(g[this.result.from]),this.decorate(g[this.result.to])):(d=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(e,this.result.to)):a=this.decorate(d+this.options.values_separator+e,this.result.to),b=this.decorate(d,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(a),this.$cache.from.html(b),this.$cache.to.html(c),this.calcLabels();var h=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake,j=this.labels.p_to_left+this.labels.p_to_fake,k=Math.max(i,j);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",k=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",j):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,j))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),h<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",k>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var a,b,c,d,e=this.options,f=this.$cache,g="number"==typeof e.from_min&&!isNaN(e.from_min),h="number"==typeof e.from_max&&!isNaN(e.from_max),i="number"==typeof e.to_min&&!isNaN(e.to_min),j="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_single[0].style.display="block",f.shad_single[0].style.left=a+"%",f.shad_single[0].style.width=b+"%"):f.shad_single[0].style.display="none":(e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_from[0].style.display="block",f.shad_from[0].style.left=a+"%",f.shad_from[0].style.width=b+"%"):f.shad_from[0].style.display="none",e.to_shadow&&(i||j)?(c=this.convertToPercent(i?e.to_min:e.min),d=this.convertToPercent(j?e.to_max:e.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,f.shad_to[0].style.display="block",f.shad_to[0].style.left=c+"%",f.shad_to[0].style.width=d+"%"):f.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var c,d=this.options.max-this.options.min,e=d/100;return d?(c=(b?a:a-this.options.min)/e,this.toFixed(c)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;if(0===a)return this.options.min;if(100===a)return this.options.max;f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=c<=b?b:c),d<0&&(d=+(d+(i=Math.abs(d))).toFixed(h),e=+(e+i).toFixed(h));var j,k=(e-d)/100*a+d,l=this.options.step.toString().split(".")[1];return k=l?+k.toFixed(l.length):(k/=this.options.step,+(k*=this.options.step).toFixed(0)),i&&(k-=i),(j=l?+k.toFixed(l.length):this.toFixed(k))<this.options.min?j=this.options.min:j>this.options.max&&(j=this.options.max),j},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return 100<b&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d,e,f=this.options;return f.min_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d<f.min_interval&&(d=e-f.min_interval):d-e<f.min_interval&&(d=e+f.min_interval),this.convertToPercent(d)):a},checkMaxInterval:function(a,b,c){var d,e,f=this.options;return f.max_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d>f.max_interval&&(d=e-f.max_interval):d-e>f.max_interval&&(d=e+f.max_interval),this.convertToPercent(d)):a},checkDiapason:function(a,b,c){var d=this.convertToValue(a),e=this.options;return"number"!=typeof b&&(b=e.min),"number"!=typeof c&&(c=e.max),d<b&&(d=b),c<d&&(d=c),this.convertToPercent(d)},toFixed:function(a){return+(a=a.toFixed(20))},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges&&(a<0?a=0:100-b<a&&(a=100-b)),this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.max<c.min&&(c.max=c.min),f)for(c.p_values=[],c.min=0,c.max=f-1,c.step=1,c.grid_num=c.max,c.grid_snap=!0,b=0;b<f;b++)a=+e[b],a=isNaN(a)?e[b]:(e[b]=a,this._prettify(a)),c.p_values.push(a);"number"==typeof c.from&&!isNaN(c.from)||(c.from=c.min),"number"==typeof c.to&&!isNaN(c.to)||(c.to=c.max),"single"===c.type?(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max)):(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max),c.to<c.min&&(c.to=c.min),c.to>c.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.to<c.from&&(c.to=c.from)),c.from>c.to&&(c.from=c.to),c.to<c.from&&(c.to=c.from)),("number"!=typeof c.step||isNaN(c.step)||!c.step||c.step<0)&&(c.step=1),"number"==typeof c.from_min&&c.from<c.from_min&&(c.from=c.from_min),"number"==typeof c.from_max&&c.from>c.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.to<c.to_min&&(c.to=c.to_min),"number"==typeof c.to_max&&c.from>c.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.from<d.min||d.from>d.max)&&(d.from=c.from),(d.to<d.min||d.to>d.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||c.min_interval<0)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||c.max_interval<0)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c,d,e,f,g=this.options,h=g.max-g.min,i=g.grid_num,j=0,k=4,l="";for(this.calcGridMargin(),g.grid_snap&&(i=h/g.step),50<i&&(i=50),c=this.toFixed(100/i),4<i&&(k=3),7<i&&(k=2),14<i&&(k=1),28<i&&(k=0),a=0;a<i+1;a++){for(d=k,100<(j=this.toFixed(c*a))&&(j=100),e=((this.coords.big[a]=j)-c*(a-1))/(d+1),b=1;b<=d&&0!==j;b++)l+='<span class="irs-grid-pol small" style="left: '+this.toFixed(j-e*b)+'%"></span>';l+='<span class="irs-grid-pol" style="left: '+j+'%"></span>',f=this.convertToValue(j),l+='<span class="irs-grid-text js-grid-text-'+a+'" style="left: '+j+'%">'+(f=g.values.length?g.p_values[f]:this._prettify(f))+"</span>"}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(l),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b<c;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b,c=[],d=[],e=this.coords.big_num;for(a=0;a<e;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),c[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(c[a]+this.coords.big_p[a]);for(this.options.force_edges&&(c[0]<-this.coords.grid_gap&&(c[0]=-this.coords.grid_gap,d[0]=this.toFixed(c[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[e-1]>100+this.coords.grid_gap&&(d[e-1]=100+this.coords.grid_gap,c[e-1]=this.toFixed(d[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,c,d),this.calcGridCollision(4,c,d),a=0;a<e;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;d<g&&!(g<=(e=d+a/2));d+=a)f=this.$cache.grid_labels[e][0],c[d]<=b[e]?f.style.visibility="visible":f.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new f(this,b,i++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[b[d]+"RequestAnimationFrame"],c.cancelAnimationFrame=c[b[d]+"CancelAnimationFrame"]||c[b[d]+"CancelRequestAnimationFrame"];c.requestAnimationFrame||(c.requestAnimationFrame=function(b,d){var e=(new Date).getTime(),f=Math.max(0,16-(e-a)),g=c.setTimeout(function(){b(e+f)},f);return a=e+f,g}),c.cancelAnimationFrame||(c.cancelAnimationFrame=function(a){clearTimeout(a)})}()});
1
  function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c=[error_exist],d=0;d<arguments.length;d++)c.push(arguments[d]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,c),c[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){function b(a,b){return v.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=t.map,p=o&&o["*"]||{};if(a){for(g=(a=a.split("/")).length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&n&&(a=n.slice(0,n.length-1).concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),--k;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;0<k&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((n||p)&&o){for(k=(c=a.split("/")).length;0<k;--k){if(d=c.slice(0,k).join("/"),n)for(l=n.length;0<l;--l)if(e=(e=o[n.slice(0,l).join("/")])&&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 d(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(m,c.concat([a,b]))}}function e(a){return function(b){r[a]=b}}function f(a){if(b(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(m,c)}if(!b(r,a)&&!b(u,a))throw new Error("No "+a);return r[a]}function g(a){var b,c=a?a.indexOf("!"):-1;return-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function h(a){return a?g(a):[]}if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var i=a.fn.select2.amd;var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return i&&i.requirejs||(i?k=i:i={},r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/,p=function(a,b){var d,e,h=g(a),i=h[0],j=b[1];return a=h[1],i&&(d=f(i=c(i,j))),i?a=d&&d.normalize?d.normalize(a,(e=j,function(a){return c(a,e)})):c(a,j):(i=(h=g(a=c(a,j)))[0],a=h[1],i&&(d=f(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},q={require:function(a){return d(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:(b=a,function(){return t&&t.config&&t.config[b]||{}})};var b}},n=function(a,c,g,i){var j,k,l,n,o,t,v,w=[],x=typeof g;if(t=h(i=i||a),"undefined"==x||"function"==x){for(c=!c.length&&g.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if("require"===(k=(n=p(c[o],t)).f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)j=w[o]=q.module(a);else if(b(r,k)||b(s,k)||b(u,k))w[o]=f(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,d(i,!0),e(k),{}),w[o]=r[k]}l=g?g.apply(r[a],w):void 0,a&&(j&&j.exports!==m&&j.exports!==r[a]?r[a]=j.exports:l===m&&v||(r[a]=l))}else a&&(r[a]=g)},j=k=o=function(a,b,c,d,e){if("string"==typeof a)return q[a]?q[a](b):f(p(a,h(b)).f);if(!a.splice){if((t=a).deps&&o(t.deps,t.callback),!b)return;b.splice?(a=b,b=c,c=null):a=m}return b=b||function(){},"function"==typeof c&&(c=d,d=e),d?n(m,a,b,c):setTimeout(function(){n(m,a,b,c)},4),o},o.config=function(a){return o(a)},j._defined=r,(l=function(a,c,d){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");c.splice||(d=c,c=[]),b(r,a)||b(s,a)||(s[a]=[a,c,d])}).amd={jQuery:!0},i.requirejs=j,i.require=k,i.define=l),i.define("almond",function(){}),i.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}),i.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b)"function"==typeof b[d]&&"constructor"!==d&&c.push(d);return c}function c(){this.listeners={}}var d={};d.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},d.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;0<d&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new function(){this.constructor=d};for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=0;j<f.length;j++){var k=f[j];d.prototype[k]=e(k)}return d},c.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},c.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)in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},c.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},d.Observable=c,d.generateChars=function(a){for(var b="",c=0;c<a;c++)b+=Math.floor(36*Math.random()).toString(36);return b},d.bind=function(a,b){return function(){a.apply(b,arguments)}},d._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))in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},d.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||d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth)},d.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},d.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)},d.__cache={};var e=0;return d.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},d.StoreData=function(a,b,c){var e=d.GetUniqueElementId(a);d.__cache[e]||(d.__cache[e]={}),d.__cache[e][b]=c},d.GetData=function(b,c){var e=d.GetUniqueElementId(b);return c?d.__cache[e]&&null!=d.__cache[e][c]?d.__cache[e][c]:a(b).data(c):d.__cache[e]},d.RemoveData=function(a){var b=d.GetUniqueElementId(a);null!=d.__cache[b]&&delete d.__cache[b],a.removeAttribute("data-select2-id")},d}),i.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="listbox"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=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="alert" 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){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)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");0<b.length?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&-1<a.inArray(f,e)?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(a)},c=this.option(b);c.className+=" loading-results",this.$results.prepend(c)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"option","aria-selected":"false"},f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var g in(null!=c.element&&f.call(c.element,":disabled")||null==c.element&&c.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]),e){var h=e[g];d.setAttribute(g,h)}if(c.children){var i=a(d),j=document.createElement("strong");j.className="select2-results__group",a(j),this.template(c,j);for(var k=[],l=0;l<c.children.length;l++){var m=c.children[l],n=this.option(m);k.push(n)}var o=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});o.append(k),i.append(j),i.append(o)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a)+1;if(!(c>=b.length)){var d=b.eq(c);d.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),g=d.offset().top+d.outerHeight(!1),h=e.$results.scrollTop()+g-f;0===c?e.$results.scrollTop(0):f<g&&e.$results.scrollTop(h)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=0<a.deltaY&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");"true"!==d.attr("aria-selected")?e.trigger("select",{originalEvent:c,data:f}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]").index(a),c=this.$results.offset().top,d=a.offset().top,e=this.$results.scrollTop()+(d-c),f=d-c;e-=2*a.outerHeight(!1),b<=2?this.$results.scrollTop(0):(f>this.$results.outerHeight()||f<0)&&this.$results.scrollTop(e)}},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}),i.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),i.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 c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,e=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.trigger("focus"),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex),d.$selection.attr("aria-disabled","false")}),a.on("disable",function(){d.$selection.attr("tabindex","-1"),d.$selection.attr("aria-disabled","true")})},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(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d}),i.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).attr("role","textbox").attr("aria-readonly","true"),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.trigger("focus")})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0!==a.length){var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d);var e=b.title||b.text;e?c.attr("title",e):c.removeAttr("title")}else this.clear()},e}),i.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,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.isDisabled()){var d=a(this).parent(),e=c.GetData(d[0],"data");f.trigger("unselect",{originalEvent:b,data:e})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},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);var h=e.title||e.text;h&&f.attr("title",h),c.StoreData(f[0],"data",e),b.push(f)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,b)}},d}),i.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;if(1<b.length||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.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)})},d.prototype._handleClear=function(a,b){if(!this.isDisabled()){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)this.$element.val(f);else{for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(0<this.$selection.find(".select2-selection__placeholder").length||0===d.length)){var e=this.options.get("translations").get("removeAllItems"),f=a('<span class="select2-selection__clear" title="'+e()+'">&times;</span>');c.StoreData(f[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(f)}},d}),i.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="none" spellcheck="false" role="searchbox" 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,d,e){var f=this,g=d.id+"-results";a.call(this,d,e),d.on("open",function(){f.$search.attr("aria-controls",g),f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-controls"),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){a.data._resultId?f.$search.attr("aria-activedescendant",a.data._resultId):f.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(0<d.length){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(a){f.$search.val()&&a.stopPropagation()});var h=document.documentMode,i=h&&h<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){i?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(i&&"input"===a.type)f.$selection.off("input.search input.searchcheck");else{var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.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.trigger("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="";a=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",a)},d}),i.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","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];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}),i.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}),i.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"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",
2
  "é":"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","œ":"oe","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),i.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}),i.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("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];(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("input").trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("input").trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("input").trigger("change");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("input").trigger("change")})}},d.prototype.bind=function(a,b){var c=this;(this.container=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(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().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 d;a.children?(d=document.createElement("optgroup")).label=a.text:void 0!==(d=document.createElement("option")).textContent?d.textContent=a.text:d.innerText=a.text,void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return(d=this._normalizeItem(d)).element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){return a!==Object(a)&&(a={id:a,text:a}),null!=(a=c.extend({},{text:""},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({},{selected:!1,disabled:!1},a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),i.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){this._dataToConvert=b.get("data")||[],d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype.bind=function(a,b){d.__super__.bind.call(this,a,b),this.addOptions(this.convertToOptions(this._dataToConvert))},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(0<=c.inArray(j.id,g)){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}),i.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(){"status"in d&&(0===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}),i.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){var d=this;this._removeOldTags(),null!=b.term&&null==b.page?a.call(this,b,function a(e,f){for(var g=e.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!a({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(e.data=g,void c(e))}if(f)return!0;var k=d.createTag(b);if(null!=k){var l=d.option(k);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(g,k)}e.results=g,c(e)}):a.call(this,b,c)},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){this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),i.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){var e=this;c.term=c.term||"";var f=this.tokenizer(c,this.options,function(b){var c,d=e._normalizeItem(b);if(!e.$element.find("option").filter(function(){return a(this).val()===d.id}).length){var f=e.option(d);f.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([f])}c=d,e.trigger("select",{data:c})});f.term!==c.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),c.term=f.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=i(a.extend({},c,{term:k}));null!=l?(e(l),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),i.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){b.term=b.term||"",b.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.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){b.term=b.term||"",0<this.maximumInputLength&&b.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){var d=null!=a?a.length:0;0<c.maximumSelectionLength&&d>=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),i.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},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),i.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="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-controls",f),e.$search.trigger("focus"),window.setTimeout(function(){e.$search.trigger("focus")},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-controls"),e.$search.removeAttr("aria-activedescendant"),e.$search.val(""),e.$search.trigger("blur")}),c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")}),c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide"))}),c.on("results:focus",function(a){a.data._resultId?e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},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}),i.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;0<=d;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),i.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),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("query",function(a){d.lastParams=a,d.loading=!0}),b.on("query:append",function(a){d.lastParams=a,d.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&b){var c=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=c+50&&this.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="option" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),i.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),d._bindContainerResultHandlers(b)}),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.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){if(!this._containerResultsHandlersBound){var c=this;b.on("results:all",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("select",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown(),c._resizeDropdown()}),this._containerResultsHandlersBound=!0}},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(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h=this.$dropdown.outerHeight(!1),i=b.scrollTop(),j=b.scrollTop()+b.height(),k=i<f.top-h,l=j>f.bottom+h,m={left:f.left,top:g.bottom},n=this.$dropdownParent;"static"===n.css("position")&&(n=n.offsetParent());var o={top:0,left:0};(a.contains(document.body,n[0])||n[0].isConnected)&&(o=n.offset()),m.top-=o.top,m.left-=o.left,c||d||(e="below"),l||!k||c?!k&&l&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(m.top=g.top-o.top-h),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(m)},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}),i.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(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}(b.data.results)<this.minimumResultsForSearch)&&a.call(this,b)},a}),i.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),i.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||c.metaKey)||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),i.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){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},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…"},removeAllItems:function(){return"Remove all items"}}}),i.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()}return D.prototype.apply=function(k){if(null==(k=a.extend(!0,{},this.defaults,k)).dataAdapter){if(null!=k.ajax?k.dataAdapter=o:null!=k.data?k.dataAdapter=n:k.dataAdapter=m,0<k.minimumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,r)),0<k.maximumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,s)),0<k.maximumSelectionLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,t)),k.tags&&(k.dataAdapter=j.Decorate(k.dataAdapter,p)),null==k.tokenSeparators&&null==k.tokenizer||(k.dataAdapter=j.Decorate(k.dataAdapter,q)),null!=k.query){var l=b(k.amdBase+"compat/query");k.dataAdapter=j.Decorate(k.dataAdapter,l)}if(null!=k.initSelection){var C=b(k.amdBase+"compat/initSelection");k.dataAdapter=j.Decorate(k.dataAdapter,C)}}if(null==k.resultsAdapter&&(k.resultsAdapter=c,null!=k.ajax&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,x)),null!=k.placeholder&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,w)),k.selectOnClose&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,A))),null==k.dropdownAdapter){if(k.multiple)k.dropdownAdapter=u;else{var D=j.Decorate(u,v);k.dropdownAdapter=D}if(0!==k.minimumResultsForSearch&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,z)),k.closeOnSelect&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,B)),null!=k.dropdownCssClass||null!=k.dropdownCss||null!=k.adaptDropdownCssClass){var E=b(k.amdBase+"compat/dropdownCss");k.dropdownAdapter=j.Decorate(k.dropdownAdapter,E)}k.dropdownAdapter=j.Decorate(k.dropdownAdapter,y)}if(null==k.selectionAdapter){if(k.multiple?k.selectionAdapter=e:k.selectionAdapter=d,null!=k.placeholder&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,f)),k.allowClear&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,g)),k.multiple&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,h)),null!=k.containerCssClass||null!=k.containerCss||null!=k.adaptContainerCssClass){var F=b(k.amdBase+"compat/containerCss");k.selectionAdapter=j.Decorate(k.selectionAdapter,F)}k.selectionAdapter=j.Decorate(k.selectionAdapter,i)}k.language=this._resolveLanguage(k.language),k.language.push("en");for(var G=[],H=0;H<k.language.length;H++){var I=k.language[H];-1===G.indexOf(I)&&G.push(I)}return k.language=G,k.translations=this._processTranslations(k.language,k.debug),k},D.prototype.reset=function(){function b(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return l[a]||a})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:{},matcher:function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&0<e.children.length){for(var f=a.extend(!0,{},e),g=e.children.length-1;0<=g;g--)null==c(d,e.children[g])&&f.children.splice(g,1);return 0<f.children.length?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return-1<h.indexOf(i)?e:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.applyFromElement=function(a,b){var c=a.language,d=this.defaults.language,e=b.prop("lang"),f=b.closest("[lang]").prop("lang"),g=Array.prototype.concat.call(this._resolveLanguage(e),this._resolveLanguage(c),this._resolveLanguage(d),this._resolveLanguage(f));return a.language=g,a},D.prototype._resolveLanguage=function(b){if(!b)return[];if(a.isEmptyObject(b))return[];if(a.isPlainObject(b))return[b];var c;c=a.isArray(b)?b:[b];for(var d=[],e=0;e<c.length;e++)if(d.push(c[e]),"string"==typeof c[e]&&0<c[e].indexOf("-")){var f=c[e].split("-")[0];d.push(f)}return d},D.prototype._processTranslations=function(b,c){for(var d=new k,e=0;e<b.length;e++){var f=new k,g=b[e];if("string"==typeof g)try{f=k.loadPath(g)}catch(a){try{g=this.defaults.amdLanguageBase+g,f=k.loadPath(g)}catch(a){c&&window.console&&console.warn&&console.warn('Select2: The language file for "'+g+'" could not be automatically loaded. A fallback will be used instead.')}}else f=a.isPlainObject(g)?new k(g):g;d.extend(f)}return d},D.prototype.set=function(b,c){var d={};d[a.camelCase(b)]=c;var e=j._convertData(d);a.extend(!0,this.defaults,e)},new D}),i.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),null!=e&&(this.options=c.applyFromElement(this.options,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){function c(a,b){return b.toUpperCase()}var e=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),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),d.GetData(a[0],"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.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"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",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));for(var f={},g=0;g<a[0].attributes.length;g++){var h=a[0].attributes[g].name,i="data-";if(h.substr(0,i.length)==i){var j=h.substring(i.length),k=d.GetData(a[0],j);f[j.replace(/-([a-z])/g,c)]=k}}b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset&&(f=b.extend(!0,{},a[0].dataset,f));var l=b.extend(!0,{},d.GetData(a[0]),f);for(var m in l=d._convertData(l))-1<b.inArray(m,e)||(b.isPlainObject(this.options[m])?b.extend(this.options[m],l[m]):this.options[m]=l[m]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),i.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){return"select2-"+(null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,"").match(c);if(null!==j&&1<=j.length)return j[1]}return null},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 a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(b){
3
+ a.trigger("selection:update",{data:b})})}),this.$element.on("focus.select2",function(b){a.trigger("focus",b)}),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 b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=b?(this._observer=new b(function(b){a._syncA(),a._syncS(null,b)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._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),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.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._isChangeMutation=function(b,c){var d=!1,e=this;if(!b||!b.target||"OPTION"===b.target.nodeName||"OPTGROUP"===b.target.nodeName){if(c)if(c.addedNodes&&0<c.addedNodes.length)for(var f=0;f<c.addedNodes.length;f++)c.addedNodes[f].selected&&(d=!0);else c.removedNodes&&0<c.removedNodes.length?d=!0:a.isArray(c)&&a.each(c,function(a,b){if(e._isChangeMutation(a,b))return!(d=!0)});else d=!0;return d}},e.prototype._syncSubtree=function(a,b){var c=this._isChangeMutation(a,b),d=this;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",clear:"clearing"};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.isDisabled()||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},e.prototype.close=function(a){this.isOpen()&&this.trigger("close",{originalEvent:a})},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isDisabled=function(){return this.options.get("disabled")},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")&&0<arguments.length&&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("input").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",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<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")),c.StoreData(b[0],"element",this.$element),b},e}),i.define("select2/compat/utils",["jquery"],function(a){return{syncCssClasses:function(b,c,d){var e,f,g=[];(e=a.trim(b.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)}),(e=a.trim(c.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)}),b.attr("class",g.join(" "))}}}),i.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;this._isInitialized?b.call(this,c):this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),i.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("input").trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("input").trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("input").trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),i.define("select2/compat/matcher",["jquery"],function(a){return function(b){return function(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;0<=f;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(0<e.children.length)return e}return b(c.term,d.text,d)?e:null}}}),i.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),i.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),i.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),i.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),y=function(a){function b(b){var g,h=b||window.event,j=i.call(arguments,1),l=0,m=0,n=0,o=0,p=0;if((b=a.event.fix(h)).type="mousewheel","detail"in h&&(n=-1*h.detail),"wheelDelta"in h&&(n=h.wheelDelta),"wheelDeltaY"in h&&(n=h.wheelDeltaY),"wheelDeltaX"in h&&(m=-1*h.wheelDeltaX),"axis"in h&&h.axis===h.HORIZONTAL_AXIS&&(m=-1*n,n=0),l=0===n?m:n,"deltaY"in h&&(l=n=-1*h.deltaY),"deltaX"in h&&(m=h.deltaX,0===n&&(l=-1*m)),0!==n||0!==m){if(1===h.deltaMode){var q=a.data(this,"mousewheel-line-height");l*=q,n*=q,m*=q}else if(2===h.deltaMode){var r=a.data(this,"mousewheel-page-height");l*=r,n*=r,m*=r}if(g=Math.max(Math.abs(n),Math.abs(m)),(!f||g<f)&&d(h,f=g)&&(f/=40),d(h,g)&&(l/=40,m/=40,n/=40),l=Math[1<=l?"floor":"ceil"](l/f),m=Math[1<=m?"floor":"ceil"](m/f),n=Math[1<=n?"floor":"ceil"](n/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=m,b.deltaY=n,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,j.unshift(b,l,m,n),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,j)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})},"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],y):"object"==typeof exports?module.exports=y:y(a),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"!=typeof b)throw new Error("Invalid arguments for Select2: "+b);var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),-1<a.inArray(b,f)?this:d}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:i.define,require:i.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy,braapf_context_is_update;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}function d(b){var c=berocket_apply_filters("filter_mobile_width",767),d=berocket_apply_filters("filter_tablet_width",1024);return a(window).width()<=c&&b.find(".bapf_sngl_hd_mobile").remove(),a(window).width()>c&&a(window).width()<=d&&b.find(".bapf_sngl_hd_tablet").remove(),a(window).width()>d&&b.find(".bapf_sngl_hd_desktop").remove(),b}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length>a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500),jQuery(document).ready(function(){var c=the_ajax_script.pagination_class;c=c.replace(","," a,"),c=berocket_apply_filters("pagination_links_a_tags",c+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",c,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))})}),jQuery(document).ready(function(){!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)})}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||braapf_context_is_update(b),b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(berocket_apply_filters("before_update_products_context_url_filtered_partial",d,b,c),{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_context_is_update=function(a){return berocket_apply_filters("context_is_update","update"==a||"reset_all"==a||"reset_single"==a,a)},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()};braapf_update_url_history_api_from_current=function(a,b,c,d,e){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered),d!=url_filtered&&the_ajax_script.reload_changed_filters&&setTimeout(function(){braapf_filter_products_by_url(url_filtered)},5))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a('.bapf_sfilter[data-taxonomy="'+g+'"]');m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b=berocket_apply_filters("braapf_remove_pages_from_url_data",b)},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),"undefined"!=typeof b.name&&b.name.length&&"undefined"!=typeof b.value&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d),args=berocket_apply_filters("replace_current_with_new_args",args,b,c);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c,{type:"pagination"})},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");c=d(c),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).last().is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&window.addEventListener("popstate",function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),
4
+ a.each(d.always,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&(a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove(),berocket_throw_error("same_filters_multiple_times",b))}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),a(".berocket_aapf_widget_selected_area").parents(".berocket_single_filter_widget").removeClass("bapf_mt_none"),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a('.bapf_sfilter[data-taxonomy="'+a(this).data("taxonomy")+'"]').trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a('.bapf_sfilter[data-taxonomy="'+c.taxonomy+'"]').trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{berocket_apply_filters("the7_compatibility",a(the_ajax_script.products_holder_id+" .iso-lazy-load").length>0)&&a(the_ajax_script.products_holder_id+" .iso-lazy-load").attr("src",function(){return"undefined"!=typeof a(this).data("src")&&a(this).data("src")?a(this).data("src"):a(this).attr("src")}).attr("srcset",function(){return"undefined"!=typeof a(this).data("srcset")&&a(this).data("srcset")?a(this).data("srcset"):a(this).attr("srcset")}).removeClass("iso-lazy-load")}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{if("function"==typeof InfiniteScroll){var c=InfiniteScroll.data(".shop-container .products");if("object"==typeof c&&c.options){var d=c.options;c.destroy(),jQuery(".shop-container .products").data("infiniteScroll","").infiniteScroll(d)}}}catch(a){berocket_throw_error("flatsome_infinitescroll",a)}try{jQuery(".shop-container .products").length&&"object"==typeof jQuery(".shop-container .products").data("packery")&&jQuery(".shop-container .products").packery("reloadItems").packery("layout")}catch(a){berocket_throw_error("flatsome_packery",a)}try{berocket_apply_filters("JetSmartFilters_compatibility","object"==typeof window.JetSmartFilters&&"function"==typeof window.JetSmartFilters.initializeFilters)&&window.JetSmartFilters.initializeFilters()}catch(a){berocket_throw_error("JetSmartFilters_compatibility",a)}a(window).trigger("resize"),a(window).trigger("scroll")}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},a(document).ready(function(){the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading)}),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_check_partial_load_filters,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance,brapf_jet_smart_filters_add,brapf_jet_smart_filters_remove_pages,brapf_jet_smart_filters;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+'[data-taxonomy="'+f+'"]');if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').length;i++)a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},braapf_check_partial_load_filters=function(b,c,d){return a(".berocket_single_filter_widget.bapf_partload").length>0&&(b=!0),b},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button),berocket_add_filter("apply_filters_to_page_partial",braapf_check_partial_load_filters);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}}),brapf_jet_smart_filters=function(b){var c=a("<div><div>"+b+"</div></div>");jQuery("#jet-smart-filters-js-extra").length>0&&c.find("#jet-smart-filters-js-extra").length>0&&jQuery("#jet-smart-filters-js-extra").replaceWith(c.find("#jet-smart-filters-js-extra"))},brapf_jet_smart_filters_remove_pages=function(b){if(Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"pagenum"!=b.name&&c.push(b)}),b.queryargs=c}return b},brapf_jet_smart_filters_add=function(a){return a.done.push(brapf_jet_smart_filters),a},brapf_JetSmartFilter_extra_props=function(){var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split);JetSmartFilterSettings.extra_props.brfilters=c},jQuery(document).ready(function(){berocket_apply_filters("JetSmartFilter_compatibility",jQuery("#jet-smart-filters-js-extra").length>0)&&(jQuery(document).on("berocket_ajax_products_loaded",brapf_JetSmartFilter_extra_props),brapf_JetSmartFilter_extra_props(),berocket_add_filter("ajax_load_from_filters",brapf_jet_smart_filters_add),berocket_add_filter("braapf_remove_pages_from_url_data",brapf_jet_smart_filters_remove_pages))})}(jQuery),jQuery(document).trigger("bapf_js_loaded");var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){function b(){berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_link_arr_attr_price",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_arr_attr,10),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_wc_price,20)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a('.bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),"function"==typeof berocket_add_filter?b():jQuery(document).on("berocket_hooks_ready",function(){b()})}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),"function"==typeof berocket_add_filter?berocket_add_filter("grab_single_filter_default",braapf_grab_single_select):jQuery(document).on("berocket_hooks_ready",function(){berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)})}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){function a(){bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)}bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),"function"==typeof berocket_add_filter?a():jQuery(document).on("berocket_hooks_ready",function(){a()})});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}function d(){berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_arr_attr,10),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_wc_price,20),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr_price",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={
5
+ element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a('.bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),"function"==typeof berocket_add_filter?d():jQuery(document).on("berocket_hooks_ready",function(){d()})}(jQuery),!function(a){function b(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var c,d=a.ui.mouse.prototype,e=d._mouseInit,f=d._mouseDestroy;d._touchStart=function(a){var d=this;!c&&d._mouseCapture(a.originalEvent.changedTouches[0])&&(c=!0,d._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))},d._touchMove=function(a){c&&(this._touchMoved=!0,b(a,"mousemove"))},d._touchEnd=function(a){c&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),c=!1)},d._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),e.call(b)},d._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),f.call(b)}}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&W(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=S.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=T.call(this,j[0],"y"),j[1]=T.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ea()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",X(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",X(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&W(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);c.data(d)&&(c.data(d),U.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3]))})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),U.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),_(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),_(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_vertical"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div></div><div class='mCSB_draggerRail'></div></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_horizontal"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div><div class='mCSB_draggerRail'></div></div>"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+f.theme+" "+i+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+f.setTop+"; left:"+f.setLeft+";' dir='"+e.langDir+"' /></div>");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ca(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["<a href='#' class='"+k[13]+"' "+g+" />","<a href='#' class='"+k[14]+"' "+g+" />","<a href='#' class='"+k[15]+"' "+g+" />","<a href='#' class='"+k[16]+"' "+g+" />"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]<j[0]?j[0]:j[1],l=i&&j[3]<j[2]?j[2]:j[3];g[0].css({height:k,"max-height":g[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":j[0]+"px"}),g[1].css({width:l,"max-width":g[1].parent().width()-10})},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[f.outerHeight(!1)-e.height(),f.outerWidth(!1)-e.width()],i=[h[0]/(g[0].parent().height()-g[0].height()),h[1]/(g[1].parent().width()-g[1].width())];c.scrollRatio={y:i[0],x:i[1]}},x=function(a,b,c){var d=c?k[0]+"_expanded":"",e=a.closest(".mCSB_scrollTools");"active"===b?(a.toggleClass(k[0]+" "+d),e.toggleClass(k[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||("hide"===b?(a.removeClass(k[0]),e.removeClass(k[1])):(a.addClass(k[0]),e.addClass(k[1])))},y=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=null==c.overflowed?f.height():f.outerHeight(!1),h=null==c.overflowed?f.width():f.outerWidth(!1),i=f[0].scrollHeight,j=f[0].scrollWidth;return i>g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(W(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),X(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),X(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}M.call(this),O.call(this),f.advanced.autoScrollOnFocus&&N.call(this),f.scrollButtons.enable&&P.call(this),f.keyboard.enable&&Q.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!J()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),_(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),_(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),_(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document&&null!==frameElement?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=J()&&b.target.ownerDocument!==top.document&&null!==frameElement?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a,b,d,e){if(n[0].idleTimer=k.scrollInertia<233?250:0,c.attr("id")===m[1])var f="x",i=(c[0].offsetLeft-b+e)*h.scrollRatio.x;else var f="y",i=(c[0].offsetTop-a+d)*h.scrollRatio.y;X(g,i.toString(),{dir:f,drag:!0})}var c,e,f,g=a(this),h=g.data(d),k=h.opt,l=d+"_"+h.idx,m=["mCSB_"+h.idx+"_dragger_vertical","mCSB_"+h.idx+"_dragger_horizontal"],n=a("#mCSB_"+h.idx+"_container"),o=a("#"+m[0]+",#"+m[1]),p=k.advanced.releaseDraggableSelectors?o.add(a(k.advanced.releaseDraggableSelectors)):o,q=k.advanced.extraDraggableSelectors?a(!J()||top.document).add(a(k.advanced.extraDraggableSelectors)):a(!J()||top.document);o.bind("contextmenu."+l,function(a){a.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,function(b){if(b.stopImmediatePropagation(),b.preventDefault(),aa(b)){j=!0,i&&(document.onselectstart=function(){return!1}),K.call(n,!1),W(g),c=a(this);var d=c.offset(),h=D(b)[0]-d.top,l=D(b)[1]-d.left,m=c.height()+d.top,o=c.width()+d.left;m>h&&h>0&&o>l&&l>0&&(e=h,f=l),x(c,"active",k.autoExpandScrollbar)}}).bind("touchmove."+l,function(a){a.stopImmediatePropagation(),a.preventDefault();var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;b(e,f,g,h)}),a(document).add(q).bind("mousemove."+l+" pointermove."+l+" MSPointerMove."+l,function(a){if(c){var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;if(e===g&&f===h)return;b(e,f,g,h)}}).add(p).bind("mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l,function(){c&&(x(c,"active",k.autoExpandScrollbar),c=null),j=!1,i&&(document.onselectstart=null),K.call(n,!0)})},F=function(){function c(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(ba(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]<L[2]||"yx"===A.axis);if(z.overflowed[1])var h=F[1].parent().width()-F[1].width(),n=m-d>0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]<L[3]||"yx"===A.axis);g||n?(O||a.preventDefault(),w=1):(x=1,y.addClass("mCS_touch_action")),O&&a.preventDefault(),u="yx"===A.axis?[l-c,m-d]:"x"===A.axis?[null,m-d]:[l-c,null],E[0].idleTimer=250,z.overflowed[0]&&i(u[0],I,e,"y","all",!0),z.overflowed[1]&&i(u[1],I,e,"x",K,!0)}}function f(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,a.stopImmediatePropagation(),W(y),p=Z();var c=C.offset();n=D(a)[0]-c.top,o=D(a)[1]-c.left,G=[],H=[]}function g(a){if(ba(a)&&!j&&!D(a)[2]){k=0,a.stopImmediatePropagation(),w=0,x=0,r=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(!(r-q>30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&X(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],I=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,R(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g<n.height()&&j>0&&j<n.width()?k.step&&e("off",null,"stepped"):("x"!==i.axis&&h.overflowed[0]&&(0>g?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(W(c),!L(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r="y"===f.mouseWheel.axis?b.deltaY||d:b.deltaX;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),X(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=new Object,J=function(b){var c=!1,d=!1,e=null;if(void 0===b?d="#empty":void 0!==a(b).attr("id")&&(d=a(b).attr("id")),d!==!1&&void 0!==I[d])return I[d];if(b){try{var f=b.contentDocument||b.contentWindow.document;e=f.body.innerHTML}catch(a){}c=null!==e}else{try{var f=top.document;e=f.body.innerHTML}catch(a){}c=null!==e}return d!==!1&&(I[d]=c),c},K=function(a){var b=this.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}},L=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];
6
+ return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},M=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){W(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}X(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},N=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(){var c=a(document.activeElement),d=g.find(".mCustomScrollBox").length,f=0;c.is(e.advanced.autoScrollOnFocus)&&(W(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=d?(f+17)*d:0,b[0]._focusTimeout=setTimeout(function(){var a=[da(c)[0],da(c)[1]],d=[g[0].offsetTop,g[0].offsetLeft],i=[d[0]+a[0]>=0&&d[0]+a[0]<h.height()-c.outerHeight(!1),d[1]+a[1]>=0&&d[0]+a[1]<h.width()-c.outerWidth(!1)],j="yx"!==e.axis||i[0]||i[1]?"all":"none";"x"===e.axis||i[0]||X(b,a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f}),"y"===e.axis||i[1]||X(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f})},b[0]._focusTimer))})},O=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container").parent();f.bind("scroll."+e,function(){0===f.scrollTop()&&0===f.scrollLeft()||a(".mCSB_"+c.idx+"_scrollbar").css("visibility","hidden")})},P=function(){var b=a(this),c=b.data(d),e=c.opt,f=c.sequential,g=d+"_"+c.idx,h=".mCSB_"+c.idx+"_scrollbar",i=a(h+">a");i.bind("contextmenu."+g,function(a){a.preventDefault()}).bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,R(b,a,c)}if(d.preventDefault(),aa(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},Q=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||R(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){W(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},R=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),X(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),_(m,"step"),W(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],W(b),ca(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},S=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},T=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1)-i.width():h.outerHeight(!1)-i.height(),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?da(o)[1]:da(o)[0];case"string":case"number":if(ca(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&ca(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?da(o)[1]:da(o)[0]}return a(b).length?"x"===c?da(a(b))[1]:da(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},U=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void _(m[0],"autoUpdate")):void c()},V=function(a,b,c){return Math.round(a/b)*b-c},W=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){$.call(this)})},X=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?S.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?S.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=V(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),Y(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||Y(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},Y=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Z()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time<s+1&&(v.time=s+1)),v.time<d?v.id=n(h):q.call())}function i(){d>0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Z(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c<b.length;c++){var d=b[c];a._mTween[d].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(a._mTween[d].id):clearTimeout(a._mTween[d].id),a._mTween[d].id=null,a._mTween[d].stop=1)}},_=function(a,b){try{delete a[b]}catch(c){a[b]=null}},aa=function(a){return!(a.which&&1!==a.which)},ba=function(a){var b=a.originalEvent.pointerType;return!(b&&"touch"!==b&&2!==b)},ca=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},da=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]},ea=function(){function a(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)if(a[b]+"Hidden"in document)return a[b]+"Hidden";return null}var b=a();return!!b&&document[b]};a.fn[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c].defaults=f,window[c]=!0,a(window).bind("load",function(){a(e)[c](),a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d,e=a(b),f=e.parents(".mCSB_container");if(f.length)return c=f.parent(),d=[f[0].offsetTop,f[0].offsetLeft],d[0]+da(e)[0]>=0&&d[0]+da(e)[0]<c.height()-e.outerHeight(!1)&&d[1]+da(e)[1]>=0&&d[1]+da(e)[1]<c.width()-e.outerWidth(!1)},mcsInSight:a.expr[":"].mcsInSight||function(b,c,d){var e,f,g,h,i=a(b),j=i.parents(".mCSB_container"),k="exact"===d[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(j.length)return e=[i.outerHeight(!1),i.outerWidth(!1)],g=[j[0].offsetTop+da(i)[0],j[0].offsetLeft+da(i)[1]],f=[j.parent()[0].offsetHeight,j.parent()[0].offsetWidth],h=[e[0]<f[0]?k[0]:k[1],e[1]<f[1]?k[0]:k[1]],g[0]-f[0]*h[0][0]<0&&g[0]+e[0]-f[0]*h[0][1]>=0&&g[1]-f[1]*h[1][0]<0&&g[1]+e[1]-f[1]*h[1][1]>=0},mcsOverflow:a.expr[":"].mcsOverflow||function(b){var c=a(b).data(d);if(c)return c.overflowed[0]||c.overflowed[1]}})})})}),!function(a){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?a(jQuery,document,window,navigator):a(require("jquery"),document,window,navigator):define(["jquery"],function(b){return a(b,document,window,navigator)})}(function(a,b,c,d,e){"use strict";function f(d,f,g){this.VERSION="2.3.1",this.input=d,this.plugin_count=g,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h,i,j,k=this.$cache.input,l=k.prop("value");for(j in h={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==k[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",k[0]),(i={skin:k.data("skin"),type:k.data("type"),min:k.data("min"),max:k.data("max"),from:k.data("from"),to:k.data("to"),step:k.data("step"),min_interval:k.data("minInterval"),max_interval:k.data("maxInterval"),drag_interval:k.data("dragInterval"),values:k.data("values"),from_fixed:k.data("fromFixed"),from_min:k.data("fromMin"),from_max:k.data("fromMax"),from_shadow:k.data("fromShadow"),to_fixed:k.data("toFixed"),to_min:k.data("toMin"),to_max:k.data("toMax"),to_shadow:k.data("toShadow"),prettify_enabled:k.data("prettifyEnabled"),prettify_separator:k.data("prettifySeparator"),force_edges:k.data("forceEdges"),keyboard:k.data("keyboard"),grid:k.data("grid"),grid_margin:k.data("gridMargin"),grid_num:k.data("gridNum"),grid_snap:k.data("gridSnap"),hide_min_max:k.data("hideMinMax"),hide_from_to:k.data("hideFromTo"),prefix:k.data("prefix"),postfix:k.data("postfix"),max_postfix:k.data("maxPostfix"),decorate_both:k.data("decorateBoth"),values_separator:k.data("valuesSeparator"),input_values_separator:k.data("inputValuesSeparator"),disable:k.data("disable"),block:k.data("block"),extra_classes:k.data("extraClasses")}).values=i.values&&i.values.split(","),i)i.hasOwnProperty(j)&&(i[j]!==e&&""!==i[j]||delete i[j]);l!==e&&""!==l&&((l=l.split(i.input_values_separator||f.input_values_separator||";"))[0]&&l[0]==+l[0]&&(l[0]=+l[0]),l[1]&&l[1]==+l[1]&&(l[1]=+l[1]),f&&f.values&&f.values.length?(h.from=l[0]&&f.values.indexOf(l[0]),h.to=l[1]&&f.values.indexOf(l[1])):(h.from=l[0]&&+l[0],h.to=l[1]&&+l[1])),a.extend(h,f),a.extend(h,i),this.options=h,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}var g,h,i=0,j=(g=d.userAgent,h=/msie\s\d+/i,0<g.search(h)&&h.exec(g).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var g=new f,h=b.apply(g,d.concat(c.call(arguments)));return Object(h)===h?h:g}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0==e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),e<=f)return-1;for(c=Math.max(0<=f?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),f.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var a='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(a),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.min,b=this.options.max,c=this.options.from,d=this.options.to;a<c&&d===b?this.$cache.s_from.addClass("type_last"):d<b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),j&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),j&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(a){var b,c;this.target||(b=(c="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,b+=c.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:b}))},pointerMove:function(a){if(this.dragging){var b=a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX;this.coords.x_pointer=b-this.coords.x_gap,this.calc()}},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,j&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b=b||this.target||"from",this.current_plugin=this.plugin_count,this.target=b,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),j&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,c=(this.options.max-this.options.min)/100;c=this.options.step/c,a?b+=c:b-=c,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a,this.result.max_pretty=b,this.$cache.min.html(this.decorate(a,this.options.min)),this.$cache.max.html(this.decorate(b,this.options.max));
7
+ }this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,10!==this.calc_count&&!a||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var b=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,b=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,b=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(b)),this.target){case"base":var c=(this.options.max-this.options.min)/100,d=(this.result.from-this.options.min)/c,e=(this.result.to-this.options.min)/c;this.coords.p_single_real=this.toFixed(d),this.coords.p_from_real=this.toFixed(d),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(b),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(b),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(b),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;b=this.toFixed(b+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(b)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(b)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var f=this.convertToRealPercent(b),g=this.result.from_percent,h=this.result.to_percent-g,i=h/2,j=f-i,k=f+i;j<0&&(k=(j=0)+h),100<k&&(j=(k=100)-h),this.coords.p_from_real=this.calcWithStep(j),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(k),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return b<0?b=0:a<b&&(b=a),b},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=a?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var a,b,c,d,e,f=this.options.values.length,g=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)a=f?this.decorate(g[this.result.from]):(d=this._prettify(this.result.from),this.decorate(d,this.result.from)),this.$cache.single.html(a),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{c=f?(this.options.decorate_both?(a=this.decorate(g[this.result.from]),a+=this.options.values_separator,a+=this.decorate(g[this.result.to])):a=this.decorate(g[this.result.from]+this.options.values_separator+g[this.result.to]),b=this.decorate(g[this.result.from]),this.decorate(g[this.result.to])):(d=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(e,this.result.to)):a=this.decorate(d+this.options.values_separator+e,this.result.to),b=this.decorate(d,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(a),this.$cache.from.html(b),this.$cache.to.html(c),this.calcLabels();var h=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake,j=this.labels.p_to_left+this.labels.p_to_fake,k=Math.max(i,j);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",k=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",j):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,j))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),h<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",k>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var a,b,c,d,e=this.options,f=this.$cache,g="number"==typeof e.from_min&&!isNaN(e.from_min),h="number"==typeof e.from_max&&!isNaN(e.from_max),i="number"==typeof e.to_min&&!isNaN(e.to_min),j="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_single[0].style.display="block",f.shad_single[0].style.left=a+"%",f.shad_single[0].style.width=b+"%"):f.shad_single[0].style.display="none":(e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_from[0].style.display="block",f.shad_from[0].style.left=a+"%",f.shad_from[0].style.width=b+"%"):f.shad_from[0].style.display="none",e.to_shadow&&(i||j)?(c=this.convertToPercent(i?e.to_min:e.min),d=this.convertToPercent(j?e.to_max:e.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,f.shad_to[0].style.display="block",f.shad_to[0].style.left=c+"%",f.shad_to[0].style.width=d+"%"):f.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var c,d=this.options.max-this.options.min,e=d/100;return d?(c=(b?a:a-this.options.min)/e,this.toFixed(c)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;if(0===a)return this.options.min;if(100===a)return this.options.max;f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=c<=b?b:c),d<0&&(d=+(d+(i=Math.abs(d))).toFixed(h),e=+(e+i).toFixed(h));var j,k=(e-d)/100*a+d,l=this.options.step.toString().split(".")[1];return k=l?+k.toFixed(l.length):(k/=this.options.step,+(k*=this.options.step).toFixed(0)),i&&(k-=i),(j=l?+k.toFixed(l.length):this.toFixed(k))<this.options.min?j=this.options.min:j>this.options.max&&(j=this.options.max),j},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return 100<b&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d,e,f=this.options;return f.min_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d<f.min_interval&&(d=e-f.min_interval):d-e<f.min_interval&&(d=e+f.min_interval),this.convertToPercent(d)):a},checkMaxInterval:function(a,b,c){var d,e,f=this.options;return f.max_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d>f.max_interval&&(d=e-f.max_interval):d-e>f.max_interval&&(d=e+f.max_interval),this.convertToPercent(d)):a},checkDiapason:function(a,b,c){var d=this.convertToValue(a),e=this.options;return"number"!=typeof b&&(b=e.min),"number"!=typeof c&&(c=e.max),d<b&&(d=b),c<d&&(d=c),this.convertToPercent(d)},toFixed:function(a){return+(a=a.toFixed(20))},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges&&(a<0?a=0:100-b<a&&(a=100-b)),this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.max<c.min&&(c.max=c.min),f)for(c.p_values=[],c.min=0,c.max=f-1,c.step=1,c.grid_num=c.max,c.grid_snap=!0,b=0;b<f;b++)a=+e[b],a=isNaN(a)?e[b]:(e[b]=a,this._prettify(a)),c.p_values.push(a);"number"==typeof c.from&&!isNaN(c.from)||(c.from=c.min),"number"==typeof c.to&&!isNaN(c.to)||(c.to=c.max),"single"===c.type?(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max)):(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max),c.to<c.min&&(c.to=c.min),c.to>c.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.to<c.from&&(c.to=c.from)),c.from>c.to&&(c.from=c.to),c.to<c.from&&(c.to=c.from)),("number"!=typeof c.step||isNaN(c.step)||!c.step||c.step<0)&&(c.step=1),"number"==typeof c.from_min&&c.from<c.from_min&&(c.from=c.from_min),"number"==typeof c.from_max&&c.from>c.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.to<c.to_min&&(c.to=c.to_min),"number"==typeof c.to_max&&c.from>c.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.from<d.min||d.from>d.max)&&(d.from=c.from),(d.to<d.min||d.to>d.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||c.min_interval<0)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||c.max_interval<0)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c,d,e,f,g=this.options,h=g.max-g.min,i=g.grid_num,j=0,k=4,l="";for(this.calcGridMargin(),g.grid_snap&&(i=h/g.step),50<i&&(i=50),c=this.toFixed(100/i),4<i&&(k=3),7<i&&(k=2),14<i&&(k=1),28<i&&(k=0),a=0;a<i+1;a++){for(d=k,100<(j=this.toFixed(c*a))&&(j=100),e=((this.coords.big[a]=j)-c*(a-1))/(d+1),b=1;b<=d&&0!==j;b++)l+='<span class="irs-grid-pol small" style="left: '+this.toFixed(j-e*b)+'%"></span>';l+='<span class="irs-grid-pol" style="left: '+j+'%"></span>',f=this.convertToValue(j),l+='<span class="irs-grid-text js-grid-text-'+a+'" style="left: '+j+'%">'+(f=g.values.length?g.p_values[f]:this._prettify(f))+"</span>"}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(l),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b<c;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b,c=[],d=[],e=this.coords.big_num;for(a=0;a<e;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),c[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(c[a]+this.coords.big_p[a]);for(this.options.force_edges&&(c[0]<-this.coords.grid_gap&&(c[0]=-this.coords.grid_gap,d[0]=this.toFixed(c[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[e-1]>100+this.coords.grid_gap&&(d[e-1]=100+this.coords.grid_gap,c[e-1]=this.toFixed(d[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,c,d),this.calcGridCollision(4,c,d),a=0;a<e;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;d<g&&!(g<=(e=d+a/2));d+=a)f=this.$cache.grid_labels[e][0],c[d]<=b[e]?f.style.visibility="visible":f.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new f(this,b,i++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[b[d]+"RequestAnimationFrame"],c.cancelAnimationFrame=c[b[d]+"CancelAnimationFrame"]||c[b[d]+"CancelRequestAnimationFrame"];c.requestAnimationFrame||(c.requestAnimationFrame=function(b,d){var e=(new Date).getTime(),f=Math.max(0,16-(e-a)),g=c.setTimeout(function(){b(e+f)},f);return a=e+f,g}),c.cancelAnimationFrame||(c.cancelAnimationFrame=function(a){clearTimeout(a)})}()});
assets/frontend/js/main.js CHANGED
@@ -528,7 +528,7 @@ function braapf_filtered_filters_set() {
528
  if( query_get.length ) {
529
  query_get += '&';
530
  }
531
- if( val.name.length ) {
532
  query_get += val.name + '=' + val.value;
533
  }
534
  });
528
  if( query_get.length ) {
529
  query_get += '&';
530
  }
531
+ if( typeof(val.name) != 'undefined' && val.name.length && typeof(val.value) != 'undefined' ) {
532
  query_get += val.name + '=' + val.value;
533
  }
534
  });
assets/frontend/js/main.min.js CHANGED
@@ -1,2 +1,2 @@
1
- function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c=[error_exist],d=0;d<arguments.length;d++)c.push(arguments[d]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,c),c[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy,braapf_context_is_update;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}function d(b){var c=berocket_apply_filters("filter_mobile_width",767),d=berocket_apply_filters("filter_tablet_width",1024);return a(window).width()<=c&&b.find(".bapf_sngl_hd_mobile").remove(),a(window).width()>c&&a(window).width()<=d&&b.find(".bapf_sngl_hd_tablet").remove(),a(window).width()>d&&b.find(".bapf_sngl_hd_desktop").remove(),b}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length>a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500),jQuery(document).ready(function(){var c=the_ajax_script.pagination_class;c=c.replace(","," a,"),c=berocket_apply_filters("pagination_links_a_tags",c+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",c,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))})}),jQuery(document).ready(function(){!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)})}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||braapf_context_is_update(b),b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(berocket_apply_filters("before_update_products_context_url_filtered_partial",d,b,c),{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_context_is_update=function(a){return berocket_apply_filters("context_is_update","update"==a||"reset_all"==a||"reset_single"==a,a)},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()};braapf_update_url_history_api_from_current=function(a,b,c,d,e){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered),d!=url_filtered&&the_ajax_script.reload_changed_filters&&setTimeout(function(){braapf_filter_products_by_url(url_filtered)},5))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a('.bapf_sfilter[data-taxonomy="'+g+'"]');m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b=berocket_apply_filters("braapf_remove_pages_from_url_data",b)},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d),args=berocket_apply_filters("replace_current_with_new_args",args,b,c);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c,{type:"pagination"})},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");c=d(c),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).last().is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&window.addEventListener("popstate",function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&(a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove(),berocket_throw_error("same_filters_multiple_times",b))}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),a(".berocket_aapf_widget_selected_area").parents(".berocket_single_filter_widget").removeClass("bapf_mt_none"),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a('.bapf_sfilter[data-taxonomy="'+a(this).data("taxonomy")+'"]').trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a('.bapf_sfilter[data-taxonomy="'+c.taxonomy+'"]').trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{berocket_apply_filters("the7_compatibility",a(the_ajax_script.products_holder_id+" .iso-lazy-load").length>0)&&a(the_ajax_script.products_holder_id+" .iso-lazy-load").attr("src",function(){return"undefined"!=typeof a(this).data("src")&&a(this).data("src")?a(this).data("src"):a(this).attr("src")}).attr("srcset",function(){return"undefined"!=typeof a(this).data("srcset")&&a(this).data("srcset")?a(this).data("srcset"):a(this).attr("srcset")}).removeClass("iso-lazy-load")}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{if("function"==typeof InfiniteScroll){var c=InfiniteScroll.data(".shop-container .products");if("object"==typeof c&&c.options){var d=c.options;c.destroy(),jQuery(".shop-container .products").data("infiniteScroll","").infiniteScroll(d)}}}catch(a){berocket_throw_error("flatsome_infinitescroll",a)}try{jQuery(".shop-container .products").length&&"object"==typeof jQuery(".shop-container .products").data("packery")&&jQuery(".shop-container .products").packery("reloadItems").packery("layout")}catch(a){berocket_throw_error("flatsome_packery",a)}try{berocket_apply_filters("JetSmartFilters_compatibility","object"==typeof window.JetSmartFilters&&"function"==typeof window.JetSmartFilters.initializeFilters)&&window.JetSmartFilters.initializeFilters()}catch(a){berocket_throw_error("JetSmartFilters_compatibility",a)}a(window).trigger("resize"),a(window).trigger("scroll")}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},a(document).ready(function(){the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading)}),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),
2
- berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_check_partial_load_filters,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance,brapf_jet_smart_filters_add,brapf_jet_smart_filters_remove_pages,brapf_jet_smart_filters;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+'[data-taxonomy="'+f+'"]');if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').length;i++)a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},braapf_check_partial_load_filters=function(b,c,d){return a(".berocket_single_filter_widget.bapf_partload").length>0&&(b=!0),b},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button),berocket_add_filter("apply_filters_to_page_partial",braapf_check_partial_load_filters);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}}),brapf_jet_smart_filters=function(b){var c=a("<div><div>"+b+"</div></div>");jQuery("#jet-smart-filters-js-extra").length>0&&c.find("#jet-smart-filters-js-extra").length>0&&jQuery("#jet-smart-filters-js-extra").replaceWith(c.find("#jet-smart-filters-js-extra"))},brapf_jet_smart_filters_remove_pages=function(b){if(Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"pagenum"!=b.name&&c.push(b)}),b.queryargs=c}return b},brapf_jet_smart_filters_add=function(a){return a.done.push(brapf_jet_smart_filters),a},brapf_JetSmartFilter_extra_props=function(){var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split);JetSmartFilterSettings.extra_props.brfilters=c},jQuery(document).ready(function(){berocket_apply_filters("JetSmartFilter_compatibility",jQuery("#jet-smart-filters-js-extra").length>0)&&(jQuery(document).on("berocket_ajax_products_loaded",brapf_JetSmartFilter_extra_props),brapf_JetSmartFilter_extra_props(),berocket_add_filter("ajax_load_from_filters",brapf_jet_smart_filters_add),berocket_add_filter("braapf_remove_pages_from_url_data",brapf_jet_smart_filters_remove_pages))})}(jQuery),jQuery(document).trigger("bapf_js_loaded");var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){function b(){berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_link_arr_attr_price",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_arr_attr,10),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_wc_price,20)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a('.bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),"function"==typeof berocket_add_filter?b():jQuery(document).on("berocket_hooks_ready",function(){b()})}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),"function"==typeof berocket_add_filter?berocket_add_filter("grab_single_filter_default",braapf_grab_single_select):jQuery(document).on("berocket_hooks_ready",function(){berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)})}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){function a(){bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)}bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),"function"==typeof berocket_add_filter?a():jQuery(document).on("berocket_hooks_ready",function(){a()})});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}function d(){berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_arr_attr,10),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_wc_price,20),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr_price",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a('.bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),"function"==typeof berocket_add_filter?d():jQuery(document).on("berocket_hooks_ready",function(){d()})}(jQuery);
1
+ function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c=[error_exist],d=0;d<arguments.length;d++)c.push(arguments[d]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,c),c[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a}),jQuery(document).trigger("berocket_hooks_ready");var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_apply_additional_filter_data,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide,bapf_universal_theme_compatibility,braapf_disable_ajax_loading,braapf_close_tippy,braapf_context_is_update;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}function d(b){var c=berocket_apply_filters("filter_mobile_width",767),d=berocket_apply_filters("filter_tablet_width",1024);return a(window).width()<=c&&b.find(".bapf_sngl_hd_mobile").remove(),a(window).width()>c&&a(window).width()<=d&&b.find(".bapf_sngl_hd_tablet").remove(),a(window).width()>d&&b.find(".bapf_sngl_hd_desktop").remove(),b}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length>a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("berocket_filters_document_ready",function(){a(".bapf_ckbox input[type=checkbox]:checked").closest("li").parents("li").trigger("bapf_ochild")}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){berocket_apply_filters("bapf_rst_nofltr_hide","undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0)?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),berocket_apply_filters("bapf_rst_sel_show",b)?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500),jQuery(document).ready(function(){var c=the_ajax_script.pagination_class;c=c.replace(","," a,"),c=berocket_apply_filters("pagination_links_a_tags",c+" a",the_ajax_script.pagination_class),!the_ajax_script.disable_ajax_loading&&the_ajax_script.pagination_ajax&&a(document).on("click",c,function(c){c.preventDefault();var d=a(this).attr("href");d=berocket_apply_filters("pagination_href_from_clicked_a",decodeURI(d),a(this)),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load,braapf_update_data_from_current]},d))})}),jQuery(document).ready(function(){!the_ajax_script.disable_ajax_loading&&the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)})}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d),d=braapf_apply_additional_filter_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=berocket_apply_filters("before_update_products_context_url_filtered",braapf_get_url_with_filters_selected(),b,c);berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||braapf_context_is_update(b),b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(berocket_apply_filters("before_update_products_context_url_filtered_partial",d,b,c),{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_context_is_update=function(a){return berocket_apply_filters("context_is_update","update"==a||"reset_all"==a||"reset_single"==a,a)},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_data_from_current=function(){braapf_grab_all();braapf_compact_filters()};braapf_update_url_history_api_from_current=function(a,b,c,d,e){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered),d!=url_filtered&&the_ajax_script.reload_changed_filters&&setTimeout(function(){braapf_filter_products_by_url(url_filtered)},5))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=berocket_apply_filters("before_grab_all_filters",[],b);if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c,d){"undefined"==typeof d&&(d=!1),b=a(b);var e=!1,f=!1,g=b.data("taxonomy");if("undefined"==typeof g||!g)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",e,b,c);if(a.each(c,function(a,b){b.taxonomy==g&&(f=!0)}),!berocket_apply_filters("grab_single_filter_exist",f,b,c)){if(e=berocket_apply_filters("grab_single_filter",e,b,c),e!==!1)return e;var h=b.data("op"),i=b.data("name");"undefined"==typeof i&&(i="");var j=braapf_glue_by_operator(h),k=[],l=[];if(d)var m=b;else var m=a('.bapf_sfilter[data-taxonomy="'+g+'"]');m.find("input:checked:not(:disabled)").each(function(b,c){l.indexOf(a(this).val())==-1&&(k.push({value:a(this).val(),html:a(this).data("name")}),l.push(a(this).val()))}),e={name:i,taxonomy:g,values:k,glue:j,operator:h}}return berocket_apply_filters("grab_single_filter_default",e,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b=berocket_apply_filters("braapf_remove_pages_from_url_data",b)},braapf_apply_additional_filter_data=function(b,c){return"undefined"==typeof c&&(c=braapf_selected_filters),a.each(c,function(a,c){b=berocket_apply_filters("apply_additional_filter_data",b,c)}),b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),"undefined"!=typeof b.name&&b.name.length&&"undefined"!=typeof b.value&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d),args=berocket_apply_filters("replace_current_with_new_args",args,b,c);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c,{type:"pagination"})},braapf_replace_result_count=function(b){var c=the_ajax_script.result_count_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_orderby=function(b){var c=the_ajax_script.ordering_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().before(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");c=d(c),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).last().is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&window.addEventListener("popstate",function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_data_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,c){c(f,g,h,b,e)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){var b=berocket_apply_filters("filter_mobile_width",767),c=berocket_apply_filters("filter_tablet_width",1024);a(window).width()<=b&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>b&&a(window).width()<=c&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>c&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).css("max-height",a(this).data("mcs-h")).mCustomScrollbar({scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");berocket_apply_filters("remove_same_filters_to_prevent_errors",a(".berocket_single_filter_widget_"+b).length>1,a(this),b)&&(a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove(),berocket_throw_error("same_filters_multiple_times",b))}),a("body").on("click",".bapf_desci",function(a){a.stopPropagation()}),a("body").on("hover",".bapf_desci",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){berocket_apply_filters("update_page_on_error",!0)&&location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){if(d.values.length>0){var e='<div class="bapf_sfa_taxonomy"><span>'+d.name+"</span>";e+="<ul>";var f="";a.each(d.values,function(a,b){f+=berocket_apply_filters("default_selected_filters_area_single",'<li><a href="#unselect_'+b.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+b.value+'"><i class="fa fa-times"></i>'+b.html+"</a></li>",b)}),e+=f,e+="</ul></div>",b+=berocket_apply_filters("default_selected_filters_area_single_taxonomy",e,d,f)}}),a(".berocket_aapf_widget_selected_area").parents(".berocket_single_filter_widget").removeClass("bapf_mt_none"),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b=berocket_apply_filters("default_selected_filters_area_full_exist",'<div class="berocket_aapf_widget_selected_filter">'+b+'<ul class="bapf_sfa_unall"><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>",b,braapf_filtered_filters)):(b=berocket_apply_filters("default_selected_filters_area_full_notexist",the_ajax_script.translate.nothing_selected,b,braapf_filtered_filters),a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a('.bapf_sfilter[data-taxonomy="'+a(this).data("taxonomy")+'"]').trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a('.bapf_sfilter[data-taxonomy="'+c.taxonomy+'"]').trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),bapf_universal_theme_compatibility=function(b){if(berocket_apply_filters("universal_theme_compatibility",!0)){a(window).trigger("resize");try{berocket_apply_filters("uncode_theme_compatibility","object"==typeof UNCODE&&"function"==typeof UNCODE.init)&&UNCODE.init()}catch(a){berocket_throw_error("uncode_theme_compatibility",a)}try{berocket_apply_filters("flatsome_theme_compatibility","object"==typeof Flatsome&&"function"==typeof Flatsome.attach&&jQuery(the_ajax_script.products_holder_id).length)&&Flatsome.attach(jQuery(the_ajax_script.products_holder_id))}catch(a){berocket_throw_error("flatsome_theme_compatibility",a)}try{berocket_apply_filters("woodmart_theme_compatibility","object"==typeof woodmartThemeModule&&"function"==typeof woodmartThemeModule.init)&&(woodmartThemeModule.wooInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productsLoadMore())}catch(a){berocket_throw_error("woodmart_theme_compatibility",a)}try{berocket_apply_filters("divi_theme_compatibility","function"==typeof et_reinit_waypoint_modules)&&et_reinit_waypoint_modules()}catch(a){berocket_throw_error("divi_theme_compatibility",a)}try{berocket_apply_filters("rey_theme_compatibility","object"==typeof jQuery.reyTheme&&"function"==typeof jQuery.reyTheme.init)&&jQuery.reyTheme.init()}catch(a){berocket_throw_error("rey_theme_compatibility",a)}try{berocket_apply_filters("layzyloadimage_script_compatibility","function"==typeof layzyLoadImage)&&layzyLoadImage()}catch(a){berocket_throw_error("layzyloadimage_script_compatibility",a)}try{berocket_apply_filters("jetpacklazyimages_script_compatibility","function"==typeof jetpackLazyImagesModule)&&jetpackLazyImagesModule()}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{jQuery("img.jetpack-lazy-image").each(function(){jQuery(this).removeClass("jetpack-lazy-image").attr("src",jQuery(this).data("lazy-src")),jQuery(this).removeClass("jetpack-lazy-image").attr("srcset","")})}catch(a){berocket_throw_error("jetpacklazyimages_script_compatibility",a)}try{berocket_apply_filters("swift_script_compatibility","object"==typeof SWIFT&&"object"==typeof SWIFT.woocommerce&&"function"==typeof SWIFT.woocommerce.init)&&SWIFT.woocommerce.init()}catch(a){berocket_throw_error("swift_script_compatibility",a)}try{"undefined"!=typeof baapfGet_wprocketInstance&&baapfGet_wprocketInstance.update()}catch(a){berocket_throw_error("wprocket_script_compatibility",a)}try{jQuery(document).trigger("facetwp-loaded")}catch(a){berocket_throw_error("facetwp_script_compatibility",a)}try{berocket_apply_filters("etTheme_compatibility","object"==typeof etTheme&&"function"==typeof etTheme.global_image_lazy)&&etTheme.global_image_lazy()}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{berocket_apply_filters("the7_compatibility",a(the_ajax_script.products_holder_id+" .iso-lazy-load").length>0)&&a(the_ajax_script.products_holder_id+" .iso-lazy-load").attr("src",function(){return"undefined"!=typeof a(this).data("src")&&a(this).data("src")?a(this).data("src"):a(this).attr("src")}).attr("srcset",function(){return"undefined"!=typeof a(this).data("srcset")&&a(this).data("srcset")?a(this).data("srcset"):a(this).attr("srcset")}).removeClass("iso-lazy-load")}catch(a){berocket_throw_error("etTheme_compatibility",a)}try{if("function"==typeof InfiniteScroll){var c=InfiniteScroll.data(".shop-container .products");if("object"==typeof c&&c.options){var d=c.options;c.destroy(),jQuery(".shop-container .products").data("infiniteScroll","").infiniteScroll(d)}}}catch(a){berocket_throw_error("flatsome_infinitescroll",a)}try{jQuery(".shop-container .products").length&&"object"==typeof jQuery(".shop-container .products").data("packery")&&jQuery(".shop-container .products").packery("reloadItems").packery("layout")}catch(a){berocket_throw_error("flatsome_packery",a)}try{berocket_apply_filters("JetSmartFilters_compatibility","object"==typeof window.JetSmartFilters&&"function"==typeof window.JetSmartFilters.initializeFilters)&&window.JetSmartFilters.initializeFilters()}catch(a){berocket_throw_error("JetSmartFilters_compatibility",a)}a(window).trigger("resize"),a(window).trigger("scroll")}return b},berocket_add_filter("ajax_load_from_url_always_after",bapf_universal_theme_compatibility,2500),a(document).ready(function(){berocket_apply_filters("remove_shortcode_fix_filters",a(".berocket_wc_shortcode_fix").length)&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")}),braapf_disable_ajax_loading=function(a){return!0},a(document).ready(function(){the_ajax_script.disable_ajax_loading&&berocket_add_filter("page_has_products_holder",braapf_disable_ajax_loading)}),braapf_close_tippy=function(){try{a(".tippy-box").length&&a(".tippy-box").each(function(){"undefined"!=typeof a(this).parent()[0]._tippy&&a(this).parent()[0]._tippy.hide()})}catch(a){}},berocket_add_filter("update_products",braapf_close_tippy)}(jQuery);var braapf_get_current_filters,braapf_filters_url_decode,braapf_scroll_shop_to_top,braapf_set_filters_to_link,braapf_convert_ckbox_to_radio,braapf_hierarhical_save,braapf_hierarhical_set,braapf_collapse_status_save,braapf_collapse_status_set,braapf_show_hide_values_save,braapf_show_hide_values_set;!function(a){function b(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable||decodeURI(d.name)==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault(),b.stopPropagation(),a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_open_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show())}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),berocket_apply_filters("colaps_child_close_apply",!0,a(this))&&(a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide())});var c=[];braapf_hierarhical_save=function(b){return c=[],a(".bapf_cchild").each(function(){c.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(c,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_open_apply",!0,a(this))&&(a(this).find(".bapf_body").first().show(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up"))}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),berocket_apply_filters("colaps_smb_close_apply",!0,a(this))&&(a(this).find(".bapf_body").first().hide(),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up"))});var d={open:[],close:[]};braapf_collapse_status_save=function(b){return d={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?d.open.push(a(this).attr("id")):d.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(d.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(d.close,function(b,c){
2
+ a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var e={open:[],close:[]};braapf_show_hide_values_save=function(b){return e={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?e.close.push(a(this).attr("id")):e.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(e.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(e.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){var g=berocket_apply_filters("filter_mobile_width",767);if(berocket_apply_filters("scroll_shop_to_top","default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<g||3==the_ajax_script.scroll_shop_top&&a(window).width()>=g))){var h=0;a(the_ajax_script.products_holder_id).length?(h=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)):a(".bapf_no_products").length&&(h=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),h<0&&(h=0)),a("html, body").animate({scrollTop:h},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&b()}),braapf_filters_url_decode=function(a){return the_ajax_script.seo_uri_decode&&(a=encodeURIComponent(a),the_ajax_script.nice_urls&&(a=a.replace(/%2F/g,"/"))),a},jQuery(document).on("elementor/popup/show",function(){try{braapf_init_load()}catch(a){berocket_throw_error("wprocketInstance_get",a)}})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("compat_filters_to_string",braapf_filters_url_decode,900),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_check_partial_load_filters,braapf_add_loader_element,braapf_remove_loader_element,braapf_elementor_sticky_fix,baapfGet_wprocketInstance,brapf_jet_smart_filters_add,brapf_jet_smart_filters_remove_pages,brapf_jet_smart_filters;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+'[data-taxonomy="'+f+'"]');if(g.length){var h=braapf_grab_single(g,[],!0);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').length;i++)a(".bapf_sfilter.bapf_child_"+i+'[data-taxonomy="'+f+'"]').trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},braapf_check_partial_load_filters=function(b,c,d){return a(".berocket_single_filter_widget.bapf_partload").length>0&&(b=!0),b},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single,9e6),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button),berocket_add_filter("apply_filters_to_page_partial",braapf_check_partial_load_filters);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")}),jQuery(".elementor-widget").length&&jQuery(window).on("scroll",function(){jQuery(".elementor-sticky__spacer .bapf_sfilter").remove()});try{window.addEventListener("LazyLoad::Initialized",function(a){baapfGet_wprocketInstance=a.detail.instance})}catch(a){berocket_throw_error("wprocketInstance_get",a)}a(document).on("change","form.cart input.qty",function(){try{a(this.form).find("[data-quantity]").attr("data-quantity",this.value)}catch(a){berocket_throw_error("wc_quantity_change",a)}}),brapf_jet_smart_filters=function(b){var c=a("<div><div>"+b+"</div></div>");jQuery("#jet-smart-filters-js-extra").length>0&&c.find("#jet-smart-filters-js-extra").length>0&&jQuery("#jet-smart-filters-js-extra").replaceWith(c.find("#jet-smart-filters-js-extra"))},brapf_jet_smart_filters_remove_pages=function(b){if(Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"pagenum"!=b.name&&c.push(b)}),b.queryargs=c}return b},brapf_jet_smart_filters_add=function(a){return a.done.push(brapf_jet_smart_filters),a},brapf_JetSmartFilter_extra_props=function(){var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split);JetSmartFilterSettings.extra_props.brfilters=c},jQuery(document).ready(function(){berocket_apply_filters("JetSmartFilter_compatibility",jQuery("#jet-smart-filters-js-extra").length>0)&&(jQuery(document).on("berocket_ajax_products_loaded",brapf_JetSmartFilter_extra_props),brapf_JetSmartFilter_extra_props(),berocket_add_filter("ajax_load_from_filters",brapf_jet_smart_filters_add),berocket_add_filter("braapf_remove_pages_from_url_data",brapf_jet_smart_filters_remove_pages))})}(jQuery),jQuery(document).trigger("bapf_js_loaded");var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent,braapf_grab_single_ion,braapf_jqrui_slidr_ion_values_link_arr_attr;!function(a){function b(){berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_link_arr_attr_price",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",braapf_jqrui_slidr_ion_value_wc_price),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_arr_attr,10),berocket_add_filter("jqrui_slidr_ion_arr_attr_price",braapf_jqrui_slidr_ion_value_wc_price,20)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a('.bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)],g=d.data("prefix");"undefined"==typeof g&&(g="");var h=d.data("postfix");if("undefined"==typeof h&&(h=""),f[0]=g+f[0]+h,f[1]=g+f[1]+h,e[0]!=d.data("min")||e[1]!=d.data("max")){var i={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};i=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),i,e,f,d,a),a.values=[i]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),"function"==typeof berocket_add_filter?b():jQuery(document).on("berocket_hooks_ready",function(){b()})}(jQuery);var braapf_grab_single_select;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=a('.bapf_slct[data-taxonomy="'+b.taxonomy+'"] .bapf_body select:not(:disabled)'),e=[];d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&e.indexOf(c)===-1&&(e.push(c),b.values.push({value:c,html:a(this).data("name")}))})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c&&"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),"function"==typeof berocket_add_filter?berocket_add_filter("grab_single_filter_default",braapf_grab_single_select):jQuery(document).on("berocket_hooks_ready",function(){berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)})}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){function a(){bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)}bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")&&!jQuery(this).is(".select2-hidden-accessible")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(0==jQuery("#bapf-select2-high-zindex").length&&jQuery("body").append('<div id="bapf-select2-high-zindex"></div>'),a.dropdownParent=jQuery("#bapf-select2-high-zindex")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),"function"==typeof berocket_add_filter?a():jQuery(document).on("berocket_hooks_ready",function(){a()})});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent,braapf_grab_single_jqrui,braapf_jqrui_slidr_values_arr_attr,braapf_jqrui_slidr_values_link_arr_attr;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}function d(){berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_arr_attr,10),berocket_add_filter("jqrui_slidr_arr_attr_price",braapf_jqrui_slidr_values_wc_price,20),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr_price",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a('.bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="'+b+'"]').each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values"),f="";b.find(".bapf_tbprice").length&&(f=b.find(".bapf_tbprice").first().text());var g="";if(b.find(".bapf_taprice").length&&(g=b.find(".bapf_taprice").first().text()),d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c),e[0]=f+e[0]+g,e[1]=f+e[1]+g;var h={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};h=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),h,d,e,c,a),a.values=[h]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),"function"==typeof berocket_add_filter?d():jQuery(document).on("berocket_hooks_ready",function(){d()})}(jQuery);
berocket/framework.php CHANGED
@@ -35,8 +35,8 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
35
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
36
  load_plugin_textdomain('BeRocket_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
37
  class BeRocket_Framework {
38
- public static $framework_version = '2.7.9';
39
- public $plugin_framework_version = '2.7.9';
40
  public static $settings_name = '';
41
  public $addons;
42
  public $libraries;
35
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
36
  load_plugin_textdomain('BeRocket_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
37
  class BeRocket_Framework {
38
+ public static $framework_version = '2.8.0';
39
+ public $plugin_framework_version = '2.8.0';
40
  public static $settings_name = '';
41
  public $addons;
42
  public $libraries;
berocket/framework_version.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $framework_version_current = '2.7.9';
3
  if( version_compare($framework_version_current, $framework_version, '>') ) {
4
  $framework_version = $framework_version_current;
5
  $framework_dir = __DIR__;
1
  <?php
2
+ $framework_version_current = '2.8.0';
3
  if( version_compare($framework_version_current, $framework_version, '>') ) {
4
  $framework_version = $framework_version_current;
5
  $framework_dir = __DIR__;
berocket/includes/admin_notices.php CHANGED
@@ -704,6 +704,10 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
704
  }
705
  }
706
  public static function close_notice($notice = FALSE) {
 
 
 
 
707
  self::$subscribed = get_option('berocket_email_subscribed');
708
  if( ( $notice == FALSE || ! is_array($notice) ) && ! empty($_POST['notice']) ) {
709
  $notice = sanitize_textarea_field($_POST['notice']);
@@ -742,6 +746,10 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
742
  wp_die();
743
  }
744
  public static function subscribe() {
 
 
 
 
745
  if( ! empty($_POST['email']) ) {
746
  $plugins = array();
747
  if( ! empty($_POST['plugin']) ) {
@@ -928,6 +936,10 @@ if( ! class_exists( 'berocket_admin_notices_rate_stars' ) ) {
928
  update_option('berocket_admin_notices_rate_stars', $disabled);
929
  }
930
  function disable_rate_notice() {
 
 
 
 
931
  $plugin = (empty($_GET['plugin']) ? (empty($_POST['plugin']) ? '' : $_POST['plugin']) : $_GET['plugin']);
932
  $later = (empty($_GET['later']) ? (empty($_POST['later']) ? '' : $_POST['later']) : $_GET['later']);
933
  $disabled = get_option('berocket_admin_notices_rate_stars');
@@ -942,6 +954,10 @@ if( ! class_exists( 'berocket_admin_notices_rate_stars' ) ) {
942
  wp_die();
943
  }
944
  function feature_request_send() {
 
 
 
 
945
  $plugin = (empty($_GET['brfeature_plugin']) ? (empty($_POST['brfeature_plugin']) ? '' : $_POST['brfeature_plugin']) : $_GET['brfeature_plugin']);
946
  $email = (empty($_GET['brfeature_email']) ? (empty($_POST['brfeature_email']) ? '' : $_POST['brfeature_email']) : $_GET['brfeature_email']);
947
  $title = (empty($_GET['brfeature_title']) ? (empty($_POST['brfeature_title']) ? '' : $_POST['brfeature_title']) : $_GET['brfeature_title']);
704
  }
705
  }
706
  public static function close_notice($notice = FALSE) {
707
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
708
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
709
+ wp_die();
710
+ }
711
  self::$subscribed = get_option('berocket_email_subscribed');
712
  if( ( $notice == FALSE || ! is_array($notice) ) && ! empty($_POST['notice']) ) {
713
  $notice = sanitize_textarea_field($_POST['notice']);
746
  wp_die();
747
  }
748
  public static function subscribe() {
749
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
750
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
751
+ wp_die();
752
+ }
753
  if( ! empty($_POST['email']) ) {
754
  $plugins = array();
755
  if( ! empty($_POST['plugin']) ) {
936
  update_option('berocket_admin_notices_rate_stars', $disabled);
937
  }
938
  function disable_rate_notice() {
939
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
940
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
941
+ wp_die();
942
+ }
943
  $plugin = (empty($_GET['plugin']) ? (empty($_POST['plugin']) ? '' : $_POST['plugin']) : $_GET['plugin']);
944
  $later = (empty($_GET['later']) ? (empty($_POST['later']) ? '' : $_POST['later']) : $_GET['later']);
945
  $disabled = get_option('berocket_admin_notices_rate_stars');
954
  wp_die();
955
  }
956
  function feature_request_send() {
957
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
958
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
959
+ wp_die();
960
+ }
961
  $plugin = (empty($_GET['brfeature_plugin']) ? (empty($_POST['brfeature_plugin']) ? '' : $_POST['brfeature_plugin']) : $_GET['brfeature_plugin']);
962
  $email = (empty($_GET['brfeature_email']) ? (empty($_POST['brfeature_email']) ? '' : $_POST['brfeature_email']) : $_GET['brfeature_email']);
963
  $title = (empty($_GET['brfeature_title']) ? (empty($_POST['brfeature_title']) ? '' : $_POST['brfeature_title']) : $_GET['brfeature_title']);
berocket/includes/error_notices.php CHANGED
@@ -31,6 +31,10 @@ if( ! class_exists('BeRocket_error_notices') ) {
31
  update_option('berocket_plugin_error_'.$plugin_id, $errors, false);
32
  }
33
  public static function get_plugin_error_ajax() {
 
 
 
 
34
  $plugin_id = br_get_value_from_array($_POST, 'plugin_id');
35
  if( empty($plugin_id) ) {
36
  $plugin_id = br_get_value_from_array($_GET, 'plugin_id');
31
  update_option('berocket_plugin_error_'.$plugin_id, $errors, false);
32
  }
33
  public static function get_plugin_error_ajax() {
34
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
35
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
36
+ wp_die();
37
+ }
38
  $plugin_id = br_get_value_from_array($_POST, 'plugin_id');
39
  if( empty($plugin_id) ) {
40
  $plugin_id = br_get_value_from_array($_GET, 'plugin_id');
berocket/includes/information_notices.php CHANGED
@@ -239,6 +239,10 @@ if( ! class_exists( 'berocket_information_notices' ) ) {
239
  berocket_admin_notices::echo_jquery_functions();
240
  }
241
  public static function close_notice($notice = FALSE) {
 
 
 
 
242
  if( ( $notice == FALSE || ! is_array($notice) ) && ! empty($_POST['notice']) ) {
243
  $notice = sanitize_textarea_field($_POST['notice']);
244
  }
239
  berocket_admin_notices::echo_jquery_functions();
240
  }
241
  public static function close_notice($notice = FALSE) {
242
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
243
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
244
+ wp_die();
245
+ }
246
  if( ( $notice == FALSE || ! is_array($notice) ) && ! empty($_POST['notice']) ) {
247
  $notice = sanitize_textarea_field($_POST['notice']);
248
  }
berocket/includes/updater.php CHANGED
@@ -287,6 +287,10 @@ if ( ! class_exists( 'BeRocket_updater' ) ) {
287
  }
288
 
289
  public static function test_key() {
 
 
 
 
290
  if ( ! isset( $_POST[ 'key' ] ) || ! isset( $_POST[ 'id' ] ) ) {
291
  $data = array(
292
  'key_exist' => 0,
287
  }
288
 
289
  public static function test_key() {
290
+ if ( ! ( current_user_can( 'manage_options' ) ) ) {
291
+ echo __( 'Do not have access for this feature', 'BeRocket_domain' );
292
+ wp_die();
293
+ }
294
  if ( ! isset( $_POST[ 'key' ] ) || ! isset( $_POST[ 'id' ] ) ) {
295
  $data = array(
296
  'key_exist' => 0,
includes/compatibility/product-table.php CHANGED
@@ -22,11 +22,18 @@ class BeRocket_AAPF_compat_product_table {
22
  set_transient( $table_id, $table_transient, DAY_IN_SECONDS );
23
  }
24
  }
25
- public static function plugins_loaded() {
26
- if( class_exists('WC_Product_Table_Plugin')
27
  && ( function_exists( 'Barn2\Plugin\WC_Product_Table\wc_product_table' )
28
  || function_exists( 'Barn2\Plugin\WC_Product_Table\wpt' )
29
- || (function_exists( 'wc_product_table' ) && version_compare(WC_Product_Table_Plugin::VERSION, '2.1.3', '>')) ) ) {
 
 
 
 
 
 
 
30
  add_filter('aapf_localize_widget_script', array( __CLASS__, 'aapf_localize_widget_script' ));
31
  add_action( 'wc_product_table_get_table', array( __CLASS__, 'wc_product_table_get_table' ), 10, 1 );
32
  add_action( 'wc_product_table_after_get_table', array( __CLASS__, 'wc_product_table_get_table' ), 10, 1 );
22
  set_transient( $table_id, $table_transient, DAY_IN_SECONDS );
23
  }
24
  }
25
+ public static function check_old_version() {
26
+ return ( class_exists('WC_Product_Table_Plugin')
27
  && ( function_exists( 'Barn2\Plugin\WC_Product_Table\wc_product_table' )
28
  || function_exists( 'Barn2\Plugin\WC_Product_Table\wpt' )
29
+ || (function_exists( 'wc_product_table' ) && version_compare(WC_Product_Table_Plugin::VERSION, '2.1.3', '>')) ) );
30
+ }
31
+ public static function check_new_version() {
32
+ return (function_exists( 'Barn2\Plugin\WC_Product_Table\wpt' ) && ! empty(Barn2\Plugin\WC_Product_Table\PLUGIN_VERSION)
33
+ && version_compare(Barn2\Plugin\WC_Product_Table\PLUGIN_VERSION, '2.1.3', '>'));
34
+ }
35
+ public static function plugins_loaded() {
36
+ if( self::check_old_version() || self::check_new_version() ) {
37
  add_filter('aapf_localize_widget_script', array( __CLASS__, 'aapf_localize_widget_script' ));
38
  add_action( 'wc_product_table_get_table', array( __CLASS__, 'wc_product_table_get_table' ), 10, 1 );
39
  add_action( 'wc_product_table_after_get_table', array( __CLASS__, 'wc_product_table_get_table' ), 10, 1 );
includes/filters/display_widget.php CHANGED
@@ -338,6 +338,8 @@ class BeRocket_AAPF_Widget {
338
  $instance['text_after_price'] = $text_after_price;
339
  extract( $args );
340
  extract( $instance );
 
 
341
  $set_query_var_title['widget_type'] = $widget_type;
342
  $set_query_var_title['unique_filter_id'] = $unique_filter_id;
343
  $set_query_var_title['description'] = (isset($description) ? $description : null);
@@ -460,8 +462,6 @@ class BeRocket_AAPF_Widget {
460
  )
461
  );
462
  }
463
- $set_query_var_title['text_before_price'] = (isset($text_before_price) ? $text_before_price : null);
464
- $set_query_var_title['text_after_price'] = (isset($text_after_price) ? $text_after_price : null);
465
  $set_query_var_title['slider_display_data'] = 'wc_price';
466
  $terms = array((object)array(
467
  'term_id' => implode('_', $price_range),
338
  $instance['text_after_price'] = $text_after_price;
339
  extract( $args );
340
  extract( $instance );
341
+ $set_query_var_title['text_before_price'] = $text_before_price;
342
+ $set_query_var_title['text_after_price'] = $text_after_price;
343
  $set_query_var_title['widget_type'] = $widget_type;
344
  $set_query_var_title['unique_filter_id'] = $unique_filter_id;
345
  $set_query_var_title['description'] = (isset($description) ? $description : null);
462
  )
463
  );
464
  }
 
 
465
  $set_query_var_title['slider_display_data'] = 'wc_price';
466
  $terms = array((object)array(
467
  'term_id' => implode('_', $price_range),
includes/functions.php CHANGED
@@ -1741,17 +1741,24 @@ if( ! function_exists('braapf_is_filters_displayed_debug') ) {
1741
  }
1742
  }
1743
  if( ! function_exists('braapf_get_data_taxonomy_from_post') ) {
1744
- function braapf_get_data_taxonomy_from_post($post_data) {
1745
  $result = apply_filters('braapf_get_data_taxonomy_from_post_before', null, $post_data);
1746
  if( $result !== null ) {
 
 
 
 
 
 
1747
  return $result;
1748
  }
1749
  $filter_type = br_get_value_from_array($post_data, 'filter_type');
1750
  $attribute = br_get_value_from_array($post_data, 'attribute');
 
1751
  $custom_taxonomy = br_get_value_from_array($post_data, 'custom_taxonomy');
1752
  if ( $filter_type == 'price' ) {
1753
  $filter_type = 'attribute';
1754
- $attribute = 'price';
1755
  }
1756
  $filter_type_array = array(
1757
  'attribute' => array(
@@ -1788,7 +1795,9 @@ if( ! function_exists('braapf_get_data_taxonomy_from_post') ) {
1788
  $filter_type = $sameas['sameas'];
1789
  if( ! empty($sameas['attribute']) && $sameas['sameas'] == 'attribute' ) {
1790
  $attribute = $sameas['attribute'];
 
1791
  } elseif( $sameas['sameas'] == 'custom_taxonomy' ) {
 
1792
  if( ! empty($sameas['attribute']) ) {
1793
  $attribute = $sameas['attribute'];
1794
  } else {
@@ -1810,6 +1819,12 @@ if( ! function_exists('braapf_get_data_taxonomy_from_post') ) {
1810
  $attribute = $filter_type;
1811
  }
1812
  }
 
 
 
 
 
 
1813
  return $attribute;
1814
  }
1815
  }
1741
  }
1742
  }
1743
  if( ! function_exists('braapf_get_data_taxonomy_from_post') ) {
1744
+ function braapf_get_data_taxonomy_from_post($post_data, $return = 'taxonomy') {
1745
  $result = apply_filters('braapf_get_data_taxonomy_from_post_before', null, $post_data);
1746
  if( $result !== null ) {
1747
+ if( $return == 'all' ) {
1748
+ $result = array(
1749
+ 'taxonomy' => $result,
1750
+ 'type' => 'custom'
1751
+ );
1752
+ }
1753
  return $result;
1754
  }
1755
  $filter_type = br_get_value_from_array($post_data, 'filter_type');
1756
  $attribute = br_get_value_from_array($post_data, 'attribute');
1757
+ $type = $filter_type;
1758
  $custom_taxonomy = br_get_value_from_array($post_data, 'custom_taxonomy');
1759
  if ( $filter_type == 'price' ) {
1760
  $filter_type = 'attribute';
1761
+ $attribute = $type = 'price';
1762
  }
1763
  $filter_type_array = array(
1764
  'attribute' => array(
1795
  $filter_type = $sameas['sameas'];
1796
  if( ! empty($sameas['attribute']) && $sameas['sameas'] == 'attribute' ) {
1797
  $attribute = $sameas['attribute'];
1798
+ $type = 'attribute';
1799
  } elseif( $sameas['sameas'] == 'custom_taxonomy' ) {
1800
+ $type = 'custom_taxonomy';
1801
  if( ! empty($sameas['attribute']) ) {
1802
  $attribute = $sameas['attribute'];
1803
  } else {
1819
  $attribute = $filter_type;
1820
  }
1821
  }
1822
+ if( $return == 'all' ) {
1823
+ $attribute = array(
1824
+ 'taxonomy' => $attribute,
1825
+ 'type' => $type
1826
+ );
1827
+ }
1828
  return $attribute;
1829
  }
1830
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://berocket.com/woocommerce-ajax-products-filter/?utm_source=w
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 6.1
8
- Stable tag: 1.6.3.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -189,6 +189,12 @@ You can try this plugin's admin side [here](https://berocket.com/woocommerce-aja
189
 
190
  == Changelog ==
191
 
 
 
 
 
 
 
192
  = 1.6.3.3 =
193
  * Enhancement - Compatibility version: Wordpress 6.1 and WooCommerce 7.1
194
  * Fix - Some plugin links to match new BeRocket Site
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 6.1
8
+ Stable tag: 1.6.3.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
189
 
190
  == Changelog ==
191
 
192
+ = 1.6.3.4 =
193
+ * Enhancement - Additional tables generation to not change collation
194
+ * Enhancement - Additional tables check is tables exist
195
+ * Enhancement - Additional tables clear tables instead remove
196
+ * Fix - Barn2 Product table new check
197
+
198
  = 1.6.3.3 =
199
  * Enhancement - Compatibility version: Wordpress 6.1 and WooCommerce 7.1
200
  * Fix - Some plugin links to match new BeRocket Site
woocommerce-filters.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
- * Version: 1.6.3.3
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
@@ -11,6 +11,6 @@
11
  * Domain Path: /languages/
12
  * WC tested up to: 7.1
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.6.3.3' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
+ * Version: 1.6.3.4
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
11
  * Domain Path: /languages/
12
  * WC tested up to: 7.1
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.6.3.4' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');