Async JavaScript - Version 2.18.12.10

Version Description

  • the "happy birthday to me" edition ;-)
  • new: added option to disable Async JS for logged in users
  • new: added option to disable Async JS on shop cart/ checkout pages (woocommerce, edd & wp ecommerce)
  • added 'settings'-link to plugin overview screen (hi Mike!)
  • updated the chosen JS library to 1.8.7
  • confirmed working with WordPress 5.0
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 Async JavaScript
Version 2.18.12.10
Comparing to
See all releases

Code changes from version 2.18.06.13 to 2.18.12.10

assets/lib/chosen/bower.json DELETED
@@ -1,42 +0,0 @@
1
- {
2
- "name": "chosen",
3
- "description": "Chosen is a JavaScript plugin that makes select boxes user-friendly. It is currently available in both jQuery and Prototype flavors.",
4
- "keywords": [
5
- "select",
6
- "multiselect",
7
- "dropdown",
8
- "form",
9
- "input",
10
- "ui"
11
- ],
12
- "homepage": "https://harvesthq.github.io/chosen/",
13
- "license": "https://github.com/harvesthq/chosen/blob/master/LICENSE.md",
14
- "authors": [
15
- {
16
- "name": "Patrick Filler",
17
- "url": "https://github.com/pfiller"
18
- },
19
- {
20
- "name": "Christophe Coevoet",
21
- "url": "https://github.com/stof"
22
- },
23
- {
24
- "name": "Ken Earley",
25
- "url": "https://github.com/kenearley"
26
- },
27
- {
28
- "name": "Koen Punt",
29
- "url": "https://github.com/koenpunt"
30
- }
31
- ],
32
- "dependencies": {},
33
- "main": [
34
- "chosen.jquery.js",
35
- "chosen.css"
36
- ],
37
- "ignore": [],
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/harvesthq/chosen.git"
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/chosen.css CHANGED
@@ -2,7 +2,7 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.8.3
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
@@ -37,11 +37,15 @@ This file is generated by `grunt build`, do not edit it by hand.
37
  background: #fff;
38
  -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
39
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40
- display: none;
 
 
41
  }
42
 
43
  .chosen-container.chosen-with-drop .chosen-drop {
44
- display: block;
 
 
45
  }
46
 
47
  .chosen-container a {
@@ -85,12 +89,6 @@ This file is generated by `grunt build`, do not edit it by hand.
85
  line-height: 24px;
86
  }
87
 
88
- .chosen-container-single .chosen-single input[type="text"] {
89
- cursor: pointer;
90
- opacity: 0;
91
- position: absolute;
92
- }
93
-
94
  .chosen-container-single .chosen-default {
95
  color: #999;
96
  }
@@ -173,6 +171,8 @@ This file is generated by `grunt build`, do not edit it by hand.
173
  .chosen-container-single.chosen-container-single-nosearch .chosen-search {
174
  position: absolute;
175
  clip: rect(0, 0, 0, 0);
 
 
176
  }
177
 
178
  /* @end */
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.7
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
37
  background: #fff;
38
  -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
39
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40
+ clip: rect(0, 0, 0, 0);
41
+ -webkit-clip-path: inset(100% 100%);
42
+ clip-path: inset(100% 100%);
43
  }
44
 
45
  .chosen-container.chosen-with-drop .chosen-drop {
46
+ clip: auto;
47
+ -webkit-clip-path: none;
48
+ clip-path: none;
49
  }
50
 
51
  .chosen-container a {
89
  line-height: 24px;
90
  }
91
 
 
 
 
 
 
 
92
  .chosen-container-single .chosen-default {
93
  color: #999;
94
  }
171
  .chosen-container-single.chosen-container-single-nosearch .chosen-search {
172
  position: absolute;
173
  clip: rect(0, 0, 0, 0);
174
+ -webkit-clip-path: inset(100% 100%);
175
+ clip-path: inset(100% 100%);
176
  }
177
 
178
  /* @end */
assets/lib/chosen/chosen.jquery.js CHANGED
@@ -2,7 +2,7 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.8.3
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
@@ -161,7 +161,7 @@ This file is generated by `grunt build`, do not edit it by hand.
161
 
162
  AbstractChosen.prototype.choice_label = function(item) {
163
  if (this.include_group_label_in_selected && (item.group_label != null)) {
164
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
165
  } else {
166
  return item.html;
167
  }
@@ -267,7 +267,9 @@ This file is generated by `grunt build`, do not edit it by hand.
267
  }
268
  option_el = document.createElement("li");
269
  option_el.className = classes.join(" ");
270
- option_el.style.cssText = option.style;
 
 
271
  option_el.setAttribute("data-option-array-index", option.array_index);
272
  option_el.innerHTML = option.highlighted_html || option.html;
273
  if (option.title) {
@@ -341,7 +343,7 @@ This file is generated by `grunt build`, do not edit it by hand.
341
  }
342
  };
343
 
344
- AbstractChosen.prototype.winnow_results = function() {
345
  var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
346
  this.no_results_clear();
347
  results = 0;
@@ -397,7 +399,9 @@ This file is generated by `grunt build`, do not edit it by hand.
397
  return this.no_results(query);
398
  } else {
399
  this.update_results_content(this.results_option_build());
400
- return this.winnow_results_set_highlight();
 
 
401
  }
402
  };
403
 
@@ -584,7 +588,7 @@ This file is generated by `grunt build`, do not edit it by hand.
584
  };
585
 
586
  AbstractChosen.prototype.get_single_html = function() {
587
- return "<a class=\"chosen-single chosen-default\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
588
  };
589
 
590
  AbstractChosen.prototype.get_multi_html = function() {
@@ -941,7 +945,7 @@ This file is generated by `grunt build`, do not edit it by hand.
941
  this.results_data = SelectParser.select_to_array(this.form_field);
942
  if (this.is_multiple) {
943
  this.search_choices.find("li.search-choice").remove();
944
- } else if (!this.is_multiple) {
945
  this.single_set_selected_text();
946
  if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
947
  this.search_field[0].readOnly = true;
@@ -993,9 +997,6 @@ This file is generated by `grunt build`, do not edit it by hand.
993
  });
994
  return false;
995
  }
996
- if (!this.is_multiple) {
997
- this.search_container.append(this.search_field);
998
- }
999
  this.container.addClass("chosen-with-drop");
1000
  this.results_showing = true;
1001
  this.search_field.focus();
@@ -1013,10 +1014,6 @@ This file is generated by `grunt build`, do not edit it by hand.
1013
  Chosen.prototype.results_hide = function() {
1014
  if (this.results_showing) {
1015
  this.result_clear_highlight();
1016
- if (!this.is_multiple) {
1017
- this.selected_item.prepend(this.search_field);
1018
- this.search_field.focus();
1019
- }
1020
  this.container.removeClass("chosen-with-drop");
1021
  this.form_field_jq.trigger("chosen:hiding_dropdown", {
1022
  chosen: this
@@ -1161,14 +1158,20 @@ This file is generated by `grunt build`, do not edit it by hand.
1161
  item.selected = true;
1162
  this.form_field.options[item.options_index].selected = true;
1163
  this.selected_option_count = null;
1164
- this.search_field.val("");
1165
  if (this.is_multiple) {
1166
  this.choice_build(item);
1167
  } else {
1168
  this.single_set_selected_text(this.choice_label(item));
1169
  }
1170
  if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1171
- this.winnow_results();
 
 
 
 
 
 
 
1172
  } else {
1173
  this.results_hide();
1174
  this.show_search_field_default();
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.7
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
161
 
162
  AbstractChosen.prototype.choice_label = function(item) {
163
  if (this.include_group_label_in_selected && (item.group_label != null)) {
164
+ return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
165
  } else {
166
  return item.html;
167
  }
267
  }
268
  option_el = document.createElement("li");
269
  option_el.className = classes.join(" ");
270
+ if (option.style) {
271
+ option_el.style.cssText = option.style;
272
+ }
273
  option_el.setAttribute("data-option-array-index", option.array_index);
274
  option_el.innerHTML = option.highlighted_html || option.html;
275
  if (option.title) {
343
  }
344
  };
345
 
346
+ AbstractChosen.prototype.winnow_results = function(options) {
347
  var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
348
  this.no_results_clear();
349
  results = 0;
399
  return this.no_results(query);
400
  } else {
401
  this.update_results_content(this.results_option_build());
402
+ if (!(options != null ? options.skip_highlight : void 0)) {
403
+ return this.winnow_results_set_highlight();
404
+ }
405
  }
406
  };
407
 
588
  };
589
 
590
  AbstractChosen.prototype.get_single_html = function() {
591
+ return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
592
  };
593
 
594
  AbstractChosen.prototype.get_multi_html = function() {
945
  this.results_data = SelectParser.select_to_array(this.form_field);
946
  if (this.is_multiple) {
947
  this.search_choices.find("li.search-choice").remove();
948
+ } else {
949
  this.single_set_selected_text();
950
  if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
951
  this.search_field[0].readOnly = true;
997
  });
998
  return false;
999
  }
 
 
 
1000
  this.container.addClass("chosen-with-drop");
1001
  this.results_showing = true;
1002
  this.search_field.focus();
1014
  Chosen.prototype.results_hide = function() {
1015
  if (this.results_showing) {
1016
  this.result_clear_highlight();
 
 
 
 
1017
  this.container.removeClass("chosen-with-drop");
1018
  this.form_field_jq.trigger("chosen:hiding_dropdown", {
1019
  chosen: this
1158
  item.selected = true;
1159
  this.form_field.options[item.options_index].selected = true;
1160
  this.selected_option_count = null;
 
1161
  if (this.is_multiple) {
1162
  this.choice_build(item);
1163
  } else {
1164
  this.single_set_selected_text(this.choice_label(item));
1165
  }
1166
  if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1167
+ if (evt.metaKey || evt.ctrlKey) {
1168
+ this.winnow_results({
1169
+ skip_highlight: true
1170
+ });
1171
+ } else {
1172
+ this.search_field.val("");
1173
+ this.winnow_results();
1174
+ }
1175
  } else {
1176
  this.results_hide();
1177
  this.show_search_field_default();
assets/lib/chosen/chosen.jquery.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /* Chosen v1.8.3 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
 
3
- (function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,r,o;for(r=new i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,n,r,o,h,l,c,_,a,u,d,p;for(this.no_results_clear(),c=0,t=(o=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l=this.get_search_regex(t),s=0,i=(h=this.results_data).length;s<i;s++)(n=h[s]).search_match=!1,_=null,a=null,n.highlighted_html="",this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),null!=n.group_array_index&&this.results_data[n.group_array_index]&&(0===(_=this.results_data[n.group_array_index]).active_options&&_.search_match&&(c+=1),_.active_options+=1),p=n.group?n.label:n.text,n.group&&!this.group_search||(a=this.search_string_match(p,l),n.search_match=null!=a,n.search_match&&!n.group&&(c+=1),n.search_match?(o.length&&(u=a.index,r=p.slice(0,u),e=p.slice(u,u+o.length),d=p.slice(u+o.length),n.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(e)+"</em>"+this.escape_html(d)),null!=_&&(_.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),c<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple||this.search_container.append(this.search_field),this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.is_multiple||(this.selected_item.prepend(this.search_field),this.search_field.focus()),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.search_field.val(""),this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
1
+ /* Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
 
3
+ (function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,r,o;for(r=new i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,s,i,n,r,o,h,l,c,_,a,u,d,p,f;for(this.no_results_clear(),_=0,e=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),i=0,n=(l=this.results_data).length;i<n;i++)(r=l[i]).search_match=!1,a=null,u=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(a=this.results_data[r.group_array_index]).active_options&&a.search_match&&(_+=1),a.active_options+=1),f=r.group?r.label:r.text,r.group&&!this.group_search||(u=this.search_string_match(f,c),r.search_match=null!=u,r.search_match&&!r.group&&(_+=1),r.search_match?(h.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+h.length),p=f.slice(d+h.length),r.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=a&&(a.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
assets/lib/chosen/chosen.min.css CHANGED
@@ -2,10 +2,10 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.8.3
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
11
- */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);display:none}.chosen-container.chosen-with-drop .chosen-drop{display:block}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-single input[type=text]{cursor:pointer;opacity:0;position:absolute}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.7
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
11
+ */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
assets/lib/chosen/chosen.proto.js CHANGED
@@ -2,7 +2,7 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.8.3
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
@@ -161,7 +161,7 @@ This file is generated by `grunt build`, do not edit it by hand.
161
 
162
  AbstractChosen.prototype.choice_label = function(item) {
163
  if (this.include_group_label_in_selected && (item.group_label != null)) {
164
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
165
  } else {
166
  return item.html;
167
  }
@@ -267,7 +267,9 @@ This file is generated by `grunt build`, do not edit it by hand.
267
  }
268
  option_el = document.createElement("li");
269
  option_el.className = classes.join(" ");
270
- option_el.style.cssText = option.style;
 
 
271
  option_el.setAttribute("data-option-array-index", option.array_index);
272
  option_el.innerHTML = option.highlighted_html || option.html;
273
  if (option.title) {
@@ -341,7 +343,7 @@ This file is generated by `grunt build`, do not edit it by hand.
341
  }
342
  };
343
 
344
- AbstractChosen.prototype.winnow_results = function() {
345
  var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
346
  this.no_results_clear();
347
  results = 0;
@@ -397,7 +399,9 @@ This file is generated by `grunt build`, do not edit it by hand.
397
  return this.no_results(query);
398
  } else {
399
  this.update_results_content(this.results_option_build());
400
- return this.winnow_results_set_highlight();
 
 
401
  }
402
  };
403
 
@@ -584,7 +588,7 @@ This file is generated by `grunt build`, do not edit it by hand.
584
  };
585
 
586
  AbstractChosen.prototype.get_single_html = function() {
587
- return "<a class=\"chosen-single chosen-default\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
588
  };
589
 
590
  AbstractChosen.prototype.get_multi_html = function() {
@@ -945,7 +949,7 @@ This file is generated by `grunt build`, do not edit it by hand.
945
  this.results_data = SelectParser.select_to_array(this.form_field);
946
  if (this.is_multiple) {
947
  this.search_choices.select("li.search-choice").invoke("remove");
948
- } else if (!this.is_multiple) {
949
  this.single_set_selected_text();
950
  if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
951
  this.search_field.readOnly = true;
@@ -995,9 +999,6 @@ This file is generated by `grunt build`, do not edit it by hand.
995
  });
996
  return false;
997
  }
998
- if (!this.is_multiple) {
999
- this.search_container.insert(this.search_field);
1000
- }
1001
  this.container.addClassName("chosen-with-drop");
1002
  this.results_showing = true;
1003
  this.search_field.focus();
@@ -1015,12 +1016,6 @@ This file is generated by `grunt build`, do not edit it by hand.
1015
  Chosen.prototype.results_hide = function() {
1016
  if (this.results_showing) {
1017
  this.result_clear_highlight();
1018
- if (!this.is_multiple) {
1019
- this.selected_item.insert({
1020
- top: this.search_field
1021
- });
1022
- this.search_field.focus();
1023
- }
1024
  this.container.removeClassName("chosen-with-drop");
1025
  this.form_field.fire("chosen:hiding_dropdown", {
1026
  chosen: this
@@ -1172,14 +1167,20 @@ This file is generated by `grunt build`, do not edit it by hand.
1172
  item.selected = true;
1173
  this.form_field.options[item.options_index].selected = true;
1174
  this.selected_option_count = null;
1175
- this.search_field.value = "";
1176
  if (this.is_multiple) {
1177
  this.choice_build(item);
1178
  } else {
1179
  this.single_set_selected_text(this.choice_label(item));
1180
  }
1181
  if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1182
- this.winnow_results();
 
 
 
 
 
 
 
1183
  } else {
1184
  this.results_hide();
1185
  this.show_search_field_default();
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.7
6
  Full source at https://github.com/harvesthq/chosen
7
  Copyright (c) 2011-2018 Harvest http://getharvest.com
8
 
161
 
162
  AbstractChosen.prototype.choice_label = function(item) {
163
  if (this.include_group_label_in_selected && (item.group_label != null)) {
164
+ return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
165
  } else {
166
  return item.html;
167
  }
267
  }
268
  option_el = document.createElement("li");
269
  option_el.className = classes.join(" ");
270
+ if (option.style) {
271
+ option_el.style.cssText = option.style;
272
+ }
273
  option_el.setAttribute("data-option-array-index", option.array_index);
274
  option_el.innerHTML = option.highlighted_html || option.html;
275
  if (option.title) {
343
  }
344
  };
345
 
346
+ AbstractChosen.prototype.winnow_results = function(options) {
347
  var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
348
  this.no_results_clear();
349
  results = 0;
399
  return this.no_results(query);
400
  } else {
401
  this.update_results_content(this.results_option_build());
402
+ if (!(options != null ? options.skip_highlight : void 0)) {
403
+ return this.winnow_results_set_highlight();
404
+ }
405
  }
406
  };
407
 
588
  };
589
 
590
  AbstractChosen.prototype.get_single_html = function() {
591
+ return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
592
  };
593
 
594
  AbstractChosen.prototype.get_multi_html = function() {
949
  this.results_data = SelectParser.select_to_array(this.form_field);
950
  if (this.is_multiple) {
951
  this.search_choices.select("li.search-choice").invoke("remove");
952
+ } else {
953
  this.single_set_selected_text();
954
  if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
955
  this.search_field.readOnly = true;
999
  });
1000
  return false;
1001
  }
 
 
 
1002
  this.container.addClassName("chosen-with-drop");
1003
  this.results_showing = true;
1004
  this.search_field.focus();
1016
  Chosen.prototype.results_hide = function() {
1017
  if (this.results_showing) {
1018
  this.result_clear_highlight();
 
 
 
 
 
 
1019
  this.container.removeClassName("chosen-with-drop");
1020
  this.form_field.fire("chosen:hiding_dropdown", {
1021
  chosen: this
1167
  item.selected = true;
1168
  this.form_field.options[item.options_index].selected = true;
1169
  this.selected_option_count = null;
 
1170
  if (this.is_multiple) {
1171
  this.choice_build(item);
1172
  } else {
1173
  this.single_set_selected_text(this.choice_label(item));
1174
  }
1175
  if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1176
+ if (evt.metaKey || evt.ctrlKey) {
1177
+ this.winnow_results({
1178
+ skip_highlight: true
1179
+ });
1180
+ } else {
1181
+ this.search_field.value = "";
1182
+ this.winnow_results();
1183
+ }
1184
  } else {
1185
  this.results_hide();
1186
  this.show_search_field_default();
assets/lib/chosen/chosen.proto.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /* Chosen v1.8.3 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
 
3
- (function(){var e,t,s=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t){function s(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e},r={}.hasOwnProperty;(t=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,s,i,r,n,o;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=[],s=0,i=(n=e.childNodes).length;s<i;s++)r=n[s],o.push(this.add_option(r,t,e.disabled));return o},e.prototype.add_option=function(e,t,s){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===s?s:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var s,i,r,n,o;for(n=new t,i=0,r=(o=e.childNodes).length;i<r;i++)s=o[i],n.add_node(s);return n.parsed},e=function(){function e(t,i){this.form_field=t,this.options=null!=i?i:{},this.label_click_handler=s(this.label_click_handler,this),e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100)},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,s,i,r,n,o,l;for(t="",l=0,r=0,n=(o=this.results_data).length;r<n&&(s=o[r],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(l++,t+=i),(null!=e?e.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(l>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,s;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),s.style.cssText=e.style,s.setAttribute("data-option-array-index",e.array_index),s.innerHTML=e.highlighted_html||e.html,e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.result_add_group=function(e){var t,s;return(e.search_match||e.group_match)&&e.active_options>0?((t=[]).push("group-result"),e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),s.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,s,i,r;for(r=[],e=0,t=(s=this.results_data).length;e<t;e++)(i=s[e]).selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,s,i,r,n,o,l,h,c,a,_,u,d,p;for(this.no_results_clear(),c=0,e=(o=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h=this.get_search_regex(e),s=0,i=(l=this.results_data).length;s<i;s++)(r=l[s]).search_match=!1,a=null,_=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(a=this.results_data[r.group_array_index]).active_options&&a.search_match&&(c+=1),a.active_options+=1),p=r.group?r.label:r.text,r.group&&!this.group_search||(_=this.search_string_match(p,h),r.search_match=null!=_,r.search_match&&!r.group&&(c+=1),r.search_match?(o.length&&(u=_.index,n=p.slice(0,u),t=p.slice(u,u+o.length),d=p.slice(u+o.length),r.highlighted_html=this.escape_html(n)+"<em>"+this.escape_html(t)+"</em>"+this.escape_html(d)),null!=a&&(a.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),c<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,s;return s=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),t=this.case_sensitive_search?"":"i",new RegExp(s,t)},e.prototype.search_string_match=function(e,t){var s;return s=t.exec(e),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},e.prototype.choices_count=function(){var e,t,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(s=this.form_field.options).length;e<t;e++)s[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keydown_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},e.prototype.keyup_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){if(!this.is_disabled)return setTimeout(function(e){return function(){return e.results_search()}}(this),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n </div>\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),this.Chosen=function(s){function r(){return r.__super__.constructor.apply(this,arguments)}var n;return i(r,e),r.prototype.setup=function(){return this.current_selectedIndex=this.form_field.selectedIndex},r.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=new Element("div",t),this.container.setStyle({width:this.container_width()}),this.is_multiple?this.container.update(this.get_multi_html()):this.container.update(this.get_single_html()),this.form_field.hide().insert({after:this.container}),this.dropdown=this.container.down("div.chosen-drop"),this.search_field=this.container.down("input"),this.search_results=this.container.down("ul.chosen-results"),this.search_field_scale(),this.search_no_results=this.container.down("li.no-results"),this.is_multiple?(this.search_choices=this.container.down("ul.chosen-choices"),this.search_container=this.container.down("li.search-field")):(this.search_container=this.container.down("div.chosen-search"),this.selected_item=this.container.down(".chosen-single")),this.results_build(),this.set_tab_index(),this.set_label_behavior()},r.prototype.on_ready=function(){return this.form_field.fire("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){return this.container.observe("touchstart",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("touchend",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mousedown",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("mouseup",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mouseenter",function(e){return function(t){return e.mouse_enter(t)}}(this)),this.container.observe("mouseleave",function(e){return function(t){return e.mouse_leave(t)}}(this)),this.search_results.observe("mouseup",function(e){return function(t){return e.search_results_mouseup(t)}}(this)),this.search_results.observe("mouseover",function(e){return function(t){return e.search_results_mouseover(t)}}(this)),this.search_results.observe("mouseout",function(e){return function(t){return e.search_results_mouseout(t)}}(this)),this.search_results.observe("mousewheel",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("DOMMouseScroll",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("touchstart",function(e){return function(t){return e.search_results_touchstart(t)}}(this)),this.search_results.observe("touchmove",function(e){return function(t){return e.search_results_touchmove(t)}}(this)),this.search_results.observe("touchend",function(e){return function(t){return e.search_results_touchend(t)}}(this)),this.form_field.observe("chosen:updated",function(e){return function(t){return e.results_update_field(t)}}(this)),this.form_field.observe("chosen:activate",function(e){return function(t){return e.activate_field(t)}}(this)),this.form_field.observe("chosen:open",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.form_field.observe("chosen:close",function(e){return function(t){return e.close_field(t)}}(this)),this.search_field.observe("blur",function(e){return function(t){return e.input_blur(t)}}(this)),this.search_field.observe("keyup",function(e){return function(t){return e.keyup_checker(t)}}(this)),this.search_field.observe("keydown",function(e){return function(t){return e.keydown_checker(t)}}(this)),this.search_field.observe("focus",function(e){return function(t){return e.input_focus(t)}}(this)),this.search_field.observe("cut",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.search_field.observe("paste",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.observe("click",function(e){return function(t){return e.choices_click(t)}}(this)):this.container.observe("click",function(e){return e.preventDefault()})},r.prototype.destroy=function(){var e,t,s,i;for(this.container.ownerDocument.stopObserving("click",this.click_test_action),t=0,s=(i=["chosen:updated","chosen:activate","chosen:open","chosen:close"]).length;t<s;t++)e=i[t],this.form_field.stopObserving(e);return this.container.stopObserving(),this.search_results.stopObserving(),this.search_field.stopObserving(),null!=this.form_field_label&&this.form_field_label.stopObserving(),this.is_multiple?(this.search_choices.stopObserving(),this.container.select(".search-choice-close").each(function(e){return e.stopObserving()})):this.selected_item.stopObserving(),this.search_field.tabIndex&&(this.form_field.tabIndex=this.search_field.tabIndex),this.container.remove(),this.form_field.show()},r.prototype.search_field_disabled=function(){var e;return this.is_disabled=this.form_field.disabled||(null!=(e=this.form_field.up("fieldset"))?e.disabled:void 0)||!1,this.is_disabled?this.container.addClassName("chosen-disabled"):this.container.removeClassName("chosen-disabled"),this.search_field.disabled=this.is_disabled,this.is_multiple||this.selected_item.stopObserving("focus",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.observe("focus",this.activate_field)},r.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&e.target.hasClassName("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||e.target!==this.selected_item&&!e.target.up("a.chosen-single")||this.results_toggle():(this.is_multiple&&this.search_field.clear(),this.container.ownerDocument.observe("click",this.click_test_action),this.results_show()),this.activate_field())},r.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},r.prototype.search_results_mousewheel=function(e){var t;if(null!=(t=e.deltaY||-e.wheelDelta||e.detail))return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop=t+this.search_results.scrollTop},r.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClassName("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return this.container.ownerDocument.stopObserving("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClassName("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},r.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClassName("chosen-container-active"),this.active_field=!0,this.search_field.value=this.get_search_field_value(),this.search_field.focus()},r.prototype.test_active_click=function(e){return e.target.up(".chosen-container")===this.container?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=t.select_to_array(this.form_field),this.is_multiple?this.search_choices.select("li.search-choice").invoke("remove"):this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field.readOnly=!0,this.container.addClassName("chosen-container-single-nosearch")):(this.search_field.readOnly=!1,this.container.removeClassName("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(e){var t,s,i,r,n;return this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClassName("highlighted"),i=parseInt(this.search_results.getStyle("maxHeight"),10),n=this.search_results.scrollTop,r=i+n,s=this.result_highlight.positionedOffset().top,(t=s+this.result_highlight.getHeight())>=r?this.search_results.scrollTop=t-i>0?t-i:0:s<n?this.search_results.scrollTop=s:void 0},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClassName("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.is_multiple||this.search_container.insert(this.search_field),this.container.addClassName("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.value=this.get_search_field_value(),this.winnow_results(),this.form_field.fire("chosen:showing_dropdown",{chosen:this}))},r.prototype.update_results_content=function(e){return this.search_results.update(e)},r.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.is_multiple||(this.selected_item.insert({top:this.search_field}),this.search_field.focus()),this.container.removeClassName("chosen-with-drop"),this.form_field.fire("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},r.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field.tabIndex=t},r.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field.up("label"),null==this.form_field_label&&(this.form_field_label=$$("label[for='"+this.form_field.id+"']").first()),null!=this.form_field_label)return this.form_field_label.observe("click",this.label_click_handler)},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.value=this.default_text,this.search_field.addClassName("default")):(this.search_field.value="",this.search_field.removeClassName("default"))},r.prototype.search_results_mouseup=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_highlight=t,this.result_select(e),this.search_field.focus()},r.prototype.search_results_mouseover=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_do_highlight(t)},r.prototype.search_results_mouseout=function(e){if(e.target.hasClassName("active-result")||e.target.up(".active-result"))return this.result_clear_highlight()},r.prototype.choice_build=function(e){var t,s;return t=new Element("li",{class:"search-choice"}).update("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClassName("search-choice-disabled"):((s=new Element("a",{href:"#",class:"search-choice-close",rel:e.array_index})).observe("click",function(e){return function(t){return e.choice_destroy_link_click(t)}}(this)),t.insert(s)),this.search_container.insert({before:t})},r.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(e.target)},r.prototype.choice_destroy=function(e){if(this.result_deselect(e.readAttribute("rel")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.up("li").remove(),this.search_field_scale()},r.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},r.prototype.results_reset_cleanup=function(){var e;if(this.current_selectedIndex=this.form_field.selectedIndex,e=this.selected_item.down("abbr"))return e.remove()},r.prototype.result_select=function(e){var t,s;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClassName("active-result"):this.reset_single_select_options(),t.addClassName("result-selected"),s=this.results_data[t.getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.search_field.value="",this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change(),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},r.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClassName("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClassName("chosen-default")),this.selected_item.down("span").update(e)},r.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change(),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.down("abbr")||this.selected_item.down("span").insert({after:'<abbr class="search-choice-close"></abbr>'}),this.selected_item.addClassName("chosen-single-with-deselect")},r.prototype.get_search_field_value=function(){return this.search_field.value},r.prototype.get_search_text=function(){return this.get_search_field_value().strip()},r.prototype.escape_html=function(e){return e.escapeHTML()},r.prototype.winnow_results_set_highlight=function(){var e;if(this.is_multiple||(e=this.search_results.down(".result-selected.active-result")),null==e&&(e=this.search_results.down(".active-result")),null!=e)return this.result_do_highlight(e)},r.prototype.no_results=function(e){return this.search_results.insert(this.get_no_results_html(e)),this.form_field.fire("chosen:no_results",{chosen:this})},r.prototype.no_results_clear=function(){var e,t;for(e=null,t=[];e=this.search_results.down(".no-results");)t.push(e.remove());return t},r.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.next(".active-result"))?this.result_do_highlight(e):void 0:this.results_show()},r.prototype.keyup_arrow=function(){var e,t,s;return this.results_showing||this.is_multiple?this.result_highlight?(s=this.result_highlight.previousSiblings(),e=this.search_results.select("li.active-result"),(t=s.intersect(e)).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.down("a")),this.clear_backstroke()):(e=this.search_container.siblings().last())&&e.hasClassName("search-choice")&&!e.hasClassName("search-choice-disabled")?(this.pending_backstroke=e,this.pending_backstroke&&this.pending_backstroke.addClassName("search-choice-focus"),this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClassName("search-choice-focus")):void 0},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClassName("search-choice-focus"),this.pending_backstroke=null},r.prototype.search_field_scale=function(){var e,t,s,i,r,n,o,l;if(this.is_multiple){for(n={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)n[r=o[s]]=this.search_field.getStyle(r);return(t=new Element("div").update(this.escape_html(this.get_search_field_value()))).setStyle(n),document.body.appendChild(t),l=t.measure("width")+25,t.remove(),(e=this.container.getWidth())&&(l=Math.min(e-10,l)),this.search_field.setStyle({width:l+"px"})}},r.prototype.trigger_form_field_change=function(){return n(this.form_field,"input"),n(this.form_field,"change")},n=function(e,t){var s;if(e.dispatchEvent){try{s=new Event(t,{bubbles:!0,cancelable:!0})}catch(e){(s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0)}return e.dispatchEvent(s)}return e.fireEvent("on"+t,document.createEventObject())},r}()}).call(this);
1
+ /* Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
 
3
+ (function(){var e,t,s=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t){function s(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e},r={}.hasOwnProperty;(t=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,s,i,r,n,o;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=[],s=0,i=(n=e.childNodes).length;s<i;s++)r=n[s],o.push(this.add_option(r,t,e.disabled));return o},e.prototype.add_option=function(e,t,s){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===s?s:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var s,i,r,n,o;for(n=new t,i=0,r=(o=e.childNodes).length;i<r;i++)s=o[i],n.add_node(s);return n.parsed},e=function(){function e(t,i){this.form_field=t,this.options=null!=i?i:{},this.label_click_handler=s(this.label_click_handler,this),e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100)},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,s,i,r,n,o,l;for(t="",l=0,r=0,n=(o=this.results_data).length;r<n&&(s=o[r],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(l++,t+=i),(null!=e?e.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(l>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,s;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),e.style&&(s.style.cssText=e.style),s.setAttribute("data-option-array-index",e.array_index),s.innerHTML=e.highlighted_html||e.html,e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.result_add_group=function(e){var t,s;return(e.search_match||e.group_match)&&e.active_options>0?((t=[]).push("group-result"),e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),s.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,s,i,r;for(r=[],e=0,t=(s=this.results_data).length;e<t;e++)(i=s[e]).selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(e){var t,s,i,r,n,o,l,h,c,a,_,u,d,p,f;for(this.no_results_clear(),a=0,t=(l=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,r=(h=this.results_data).length;i<r;i++)(n=h[i]).search_match=!1,_=null,u=null,n.highlighted_html="",this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),null!=n.group_array_index&&this.results_data[n.group_array_index]&&(0===(_=this.results_data[n.group_array_index]).active_options&&_.search_match&&(a+=1),_.active_options+=1),f=n.group?n.label:n.text,n.group&&!this.group_search||(u=this.search_string_match(f,c),n.search_match=null!=u,n.search_match&&!n.group&&(a+=1),n.search_match?(l.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+l.length),p=f.slice(d+l.length),n.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=_&&(_.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),a<1&&l.length?(this.update_results_content(""),this.no_results(l)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,s;return s=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),t=this.case_sensitive_search?"":"i",new RegExp(s,t)},e.prototype.search_string_match=function(e,t){var s;return s=t.exec(e),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},e.prototype.choices_count=function(){var e,t,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(s=this.form_field.options).length;e<t;e++)s[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keydown_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},e.prototype.keyup_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){if(!this.is_disabled)return setTimeout(function(e){return function(){return e.results_search()}}(this),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),this.Chosen=function(s){function r(){return r.__super__.constructor.apply(this,arguments)}var n;return i(r,e),r.prototype.setup=function(){return this.current_selectedIndex=this.form_field.selectedIndex},r.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=new Element("div",t),this.container.setStyle({width:this.container_width()}),this.is_multiple?this.container.update(this.get_multi_html()):this.container.update(this.get_single_html()),this.form_field.hide().insert({after:this.container}),this.dropdown=this.container.down("div.chosen-drop"),this.search_field=this.container.down("input"),this.search_results=this.container.down("ul.chosen-results"),this.search_field_scale(),this.search_no_results=this.container.down("li.no-results"),this.is_multiple?(this.search_choices=this.container.down("ul.chosen-choices"),this.search_container=this.container.down("li.search-field")):(this.search_container=this.container.down("div.chosen-search"),this.selected_item=this.container.down(".chosen-single")),this.results_build(),this.set_tab_index(),this.set_label_behavior()},r.prototype.on_ready=function(){return this.form_field.fire("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){return this.container.observe("touchstart",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("touchend",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mousedown",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("mouseup",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mouseenter",function(e){return function(t){return e.mouse_enter(t)}}(this)),this.container.observe("mouseleave",function(e){return function(t){return e.mouse_leave(t)}}(this)),this.search_results.observe("mouseup",function(e){return function(t){return e.search_results_mouseup(t)}}(this)),this.search_results.observe("mouseover",function(e){return function(t){return e.search_results_mouseover(t)}}(this)),this.search_results.observe("mouseout",function(e){return function(t){return e.search_results_mouseout(t)}}(this)),this.search_results.observe("mousewheel",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("DOMMouseScroll",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("touchstart",function(e){return function(t){return e.search_results_touchstart(t)}}(this)),this.search_results.observe("touchmove",function(e){return function(t){return e.search_results_touchmove(t)}}(this)),this.search_results.observe("touchend",function(e){return function(t){return e.search_results_touchend(t)}}(this)),this.form_field.observe("chosen:updated",function(e){return function(t){return e.results_update_field(t)}}(this)),this.form_field.observe("chosen:activate",function(e){return function(t){return e.activate_field(t)}}(this)),this.form_field.observe("chosen:open",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.form_field.observe("chosen:close",function(e){return function(t){return e.close_field(t)}}(this)),this.search_field.observe("blur",function(e){return function(t){return e.input_blur(t)}}(this)),this.search_field.observe("keyup",function(e){return function(t){return e.keyup_checker(t)}}(this)),this.search_field.observe("keydown",function(e){return function(t){return e.keydown_checker(t)}}(this)),this.search_field.observe("focus",function(e){return function(t){return e.input_focus(t)}}(this)),this.search_field.observe("cut",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.search_field.observe("paste",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.observe("click",function(e){return function(t){return e.choices_click(t)}}(this)):this.container.observe("click",function(e){return e.preventDefault()})},r.prototype.destroy=function(){var e,t,s,i;for(this.container.ownerDocument.stopObserving("click",this.click_test_action),t=0,s=(i=["chosen:updated","chosen:activate","chosen:open","chosen:close"]).length;t<s;t++)e=i[t],this.form_field.stopObserving(e);return this.container.stopObserving(),this.search_results.stopObserving(),this.search_field.stopObserving(),null!=this.form_field_label&&this.form_field_label.stopObserving(),this.is_multiple?(this.search_choices.stopObserving(),this.container.select(".search-choice-close").each(function(e){return e.stopObserving()})):this.selected_item.stopObserving(),this.search_field.tabIndex&&(this.form_field.tabIndex=this.search_field.tabIndex),this.container.remove(),this.form_field.show()},r.prototype.search_field_disabled=function(){var e;return this.is_disabled=this.form_field.disabled||(null!=(e=this.form_field.up("fieldset"))?e.disabled:void 0)||!1,this.is_disabled?this.container.addClassName("chosen-disabled"):this.container.removeClassName("chosen-disabled"),this.search_field.disabled=this.is_disabled,this.is_multiple||this.selected_item.stopObserving("focus",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.observe("focus",this.activate_field)},r.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&e.target.hasClassName("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||e.target!==this.selected_item&&!e.target.up("a.chosen-single")||this.results_toggle():(this.is_multiple&&this.search_field.clear(),this.container.ownerDocument.observe("click",this.click_test_action),this.results_show()),this.activate_field())},r.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},r.prototype.search_results_mousewheel=function(e){var t;if(null!=(t=e.deltaY||-e.wheelDelta||e.detail))return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop=t+this.search_results.scrollTop},r.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClassName("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return this.container.ownerDocument.stopObserving("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClassName("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},r.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClassName("chosen-container-active"),this.active_field=!0,this.search_field.value=this.get_search_field_value(),this.search_field.focus()},r.prototype.test_active_click=function(e){return e.target.up(".chosen-container")===this.container?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=t.select_to_array(this.form_field),this.is_multiple?this.search_choices.select("li.search-choice").invoke("remove"):(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field.readOnly=!0,this.container.addClassName("chosen-container-single-nosearch")):(this.search_field.readOnly=!1,this.container.removeClassName("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(e){var t,s,i,r,n;return this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClassName("highlighted"),i=parseInt(this.search_results.getStyle("maxHeight"),10),n=this.search_results.scrollTop,r=i+n,s=this.result_highlight.positionedOffset().top,(t=s+this.result_highlight.getHeight())>=r?this.search_results.scrollTop=t-i>0?t-i:0:s<n?this.search_results.scrollTop=s:void 0},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClassName("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.container.addClassName("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.value=this.get_search_field_value(),this.winnow_results(),this.form_field.fire("chosen:showing_dropdown",{chosen:this}))},r.prototype.update_results_content=function(e){return this.search_results.update(e)},r.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClassName("chosen-with-drop"),this.form_field.fire("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},r.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field.tabIndex=t},r.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field.up("label"),null==this.form_field_label&&(this.form_field_label=$$("label[for='"+this.form_field.id+"']").first()),null!=this.form_field_label)return this.form_field_label.observe("click",this.label_click_handler)},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.value=this.default_text,this.search_field.addClassName("default")):(this.search_field.value="",this.search_field.removeClassName("default"))},r.prototype.search_results_mouseup=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_highlight=t,this.result_select(e),this.search_field.focus()},r.prototype.search_results_mouseover=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_do_highlight(t)},r.prototype.search_results_mouseout=function(e){if(e.target.hasClassName("active-result")||e.target.up(".active-result"))return this.result_clear_highlight()},r.prototype.choice_build=function(e){var t,s;return t=new Element("li",{class:"search-choice"}).update("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClassName("search-choice-disabled"):((s=new Element("a",{href:"#",class:"search-choice-close",rel:e.array_index})).observe("click",function(e){return function(t){return e.choice_destroy_link_click(t)}}(this)),t.insert(s)),this.search_container.insert({before:t})},r.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(e.target)},r.prototype.choice_destroy=function(e){if(this.result_deselect(e.readAttribute("rel")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.up("li").remove(),this.search_field_scale()},r.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},r.prototype.results_reset_cleanup=function(){var e;if(this.current_selectedIndex=this.form_field.selectedIndex,e=this.selected_item.down("abbr"))return e.remove()},r.prototype.result_select=function(e){var t,s;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClassName("active-result"):this.reset_single_select_options(),t.addClassName("result-selected"),s=this.results_data[t.getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.value="",this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change(),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},r.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClassName("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClassName("chosen-default")),this.selected_item.down("span").update(e)},r.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change(),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.down("abbr")||this.selected_item.down("span").insert({after:'<abbr class="search-choice-close"></abbr>'}),this.selected_item.addClassName("chosen-single-with-deselect")},r.prototype.get_search_field_value=function(){return this.search_field.value},r.prototype.get_search_text=function(){return this.get_search_field_value().strip()},r.prototype.escape_html=function(e){return e.escapeHTML()},r.prototype.winnow_results_set_highlight=function(){var e;if(this.is_multiple||(e=this.search_results.down(".result-selected.active-result")),null==e&&(e=this.search_results.down(".active-result")),null!=e)return this.result_do_highlight(e)},r.prototype.no_results=function(e){return this.search_results.insert(this.get_no_results_html(e)),this.form_field.fire("chosen:no_results",{chosen:this})},r.prototype.no_results_clear=function(){var e,t;for(e=null,t=[];e=this.search_results.down(".no-results");)t.push(e.remove());return t},r.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.next(".active-result"))?this.result_do_highlight(e):void 0:this.results_show()},r.prototype.keyup_arrow=function(){var e,t,s;return this.results_showing||this.is_multiple?this.result_highlight?(s=this.result_highlight.previousSiblings(),e=this.search_results.select("li.active-result"),(t=s.intersect(e)).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.down("a")),this.clear_backstroke()):(e=this.search_container.siblings().last())&&e.hasClassName("search-choice")&&!e.hasClassName("search-choice-disabled")?(this.pending_backstroke=e,this.pending_backstroke&&this.pending_backstroke.addClassName("search-choice-focus"),this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClassName("search-choice-focus")):void 0},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClassName("search-choice-focus"),this.pending_backstroke=null},r.prototype.search_field_scale=function(){var e,t,s,i,r,n,o,l;if(this.is_multiple){for(n={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)n[r=o[s]]=this.search_field.getStyle(r);return(t=new Element("div").update(this.escape_html(this.get_search_field_value()))).setStyle(n),document.body.appendChild(t),l=t.measure("width")+25,t.remove(),(e=this.container.getWidth())&&(l=Math.min(e-10,l)),this.search_field.setStyle({width:l+"px"})}},r.prototype.trigger_form_field_change=function(){return n(this.form_field,"input"),n(this.form_field,"change")},n=function(e,t){var s;if(e.dispatchEvent){try{s=new Event(t,{bubbles:!0,cancelable:!0})}catch(e){(s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0)}return e.dispatchEvent(s)}return e.fireEvent("on"+t,document.createEventObject())},r}()}).call(this);
assets/lib/chosen/docsupport/chosen.png DELETED
Binary file
assets/lib/chosen/docsupport/init.js DELETED
@@ -1,11 +0,0 @@
1
- var config = {
2
- '.chosen-select' : {},
3
- '.chosen-select-deselect' : { allow_single_deselect: true },
4
- '.chosen-select-no-single' : { disable_search_threshold: 10 },
5
- '.chosen-select-no-results': { no_results_text: 'Oops, nothing found!' },
6
- '.chosen-select-rtl' : { rtl: true },
7
- '.chosen-select-width' : { width: '95%' }
8
- }
9
- for (var selector in config) {
10
- $(selector).chosen(config[selector]);
11
- }
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/docsupport/init.proto.js DELETED
@@ -1,16 +0,0 @@
1
- document.observe('dom:loaded', function(evt) {
2
- var config = {
3
- '.chosen-select' : {},
4
- '.chosen-select-deselect' : { allow_single_deselect: true },
5
- '.chosen-select-no-single' : { disable_search_threshold: 10 },
6
- '.chosen-select-no-results': { no_results_text: 'Oops, nothing found!' },
7
- '.chosen-select-rtl' : { rtl: true },
8
- '.chosen-select-width' : { width: '95%' }
9
- }
10
-
11
- for (var selector in config) {
12
- $$(selector).each(function(element) {
13
- new Chosen(element, config[selector]);
14
- });
15
- }
16
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/docsupport/jquery-1.12.4.min.js DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
2
- !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
3
- }return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
4
- marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({
5
- padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
 
 
 
 
 
assets/lib/chosen/docsupport/jquery-3.2.1.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
2
- !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,N,e),g(f,c,O,e)):(f++,j.call(a,g(f,c,N,e),g(f,c,O,e),g(f,c,N,c.notifyWith))):(d!==N&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
3
- a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ga[d]=e,e)}function ia(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=W.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&da(d)&&(e[f]=ha(d))):"none"!==c&&(e[f]="none",W.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ia(this,!0)},hide:function(){return ia(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){da(this)?r(this).show():r(this).hide()})}});var ja=/^(?:checkbox|radio)$/i,ka=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c<d;c++)W.set(a[c],"globalEval",!b||W.get(b[c],"globalEval"))}var pa=/<|&#?\w+;/;function qa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(pa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ka.exec(f)||["",""])[1].toLowerCase(),i=ma[h]||ma._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&B(this,"input"))return this.click(),!1},_default:function(a){return B(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?va:wa,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:wa,isPropagationStopped:wa,isImmediatePropagationStopped:wa,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=va,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=va,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=va,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&sa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ta.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return ya(this,a,b,c,d)},one:function(a,b,c,d){return ya(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=wa),this.each(function(){r.event.remove(this,a,c,b)})}});var za=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/<script|<style|<link/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,Ca=/^true\/(.*)/,Da=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}X.hasData(a)&&(h=X.access(a),i=r.extend({},h),X.set(b,i))}}function Ia(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ja.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ja(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,na(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ga),l=0;l<i;l++)j=h[l],la.test(j.type||"")&&!W.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Da,""),k))}return a}function Ka(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(na(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&oa(na(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(za,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d<e;d++)Ia(f[d],g[d]);if(b)if(c)for(f=f||na(a),g=g||na(h),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);else Ha(a,h);return g=na(h,"script"),g.length>0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(na(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ja(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(na(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var La=/^margin/,Ma=new RegExp("^("+aa+")(?!px)[a-z%]+$","i"),Na=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",ra.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,ra.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Oa(a,b,c){var d,e,f,g,h=a.style;return c=c||Na(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ma.test(g)&&La.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Pa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Qa=/^(none|table(?!-c[ea]).+)/,Ra=/^--/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta={letterSpacing:"0",fontWeight:"400"},Ua=["Webkit","Moz","ms"],Va=d.createElement("div").style;function Wa(a){if(a in Va)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ua.length;while(c--)if(a=Ua[c]+b,a in Va)return a}function Xa(a){var b=r.cssProps[a];return b||(b=r.cssProps[a]=Wa(a)||a),b}function Ya(a,b,c){var d=ba.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Za(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ca[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ca[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ca[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ca[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ca[f]+"Width",!0,e)));return g}function $a(a,b,c){var d,e=Na(a),f=Oa(a,b,e),g="border-box"===r.css(a,"boxSizing",!1,e);return Ma.test(f)?f:(d=g&&(o.boxSizingReliable()||f===a.style[b]),"auto"===f&&(f=a["offset"+b[0].toUpperCase()+b.slice(1)]),f=parseFloat(f)||0,f+Za(a,b,c||(g?"border":"content"),d,e)+"px")}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Oa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=Ra.test(b),j=a.style;return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:j[b]:(f=typeof c,"string"===f&&(e=ba.exec(c))&&e[1]&&(c=fa(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(j[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i?j.setProperty(b,c):j[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b),i=Ra.test(b);return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Oa(a,b,d)),"normal"===e&&b in Ta&&(e=Ta[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Qa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?$a(a,b,d):ea(a,Sa,function(){return $a(a,b,d)})},set:function(a,c,d){var e,f=d&&Na(a),g=d&&Za(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=ba.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ya(a,c,g)}}}),r.cssHooks.marginLeft=Pa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Oa(a,"marginLeft"))||a.getBoundingClientRect().left-ea(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ca[d]+b]=f[d]||f[d-2]||f[0];return e}},La.test(a)||(r.cssHooks[a+b].set=Ya)}),r.fn.extend({css:function(a,b){return T(this,function(a,b,c){var d,e,f={},g=0;if(Array.isArray(b)){for(d=Na(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&da(a),q=W.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],cb.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=W.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ia([a],!0),j=a.style.display||j,k=r.css(a,"display"),ia([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=W.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ia([a],!0),m.done(function(){p||ia([a]),W.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=hb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],Array.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=kb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=ab||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(i||h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:ab||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);f<g;f++)if(d=kb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,hb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j}r.Animation=r.extend(kb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return fa(c.elem,a,ba.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(L);for(var c,d=0,e=a.length;d<e;d++)c=a[d],kb.tweeners[c]=kb.tweeners[c]||[],kb.tweeners[c].unshift(b)},prefilters:[ib],prefilter:function(a,b){b?kb.prefilters.unshift(a):kb.prefilters.push(a)}}),r.speed=function(a,b,c){var d=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off?d.duration=0:"number"!=typeof d.duration&&(d.duration in r.fx.speeds?d.duration=r.fx.speeds[d.duration]:d.duration=r.fx.speeds._default),null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){r.isFunction(d.old)&&d.old.call(this),d.queue&&r.dequeue(this,d.queue)},d},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(da).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=kb(this,r.extend({},a),f);(e||W.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=W.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&db.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=W.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),r.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(ab=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),ab=void 0},r.fx.timer=function(a){r.timers.push(a),r.fx.start()},r.fx.interval=13,r.fx.start=function(){bb||(bb=!0,eb())},r.fx.stop=function(){bb=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var lb,mb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return T(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),
4
- null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Tb=[],Ub=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Tb.pop()||r.expando+"_"+ub++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Ub.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ub.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Ub,"$1"+e):b.jsonp!==!1&&(b.url+=(vb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Tb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=C.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=qa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=pb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length},r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),b=f.ownerDocument,c=b.documentElement,e=b.defaultView,{top:d.top+e.pageYOffset-c.clientTop,left:d.left+e.pageXOffset-c.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),B(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||ra})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return T(this,function(a,d,e){var f;return r.isWindow(a)?f=a:9===a.nodeType&&(f=a.defaultView),void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Pa(o.pixelPosition,function(a,c){if(c)return c=Oa(a,b),Ma.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return T(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.holdReady=function(a){a?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=B,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Vb=a.jQuery,Wb=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Wb),b&&a.jQuery===r&&(a.jQuery=Vb),r},b||(a.jQuery=a.$=r),r});
 
 
 
 
assets/lib/chosen/docsupport/oss-credit.png DELETED
Binary file
assets/lib/chosen/docsupport/prism.css DELETED
@@ -1,108 +0,0 @@
1
- /**
2
- * okaidia theme for JavaScript, CSS and HTML
3
- * Loosely based on Monokai textmate theme by http://www.monokai.nl/
4
- * @author ocodia
5
- */
6
-
7
- code[class*="language-"],
8
- pre[class*="language-"] {
9
- color: #f8f8f2;
10
- text-shadow: 0 1px rgba(0,0,0,0.3);
11
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
12
- direction: ltr;
13
- text-align: left;
14
- white-space: pre;
15
- word-spacing: normal;
16
-
17
- -moz-tab-size: 4;
18
- -o-tab-size: 4;
19
- tab-size: 4;
20
-
21
- -webkit-hyphens: none;
22
- -moz-hyphens: none;
23
- -ms-hyphens: none;
24
- hyphens: none;
25
- }
26
-
27
- /* Code blocks */
28
- pre[class*="language-"] {
29
- padding: 1em;
30
- margin: .5em 0;
31
- overflow: auto;
32
- border-radius: 0.3em;
33
- }
34
-
35
- :not(pre) > code[class*="language-"],
36
- pre[class*="language-"] {
37
- background: #272822;
38
- }
39
-
40
- /* Inline code */
41
- :not(pre) > code[class*="language-"] {
42
- padding: .1em;
43
- border-radius: .3em;
44
- }
45
-
46
- .token.comment,
47
- .token.prolog,
48
- .token.doctype,
49
- .token.cdata {
50
- color: slategray;
51
- }
52
-
53
- .token.punctuation {
54
- color: #f8f8f2;
55
- }
56
-
57
- .namespace {
58
- opacity: .7;
59
- }
60
-
61
- .token.property,
62
- .token.tag {
63
- color: #f92672;
64
- }
65
-
66
- .token.boolean,
67
- .token.number{
68
- color: #ae81ff;
69
- }
70
-
71
- .token.selector,
72
- .token.attr-name,
73
- .token.string {
74
- color: #a6e22e;
75
- }
76
-
77
-
78
- .token.operator,
79
- .token.entity,
80
- .token.url,
81
- .language-css .token.string,
82
- .style .token.string {
83
- color: #f8f8f2;
84
- }
85
-
86
- .token.atrule,
87
- .token.attr-value
88
- {
89
- color: #e6db74;
90
- }
91
-
92
-
93
- .token.keyword{
94
- color: #66d9ef;
95
- }
96
-
97
- .token.regex,
98
- .token.important {
99
- color: #fd971f;
100
- }
101
-
102
- .token.important {
103
- font-weight: bold;
104
- }
105
-
106
- .token.entity {
107
- cursor: help;
108
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/docsupport/prism.js DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Prism: Lightweight, robust, elegant syntax highlighting
3
- * MIT license http://www.opensource.org/licenses/mit-license.php/
4
- * @author Lea Verou http://lea.verou.me
5
- */(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ");var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data),o);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar,l.language);t.hooks.run("before-insert",l);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r,i){return n.stringify(t.tokenize(e,r),i)},tokenize:function(e,n,r){var i=t.Token,s=[e],o=n.rest;if(o){for(var u in o)n[u]=o[u];delete n.rest}e:for(var u in n){if(!n.hasOwnProperty(u)||!n[u])continue;var a=n[u],f=a.inside,l=!!a.lookbehind,c=0;a=a.pattern||a;for(var h=0;h<s.length;h++){var p=s[h];if(s.length>e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+"</"+s.tag+">"};if(!self.document){self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}})();;
6
- Prism.languages.markup={comment:/&lt;!--[\w\W]*?-->/g,prolog:/&lt;\?.+?\?>/,doctype:/&lt;!DOCTYPE.+?>/,cdata:/&lt;!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/&lt;\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^&lt;\/?[\w:-]+/i,inside:{punctuation:/^&lt;\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&amp;#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});;
7
- Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/style(>|&gt;)/ig,inside:{tag:{pattern:/(&lt;|<)style[\w\W]*?(>|&gt;)|(&lt;|<)\/style(>|&gt;)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
8
- Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}}, number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|&lt;=?|>=?|={1,3}|(&amp;){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
9
- Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/script(>|&gt;)/ig,inside:{tag:{pattern:/(&lt;|<)script[\w\W]*?(>|&gt;)|(&lt;|<)\/script(>|&gt;)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
 
 
 
 
 
 
 
 
 
assets/lib/chosen/docsupport/prototype-1.7.0.0.js DELETED
@@ -1,6082 +0,0 @@
1
- /* Prototype JavaScript framework, version 1.7
2
- * (c) 2005-2010 Sam Stephenson
3
- *
4
- * Prototype is freely distributable under the terms of an MIT-style license.
5
- * For details, see the Prototype web site: http://www.prototypejs.org/
6
- *
7
- *--------------------------------------------------------------------------*/
8
-
9
- var Prototype = {
10
-
11
- Version: '1.7',
12
-
13
- Browser: (function(){
14
- var ua = navigator.userAgent;
15
- var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
16
- return {
17
- IE: !!window.attachEvent && !isOpera,
18
- Opera: isOpera,
19
- WebKit: ua.indexOf('AppleWebKit/') > -1,
20
- Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
21
- MobileSafari: /Apple.*Mobile/.test(ua)
22
- }
23
- })(),
24
-
25
- BrowserFeatures: {
26
- XPath: !!document.evaluate,
27
-
28
- SelectorsAPI: !!document.querySelector,
29
-
30
- ElementExtensions: (function() {
31
- var constructor = window.Element || window.HTMLElement;
32
- return !!(constructor && constructor.prototype);
33
- })(),
34
- SpecificElementExtensions: (function() {
35
- if (typeof window.HTMLDivElement !== 'undefined')
36
- return true;
37
-
38
- var div = document.createElement('div'),
39
- form = document.createElement('form'),
40
- isSupported = false;
41
-
42
- if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
43
- isSupported = true;
44
- }
45
-
46
- div = form = null;
47
-
48
- return isSupported;
49
- })()
50
- },
51
-
52
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
53
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
54
-
55
- emptyFunction: function() { },
56
-
57
- K: function(x) { return x }
58
- };
59
-
60
- if (Prototype.Browser.MobileSafari)
61
- Prototype.BrowserFeatures.SpecificElementExtensions = false;
62
-
63
-
64
- var Abstract = { };
65
-
66
-
67
- var Try = {
68
- these: function() {
69
- var returnValue;
70
-
71
- for (var i = 0, length = arguments.length; i < length; i++) {
72
- var lambda = arguments[i];
73
- try {
74
- returnValue = lambda();
75
- break;
76
- } catch (e) { }
77
- }
78
-
79
- return returnValue;
80
- }
81
- };
82
-
83
- /* Based on Alex Arnell's inheritance implementation. */
84
-
85
- var Class = (function() {
86
-
87
- var IS_DONTENUM_BUGGY = (function(){
88
- for (var p in { toString: 1 }) {
89
- if (p === 'toString') return false;
90
- }
91
- return true;
92
- })();
93
-
94
- function subclass() {};
95
- function create() {
96
- var parent = null, properties = $A(arguments);
97
- if (Object.isFunction(properties[0]))
98
- parent = properties.shift();
99
-
100
- function klass() {
101
- this.initialize.apply(this, arguments);
102
- }
103
-
104
- Object.extend(klass, Class.Methods);
105
- klass.superclass = parent;
106
- klass.subclasses = [];
107
-
108
- if (parent) {
109
- subclass.prototype = parent.prototype;
110
- klass.prototype = new subclass;
111
- parent.subclasses.push(klass);
112
- }
113
-
114
- for (var i = 0, length = properties.length; i < length; i++)
115
- klass.addMethods(properties[i]);
116
-
117
- if (!klass.prototype.initialize)
118
- klass.prototype.initialize = Prototype.emptyFunction;
119
-
120
- klass.prototype.constructor = klass;
121
- return klass;
122
- }
123
-
124
- function addMethods(source) {
125
- var ancestor = this.superclass && this.superclass.prototype,
126
- properties = Object.keys(source);
127
-
128
- if (IS_DONTENUM_BUGGY) {
129
- if (source.toString != Object.prototype.toString)
130
- properties.push("toString");
131
- if (source.valueOf != Object.prototype.valueOf)
132
- properties.push("valueOf");
133
- }
134
-
135
- for (var i = 0, length = properties.length; i < length; i++) {
136
- var property = properties[i], value = source[property];
137
- if (ancestor && Object.isFunction(value) &&
138
- value.argumentNames()[0] == "$super") {
139
- var method = value;
140
- value = (function(m) {
141
- return function() { return ancestor[m].apply(this, arguments); };
142
- })(property).wrap(method);
143
-
144
- value.valueOf = method.valueOf.bind(method);
145
- value.toString = method.toString.bind(method);
146
- }
147
- this.prototype[property] = value;
148
- }
149
-
150
- return this;
151
- }
152
-
153
- return {
154
- create: create,
155
- Methods: {
156
- addMethods: addMethods
157
- }
158
- };
159
- })();
160
- (function() {
161
-
162
- var _toString = Object.prototype.toString,
163
- NULL_TYPE = 'Null',
164
- UNDEFINED_TYPE = 'Undefined',
165
- BOOLEAN_TYPE = 'Boolean',
166
- NUMBER_TYPE = 'Number',
167
- STRING_TYPE = 'String',
168
- OBJECT_TYPE = 'Object',
169
- FUNCTION_CLASS = '[object Function]',
170
- BOOLEAN_CLASS = '[object Boolean]',
171
- NUMBER_CLASS = '[object Number]',
172
- STRING_CLASS = '[object String]',
173
- ARRAY_CLASS = '[object Array]',
174
- DATE_CLASS = '[object Date]',
175
- NATIVE_JSON_STRINGIFY_SUPPORT = window.JSON &&
176
- typeof JSON.stringify === 'function' &&
177
- JSON.stringify(0) === '0' &&
178
- typeof JSON.stringify(Prototype.K) === 'undefined';
179
-
180
- function Type(o) {
181
- switch(o) {
182
- case null: return NULL_TYPE;
183
- case (void 0): return UNDEFINED_TYPE;
184
- }
185
- var type = typeof o;
186
- switch(type) {
187
- case 'boolean': return BOOLEAN_TYPE;
188
- case 'number': return NUMBER_TYPE;
189
- case 'string': return STRING_TYPE;
190
- }
191
- return OBJECT_TYPE;
192
- }
193
-
194
- function extend(destination, source) {
195
- for (var property in source)
196
- destination[property] = source[property];
197
- return destination;
198
- }
199
-
200
- function inspect(object) {
201
- try {
202
- if (isUndefined(object)) return 'undefined';
203
- if (object === null) return 'null';
204
- return object.inspect ? object.inspect() : String(object);
205
- } catch (e) {
206
- if (e instanceof RangeError) return '...';
207
- throw e;
208
- }
209
- }
210
-
211
- function toJSON(value) {
212
- return Str('', { '': value }, []);
213
- }
214
-
215
- function Str(key, holder, stack) {
216
- var value = holder[key],
217
- type = typeof value;
218
-
219
- if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
220
- value = value.toJSON(key);
221
- }
222
-
223
- var _class = _toString.call(value);
224
-
225
- switch (_class) {
226
- case NUMBER_CLASS:
227
- case BOOLEAN_CLASS:
228
- case STRING_CLASS:
229
- value = value.valueOf();
230
- }
231
-
232
- switch (value) {
233
- case null: return 'null';
234
- case true: return 'true';
235
- case false: return 'false';
236
- }
237
-
238
- type = typeof value;
239
- switch (type) {
240
- case 'string':
241
- return value.inspect(true);
242
- case 'number':
243
- return isFinite(value) ? String(value) : 'null';
244
- case 'object':
245
-
246
- for (var i = 0, length = stack.length; i < length; i++) {
247
- if (stack[i] === value) { throw new TypeError(); }
248
- }
249
- stack.push(value);
250
-
251
- var partial = [];
252
- if (_class === ARRAY_CLASS) {
253
- for (var i = 0, length = value.length; i < length; i++) {
254
- var str = Str(i, value, stack);
255
- partial.push(typeof str === 'undefined' ? 'null' : str);
256
- }
257
- partial = '[' + partial.join(',') + ']';
258
- } else {
259
- var keys = Object.keys(value);
260
- for (var i = 0, length = keys.length; i < length; i++) {
261
- var key = keys[i], str = Str(key, value, stack);
262
- if (typeof str !== "undefined") {
263
- partial.push(key.inspect(true)+ ':' + str);
264
- }
265
- }
266
- partial = '{' + partial.join(',') + '}';
267
- }
268
- stack.pop();
269
- return partial;
270
- }
271
- }
272
-
273
- function stringify(object) {
274
- return JSON.stringify(object);
275
- }
276
-
277
- function toQueryString(object) {
278
- return $H(object).toQueryString();
279
- }
280
-
281
- function toHTML(object) {
282
- return object && object.toHTML ? object.toHTML() : String.interpret(object);
283
- }
284
-
285
- function keys(object) {
286
- if (Type(object) !== OBJECT_TYPE) { throw new TypeError(); }
287
- var results = [];
288
- for (var property in object) {
289
- if (object.hasOwnProperty(property)) {
290
- results.push(property);
291
- }
292
- }
293
- return results;
294
- }
295
-
296
- function values(object) {
297
- var results = [];
298
- for (var property in object)
299
- results.push(object[property]);
300
- return results;
301
- }
302
-
303
- function clone(object) {
304
- return extend({ }, object);
305
- }
306
-
307
- function isElement(object) {
308
- return !!(object && object.nodeType == 1);
309
- }
310
-
311
- function isArray(object) {
312
- return _toString.call(object) === ARRAY_CLASS;
313
- }
314
-
315
- var hasNativeIsArray = (typeof Array.isArray == 'function')
316
- && Array.isArray([]) && !Array.isArray({});
317
-
318
- if (hasNativeIsArray) {
319
- isArray = Array.isArray;
320
- }
321
-
322
- function isHash(object) {
323
- return object instanceof Hash;
324
- }
325
-
326
- function isFunction(object) {
327
- return _toString.call(object) === FUNCTION_CLASS;
328
- }
329
-
330
- function isString(object) {
331
- return _toString.call(object) === STRING_CLASS;
332
- }
333
-
334
- function isNumber(object) {
335
- return _toString.call(object) === NUMBER_CLASS;
336
- }
337
-
338
- function isDate(object) {
339
- return _toString.call(object) === DATE_CLASS;
340
- }
341
-
342
- function isUndefined(object) {
343
- return typeof object === "undefined";
344
- }
345
-
346
- extend(Object, {
347
- extend: extend,
348
- inspect: inspect,
349
- toJSON: NATIVE_JSON_STRINGIFY_SUPPORT ? stringify : toJSON,
350
- toQueryString: toQueryString,
351
- toHTML: toHTML,
352
- keys: Object.keys || keys,
353
- values: values,
354
- clone: clone,
355
- isElement: isElement,
356
- isArray: isArray,
357
- isHash: isHash,
358
- isFunction: isFunction,
359
- isString: isString,
360
- isNumber: isNumber,
361
- isDate: isDate,
362
- isUndefined: isUndefined
363
- });
364
- })();
365
- Object.extend(Function.prototype, (function() {
366
- var slice = Array.prototype.slice;
367
-
368
- function update(array, args) {
369
- var arrayLength = array.length, length = args.length;
370
- while (length--) array[arrayLength + length] = args[length];
371
- return array;
372
- }
373
-
374
- function merge(array, args) {
375
- array = slice.call(array, 0);
376
- return update(array, args);
377
- }
378
-
379
- function argumentNames() {
380
- var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
381
- .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
382
- .replace(/\s+/g, '').split(',');
383
- return names.length == 1 && !names[0] ? [] : names;
384
- }
385
-
386
- function bind(context) {
387
- if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
388
- var __method = this, args = slice.call(arguments, 1);
389
- return function() {
390
- var a = merge(args, arguments);
391
- return __method.apply(context, a);
392
- }
393
- }
394
-
395
- function bindAsEventListener(context) {
396
- var __method = this, args = slice.call(arguments, 1);
397
- return function(event) {
398
- var a = update([event || window.event], args);
399
- return __method.apply(context, a);
400
- }
401
- }
402
-
403
- function curry() {
404
- if (!arguments.length) return this;
405
- var __method = this, args = slice.call(arguments, 0);
406
- return function() {
407
- var a = merge(args, arguments);
408
- return __method.apply(this, a);
409
- }
410
- }
411
-
412
- function delay(timeout) {
413
- var __method = this, args = slice.call(arguments, 1);
414
- timeout = timeout * 1000;
415
- return window.setTimeout(function() {
416
- return __method.apply(__method, args);
417
- }, timeout);
418
- }
419
-
420
- function defer() {
421
- var args = update([0.01], arguments);
422
- return this.delay.apply(this, args);
423
- }
424
-
425
- function wrap(wrapper) {
426
- var __method = this;
427
- return function() {
428
- var a = update([__method.bind(this)], arguments);
429
- return wrapper.apply(this, a);
430
- }
431
- }
432
-
433
- function methodize() {
434
- if (this._methodized) return this._methodized;
435
- var __method = this;
436
- return this._methodized = function() {
437
- var a = update([this], arguments);
438
- return __method.apply(null, a);
439
- };
440
- }
441
-
442
- return {
443
- argumentNames: argumentNames,
444
- bind: bind,
445
- bindAsEventListener: bindAsEventListener,
446
- curry: curry,
447
- delay: delay,
448
- defer: defer,
449
- wrap: wrap,
450
- methodize: methodize
451
- }
452
- })());
453
-
454
-
455
-
456
- (function(proto) {
457
-
458
-
459
- function toISOString() {
460
- return this.getUTCFullYear() + '-' +
461
- (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
462
- this.getUTCDate().toPaddedString(2) + 'T' +
463
- this.getUTCHours().toPaddedString(2) + ':' +
464
- this.getUTCMinutes().toPaddedString(2) + ':' +
465
- this.getUTCSeconds().toPaddedString(2) + 'Z';
466
- }
467
-
468
-
469
- function toJSON() {
470
- return this.toISOString();
471
- }
472
-
473
- if (!proto.toISOString) proto.toISOString = toISOString;
474
- if (!proto.toJSON) proto.toJSON = toJSON;
475
-
476
- })(Date.prototype);
477
-
478
-
479
- RegExp.prototype.match = RegExp.prototype.test;
480
-
481
- RegExp.escape = function(str) {
482
- return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
483
- };
484
- var PeriodicalExecuter = Class.create({
485
- initialize: function(callback, frequency) {
486
- this.callback = callback;
487
- this.frequency = frequency;
488
- this.currentlyExecuting = false;
489
-
490
- this.registerCallback();
491
- },
492
-
493
- registerCallback: function() {
494
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
495
- },
496
-
497
- execute: function() {
498
- this.callback(this);
499
- },
500
-
501
- stop: function() {
502
- if (!this.timer) return;
503
- clearInterval(this.timer);
504
- this.timer = null;
505
- },
506
-
507
- onTimerEvent: function() {
508
- if (!this.currentlyExecuting) {
509
- try {
510
- this.currentlyExecuting = true;
511
- this.execute();
512
- this.currentlyExecuting = false;
513
- } catch(e) {
514
- this.currentlyExecuting = false;
515
- throw e;
516
- }
517
- }
518
- }
519
- });
520
- Object.extend(String, {
521
- interpret: function(value) {
522
- return value == null ? '' : String(value);
523
- },
524
- specialChar: {
525
- '\b': '\\b',
526
- '\t': '\\t',
527
- '\n': '\\n',
528
- '\f': '\\f',
529
- '\r': '\\r',
530
- '\\': '\\\\'
531
- }
532
- });
533
-
534
- Object.extend(String.prototype, (function() {
535
- var NATIVE_JSON_PARSE_SUPPORT = window.JSON &&
536
- typeof JSON.parse === 'function' &&
537
- JSON.parse('{"test": true}').test;
538
-
539
- function prepareReplacement(replacement) {
540
- if (Object.isFunction(replacement)) return replacement;
541
- var template = new Template(replacement);
542
- return function(match) { return template.evaluate(match) };
543
- }
544
-
545
- function gsub(pattern, replacement) {
546
- var result = '', source = this, match;
547
- replacement = prepareReplacement(replacement);
548
-
549
- if (Object.isString(pattern))
550
- pattern = RegExp.escape(pattern);
551
-
552
- if (!(pattern.length || pattern.source)) {
553
- replacement = replacement('');
554
- return replacement + source.split('').join(replacement) + replacement;
555
- }
556
-
557
- while (source.length > 0) {
558
- if (match = source.match(pattern)) {
559
- result += source.slice(0, match.index);
560
- result += String.interpret(replacement(match));
561
- source = source.slice(match.index + match[0].length);
562
- } else {
563
- result += source, source = '';
564
- }
565
- }
566
- return result;
567
- }
568
-
569
- function sub(pattern, replacement, count) {
570
- replacement = prepareReplacement(replacement);
571
- count = Object.isUndefined(count) ? 1 : count;
572
-
573
- return this.gsub(pattern, function(match) {
574
- if (--count < 0) return match[0];
575
- return replacement(match);
576
- });
577
- }
578
-
579
- function scan(pattern, iterator) {
580
- this.gsub(pattern, iterator);
581
- return String(this);
582
- }
583
-
584
- function truncate(length, truncation) {
585
- length = length || 30;
586
- truncation = Object.isUndefined(truncation) ? '...' : truncation;
587
- return this.length > length ?
588
- this.slice(0, length - truncation.length) + truncation : String(this);
589
- }
590
-
591
- function strip() {
592
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
593
- }
594
-
595
- function stripTags() {
596
- return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
597
- }
598
-
599
- function stripScripts() {
600
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
601
- }
602
-
603
- function extractScripts() {
604
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img'),
605
- matchOne = new RegExp(Prototype.ScriptFragment, 'im');
606
- return (this.match(matchAll) || []).map(function(scriptTag) {
607
- return (scriptTag.match(matchOne) || ['', ''])[1];
608
- });
609
- }
610
-
611
- function evalScripts() {
612
- return this.extractScripts().map(function(script) { return eval(script) });
613
- }
614
-
615
- function escapeHTML() {
616
- return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
617
- }
618
-
619
- function unescapeHTML() {
620
- return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
621
- }
622
-
623
-
624
- function toQueryParams(separator) {
625
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
626
- if (!match) return { };
627
-
628
- return match[1].split(separator || '&').inject({ }, function(hash, pair) {
629
- if ((pair = pair.split('='))[0]) {
630
- var key = decodeURIComponent(pair.shift()),
631
- value = pair.length > 1 ? pair.join('=') : pair[0];
632
-
633
- if (value != undefined) value = decodeURIComponent(value);
634
-
635
- if (key in hash) {
636
- if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
637
- hash[key].push(value);
638
- }
639
- else hash[key] = value;
640
- }
641
- return hash;
642
- });
643
- }
644
-
645
- function toArray() {
646
- return this.split('');
647
- }
648
-
649
- function succ() {
650
- return this.slice(0, this.length - 1) +
651
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
652
- }
653
-
654
- function times(count) {
655
- return count < 1 ? '' : new Array(count + 1).join(this);
656
- }
657
-
658
- function camelize() {
659
- return this.replace(/-+(.)?/g, function(match, chr) {
660
- return chr ? chr.toUpperCase() : '';
661
- });
662
- }
663
-
664
- function capitalize() {
665
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
666
- }
667
-
668
- function underscore() {
669
- return this.replace(/::/g, '/')
670
- .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
671
- .replace(/([a-z\d])([A-Z])/g, '$1_$2')
672
- .replace(/-/g, '_')
673
- .toLowerCase();
674
- }
675
-
676
- function dasherize() {
677
- return this.replace(/_/g, '-');
678
- }
679
-
680
- function inspect(useDoubleQuotes) {
681
- var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
682
- if (character in String.specialChar) {
683
- return String.specialChar[character];
684
- }
685
- return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
686
- });
687
- if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
688
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
689
- }
690
-
691
- function unfilterJSON(filter) {
692
- return this.replace(filter || Prototype.JSONFilter, '$1');
693
- }
694
-
695
- function isJSON() {
696
- var str = this;
697
- if (str.blank()) return false;
698
- str = str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@');
699
- str = str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');
700
- str = str.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
701
- return (/^[\],:{}\s]*$/).test(str);
702
- }
703
-
704
- function evalJSON(sanitize) {
705
- var json = this.unfilterJSON(),
706
- cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
707
- if (cx.test(json)) {
708
- json = json.replace(cx, function (a) {
709
- return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
710
- });
711
- }
712
- try {
713
- if (!sanitize || json.isJSON()) return eval('(' + json + ')');
714
- } catch (e) { }
715
- throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
716
- }
717
-
718
- function parseJSON() {
719
- var json = this.unfilterJSON();
720
- return JSON.parse(json);
721
- }
722
-
723
- function include(pattern) {
724
- return this.indexOf(pattern) > -1;
725
- }
726
-
727
- function startsWith(pattern) {
728
- return this.lastIndexOf(pattern, 0) === 0;
729
- }
730
-
731
- function endsWith(pattern) {
732
- var d = this.length - pattern.length;
733
- return d >= 0 && this.indexOf(pattern, d) === d;
734
- }
735
-
736
- function empty() {
737
- return this == '';
738
- }
739
-
740
- function blank() {
741
- return /^\s*$/.test(this);
742
- }
743
-
744
- function interpolate(object, pattern) {
745
- return new Template(this, pattern).evaluate(object);
746
- }
747
-
748
- return {
749
- gsub: gsub,
750
- sub: sub,
751
- scan: scan,
752
- truncate: truncate,
753
- strip: String.prototype.trim || strip,
754
- stripTags: stripTags,
755
- stripScripts: stripScripts,
756
- extractScripts: extractScripts,
757
- evalScripts: evalScripts,
758
- escapeHTML: escapeHTML,
759
- unescapeHTML: unescapeHTML,
760
- toQueryParams: toQueryParams,
761
- parseQuery: toQueryParams,
762
- toArray: toArray,
763
- succ: succ,
764
- times: times,
765
- camelize: camelize,
766
- capitalize: capitalize,
767
- underscore: underscore,
768
- dasherize: dasherize,
769
- inspect: inspect,
770
- unfilterJSON: unfilterJSON,
771
- isJSON: isJSON,
772
- evalJSON: NATIVE_JSON_PARSE_SUPPORT ? parseJSON : evalJSON,
773
- include: include,
774
- startsWith: startsWith,
775
- endsWith: endsWith,
776
- empty: empty,
777
- blank: blank,
778
- interpolate: interpolate
779
- };
780
- })());
781
-
782
- var Template = Class.create({
783
- initialize: function(template, pattern) {
784
- this.template = template.toString();
785
- this.pattern = pattern || Template.Pattern;
786
- },
787
-
788
- evaluate: function(object) {
789
- if (object && Object.isFunction(object.toTemplateReplacements))
790
- object = object.toTemplateReplacements();
791
-
792
- return this.template.gsub(this.pattern, function(match) {
793
- if (object == null) return (match[1] + '');
794
-
795
- var before = match[1] || '';
796
- if (before == '\\') return match[2];
797
-
798
- var ctx = object, expr = match[3],
799
- pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
800
-
801
- match = pattern.exec(expr);
802
- if (match == null) return before;
803
-
804
- while (match != null) {
805
- var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
806
- ctx = ctx[comp];
807
- if (null == ctx || '' == match[3]) break;
808
- expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
809
- match = pattern.exec(expr);
810
- }
811
-
812
- return before + String.interpret(ctx);
813
- });
814
- }
815
- });
816
- Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
817
-
818
- var $break = { };
819
-
820
- var Enumerable = (function() {
821
- function each(iterator, context) {
822
- var index = 0;
823
- try {
824
- this._each(function(value) {
825
- iterator.call(context, value, index++);
826
- });
827
- } catch (e) {
828
- if (e != $break) throw e;
829
- }
830
- return this;
831
- }
832
-
833
- function eachSlice(number, iterator, context) {
834
- var index = -number, slices = [], array = this.toArray();
835
- if (number < 1) return array;
836
- while ((index += number) < array.length)
837
- slices.push(array.slice(index, index+number));
838
- return slices.collect(iterator, context);
839
- }
840
-
841
- function all(iterator, context) {
842
- iterator = iterator || Prototype.K;
843
- var result = true;
844
- this.each(function(value, index) {
845
- result = result && !!iterator.call(context, value, index);
846
- if (!result) throw $break;
847
- });
848
- return result;
849
- }
850
-
851
- function any(iterator, context) {
852
- iterator = iterator || Prototype.K;
853
- var result = false;
854
- this.each(function(value, index) {
855
- if (result = !!iterator.call(context, value, index))
856
- throw $break;
857
- });
858
- return result;
859
- }
860
-
861
- function collect(iterator, context) {
862
- iterator = iterator || Prototype.K;
863
- var results = [];
864
- this.each(function(value, index) {
865
- results.push(iterator.call(context, value, index));
866
- });
867
- return results;
868
- }
869
-
870
- function detect(iterator, context) {
871
- var result;
872
- this.each(function(value, index) {
873
- if (iterator.call(context, value, index)) {
874
- result = value;
875
- throw $break;
876
- }
877
- });
878
- return result;
879
- }
880
-
881
- function findAll(iterator, context) {
882
- var results = [];
883
- this.each(function(value, index) {
884
- if (iterator.call(context, value, index))
885
- results.push(value);
886
- });
887
- return results;
888
- }
889
-
890
- function grep(filter, iterator, context) {
891
- iterator = iterator || Prototype.K;
892
- var results = [];
893
-
894
- if (Object.isString(filter))
895
- filter = new RegExp(RegExp.escape(filter));
896
-
897
- this.each(function(value, index) {
898
- if (filter.match(value))
899
- results.push(iterator.call(context, value, index));
900
- });
901
- return results;
902
- }
903
-
904
- function include(object) {
905
- if (Object.isFunction(this.indexOf))
906
- if (this.indexOf(object) != -1) return true;
907
-
908
- var found = false;
909
- this.each(function(value) {
910
- if (value == object) {
911
- found = true;
912
- throw $break;
913
- }
914
- });
915
- return found;
916
- }
917
-
918
- function inGroupsOf(number, fillWith) {
919
- fillWith = Object.isUndefined(fillWith) ? null : fillWith;
920
- return this.eachSlice(number, function(slice) {
921
- while(slice.length < number) slice.push(fillWith);
922
- return slice;
923
- });
924
- }
925
-
926
- function inject(memo, iterator, context) {
927
- this.each(function(value, index) {
928
- memo = iterator.call(context, memo, value, index);
929
- });
930
- return memo;
931
- }
932
-
933
- function invoke(method) {
934
- var args = $A(arguments).slice(1);
935
- return this.map(function(value) {
936
- return value[method].apply(value, args);
937
- });
938
- }
939
-
940
- function max(iterator, context) {
941
- iterator = iterator || Prototype.K;
942
- var result;
943
- this.each(function(value, index) {
944
- value = iterator.call(context, value, index);
945
- if (result == null || value >= result)
946
- result = value;
947
- });
948
- return result;
949
- }
950
-
951
- function min(iterator, context) {
952
- iterator = iterator || Prototype.K;
953
- var result;
954
- this.each(function(value, index) {
955
- value = iterator.call(context, value, index);
956
- if (result == null || value < result)
957
- result = value;
958
- });
959
- return result;
960
- }
961
-
962
- function partition(iterator, context) {
963
- iterator = iterator || Prototype.K;
964
- var trues = [], falses = [];
965
- this.each(function(value, index) {
966
- (iterator.call(context, value, index) ?
967
- trues : falses).push(value);
968
- });
969
- return [trues, falses];
970
- }
971
-
972
- function pluck(property) {
973
- var results = [];
974
- this.each(function(value) {
975
- results.push(value[property]);
976
- });
977
- return results;
978
- }
979
-
980
- function reject(iterator, context) {
981
- var results = [];
982
- this.each(function(value, index) {
983
- if (!iterator.call(context, value, index))
984
- results.push(value);
985
- });
986
- return results;
987
- }
988
-
989
- function sortBy(iterator, context) {
990
- return this.map(function(value, index) {
991
- return {
992
- value: value,
993
- criteria: iterator.call(context, value, index)
994
- };
995
- }).sort(function(left, right) {
996
- var a = left.criteria, b = right.criteria;
997
- return a < b ? -1 : a > b ? 1 : 0;
998
- }).pluck('value');
999
- }
1000
-
1001
- function toArray() {
1002
- return this.map();
1003
- }
1004
-
1005
- function zip() {
1006
- var iterator = Prototype.K, args = $A(arguments);
1007
- if (Object.isFunction(args.last()))
1008
- iterator = args.pop();
1009
-
1010
- var collections = [this].concat(args).map($A);
1011
- return this.map(function(value, index) {
1012
- return iterator(collections.pluck(index));
1013
- });
1014
- }
1015
-
1016
- function size() {
1017
- return this.toArray().length;
1018
- }
1019
-
1020
- function inspect() {
1021
- return '#<Enumerable:' + this.toArray().inspect() + '>';
1022
- }
1023
-
1024
-
1025
-
1026
-
1027
-
1028
-
1029
-
1030
-
1031
-
1032
- return {
1033
- each: each,
1034
- eachSlice: eachSlice,
1035
- all: all,
1036
- every: all,
1037
- any: any,
1038
- some: any,
1039
- collect: collect,
1040
- map: collect,
1041
- detect: detect,
1042
- findAll: findAll,
1043
- select: findAll,
1044
- filter: findAll,
1045
- grep: grep,
1046
- include: include,
1047
- member: include,
1048
- inGroupsOf: inGroupsOf,
1049
- inject: inject,
1050
- invoke: invoke,
1051
- max: max,
1052
- min: min,
1053
- partition: partition,
1054
- pluck: pluck,
1055
- reject: reject,
1056
- sortBy: sortBy,
1057
- toArray: toArray,
1058
- entries: toArray,
1059
- zip: zip,
1060
- size: size,
1061
- inspect: inspect,
1062
- find: detect
1063
- };
1064
- })();
1065
-
1066
- function $A(iterable) {
1067
- if (!iterable) return [];
1068
- if ('toArray' in Object(iterable)) return iterable.toArray();
1069
- var length = iterable.length || 0, results = new Array(length);
1070
- while (length--) results[length] = iterable[length];
1071
- return results;
1072
- }
1073
-
1074
-
1075
- function $w(string) {
1076
- if (!Object.isString(string)) return [];
1077
- string = string.strip();
1078
- return string ? string.split(/\s+/) : [];
1079
- }
1080
-
1081
- Array.from = $A;
1082
-
1083
-
1084
- (function() {
1085
- var arrayProto = Array.prototype,
1086
- slice = arrayProto.slice,
1087
- _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
1088
-
1089
- function each(iterator, context) {
1090
- for (var i = 0, length = this.length >>> 0; i < length; i++) {
1091
- if (i in this) iterator.call(context, this[i], i, this);
1092
- }
1093
- }
1094
- if (!_each) _each = each;
1095
-
1096
- function clear() {
1097
- this.length = 0;
1098
- return this;
1099
- }
1100
-
1101
- function first() {
1102
- return this[0];
1103
- }
1104
-
1105
- function last() {
1106
- return this[this.length - 1];
1107
- }
1108
-
1109
- function compact() {
1110
- return this.select(function(value) {
1111
- return value != null;
1112
- });
1113
- }
1114
-
1115
- function flatten() {
1116
- return this.inject([], function(array, value) {
1117
- if (Object.isArray(value))
1118
- return array.concat(value.flatten());
1119
- array.push(value);
1120
- return array;
1121
- });
1122
- }
1123
-
1124
- function without() {
1125
- var values = slice.call(arguments, 0);
1126
- return this.select(function(value) {
1127
- return !values.include(value);
1128
- });
1129
- }
1130
-
1131
- function reverse(inline) {
1132
- return (inline === false ? this.toArray() : this)._reverse();
1133
- }
1134
-
1135
- function uniq(sorted) {
1136
- return this.inject([], function(array, value, index) {
1137
- if (0 == index || (sorted ? array.last() != value : !array.include(value)))
1138
- array.push(value);
1139
- return array;
1140
- });
1141
- }
1142
-
1143
- function intersect(array) {
1144
- return this.uniq().findAll(function(item) {
1145
- return array.detect(function(value) { return item === value });
1146
- });
1147
- }
1148
-
1149
-
1150
- function clone() {
1151
- return slice.call(this, 0);
1152
- }
1153
-
1154
- function size() {
1155
- return this.length;
1156
- }
1157
-
1158
- function inspect() {
1159
- return '[' + this.map(Object.inspect).join(', ') + ']';
1160
- }
1161
-
1162
- function indexOf(item, i) {
1163
- i || (i = 0);
1164
- var length = this.length;
1165
- if (i < 0) i = length + i;
1166
- for (; i < length; i++)
1167
- if (this[i] === item) return i;
1168
- return -1;
1169
- }
1170
-
1171
- function lastIndexOf(item, i) {
1172
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
1173
- var n = this.slice(0, i).reverse().indexOf(item);
1174
- return (n < 0) ? n : i - n - 1;
1175
- }
1176
-
1177
- function concat() {
1178
- var array = slice.call(this, 0), item;
1179
- for (var i = 0, length = arguments.length; i < length; i++) {
1180
- item = arguments[i];
1181
- if (Object.isArray(item) && !('callee' in item)) {
1182
- for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
1183
- array.push(item[j]);
1184
- } else {
1185
- array.push(item);
1186
- }
1187
- }
1188
- return array;
1189
- }
1190
-
1191
- Object.extend(arrayProto, Enumerable);
1192
-
1193
- if (!arrayProto._reverse)
1194
- arrayProto._reverse = arrayProto.reverse;
1195
-
1196
- Object.extend(arrayProto, {
1197
- _each: _each,
1198
- clear: clear,
1199
- first: first,
1200
- last: last,
1201
- compact: compact,
1202
- flatten: flatten,
1203
- without: without,
1204
- reverse: reverse,
1205
- uniq: uniq,
1206
- intersect: intersect,
1207
- clone: clone,
1208
- toArray: clone,
1209
- size: size,
1210
- inspect: inspect
1211
- });
1212
-
1213
- var CONCAT_ARGUMENTS_BUGGY = (function() {
1214
- return [].concat(arguments)[0][0] !== 1;
1215
- })(1,2)
1216
-
1217
- if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
1218
-
1219
- if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
1220
- if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
1221
- })();
1222
- function $H(object) {
1223
- return new Hash(object);
1224
- };
1225
-
1226
- var Hash = Class.create(Enumerable, (function() {
1227
- function initialize(object) {
1228
- this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
1229
- }
1230
-
1231
-
1232
- function _each(iterator) {
1233
- for (var key in this._object) {
1234
- var value = this._object[key], pair = [key, value];
1235
- pair.key = key;
1236
- pair.value = value;
1237
- iterator(pair);
1238
- }
1239
- }
1240
-
1241
- function set(key, value) {
1242
- return this._object[key] = value;
1243
- }
1244
-
1245
- function get(key) {
1246
- if (this._object[key] !== Object.prototype[key])
1247
- return this._object[key];
1248
- }
1249
-
1250
- function unset(key) {
1251
- var value = this._object[key];
1252
- delete this._object[key];
1253
- return value;
1254
- }
1255
-
1256
- function toObject() {
1257
- return Object.clone(this._object);
1258
- }
1259
-
1260
-
1261
-
1262
- function keys() {
1263
- return this.pluck('key');
1264
- }
1265
-
1266
- function values() {
1267
- return this.pluck('value');
1268
- }
1269
-
1270
- function index(value) {
1271
- var match = this.detect(function(pair) {
1272
- return pair.value === value;
1273
- });
1274
- return match && match.key;
1275
- }
1276
-
1277
- function merge(object) {
1278
- return this.clone().update(object);
1279
- }
1280
-
1281
- function update(object) {
1282
- return new Hash(object).inject(this, function(result, pair) {
1283
- result.set(pair.key, pair.value);
1284
- return result;
1285
- });
1286
- }
1287
-
1288
- function toQueryPair(key, value) {
1289
- if (Object.isUndefined(value)) return key;
1290
- return key + '=' + encodeURIComponent(String.interpret(value));
1291
- }
1292
-
1293
- function toQueryString() {
1294
- return this.inject([], function(results, pair) {
1295
- var key = encodeURIComponent(pair.key), values = pair.value;
1296
-
1297
- if (values && typeof values == 'object') {
1298
- if (Object.isArray(values)) {
1299
- var queryValues = [];
1300
- for (var i = 0, len = values.length, value; i < len; i++) {
1301
- value = values[i];
1302
- queryValues.push(toQueryPair(key, value));
1303
- }
1304
- return results.concat(queryValues);
1305
- }
1306
- } else results.push(toQueryPair(key, values));
1307
- return results;
1308
- }).join('&');
1309
- }
1310
-
1311
- function inspect() {
1312
- return '#<Hash:{' + this.map(function(pair) {
1313
- return pair.map(Object.inspect).join(': ');
1314
- }).join(', ') + '}>';
1315
- }
1316
-
1317
- function clone() {
1318
- return new Hash(this);
1319
- }
1320
-
1321
- return {
1322
- initialize: initialize,
1323
- _each: _each,
1324
- set: set,
1325
- get: get,
1326
- unset: unset,
1327
- toObject: toObject,
1328
- toTemplateReplacements: toObject,
1329
- keys: keys,
1330
- values: values,
1331
- index: index,
1332
- merge: merge,
1333
- update: update,
1334
- toQueryString: toQueryString,
1335
- inspect: inspect,
1336
- toJSON: toObject,
1337
- clone: clone
1338
- };
1339
- })());
1340
-
1341
- Hash.from = $H;
1342
- Object.extend(Number.prototype, (function() {
1343
- function toColorPart() {
1344
- return this.toPaddedString(2, 16);
1345
- }
1346
-
1347
- function succ() {
1348
- return this + 1;
1349
- }
1350
-
1351
- function times(iterator, context) {
1352
- $R(0, this, true).each(iterator, context);
1353
- return this;
1354
- }
1355
-
1356
- function toPaddedString(length, radix) {
1357
- var string = this.toString(radix || 10);
1358
- return '0'.times(length - string.length) + string;
1359
- }
1360
-
1361
- function abs() {
1362
- return Math.abs(this);
1363
- }
1364
-
1365
- function round() {
1366
- return Math.round(this);
1367
- }
1368
-
1369
- function ceil() {
1370
- return Math.ceil(this);
1371
- }
1372
-
1373
- function floor() {
1374
- return Math.floor(this);
1375
- }
1376
-
1377
- return {
1378
- toColorPart: toColorPart,
1379
- succ: succ,
1380
- times: times,
1381
- toPaddedString: toPaddedString,
1382
- abs: abs,
1383
- round: round,
1384
- ceil: ceil,
1385
- floor: floor
1386
- };
1387
- })());
1388
-
1389
- function $R(start, end, exclusive) {
1390
- return new ObjectRange(start, end, exclusive);
1391
- }
1392
-
1393
- var ObjectRange = Class.create(Enumerable, (function() {
1394
- function initialize(start, end, exclusive) {
1395
- this.start = start;
1396
- this.end = end;
1397
- this.exclusive = exclusive;
1398
- }
1399
-
1400
- function _each(iterator) {
1401
- var value = this.start;
1402
- while (this.include(value)) {
1403
- iterator(value);
1404
- value = value.succ();
1405
- }
1406
- }
1407
-
1408
- function include(value) {
1409
- if (value < this.start)
1410
- return false;
1411
- if (this.exclusive)
1412
- return value < this.end;
1413
- return value <= this.end;
1414
- }
1415
-
1416
- return {
1417
- initialize: initialize,
1418
- _each: _each,
1419
- include: include
1420
- };
1421
- })());
1422
-
1423
-
1424
-
1425
- var Ajax = {
1426
- getTransport: function() {
1427
- return Try.these(
1428
- function() {return new XMLHttpRequest()},
1429
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
1430
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
1431
- ) || false;
1432
- },
1433
-
1434
- activeRequestCount: 0
1435
- };
1436
-
1437
- Ajax.Responders = {
1438
- responders: [],
1439
-
1440
- _each: function(iterator) {
1441
- this.responders._each(iterator);
1442
- },
1443
-
1444
- register: function(responder) {
1445
- if (!this.include(responder))
1446
- this.responders.push(responder);
1447
- },
1448
-
1449
- unregister: function(responder) {
1450
- this.responders = this.responders.without(responder);
1451
- },
1452
-
1453
- dispatch: function(callback, request, transport, json) {
1454
- this.each(function(responder) {
1455
- if (Object.isFunction(responder[callback])) {
1456
- try {
1457
- responder[callback].apply(responder, [request, transport, json]);
1458
- } catch (e) { }
1459
- }
1460
- });
1461
- }
1462
- };
1463
-
1464
- Object.extend(Ajax.Responders, Enumerable);
1465
-
1466
- Ajax.Responders.register({
1467
- onCreate: function() { Ajax.activeRequestCount++ },
1468
- onComplete: function() { Ajax.activeRequestCount-- }
1469
- });
1470
- Ajax.Base = Class.create({
1471
- initialize: function(options) {
1472
- this.options = {
1473
- method: 'post',
1474
- asynchronous: true,
1475
- contentType: 'application/x-www-form-urlencoded',
1476
- encoding: 'UTF-8',
1477
- parameters: '',
1478
- evalJSON: true,
1479
- evalJS: true
1480
- };
1481
- Object.extend(this.options, options || { });
1482
-
1483
- this.options.method = this.options.method.toLowerCase();
1484
-
1485
- if (Object.isHash(this.options.parameters))
1486
- this.options.parameters = this.options.parameters.toObject();
1487
- }
1488
- });
1489
- Ajax.Request = Class.create(Ajax.Base, {
1490
- _complete: false,
1491
-
1492
- initialize: function($super, url, options) {
1493
- $super(options);
1494
- this.transport = Ajax.getTransport();
1495
- this.request(url);
1496
- },
1497
-
1498
- request: function(url) {
1499
- this.url = url;
1500
- this.method = this.options.method;
1501
- var params = Object.isString(this.options.parameters) ?
1502
- this.options.parameters :
1503
- Object.toQueryString(this.options.parameters);
1504
-
1505
- if (!['get', 'post'].include(this.method)) {
1506
- params += (params ? '&' : '') + "_method=" + this.method;
1507
- this.method = 'post';
1508
- }
1509
-
1510
- if (params && this.method === 'get') {
1511
- this.url += (this.url.include('?') ? '&' : '?') + params;
1512
- }
1513
-
1514
- this.parameters = params.toQueryParams();
1515
-
1516
- try {
1517
- var response = new Ajax.Response(this);
1518
- if (this.options.onCreate) this.options.onCreate(response);
1519
- Ajax.Responders.dispatch('onCreate', this, response);
1520
-
1521
- this.transport.open(this.method.toUpperCase(), this.url,
1522
- this.options.asynchronous);
1523
-
1524
- if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
1525
-
1526
- this.transport.onreadystatechange = this.onStateChange.bind(this);
1527
- this.setRequestHeaders();
1528
-
1529
- this.body = this.method == 'post' ? (this.options.postBody || params) : null;
1530
- this.transport.send(this.body);
1531
-
1532
- /* Force Firefox to handle ready state 4 for synchronous requests */
1533
- if (!this.options.asynchronous && this.transport.overrideMimeType)
1534
- this.onStateChange();
1535
-
1536
- }
1537
- catch (e) {
1538
- this.dispatchException(e);
1539
- }
1540
- },
1541
-
1542
- onStateChange: function() {
1543
- var readyState = this.transport.readyState;
1544
- if (readyState > 1 && !((readyState == 4) && this._complete))
1545
- this.respondToReadyState(this.transport.readyState);
1546
- },
1547
-
1548
- setRequestHeaders: function() {
1549
- var headers = {
1550
- 'X-Requested-With': 'XMLHttpRequest',
1551
- 'X-Prototype-Version': Prototype.Version,
1552
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
1553
- };
1554
-
1555
- if (this.method == 'post') {
1556
- headers['Content-type'] = this.options.contentType +
1557
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
1558
-
1559
- /* Force "Connection: close" for older Mozilla browsers to work
1560
- * around a bug where XMLHttpRequest sends an incorrect
1561
- * Content-length header. See Mozilla Bugzilla #246651.
1562
- */
1563
- if (this.transport.overrideMimeType &&
1564
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
1565
- headers['Connection'] = 'close';
1566
- }
1567
-
1568
- if (typeof this.options.requestHeaders == 'object') {
1569
- var extras = this.options.requestHeaders;
1570
-
1571
- if (Object.isFunction(extras.push))
1572
- for (var i = 0, length = extras.length; i < length; i += 2)
1573
- headers[extras[i]] = extras[i+1];
1574
- else
1575
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
1576
- }
1577
-
1578
- for (var name in headers)
1579
- this.transport.setRequestHeader(name, headers[name]);
1580
- },
1581
-
1582
- success: function() {
1583
- var status = this.getStatus();
1584
- return !status || (status >= 200 && status < 300) || status == 304;
1585
- },
1586
-
1587
- getStatus: function() {
1588
- try {
1589
- if (this.transport.status === 1223) return 204;
1590
- return this.transport.status || 0;
1591
- } catch (e) { return 0 }
1592
- },
1593
-
1594
- respondToReadyState: function(readyState) {
1595
- var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
1596
-
1597
- if (state == 'Complete') {
1598
- try {
1599
- this._complete = true;
1600
- (this.options['on' + response.status]
1601
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
1602
- || Prototype.emptyFunction)(response, response.headerJSON);
1603
- } catch (e) {
1604
- this.dispatchException(e);
1605
- }
1606
-
1607
- var contentType = response.getHeader('Content-type');
1608
- if (this.options.evalJS == 'force'
1609
- || (this.options.evalJS && this.isSameOrigin() && contentType
1610
- && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
1611
- this.evalResponse();
1612
- }
1613
-
1614
- try {
1615
- (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
1616
- Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
1617
- } catch (e) {
1618
- this.dispatchException(e);
1619
- }
1620
-
1621
- if (state == 'Complete') {
1622
- this.transport.onreadystatechange = Prototype.emptyFunction;
1623
- }
1624
- },
1625
-
1626
- isSameOrigin: function() {
1627
- var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
1628
- return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
1629
- protocol: location.protocol,
1630
- domain: document.domain,
1631
- port: location.port ? ':' + location.port : ''
1632
- }));
1633
- },
1634
-
1635
- getHeader: function(name) {
1636
- try {
1637
- return this.transport.getResponseHeader(name) || null;
1638
- } catch (e) { return null; }
1639
- },
1640
-
1641
- evalResponse: function() {
1642
- try {
1643
- return eval((this.transport.responseText || '').unfilterJSON());
1644
- } catch (e) {
1645
- this.dispatchException(e);
1646
- }
1647
- },
1648
-
1649
- dispatchException: function(exception) {
1650
- (this.options.onException || Prototype.emptyFunction)(this, exception);
1651
- Ajax.Responders.dispatch('onException', this, exception);
1652
- }
1653
- });
1654
-
1655
- Ajax.Request.Events =
1656
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
1657
-
1658
-
1659
-
1660
-
1661
-
1662
-
1663
-
1664
-
1665
- Ajax.Response = Class.create({
1666
- initialize: function(request){
1667
- this.request = request;
1668
- var transport = this.transport = request.transport,
1669
- readyState = this.readyState = transport.readyState;
1670
-
1671
- if ((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
1672
- this.status = this.getStatus();
1673
- this.statusText = this.getStatusText();
1674
- this.responseText = String.interpret(transport.responseText);
1675
- this.headerJSON = this._getHeaderJSON();
1676
- }
1677
-
1678
- if (readyState == 4) {
1679
- var xml = transport.responseXML;
1680
- this.responseXML = Object.isUndefined(xml) ? null : xml;
1681
- this.responseJSON = this._getResponseJSON();
1682
- }
1683
- },
1684
-
1685
- status: 0,
1686
-
1687
- statusText: '',
1688
-
1689
- getStatus: Ajax.Request.prototype.getStatus,
1690
-
1691
- getStatusText: function() {
1692
- try {
1693
- return this.transport.statusText || '';
1694
- } catch (e) { return '' }
1695
- },
1696
-
1697
- getHeader: Ajax.Request.prototype.getHeader,
1698
-
1699
- getAllHeaders: function() {
1700
- try {
1701
- return this.getAllResponseHeaders();
1702
- } catch (e) { return null }
1703
- },
1704
-
1705
- getResponseHeader: function(name) {
1706
- return this.transport.getResponseHeader(name);
1707
- },
1708
-
1709
- getAllResponseHeaders: function() {
1710
- return this.transport.getAllResponseHeaders();
1711
- },
1712
-
1713
- _getHeaderJSON: function() {
1714
- var json = this.getHeader('X-JSON');
1715
- if (!json) return null;
1716
- json = decodeURIComponent(escape(json));
1717
- try {
1718
- return json.evalJSON(this.request.options.sanitizeJSON ||
1719
- !this.request.isSameOrigin());
1720
- } catch (e) {
1721
- this.request.dispatchException(e);
1722
- }
1723
- },
1724
-
1725
- _getResponseJSON: function() {
1726
- var options = this.request.options;
1727
- if (!options.evalJSON || (options.evalJSON != 'force' &&
1728
- !(this.getHeader('Content-type') || '').include('application/json')) ||
1729
- this.responseText.blank())
1730
- return null;
1731
- try {
1732
- return this.responseText.evalJSON(options.sanitizeJSON ||
1733
- !this.request.isSameOrigin());
1734
- } catch (e) {
1735
- this.request.dispatchException(e);
1736
- }
1737
- }
1738
- });
1739
-
1740
- Ajax.Updater = Class.create(Ajax.Request, {
1741
- initialize: function($super, container, url, options) {
1742
- this.container = {
1743
- success: (container.success || container),
1744
- failure: (container.failure || (container.success ? null : container))
1745
- };
1746
-
1747
- options = Object.clone(options);
1748
- var onComplete = options.onComplete;
1749
- options.onComplete = (function(response, json) {
1750
- this.updateContent(response.responseText);
1751
- if (Object.isFunction(onComplete)) onComplete(response, json);
1752
- }).bind(this);
1753
-
1754
- $super(url, options);
1755
- },
1756
-
1757
- updateContent: function(responseText) {
1758
- var receiver = this.container[this.success() ? 'success' : 'failure'],
1759
- options = this.options;
1760
-
1761
- if (!options.evalScripts) responseText = responseText.stripScripts();
1762
-
1763
- if (receiver = $(receiver)) {
1764
- if (options.insertion) {
1765
- if (Object.isString(options.insertion)) {
1766
- var insertion = { }; insertion[options.insertion] = responseText;
1767
- receiver.insert(insertion);
1768
- }
1769
- else options.insertion(receiver, responseText);
1770
- }
1771
- else receiver.update(responseText);
1772
- }
1773
- }
1774
- });
1775
-
1776
- Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
1777
- initialize: function($super, container, url, options) {
1778
- $super(options);
1779
- this.onComplete = this.options.onComplete;
1780
-
1781
- this.frequency = (this.options.frequency || 2);
1782
- this.decay = (this.options.decay || 1);
1783
-
1784
- this.updater = { };
1785
- this.container = container;
1786
- this.url = url;
1787
-
1788
- this.start();
1789
- },
1790
-
1791
- start: function() {
1792
- this.options.onComplete = this.updateComplete.bind(this);
1793
- this.onTimerEvent();
1794
- },
1795
-
1796
- stop: function() {
1797
- this.updater.options.onComplete = undefined;
1798
- clearTimeout(this.timer);
1799
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
1800
- },
1801
-
1802
- updateComplete: function(response) {
1803
- if (this.options.decay) {
1804
- this.decay = (response.responseText == this.lastText ?
1805
- this.decay * this.options.decay : 1);
1806
-
1807
- this.lastText = response.responseText;
1808
- }
1809
- this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
1810
- },
1811
-
1812
- onTimerEvent: function() {
1813
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
1814
- }
1815
- });
1816
-
1817
-
1818
- function $(element) {
1819
- if (arguments.length > 1) {
1820
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
1821
- elements.push($(arguments[i]));
1822
- return elements;
1823
- }
1824
- if (Object.isString(element))
1825
- element = document.getElementById(element);
1826
- return Element.extend(element);
1827
- }
1828
-
1829
- if (Prototype.BrowserFeatures.XPath) {
1830
- document._getElementsByXPath = function(expression, parentElement) {
1831
- var results = [];
1832
- var query = document.evaluate(expression, $(parentElement) || document,
1833
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
1834
- for (var i = 0, length = query.snapshotLength; i < length; i++)
1835
- results.push(Element.extend(query.snapshotItem(i)));
1836
- return results;
1837
- };
1838
- }
1839
-
1840
- /*--------------------------------------------------------------------------*/
1841
-
1842
- if (!Node) var Node = { };
1843
-
1844
- if (!Node.ELEMENT_NODE) {
1845
- Object.extend(Node, {
1846
- ELEMENT_NODE: 1,
1847
- ATTRIBUTE_NODE: 2,
1848
- TEXT_NODE: 3,
1849
- CDATA_SECTION_NODE: 4,
1850
- ENTITY_REFERENCE_NODE: 5,
1851
- ENTITY_NODE: 6,
1852
- PROCESSING_INSTRUCTION_NODE: 7,
1853
- COMMENT_NODE: 8,
1854
- DOCUMENT_NODE: 9,
1855
- DOCUMENT_TYPE_NODE: 10,
1856
- DOCUMENT_FRAGMENT_NODE: 11,
1857
- NOTATION_NODE: 12
1858
- });
1859
- }
1860
-
1861
-
1862
-
1863
- (function(global) {
1864
- function shouldUseCache(tagName, attributes) {
1865
- if (tagName === 'select') return false;
1866
- if ('type' in attributes) return false;
1867
- return true;
1868
- }
1869
-
1870
- var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){
1871
- try {
1872
- var el = document.createElement('<input name="x">');
1873
- return el.tagName.toLowerCase() === 'input' && el.name === 'x';
1874
- }
1875
- catch(err) {
1876
- return false;
1877
- }
1878
- })();
1879
-
1880
- var element = global.Element;
1881
-
1882
- global.Element = function(tagName, attributes) {
1883
- attributes = attributes || { };
1884
- tagName = tagName.toLowerCase();
1885
- var cache = Element.cache;
1886
-
1887
- if (HAS_EXTENDED_CREATE_ELEMENT_SYNTAX && attributes.name) {
1888
- tagName = '<' + tagName + ' name="' + attributes.name + '">';
1889
- delete attributes.name;
1890
- return Element.writeAttribute(document.createElement(tagName), attributes);
1891
- }
1892
-
1893
- if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
1894
-
1895
- var node = shouldUseCache(tagName, attributes) ?
1896
- cache[tagName].cloneNode(false) : document.createElement(tagName);
1897
-
1898
- return Element.writeAttribute(node, attributes);
1899
- };
1900
-
1901
- Object.extend(global.Element, element || { });
1902
- if (element) global.Element.prototype = element.prototype;
1903
-
1904
- })(this);
1905
-
1906
- Element.idCounter = 1;
1907
- Element.cache = { };
1908
-
1909
- Element._purgeElement = function(element) {
1910
- var uid = element._prototypeUID;
1911
- if (uid) {
1912
- Element.stopObserving(element);
1913
- element._prototypeUID = void 0;
1914
- delete Element.Storage[uid];
1915
- }
1916
- }
1917
-
1918
- Element.Methods = {
1919
- visible: function(element) {
1920
- return $(element).style.display != 'none';
1921
- },
1922
-
1923
- toggle: function(element) {
1924
- element = $(element);
1925
- Element[Element.visible(element) ? 'hide' : 'show'](element);
1926
- return element;
1927
- },
1928
-
1929
- hide: function(element) {
1930
- element = $(element);
1931
- element.style.display = 'none';
1932
- return element;
1933
- },
1934
-
1935
- show: function(element) {
1936
- element = $(element);
1937
- element.style.display = '';
1938
- return element;
1939
- },
1940
-
1941
- remove: function(element) {
1942
- element = $(element);
1943
- element.parentNode.removeChild(element);
1944
- return element;
1945
- },
1946
-
1947
- update: (function(){
1948
-
1949
- var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
1950
- var el = document.createElement("select"),
1951
- isBuggy = true;
1952
- el.innerHTML = "<option value=\"test\">test</option>";
1953
- if (el.options && el.options[0]) {
1954
- isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
1955
- }
1956
- el = null;
1957
- return isBuggy;
1958
- })();
1959
-
1960
- var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
1961
- try {
1962
- var el = document.createElement("table");
1963
- if (el && el.tBodies) {
1964
- el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
1965
- var isBuggy = typeof el.tBodies[0] == "undefined";
1966
- el = null;
1967
- return isBuggy;
1968
- }
1969
- } catch (e) {
1970
- return true;
1971
- }
1972
- })();
1973
-
1974
- var LINK_ELEMENT_INNERHTML_BUGGY = (function() {
1975
- try {
1976
- var el = document.createElement('div');
1977
- el.innerHTML = "<link>";
1978
- var isBuggy = (el.childNodes.length === 0);
1979
- el = null;
1980
- return isBuggy;
1981
- } catch(e) {
1982
- return true;
1983
- }
1984
- })();
1985
-
1986
- var ANY_INNERHTML_BUGGY = SELECT_ELEMENT_INNERHTML_BUGGY ||
1987
- TABLE_ELEMENT_INNERHTML_BUGGY || LINK_ELEMENT_INNERHTML_BUGGY;
1988
-
1989
- var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
1990
- var s = document.createElement("script"),
1991
- isBuggy = false;
1992
- try {
1993
- s.appendChild(document.createTextNode(""));
1994
- isBuggy = !s.firstChild ||
1995
- s.firstChild && s.firstChild.nodeType !== 3;
1996
- } catch (e) {
1997
- isBuggy = true;
1998
- }
1999
- s = null;
2000
- return isBuggy;
2001
- })();
2002
-
2003
-
2004
- function update(element, content) {
2005
- element = $(element);
2006
- var purgeElement = Element._purgeElement;
2007
-
2008
- var descendants = element.getElementsByTagName('*'),
2009
- i = descendants.length;
2010
- while (i--) purgeElement(descendants[i]);
2011
-
2012
- if (content && content.toElement)
2013
- content = content.toElement();
2014
-
2015
- if (Object.isElement(content))
2016
- return element.update().insert(content);
2017
-
2018
- content = Object.toHTML(content);
2019
-
2020
- var tagName = element.tagName.toUpperCase();
2021
-
2022
- if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
2023
- element.text = content;
2024
- return element;
2025
- }
2026
-
2027
- if (ANY_INNERHTML_BUGGY) {
2028
- if (tagName in Element._insertionTranslations.tags) {
2029
- while (element.firstChild) {
2030
- element.removeChild(element.firstChild);
2031
- }
2032
- Element._getContentFromAnonymousElement(tagName, content.stripScripts())
2033
- .each(function(node) {
2034
- element.appendChild(node)
2035
- });
2036
- } else if (LINK_ELEMENT_INNERHTML_BUGGY && Object.isString(content) && content.indexOf('<link') > -1) {
2037
- while (element.firstChild) {
2038
- element.removeChild(element.firstChild);
2039
- }
2040
- var nodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts(), true);
2041
- nodes.each(function(node) { element.appendChild(node) });
2042
- }
2043
- else {
2044
- element.innerHTML = content.stripScripts();
2045
- }
2046
- }
2047
- else {
2048
- element.innerHTML = content.stripScripts();
2049
- }
2050
-
2051
- content.evalScripts.bind(content).defer();
2052
- return element;
2053
- }
2054
-
2055
- return update;
2056
- })(),
2057
-
2058
- replace: function(element, content) {
2059
- element = $(element);
2060
- if (content && content.toElement) content = content.toElement();
2061
- else if (!Object.isElement(content)) {
2062
- content = Object.toHTML(content);
2063
- var range = element.ownerDocument.createRange();
2064
- range.selectNode(element);
2065
- content.evalScripts.bind(content).defer();
2066
- content = range.createContextualFragment(content.stripScripts());
2067
- }
2068
- element.parentNode.replaceChild(content, element);
2069
- return element;
2070
- },
2071
-
2072
- insert: function(element, insertions) {
2073
- element = $(element);
2074
-
2075
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
2076
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
2077
- insertions = {bottom:insertions};
2078
-
2079
- var content, insert, tagName, childNodes;
2080
-
2081
- for (var position in insertions) {
2082
- content = insertions[position];
2083
- position = position.toLowerCase();
2084
- insert = Element._insertionTranslations[position];
2085
-
2086
- if (content && content.toElement) content = content.toElement();
2087
- if (Object.isElement(content)) {
2088
- insert(element, content);
2089
- continue;
2090
- }
2091
-
2092
- content = Object.toHTML(content);
2093
-
2094
- tagName = ((position == 'before' || position == 'after')
2095
- ? element.parentNode : element).tagName.toUpperCase();
2096
-
2097
- childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2098
-
2099
- if (position == 'top' || position == 'after') childNodes.reverse();
2100
- childNodes.each(insert.curry(element));
2101
-
2102
- content.evalScripts.bind(content).defer();
2103
- }
2104
-
2105
- return element;
2106
- },
2107
-
2108
- wrap: function(element, wrapper, attributes) {
2109
- element = $(element);
2110
- if (Object.isElement(wrapper))
2111
- $(wrapper).writeAttribute(attributes || { });
2112
- else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
2113
- else wrapper = new Element('div', wrapper);
2114
- if (element.parentNode)
2115
- element.parentNode.replaceChild(wrapper, element);
2116
- wrapper.appendChild(element);
2117
- return wrapper;
2118
- },
2119
-
2120
- inspect: function(element) {
2121
- element = $(element);
2122
- var result = '<' + element.tagName.toLowerCase();
2123
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
2124
- var property = pair.first(),
2125
- attribute = pair.last(),
2126
- value = (element[property] || '').toString();
2127
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
2128
- });
2129
- return result + '>';
2130
- },
2131
-
2132
- recursivelyCollect: function(element, property, maximumLength) {
2133
- element = $(element);
2134
- maximumLength = maximumLength || -1;
2135
- var elements = [];
2136
-
2137
- while (element = element[property]) {
2138
- if (element.nodeType == 1)
2139
- elements.push(Element.extend(element));
2140
- if (elements.length == maximumLength)
2141
- break;
2142
- }
2143
-
2144
- return elements;
2145
- },
2146
-
2147
- ancestors: function(element) {
2148
- return Element.recursivelyCollect(element, 'parentNode');
2149
- },
2150
-
2151
- descendants: function(element) {
2152
- return Element.select(element, "*");
2153
- },
2154
-
2155
- firstDescendant: function(element) {
2156
- element = $(element).firstChild;
2157
- while (element && element.nodeType != 1) element = element.nextSibling;
2158
- return $(element);
2159
- },
2160
-
2161
- immediateDescendants: function(element) {
2162
- var results = [], child = $(element).firstChild;
2163
- while (child) {
2164
- if (child.nodeType === 1) {
2165
- results.push(Element.extend(child));
2166
- }
2167
- child = child.nextSibling;
2168
- }
2169
- return results;
2170
- },
2171
-
2172
- previousSiblings: function(element, maximumLength) {
2173
- return Element.recursivelyCollect(element, 'previousSibling');
2174
- },
2175
-
2176
- nextSiblings: function(element) {
2177
- return Element.recursivelyCollect(element, 'nextSibling');
2178
- },
2179
-
2180
- siblings: function(element) {
2181
- element = $(element);
2182
- return Element.previousSiblings(element).reverse()
2183
- .concat(Element.nextSiblings(element));
2184
- },
2185
-
2186
- match: function(element, selector) {
2187
- element = $(element);
2188
- if (Object.isString(selector))
2189
- return Prototype.Selector.match(element, selector);
2190
- return selector.match(element);
2191
- },
2192
-
2193
- up: function(element, expression, index) {
2194
- element = $(element);
2195
- if (arguments.length == 1) return $(element.parentNode);
2196
- var ancestors = Element.ancestors(element);
2197
- return Object.isNumber(expression) ? ancestors[expression] :
2198
- Prototype.Selector.find(ancestors, expression, index);
2199
- },
2200
-
2201
- down: function(element, expression, index) {
2202
- element = $(element);
2203
- if (arguments.length == 1) return Element.firstDescendant(element);
2204
- return Object.isNumber(expression) ? Element.descendants(element)[expression] :
2205
- Element.select(element, expression)[index || 0];
2206
- },
2207
-
2208
- previous: function(element, expression, index) {
2209
- element = $(element);
2210
- if (Object.isNumber(expression)) index = expression, expression = false;
2211
- if (!Object.isNumber(index)) index = 0;
2212
-
2213
- if (expression) {
2214
- return Prototype.Selector.find(element.previousSiblings(), expression, index);
2215
- } else {
2216
- return element.recursivelyCollect("previousSibling", index + 1)[index];
2217
- }
2218
- },
2219
-
2220
- next: function(element, expression, index) {
2221
- element = $(element);
2222
- if (Object.isNumber(expression)) index = expression, expression = false;
2223
- if (!Object.isNumber(index)) index = 0;
2224
-
2225
- if (expression) {
2226
- return Prototype.Selector.find(element.nextSiblings(), expression, index);
2227
- } else {
2228
- var maximumLength = Object.isNumber(index) ? index + 1 : 1;
2229
- return element.recursivelyCollect("nextSibling", index + 1)[index];
2230
- }
2231
- },
2232
-
2233
-
2234
- select: function(element) {
2235
- element = $(element);
2236
- var expressions = Array.prototype.slice.call(arguments, 1).join(', ');
2237
- return Prototype.Selector.select(expressions, element);
2238
- },
2239
-
2240
- adjacent: function(element) {
2241
- element = $(element);
2242
- var expressions = Array.prototype.slice.call(arguments, 1).join(', ');
2243
- return Prototype.Selector.select(expressions, element.parentNode).without(element);
2244
- },
2245
-
2246
- identify: function(element) {
2247
- element = $(element);
2248
- var id = Element.readAttribute(element, 'id');
2249
- if (id) return id;
2250
- do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
2251
- Element.writeAttribute(element, 'id', id);
2252
- return id;
2253
- },
2254
-
2255
- readAttribute: function(element, name) {
2256
- element = $(element);
2257
- if (Prototype.Browser.IE) {
2258
- var t = Element._attributeTranslations.read;
2259
- if (t.values[name]) return t.values[name](element, name);
2260
- if (t.names[name]) name = t.names[name];
2261
- if (name.include(':')) {
2262
- return (!element.attributes || !element.attributes[name]) ? null :
2263
- element.attributes[name].value;
2264
- }
2265
- }
2266
- return element.getAttribute(name);
2267
- },
2268
-
2269
- writeAttribute: function(element, name, value) {
2270
- element = $(element);
2271
- var attributes = { }, t = Element._attributeTranslations.write;
2272
-
2273
- if (typeof name == 'object') attributes = name;
2274
- else attributes[name] = Object.isUndefined(value) ? true : value;
2275
-
2276
- for (var attr in attributes) {
2277
- name = t.names[attr] || attr;
2278
- value = attributes[attr];
2279
- if (t.values[attr]) name = t.values[attr](element, value);
2280
- if (value === false || value === null)
2281
- element.removeAttribute(name);
2282
- else if (value === true)
2283
- element.setAttribute(name, name);
2284
- else element.setAttribute(name, value);
2285
- }
2286
- return element;
2287
- },
2288
-
2289
- getHeight: function(element) {
2290
- return Element.getDimensions(element).height;
2291
- },
2292
-
2293
- getWidth: function(element) {
2294
- return Element.getDimensions(element).width;
2295
- },
2296
-
2297
- classNames: function(element) {
2298
- return new Element.ClassNames(element);
2299
- },
2300
-
2301
- hasClassName: function(element, className) {
2302
- if (!(element = $(element))) return;
2303
- var elementClassName = element.className;
2304
- return (elementClassName.length > 0 && (elementClassName == className ||
2305
- new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
2306
- },
2307
-
2308
- addClassName: function(element, className) {
2309
- if (!(element = $(element))) return;
2310
- if (!Element.hasClassName(element, className))
2311
- element.className += (element.className ? ' ' : '') + className;
2312
- return element;
2313
- },
2314
-
2315
- removeClassName: function(element, className) {
2316
- if (!(element = $(element))) return;
2317
- element.className = element.className.replace(
2318
- new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
2319
- return element;
2320
- },
2321
-
2322
- toggleClassName: function(element, className) {
2323
- if (!(element = $(element))) return;
2324
- return Element[Element.hasClassName(element, className) ?
2325
- 'removeClassName' : 'addClassName'](element, className);
2326
- },
2327
-
2328
- cleanWhitespace: function(element) {
2329
- element = $(element);
2330
- var node = element.firstChild;
2331
- while (node) {
2332
- var nextNode = node.nextSibling;
2333
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
2334
- element.removeChild(node);
2335
- node = nextNode;
2336
- }
2337
- return element;
2338
- },
2339
-
2340
- empty: function(element) {
2341
- return $(element).innerHTML.blank();
2342
- },
2343
-
2344
- descendantOf: function(element, ancestor) {
2345
- element = $(element), ancestor = $(ancestor);
2346
-
2347
- if (element.compareDocumentPosition)
2348
- return (element.compareDocumentPosition(ancestor) & 8) === 8;
2349
-
2350
- if (ancestor.contains)
2351
- return ancestor.contains(element) && ancestor !== element;
2352
-
2353
- while (element = element.parentNode)
2354
- if (element == ancestor) return true;
2355
-
2356
- return false;
2357
- },
2358
-
2359
- scrollTo: function(element) {
2360
- element = $(element);
2361
- var pos = Element.cumulativeOffset(element);
2362
- window.scrollTo(pos[0], pos[1]);
2363
- return element;
2364
- },
2365
-
2366
- getStyle: function(element, style) {
2367
- element = $(element);
2368
- style = style == 'float' ? 'cssFloat' : style.camelize();
2369
- var value = element.style[style];
2370
- if (!value || value == 'auto') {
2371
- var css = document.defaultView.getComputedStyle(element, null);
2372
- value = css ? css[style] : null;
2373
- }
2374
- if (style == 'opacity') return value ? parseFloat(value) : 1.0;
2375
- return value == 'auto' ? null : value;
2376
- },
2377
-
2378
- getOpacity: function(element) {
2379
- return $(element).getStyle('opacity');
2380
- },
2381
-
2382
- setStyle: function(element, styles) {
2383
- element = $(element);
2384
- var elementStyle = element.style, match;
2385
- if (Object.isString(styles)) {
2386
- element.style.cssText += ';' + styles;
2387
- return styles.include('opacity') ?
2388
- element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
2389
- }
2390
- for (var property in styles)
2391
- if (property == 'opacity') element.setOpacity(styles[property]);
2392
- else
2393
- elementStyle[(property == 'float' || property == 'cssFloat') ?
2394
- (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
2395
- property] = styles[property];
2396
-
2397
- return element;
2398
- },
2399
-
2400
- setOpacity: function(element, value) {
2401
- element = $(element);
2402
- element.style.opacity = (value == 1 || value === '') ? '' :
2403
- (value < 0.00001) ? 0 : value;
2404
- return element;
2405
- },
2406
-
2407
- makePositioned: function(element) {
2408
- element = $(element);
2409
- var pos = Element.getStyle(element, 'position');
2410
- if (pos == 'static' || !pos) {
2411
- element._madePositioned = true;
2412
- element.style.position = 'relative';
2413
- if (Prototype.Browser.Opera) {
2414
- element.style.top = 0;
2415
- element.style.left = 0;
2416
- }
2417
- }
2418
- return element;
2419
- },
2420
-
2421
- undoPositioned: function(element) {
2422
- element = $(element);
2423
- if (element._madePositioned) {
2424
- element._madePositioned = undefined;
2425
- element.style.position =
2426
- element.style.top =
2427
- element.style.left =
2428
- element.style.bottom =
2429
- element.style.right = '';
2430
- }
2431
- return element;
2432
- },
2433
-
2434
- makeClipping: function(element) {
2435
- element = $(element);
2436
- if (element._overflow) return element;
2437
- element._overflow = Element.getStyle(element, 'overflow') || 'auto';
2438
- if (element._overflow !== 'hidden')
2439
- element.style.overflow = 'hidden';
2440
- return element;
2441
- },
2442
-
2443
- undoClipping: function(element) {
2444
- element = $(element);
2445
- if (!element._overflow) return element;
2446
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
2447
- element._overflow = null;
2448
- return element;
2449
- },
2450
-
2451
- clonePosition: function(element, source) {
2452
- var options = Object.extend({
2453
- setLeft: true,
2454
- setTop: true,
2455
- setWidth: true,
2456
- setHeight: true,
2457
- offsetTop: 0,
2458
- offsetLeft: 0
2459
- }, arguments[2] || { });
2460
-
2461
- source = $(source);
2462
- var p = Element.viewportOffset(source), delta = [0, 0], parent = null;
2463
-
2464
- element = $(element);
2465
-
2466
- if (Element.getStyle(element, 'position') == 'absolute') {
2467
- parent = Element.getOffsetParent(element);
2468
- delta = Element.viewportOffset(parent);
2469
- }
2470
-
2471
- if (parent == document.body) {
2472
- delta[0] -= document.body.offsetLeft;
2473
- delta[1] -= document.body.offsetTop;
2474
- }
2475
-
2476
- if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
2477
- if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
2478
- if (options.setWidth) element.style.width = source.offsetWidth + 'px';
2479
- if (options.setHeight) element.style.height = source.offsetHeight + 'px';
2480
- return element;
2481
- }
2482
- };
2483
-
2484
- Object.extend(Element.Methods, {
2485
- getElementsBySelector: Element.Methods.select,
2486
-
2487
- childElements: Element.Methods.immediateDescendants
2488
- });
2489
-
2490
- Element._attributeTranslations = {
2491
- write: {
2492
- names: {
2493
- className: 'class',
2494
- htmlFor: 'for'
2495
- },
2496
- values: { }
2497
- }
2498
- };
2499
-
2500
- if (Prototype.Browser.Opera) {
2501
- Element.Methods.getStyle = Element.Methods.getStyle.wrap(
2502
- function(proceed, element, style) {
2503
- switch (style) {
2504
- case 'height': case 'width':
2505
- if (!Element.visible(element)) return null;
2506
-
2507
- var dim = parseInt(proceed(element, style), 10);
2508
-
2509
- if (dim !== element['offset' + style.capitalize()])
2510
- return dim + 'px';
2511
-
2512
- var properties;
2513
- if (style === 'height') {
2514
- properties = ['border-top-width', 'padding-top',
2515
- 'padding-bottom', 'border-bottom-width'];
2516
- }
2517
- else {
2518
- properties = ['border-left-width', 'padding-left',
2519
- 'padding-right', 'border-right-width'];
2520
- }
2521
- return properties.inject(dim, function(memo, property) {
2522
- var val = proceed(element, property);
2523
- return val === null ? memo : memo - parseInt(val, 10);
2524
- }) + 'px';
2525
- default: return proceed(element, style);
2526
- }
2527
- }
2528
- );
2529
-
2530
- Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
2531
- function(proceed, element, attribute) {
2532
- if (attribute === 'title') return element.title;
2533
- return proceed(element, attribute);
2534
- }
2535
- );
2536
- }
2537
-
2538
- else if (Prototype.Browser.IE) {
2539
- Element.Methods.getStyle = function(element, style) {
2540
- element = $(element);
2541
- style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
2542
- var value = element.style[style];
2543
- if (!value && element.currentStyle) value = element.currentStyle[style];
2544
-
2545
- if (style == 'opacity') {
2546
- if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
2547
- if (value[1]) return parseFloat(value[1]) / 100;
2548
- return 1.0;
2549
- }
2550
-
2551
- if (value == 'auto') {
2552
- if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
2553
- return element['offset' + style.capitalize()] + 'px';
2554
- return null;
2555
- }
2556
- return value;
2557
- };
2558
-
2559
- Element.Methods.setOpacity = function(element, value) {
2560
- function stripAlpha(filter){
2561
- return filter.replace(/alpha\([^\)]*\)/gi,'');
2562
- }
2563
- element = $(element);
2564
- var currentStyle = element.currentStyle;
2565
- if ((currentStyle && !currentStyle.hasLayout) ||
2566
- (!currentStyle && element.style.zoom == 'normal'))
2567
- element.style.zoom = 1;
2568
-
2569
- var filter = element.getStyle('filter'), style = element.style;
2570
- if (value == 1 || value === '') {
2571
- (filter = stripAlpha(filter)) ?
2572
- style.filter = filter : style.removeAttribute('filter');
2573
- return element;
2574
- } else if (value < 0.00001) value = 0;
2575
- style.filter = stripAlpha(filter) +
2576
- 'alpha(opacity=' + (value * 100) + ')';
2577
- return element;
2578
- };
2579
-
2580
- Element._attributeTranslations = (function(){
2581
-
2582
- var classProp = 'className',
2583
- forProp = 'for',
2584
- el = document.createElement('div');
2585
-
2586
- el.setAttribute(classProp, 'x');
2587
-
2588
- if (el.className !== 'x') {
2589
- el.setAttribute('class', 'x');
2590
- if (el.className === 'x') {
2591
- classProp = 'class';
2592
- }
2593
- }
2594
- el = null;
2595
-
2596
- el = document.createElement('label');
2597
- el.setAttribute(forProp, 'x');
2598
- if (el.htmlFor !== 'x') {
2599
- el.setAttribute('htmlFor', 'x');
2600
- if (el.htmlFor === 'x') {
2601
- forProp = 'htmlFor';
2602
- }
2603
- }
2604
- el = null;
2605
-
2606
- return {
2607
- read: {
2608
- names: {
2609
- 'class': classProp,
2610
- 'className': classProp,
2611
- 'for': forProp,
2612
- 'htmlFor': forProp
2613
- },
2614
- values: {
2615
- _getAttr: function(element, attribute) {
2616
- return element.getAttribute(attribute);
2617
- },
2618
- _getAttr2: function(element, attribute) {
2619
- return element.getAttribute(attribute, 2);
2620
- },
2621
- _getAttrNode: function(element, attribute) {
2622
- var node = element.getAttributeNode(attribute);
2623
- return node ? node.value : "";
2624
- },
2625
- _getEv: (function(){
2626
-
2627
- var el = document.createElement('div'), f;
2628
- el.onclick = Prototype.emptyFunction;
2629
- var value = el.getAttribute('onclick');
2630
-
2631
- if (String(value).indexOf('{') > -1) {
2632
- f = function(element, attribute) {
2633
- attribute = element.getAttribute(attribute);
2634
- if (!attribute) return null;
2635
- attribute = attribute.toString();
2636
- attribute = attribute.split('{')[1];
2637
- attribute = attribute.split('}')[0];
2638
- return attribute.strip();
2639
- };
2640
- }
2641
- else if (value === '') {
2642
- f = function(element, attribute) {
2643
- attribute = element.getAttribute(attribute);
2644
- if (!attribute) return null;
2645
- return attribute.strip();
2646
- };
2647
- }
2648
- el = null;
2649
- return f;
2650
- })(),
2651
- _flag: function(element, attribute) {
2652
- return $(element).hasAttribute(attribute) ? attribute : null;
2653
- },
2654
- style: function(element) {
2655
- return element.style.cssText.toLowerCase();
2656
- },
2657
- title: function(element) {
2658
- return element.title;
2659
- }
2660
- }
2661
- }
2662
- }
2663
- })();
2664
-
2665
- Element._attributeTranslations.write = {
2666
- names: Object.extend({
2667
- cellpadding: 'cellPadding',
2668
- cellspacing: 'cellSpacing'
2669
- }, Element._attributeTranslations.read.names),
2670
- values: {
2671
- checked: function(element, value) {
2672
- element.checked = !!value;
2673
- },
2674
-
2675
- style: function(element, value) {
2676
- element.style.cssText = value ? value : '';
2677
- }
2678
- }
2679
- };
2680
-
2681
- Element._attributeTranslations.has = {};
2682
-
2683
- $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
2684
- 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
2685
- Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
2686
- Element._attributeTranslations.has[attr.toLowerCase()] = attr;
2687
- });
2688
-
2689
- (function(v) {
2690
- Object.extend(v, {
2691
- href: v._getAttr2,
2692
- src: v._getAttr2,
2693
- type: v._getAttr,
2694
- action: v._getAttrNode,
2695
- disabled: v._flag,
2696
- checked: v._flag,
2697
- readonly: v._flag,
2698
- multiple: v._flag,
2699
- onload: v._getEv,
2700
- onunload: v._getEv,
2701
- onclick: v._getEv,
2702
- ondblclick: v._getEv,
2703
- onmousedown: v._getEv,
2704
- onmouseup: v._getEv,
2705
- onmouseover: v._getEv,
2706
- onmousemove: v._getEv,
2707
- onmouseout: v._getEv,
2708
- onfocus: v._getEv,
2709
- onblur: v._getEv,
2710
- onkeypress: v._getEv,
2711
- onkeydown: v._getEv,
2712
- onkeyup: v._getEv,
2713
- onsubmit: v._getEv,
2714
- onreset: v._getEv,
2715
- onselect: v._getEv,
2716
- onchange: v._getEv
2717
- });
2718
- })(Element._attributeTranslations.read.values);
2719
-
2720
- if (Prototype.BrowserFeatures.ElementExtensions) {
2721
- (function() {
2722
- function _descendants(element) {
2723
- var nodes = element.getElementsByTagName('*'), results = [];
2724
- for (var i = 0, node; node = nodes[i]; i++)
2725
- if (node.tagName !== "!") // Filter out comment nodes.
2726
- results.push(node);
2727
- return results;
2728
- }
2729
-
2730
- Element.Methods.down = function(element, expression, index) {
2731
- element = $(element);
2732
- if (arguments.length == 1) return element.firstDescendant();
2733
- return Object.isNumber(expression) ? _descendants(element)[expression] :
2734
- Element.select(element, expression)[index || 0];
2735
- }
2736
- })();
2737
- }
2738
-
2739
- }
2740
-
2741
- else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
2742
- Element.Methods.setOpacity = function(element, value) {
2743
- element = $(element);
2744
- element.style.opacity = (value == 1) ? 0.999999 :
2745
- (value === '') ? '' : (value < 0.00001) ? 0 : value;
2746
- return element;
2747
- };
2748
- }
2749
-
2750
- else if (Prototype.Browser.WebKit) {
2751
- Element.Methods.setOpacity = function(element, value) {
2752
- element = $(element);
2753
- element.style.opacity = (value == 1 || value === '') ? '' :
2754
- (value < 0.00001) ? 0 : value;
2755
-
2756
- if (value == 1)
2757
- if (element.tagName.toUpperCase() == 'IMG' && element.width) {
2758
- element.width++; element.width--;
2759
- } else try {
2760
- var n = document.createTextNode(' ');
2761
- element.appendChild(n);
2762
- element.removeChild(n);
2763
- } catch (e) { }
2764
-
2765
- return element;
2766
- };
2767
- }
2768
-
2769
- if ('outerHTML' in document.documentElement) {
2770
- Element.Methods.replace = function(element, content) {
2771
- element = $(element);
2772
-
2773
- if (content && content.toElement) content = content.toElement();
2774
- if (Object.isElement(content)) {
2775
- element.parentNode.replaceChild(content, element);
2776
- return element;
2777
- }
2778
-
2779
- content = Object.toHTML(content);
2780
- var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
2781
-
2782
- if (Element._insertionTranslations.tags[tagName]) {
2783
- var nextSibling = element.next(),
2784
- fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2785
- parent.removeChild(element);
2786
- if (nextSibling)
2787
- fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
2788
- else
2789
- fragments.each(function(node) { parent.appendChild(node) });
2790
- }
2791
- else element.outerHTML = content.stripScripts();
2792
-
2793
- content.evalScripts.bind(content).defer();
2794
- return element;
2795
- };
2796
- }
2797
-
2798
- Element._returnOffset = function(l, t) {
2799
- var result = [l, t];
2800
- result.left = l;
2801
- result.top = t;
2802
- return result;
2803
- };
2804
-
2805
- Element._getContentFromAnonymousElement = function(tagName, html, force) {
2806
- var div = new Element('div'),
2807
- t = Element._insertionTranslations.tags[tagName];
2808
-
2809
- var workaround = false;
2810
- if (t) workaround = true;
2811
- else if (force) {
2812
- workaround = true;
2813
- t = ['', '', 0];
2814
- }
2815
-
2816
- if (workaround) {
2817
- div.innerHTML = '&nbsp;' + t[0] + html + t[1];
2818
- div.removeChild(div.firstChild);
2819
- for (var i = t[2]; i--; ) {
2820
- div = div.firstChild;
2821
- }
2822
- }
2823
- else {
2824
- div.innerHTML = html;
2825
- }
2826
- return $A(div.childNodes);
2827
- };
2828
-
2829
- Element._insertionTranslations = {
2830
- before: function(element, node) {
2831
- element.parentNode.insertBefore(node, element);
2832
- },
2833
- top: function(element, node) {
2834
- element.insertBefore(node, element.firstChild);
2835
- },
2836
- bottom: function(element, node) {
2837
- element.appendChild(node);
2838
- },
2839
- after: function(element, node) {
2840
- element.parentNode.insertBefore(node, element.nextSibling);
2841
- },
2842
- tags: {
2843
- TABLE: ['<table>', '</table>', 1],
2844
- TBODY: ['<table><tbody>', '</tbody></table>', 2],
2845
- TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
2846
- TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
2847
- SELECT: ['<select>', '</select>', 1]
2848
- }
2849
- };
2850
-
2851
- (function() {
2852
- var tags = Element._insertionTranslations.tags;
2853
- Object.extend(tags, {
2854
- THEAD: tags.TBODY,
2855
- TFOOT: tags.TBODY,
2856
- TH: tags.TD
2857
- });
2858
- })();
2859
-
2860
- Element.Methods.Simulated = {
2861
- hasAttribute: function(element, attribute) {
2862
- attribute = Element._attributeTranslations.has[attribute] || attribute;
2863
- var node = $(element).getAttributeNode(attribute);
2864
- return !!(node && node.specified);
2865
- }
2866
- };
2867
-
2868
- Element.Methods.ByTag = { };
2869
-
2870
- Object.extend(Element, Element.Methods);
2871
-
2872
- (function(div) {
2873
-
2874
- if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
2875
- window.HTMLElement = { };
2876
- window.HTMLElement.prototype = div['__proto__'];
2877
- Prototype.BrowserFeatures.ElementExtensions = true;
2878
- }
2879
-
2880
- div = null;
2881
-
2882
- })(document.createElement('div'));
2883
-
2884
- Element.extend = (function() {
2885
-
2886
- function checkDeficiency(tagName) {
2887
- if (typeof window.Element != 'undefined') {
2888
- var proto = window.Element.prototype;
2889
- if (proto) {
2890
- var id = '_' + (Math.random()+'').slice(2),
2891
- el = document.createElement(tagName);
2892
- proto[id] = 'x';
2893
- var isBuggy = (el[id] !== 'x');
2894
- delete proto[id];
2895
- el = null;
2896
- return isBuggy;
2897
- }
2898
- }
2899
- return false;
2900
- }
2901
-
2902
- function extendElementWith(element, methods) {
2903
- for (var property in methods) {
2904
- var value = methods[property];
2905
- if (Object.isFunction(value) && !(property in element))
2906
- element[property] = value.methodize();
2907
- }
2908
- }
2909
-
2910
- var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
2911
-
2912
- if (Prototype.BrowserFeatures.SpecificElementExtensions) {
2913
- if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
2914
- return function(element) {
2915
- if (element && typeof element._extendedByPrototype == 'undefined') {
2916
- var t = element.tagName;
2917
- if (t && (/^(?:object|applet|embed)$/i.test(t))) {
2918
- extendElementWith(element, Element.Methods);
2919
- extendElementWith(element, Element.Methods.Simulated);
2920
- extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
2921
- }
2922
- }
2923
- return element;
2924
- }
2925
- }
2926
- return Prototype.K;
2927
- }
2928
-
2929
- var Methods = { }, ByTag = Element.Methods.ByTag;
2930
-
2931
- var extend = Object.extend(function(element) {
2932
- if (!element || typeof element._extendedByPrototype != 'undefined' ||
2933
- element.nodeType != 1 || element == window) return element;
2934
-
2935
- var methods = Object.clone(Methods),
2936
- tagName = element.tagName.toUpperCase();
2937
-
2938
- if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
2939
-
2940
- extendElementWith(element, methods);
2941
-
2942
- element._extendedByPrototype = Prototype.emptyFunction;
2943
- return element;
2944
-
2945
- }, {
2946
- refresh: function() {
2947
- if (!Prototype.BrowserFeatures.ElementExtensions) {
2948
- Object.extend(Methods, Element.Methods);
2949
- Object.extend(Methods, Element.Methods.Simulated);
2950
- }
2951
- }
2952
- });
2953
-
2954
- extend.refresh();
2955
- return extend;
2956
- })();
2957
-
2958
- if (document.documentElement.hasAttribute) {
2959
- Element.hasAttribute = function(element, attribute) {
2960
- return element.hasAttribute(attribute);
2961
- };
2962
- }
2963
- else {
2964
- Element.hasAttribute = Element.Methods.Simulated.hasAttribute;
2965
- }
2966
-
2967
- Element.addMethods = function(methods) {
2968
- var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
2969
-
2970
- if (!methods) {
2971
- Object.extend(Form, Form.Methods);
2972
- Object.extend(Form.Element, Form.Element.Methods);
2973
- Object.extend(Element.Methods.ByTag, {
2974
- "FORM": Object.clone(Form.Methods),
2975
- "INPUT": Object.clone(Form.Element.Methods),
2976
- "SELECT": Object.clone(Form.Element.Methods),
2977
- "TEXTAREA": Object.clone(Form.Element.Methods),
2978
- "BUTTON": Object.clone(Form.Element.Methods)
2979
- });
2980
- }
2981
-
2982
- if (arguments.length == 2) {
2983
- var tagName = methods;
2984
- methods = arguments[1];
2985
- }
2986
-
2987
- if (!tagName) Object.extend(Element.Methods, methods || { });
2988
- else {
2989
- if (Object.isArray(tagName)) tagName.each(extend);
2990
- else extend(tagName);
2991
- }
2992
-
2993
- function extend(tagName) {
2994
- tagName = tagName.toUpperCase();
2995
- if (!Element.Methods.ByTag[tagName])
2996
- Element.Methods.ByTag[tagName] = { };
2997
- Object.extend(Element.Methods.ByTag[tagName], methods);
2998
- }
2999
-
3000
- function copy(methods, destination, onlyIfAbsent) {
3001
- onlyIfAbsent = onlyIfAbsent || false;
3002
- for (var property in methods) {
3003
- var value = methods[property];
3004
- if (!Object.isFunction(value)) continue;
3005
- if (!onlyIfAbsent || !(property in destination))
3006
- destination[property] = value.methodize();
3007
- }
3008
- }
3009
-
3010
- function findDOMClass(tagName) {
3011
- var klass;
3012
- var trans = {
3013
- "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
3014
- "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
3015
- "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
3016
- "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
3017
- "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
3018
- "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
3019
- "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
3020
- "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
3021
- "FrameSet", "IFRAME": "IFrame"
3022
- };
3023
- if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
3024
- if (window[klass]) return window[klass];
3025
- klass = 'HTML' + tagName + 'Element';
3026
- if (window[klass]) return window[klass];
3027
- klass = 'HTML' + tagName.capitalize() + 'Element';
3028
- if (window[klass]) return window[klass];
3029
-
3030
- var element = document.createElement(tagName),
3031
- proto = element['__proto__'] || element.constructor.prototype;
3032
-
3033
- element = null;
3034
- return proto;
3035
- }
3036
-
3037
- var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
3038
- Element.prototype;
3039
-
3040
- if (F.ElementExtensions) {
3041
- copy(Element.Methods, elementPrototype);
3042
- copy(Element.Methods.Simulated, elementPrototype, true);
3043
- }
3044
-
3045
- if (F.SpecificElementExtensions) {
3046
- for (var tag in Element.Methods.ByTag) {
3047
- var klass = findDOMClass(tag);
3048
- if (Object.isUndefined(klass)) continue;
3049
- copy(T[tag], klass.prototype);
3050
- }
3051
- }
3052
-
3053
- Object.extend(Element, Element.Methods);
3054
- delete Element.ByTag;
3055
-
3056
- if (Element.extend.refresh) Element.extend.refresh();
3057
- Element.cache = { };
3058
- };
3059
-
3060
-
3061
- document.viewport = {
3062
-
3063
- getDimensions: function() {
3064
- return { width: this.getWidth(), height: this.getHeight() };
3065
- },
3066
-
3067
- getScrollOffsets: function() {
3068
- return Element._returnOffset(
3069
- window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
3070
- window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
3071
- }
3072
- };
3073
-
3074
- (function(viewport) {
3075
- var B = Prototype.Browser, doc = document, element, property = {};
3076
-
3077
- function getRootElement() {
3078
- if (B.WebKit && !doc.evaluate)
3079
- return document;
3080
-
3081
- if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
3082
- return document.body;
3083
-
3084
- return document.documentElement;
3085
- }
3086
-
3087
- function define(D) {
3088
- if (!element) element = getRootElement();
3089
-
3090
- property[D] = 'client' + D;
3091
-
3092
- viewport['get' + D] = function() { return element[property[D]] };
3093
- return viewport['get' + D]();
3094
- }
3095
-
3096
- viewport.getWidth = define.curry('Width');
3097
-
3098
- viewport.getHeight = define.curry('Height');
3099
- })(document.viewport);
3100
-
3101
-
3102
- Element.Storage = {
3103
- UID: 1
3104
- };
3105
-
3106
- Element.addMethods({
3107
- getStorage: function(element) {
3108
- if (!(element = $(element))) return;
3109
-
3110
- var uid;
3111
- if (element === window) {
3112
- uid = 0;
3113
- } else {
3114
- if (typeof element._prototypeUID === "undefined")
3115
- element._prototypeUID = Element.Storage.UID++;
3116
- uid = element._prototypeUID;
3117
- }
3118
-
3119
- if (!Element.Storage[uid])
3120
- Element.Storage[uid] = $H();
3121
-
3122
- return Element.Storage[uid];
3123
- },
3124
-
3125
- store: function(element, key, value) {
3126
- if (!(element = $(element))) return;
3127
-
3128
- if (arguments.length === 2) {
3129
- Element.getStorage(element).update(key);
3130
- } else {
3131
- Element.getStorage(element).set(key, value);
3132
- }
3133
-
3134
- return element;
3135
- },
3136
-
3137
- retrieve: function(element, key, defaultValue) {
3138
- if (!(element = $(element))) return;
3139
- var hash = Element.getStorage(element), value = hash.get(key);
3140
-
3141
- if (Object.isUndefined(value)) {
3142
- hash.set(key, defaultValue);
3143
- value = defaultValue;
3144
- }
3145
-
3146
- return value;
3147
- },
3148
-
3149
- clone: function(element, deep) {
3150
- if (!(element = $(element))) return;
3151
- var clone = element.cloneNode(deep);
3152
- clone._prototypeUID = void 0;
3153
- if (deep) {
3154
- var descendants = Element.select(clone, '*'),
3155
- i = descendants.length;
3156
- while (i--) {
3157
- descendants[i]._prototypeUID = void 0;
3158
- }
3159
- }
3160
- return Element.extend(clone);
3161
- },
3162
-
3163
- purge: function(element) {
3164
- if (!(element = $(element))) return;
3165
- var purgeElement = Element._purgeElement;
3166
-
3167
- purgeElement(element);
3168
-
3169
- var descendants = element.getElementsByTagName('*'),
3170
- i = descendants.length;
3171
-
3172
- while (i--) purgeElement(descendants[i]);
3173
-
3174
- return null;
3175
- }
3176
- });
3177
-
3178
- (function() {
3179
-
3180
- function toDecimal(pctString) {
3181
- var match = pctString.match(/^(\d+)%?$/i);
3182
- if (!match) return null;
3183
- return (Number(match[1]) / 100);
3184
- }
3185
-
3186
- function getPixelValue(value, property, context) {
3187
- var element = null;
3188
- if (Object.isElement(value)) {
3189
- element = value;
3190
- value = element.getStyle(property);
3191
- }
3192
-
3193
- if (value === null) {
3194
- return null;
3195
- }
3196
-
3197
- if ((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(value)) {
3198
- return window.parseFloat(value);
3199
- }
3200
-
3201
- var isPercentage = value.include('%'), isViewport = (context === document.viewport);
3202
-
3203
- if (/\d/.test(value) && element && element.runtimeStyle && !(isPercentage && isViewport)) {
3204
- var style = element.style.left, rStyle = element.runtimeStyle.left;
3205
- element.runtimeStyle.left = element.currentStyle.left;
3206
- element.style.left = value || 0;
3207
- value = element.style.pixelLeft;
3208
- element.style.left = style;
3209
- element.runtimeStyle.left = rStyle;
3210
-
3211
- return value;
3212
- }
3213
-
3214
- if (element && isPercentage) {
3215
- context = context || element.parentNode;
3216
- var decimal = toDecimal(value);
3217
- var whole = null;
3218
- var position = element.getStyle('position');
3219
-
3220
- var isHorizontal = property.include('left') || property.include('right') ||
3221
- property.include('width');
3222
-
3223
- var isVertical = property.include('top') || property.include('bottom') ||
3224
- property.include('height');
3225
-
3226
- if (context === document.viewport) {
3227
- if (isHorizontal) {
3228
- whole = document.viewport.getWidth();
3229
- } else if (isVertical) {
3230
- whole = document.viewport.getHeight();
3231
- }
3232
- } else {
3233
- if (isHorizontal) {
3234
- whole = $(context).measure('width');
3235
- } else if (isVertical) {
3236
- whole = $(context).measure('height');
3237
- }
3238
- }
3239
-
3240
- return (whole === null) ? 0 : whole * decimal;
3241
- }
3242
-
3243
- return 0;
3244
- }
3245
-
3246
- function toCSSPixels(number) {
3247
- if (Object.isString(number) && number.endsWith('px')) {
3248
- return number;
3249
- }
3250
- return number + 'px';
3251
- }
3252
-
3253
- function isDisplayed(element) {
3254
- var originalElement = element;
3255
- while (element && element.parentNode) {
3256
- var display = element.getStyle('display');
3257
- if (display === 'none') {
3258
- return false;
3259
- }
3260
- element = $(element.parentNode);
3261
- }
3262
- return true;
3263
- }
3264
-
3265
- var hasLayout = Prototype.K;
3266
- if ('currentStyle' in document.documentElement) {
3267
- hasLayout = function(element) {
3268
- if (!element.currentStyle.hasLayout) {
3269
- element.style.zoom = 1;
3270
- }
3271
- return element;
3272
- };
3273
- }
3274
-
3275
- function cssNameFor(key) {
3276
- if (key.include('border')) key = key + '-width';
3277
- return key.camelize();
3278
- }
3279
-
3280
- Element.Layout = Class.create(Hash, {
3281
- initialize: function($super, element, preCompute) {
3282
- $super();
3283
- this.element = $(element);
3284
-
3285
- Element.Layout.PROPERTIES.each( function(property) {
3286
- this._set(property, null);
3287
- }, this);
3288
-
3289
- if (preCompute) {
3290
- this._preComputing = true;
3291
- this._begin();
3292
- Element.Layout.PROPERTIES.each( this._compute, this );
3293
- this._end();
3294
- this._preComputing = false;
3295
- }
3296
- },
3297
-
3298
- _set: function(property, value) {
3299
- return Hash.prototype.set.call(this, property, value);
3300
- },
3301
-
3302
- set: function(property, value) {
3303
- throw "Properties of Element.Layout are read-only.";
3304
- },
3305
-
3306
- get: function($super, property) {
3307
- var value = $super(property);
3308
- return value === null ? this._compute(property) : value;
3309
- },
3310
-
3311
- _begin: function() {
3312
- if (this._prepared) return;
3313
-
3314
- var element = this.element;
3315
- if (isDisplayed(element)) {
3316
- this._prepared = true;
3317
- return;
3318
- }
3319
-
3320
- var originalStyles = {
3321
- position: element.style.position || '',
3322
- width: element.style.width || '',
3323
- visibility: element.style.visibility || '',
3324
- display: element.style.display || ''
3325
- };
3326
-
3327
- element.store('prototype_original_styles', originalStyles);
3328
-
3329
- var position = element.getStyle('position'),
3330
- width = element.getStyle('width');
3331
-
3332
- if (width === "0px" || width === null) {
3333
- element.style.display = 'block';
3334
- width = element.getStyle('width');
3335
- }
3336
-
3337
- var context = (position === 'fixed') ? document.viewport :
3338
- element.parentNode;
3339
-
3340
- element.setStyle({
3341
- position: 'absolute',
3342
- visibility: 'hidden',
3343
- display: 'block'
3344
- });
3345
-
3346
- var positionedWidth = element.getStyle('width');
3347
-
3348
- var newWidth;
3349
- if (width && (positionedWidth === width)) {
3350
- newWidth = getPixelValue(element, 'width', context);
3351
- } else if (position === 'absolute' || position === 'fixed') {
3352
- newWidth = getPixelValue(element, 'width', context);
3353
- } else {
3354
- var parent = element.parentNode, pLayout = $(parent).getLayout();
3355
-
3356
- newWidth = pLayout.get('width') -
3357
- this.get('margin-left') -
3358
- this.get('border-left') -
3359
- this.get('padding-left') -
3360
- this.get('padding-right') -
3361
- this.get('border-right') -
3362
- this.get('margin-right');
3363
- }
3364
-
3365
- element.setStyle({ width: newWidth + 'px' });
3366
-
3367
- this._prepared = true;
3368
- },
3369
-
3370
- _end: function() {
3371
- var element = this.element;
3372
- var originalStyles = element.retrieve('prototype_original_styles');
3373
- element.store('prototype_original_styles', null);
3374
- element.setStyle(originalStyles);
3375
- this._prepared = false;
3376
- },
3377
-
3378
- _compute: function(property) {
3379
- var COMPUTATIONS = Element.Layout.COMPUTATIONS;
3380
- if (!(property in COMPUTATIONS)) {
3381
- throw "Property not found.";
3382
- }
3383
-
3384
- return this._set(property, COMPUTATIONS[property].call(this, this.element));
3385
- },
3386
-
3387
- toObject: function() {
3388
- var args = $A(arguments);
3389
- var keys = (args.length === 0) ? Element.Layout.PROPERTIES :
3390
- args.join(' ').split(' ');
3391
- var obj = {};
3392
- keys.each( function(key) {
3393
- if (!Element.Layout.PROPERTIES.include(key)) return;
3394
- var value = this.get(key);
3395
- if (value != null) obj[key] = value;
3396
- }, this);
3397
- return obj;
3398
- },
3399
-
3400
- toHash: function() {
3401
- var obj = this.toObject.apply(this, arguments);
3402
- return new Hash(obj);
3403
- },
3404
-
3405
- toCSS: function() {
3406
- var args = $A(arguments);
3407
- var keys = (args.length === 0) ? Element.Layout.PROPERTIES :
3408
- args.join(' ').split(' ');
3409
- var css = {};
3410
-
3411
- keys.each( function(key) {
3412
- if (!Element.Layout.PROPERTIES.include(key)) return;
3413
- if (Element.Layout.COMPOSITE_PROPERTIES.include(key)) return;
3414
-
3415
- var value = this.get(key);
3416
- if (value != null) css[cssNameFor(key)] = value + 'px';
3417
- }, this);
3418
- return css;
3419
- },
3420
-
3421
- inspect: function() {
3422
- return "#<Element.Layout>";
3423
- }
3424
- });
3425
-
3426
- Object.extend(Element.Layout, {
3427
- PROPERTIES: $w('height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height'),
3428
-
3429
- COMPOSITE_PROPERTIES: $w('padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height'),
3430
-
3431
- COMPUTATIONS: {
3432
- 'height': function(element) {
3433
- if (!this._preComputing) this._begin();
3434
-
3435
- var bHeight = this.get('border-box-height');
3436
- if (bHeight <= 0) {
3437
- if (!this._preComputing) this._end();
3438
- return 0;
3439
- }
3440
-
3441
- var bTop = this.get('border-top'),
3442
- bBottom = this.get('border-bottom');
3443
-
3444
- var pTop = this.get('padding-top'),
3445
- pBottom = this.get('padding-bottom');
3446
-
3447
- if (!this._preComputing) this._end();
3448
-
3449
- return bHeight - bTop - bBottom - pTop - pBottom;
3450
- },
3451
-
3452
- 'width': function(element) {
3453
- if (!this._preComputing) this._begin();
3454
-
3455
- var bWidth = this.get('border-box-width');
3456
- if (bWidth <= 0) {
3457
- if (!this._preComputing) this._end();
3458
- return 0;
3459
- }
3460
-
3461
- var bLeft = this.get('border-left'),
3462
- bRight = this.get('border-right');
3463
-
3464
- var pLeft = this.get('padding-left'),
3465
- pRight = this.get('padding-right');
3466
-
3467
- if (!this._preComputing) this._end();
3468
-
3469
- return bWidth - bLeft - bRight - pLeft - pRight;
3470
- },
3471
-
3472
- 'padding-box-height': function(element) {
3473
- var height = this.get('height'),
3474
- pTop = this.get('padding-top'),
3475
- pBottom = this.get('padding-bottom');
3476
-
3477
- return height + pTop + pBottom;
3478
- },
3479
-
3480
- 'padding-box-width': function(element) {
3481
- var width = this.get('width'),
3482
- pLeft = this.get('padding-left'),
3483
- pRight = this.get('padding-right');
3484
-
3485
- return width + pLeft + pRight;
3486
- },
3487
-
3488
- 'border-box-height': function(element) {
3489
- if (!this._preComputing) this._begin();
3490
- var height = element.offsetHeight;
3491
- if (!this._preComputing) this._end();
3492
- return height;
3493
- },
3494
-
3495
- 'border-box-width': function(element) {
3496
- if (!this._preComputing) this._begin();
3497
- var width = element.offsetWidth;
3498
- if (!this._preComputing) this._end();
3499
- return width;
3500
- },
3501
-
3502
- 'margin-box-height': function(element) {
3503
- var bHeight = this.get('border-box-height'),
3504
- mTop = this.get('margin-top'),
3505
- mBottom = this.get('margin-bottom');
3506
-
3507
- if (bHeight <= 0) return 0;
3508
-
3509
- return bHeight + mTop + mBottom;
3510
- },
3511
-
3512
- 'margin-box-width': function(element) {
3513
- var bWidth = this.get('border-box-width'),
3514
- mLeft = this.get('margin-left'),
3515
- mRight = this.get('margin-right');
3516
-
3517
- if (bWidth <= 0) return 0;
3518
-
3519
- return bWidth + mLeft + mRight;
3520
- },
3521
-
3522
- 'top': function(element) {
3523
- var offset = element.positionedOffset();
3524
- return offset.top;
3525
- },
3526
-
3527
- 'bottom': function(element) {
3528
- var offset = element.positionedOffset(),
3529
- parent = element.getOffsetParent(),
3530
- pHeight = parent.measure('height');
3531
-
3532
- var mHeight = this.get('border-box-height');
3533
-
3534
- return pHeight - mHeight - offset.top;
3535
- },
3536
-
3537
- 'left': function(element) {
3538
- var offset = element.positionedOffset();
3539
- return offset.left;
3540
- },
3541
-
3542
- 'right': function(element) {
3543
- var offset = element.positionedOffset(),
3544
- parent = element.getOffsetParent(),
3545
- pWidth = parent.measure('width');
3546
-
3547
- var mWidth = this.get('border-box-width');
3548
-
3549
- return pWidth - mWidth - offset.left;
3550
- },
3551
-
3552
- 'padding-top': function(element) {
3553
- return getPixelValue(element, 'paddingTop');
3554
- },
3555
-
3556
- 'padding-bottom': function(element) {
3557
- return getPixelValue(element, 'paddingBottom');
3558
- },
3559
-
3560
- 'padding-left': function(element) {
3561
- return getPixelValue(element, 'paddingLeft');
3562
- },
3563
-
3564
- 'padding-right': function(element) {
3565
- return getPixelValue(element, 'paddingRight');
3566
- },
3567
-
3568
- 'border-top': function(element) {
3569
- return getPixelValue(element, 'borderTopWidth');
3570
- },
3571
-
3572
- 'border-bottom': function(element) {
3573
- return getPixelValue(element, 'borderBottomWidth');
3574
- },
3575
-
3576
- 'border-left': function(element) {
3577
- return getPixelValue(element, 'borderLeftWidth');
3578
- },
3579
-
3580
- 'border-right': function(element) {
3581
- return getPixelValue(element, 'borderRightWidth');
3582
- },
3583
-
3584
- 'margin-top': function(element) {
3585
- return getPixelValue(element, 'marginTop');
3586
- },
3587
-
3588
- 'margin-bottom': function(element) {
3589
- return getPixelValue(element, 'marginBottom');
3590
- },
3591
-
3592
- 'margin-left': function(element) {
3593
- return getPixelValue(element, 'marginLeft');
3594
- },
3595
-
3596
- 'margin-right': function(element) {
3597
- return getPixelValue(element, 'marginRight');
3598
- }
3599
- }
3600
- });
3601
-
3602
- if ('getBoundingClientRect' in document.documentElement) {
3603
- Object.extend(Element.Layout.COMPUTATIONS, {
3604
- 'right': function(element) {
3605
- var parent = hasLayout(element.getOffsetParent());
3606
- var rect = element.getBoundingClientRect(),
3607
- pRect = parent.getBoundingClientRect();
3608
-
3609
- return (pRect.right - rect.right).round();
3610
- },
3611
-
3612
- 'bottom': function(element) {
3613
- var parent = hasLayout(element.getOffsetParent());
3614
- var rect = element.getBoundingClientRect(),
3615
- pRect = parent.getBoundingClientRect();
3616
-
3617
- return (pRect.bottom - rect.bottom).round();
3618
- }
3619
- });
3620
- }
3621
-
3622
- Element.Offset = Class.create({
3623
- initialize: function(left, top) {
3624
- this.left = left.round();
3625
- this.top = top.round();
3626
-
3627
- this[0] = this.left;
3628
- this[1] = this.top;
3629
- },
3630
-
3631
- relativeTo: function(offset) {
3632
- return new Element.Offset(
3633
- this.left - offset.left,
3634
- this.top - offset.top
3635
- );
3636
- },
3637
-
3638
- inspect: function() {
3639
- return "#<Element.Offset left: #{left} top: #{top}>".interpolate(this);
3640
- },
3641
-
3642
- toString: function() {
3643
- return "[#{left}, #{top}]".interpolate(this);
3644
- },
3645
-
3646
- toArray: function() {
3647
- return [this.left, this.top];
3648
- }
3649
- });
3650
-
3651
- function getLayout(element, preCompute) {
3652
- return new Element.Layout(element, preCompute);
3653
- }
3654
-
3655
- function measure(element, property) {
3656
- return $(element).getLayout().get(property);
3657
- }
3658
-
3659
- function getDimensions(element) {
3660
- element = $(element);
3661
- var display = Element.getStyle(element, 'display');
3662
-
3663
- if (display && display !== 'none') {
3664
- return { width: element.offsetWidth, height: element.offsetHeight };
3665
- }
3666
-
3667
- var style = element.style;
3668
- var originalStyles = {
3669
- visibility: style.visibility,
3670
- position: style.position,
3671
- display: style.display
3672
- };
3673
-
3674
- var newStyles = {
3675
- visibility: 'hidden',
3676
- display: 'block'
3677
- };
3678
-
3679
- if (originalStyles.position !== 'fixed')
3680
- newStyles.position = 'absolute';
3681
-
3682
- Element.setStyle(element, newStyles);
3683
-
3684
- var dimensions = {
3685
- width: element.offsetWidth,
3686
- height: element.offsetHeight
3687
- };
3688
-
3689
- Element.setStyle(element, originalStyles);
3690
-
3691
- return dimensions;
3692
- }
3693
-
3694
- function getOffsetParent(element) {
3695
- element = $(element);
3696
-
3697
- if (isDocument(element) || isDetached(element) || isBody(element) || isHtml(element))
3698
- return $(document.body);
3699
-
3700
- var isInline = (Element.getStyle(element, 'display') === 'inline');
3701
- if (!isInline && element.offsetParent) return $(element.offsetParent);
3702
-
3703
- while ((element = element.parentNode) && element !== document.body) {
3704
- if (Element.getStyle(element, 'position') !== 'static') {
3705
- return isHtml(element) ? $(document.body) : $(element);
3706
- }
3707
- }
3708
-
3709
- return $(document.body);
3710
- }
3711
-
3712
-
3713
- function cumulativeOffset(element) {
3714
- element = $(element);
3715
- var valueT = 0, valueL = 0;
3716
- if (element.parentNode) {
3717
- do {
3718
- valueT += element.offsetTop || 0;
3719
- valueL += element.offsetLeft || 0;
3720
- element = element.offsetParent;
3721
- } while (element);
3722
- }
3723
- return new Element.Offset(valueL, valueT);
3724
- }
3725
-
3726
- function positionedOffset(element) {
3727
- element = $(element);
3728
-
3729
- var layout = element.getLayout();
3730
-
3731
- var valueT = 0, valueL = 0;
3732
- do {
3733
- valueT += element.offsetTop || 0;
3734
- valueL += element.offsetLeft || 0;
3735
- element = element.offsetParent;
3736
- if (element) {
3737
- if (isBody(element)) break;
3738
- var p = Element.getStyle(element, 'position');
3739
- if (p !== 'static') break;
3740
- }
3741
- } while (element);
3742
-
3743
- valueL -= layout.get('margin-top');
3744
- valueT -= layout.get('margin-left');
3745
-
3746
- return new Element.Offset(valueL, valueT);
3747
- }
3748
-
3749
- function cumulativeScrollOffset(element) {
3750
- var valueT = 0, valueL = 0;
3751
- do {
3752
- valueT += element.scrollTop || 0;
3753
- valueL += element.scrollLeft || 0;
3754
- element = element.parentNode;
3755
- } while (element);
3756
- return new Element.Offset(valueL, valueT);
3757
- }
3758
-
3759
- function viewportOffset(forElement) {
3760
- element = $(element);
3761
- var valueT = 0, valueL = 0, docBody = document.body;
3762
-
3763
- var element = forElement;
3764
- do {
3765
- valueT += element.offsetTop || 0;
3766
- valueL += element.offsetLeft || 0;
3767
- if (element.offsetParent == docBody &&
3768
- Element.getStyle(element, 'position') == 'absolute') break;
3769
- } while (element = element.offsetParent);
3770
-
3771
- element = forElement;
3772
- do {
3773
- if (element != docBody) {
3774
- valueT -= element.scrollTop || 0;
3775
- valueL -= element.scrollLeft || 0;
3776
- }
3777
- } while (element = element.parentNode);
3778
- return new Element.Offset(valueL, valueT);
3779
- }
3780
-
3781
- function absolutize(element) {
3782
- element = $(element);
3783
-
3784
- if (Element.getStyle(element, 'position') === 'absolute') {
3785
- return element;
3786
- }
3787
-
3788
- var offsetParent = getOffsetParent(element);
3789
- var eOffset = element.viewportOffset(),
3790
- pOffset = offsetParent.viewportOffset();
3791
-
3792
- var offset = eOffset.relativeTo(pOffset);
3793
- var layout = element.getLayout();
3794
-
3795
- element.store('prototype_absolutize_original_styles', {
3796
- left: element.getStyle('left'),
3797
- top: element.getStyle('top'),
3798
- width: element.getStyle('width'),
3799
- height: element.getStyle('height')
3800
- });
3801
-
3802
- element.setStyle({
3803
- position: 'absolute',
3804
- top: offset.top + 'px',
3805
- left: offset.left + 'px',
3806
- width: layout.get('width') + 'px',
3807
- height: layout.get('height') + 'px'
3808
- });
3809
-
3810
- return element;
3811
- }
3812
-
3813
- function relativize(element) {
3814
- element = $(element);
3815
- if (Element.getStyle(element, 'position') === 'relative') {
3816
- return element;
3817
- }
3818
-
3819
- var originalStyles =
3820
- element.retrieve('prototype_absolutize_original_styles');
3821
-
3822
- if (originalStyles) element.setStyle(originalStyles);
3823
- return element;
3824
- }
3825
-
3826
- if (Prototype.Browser.IE) {
3827
- getOffsetParent = getOffsetParent.wrap(
3828
- function(proceed, element) {
3829
- element = $(element);
3830
-
3831
- if (isDocument(element) || isDetached(element) || isBody(element) || isHtml(element))
3832
- return $(document.body);
3833
-
3834
- var position = element.getStyle('position');
3835
- if (position !== 'static') return proceed(element);
3836
-
3837
- element.setStyle({ position: 'relative' });
3838
- var value = proceed(element);
3839
- element.setStyle({ position: position });
3840
- return value;
3841
- }
3842
- );
3843
-
3844
- positionedOffset = positionedOffset.wrap(function(proceed, element) {
3845
- element = $(element);
3846
- if (!element.parentNode) return new Element.Offset(0, 0);
3847
- var position = element.getStyle('position');
3848
- if (position !== 'static') return proceed(element);
3849
-
3850
- var offsetParent = element.getOffsetParent();
3851
- if (offsetParent && offsetParent.getStyle('position') === 'fixed')
3852
- hasLayout(offsetParent);
3853
-
3854
- element.setStyle({ position: 'relative' });
3855
- var value = proceed(element);
3856
- element.setStyle({ position: position });
3857
- return value;
3858
- });
3859
- } else if (Prototype.Browser.Webkit) {
3860
- cumulativeOffset = function(element) {
3861
- element = $(element);
3862
- var valueT = 0, valueL = 0;
3863
- do {
3864
- valueT += element.offsetTop || 0;
3865
- valueL += element.offsetLeft || 0;
3866
- if (element.offsetParent == document.body)
3867
- if (Element.getStyle(element, 'position') == 'absolute') break;
3868
-
3869
- element = element.offsetParent;
3870
- } while (element);
3871
-
3872
- return new Element.Offset(valueL, valueT);
3873
- };
3874
- }
3875
-
3876
-
3877
- Element.addMethods({
3878
- getLayout: getLayout,
3879
- measure: measure,
3880
- getDimensions: getDimensions,
3881
- getOffsetParent: getOffsetParent,
3882
- cumulativeOffset: cumulativeOffset,
3883
- positionedOffset: positionedOffset,
3884
- cumulativeScrollOffset: cumulativeScrollOffset,
3885
- viewportOffset: viewportOffset,
3886
- absolutize: absolutize,
3887
- relativize: relativize
3888
- });
3889
-
3890
- function isBody(element) {
3891
- return element.nodeName.toUpperCase() === 'BODY';
3892
- }
3893
-
3894
- function isHtml(element) {
3895
- return element.nodeName.toUpperCase() === 'HTML';
3896
- }
3897
-
3898
- function isDocument(element) {
3899
- return element.nodeType === Node.DOCUMENT_NODE;
3900
- }
3901
-
3902
- function isDetached(element) {
3903
- return element !== document.body &&
3904
- !Element.descendantOf(element, document.body);
3905
- }
3906
-
3907
- if ('getBoundingClientRect' in document.documentElement) {
3908
- Element.addMethods({
3909
- viewportOffset: function(element) {
3910
- element = $(element);
3911
- if (isDetached(element)) return new Element.Offset(0, 0);
3912
-
3913
- var rect = element.getBoundingClientRect(),
3914
- docEl = document.documentElement;
3915
- return new Element.Offset(rect.left - docEl.clientLeft,
3916
- rect.top - docEl.clientTop);
3917
- }
3918
- });
3919
- }
3920
- })();
3921
- window.$$ = function() {
3922
- var expression = $A(arguments).join(', ');
3923
- return Prototype.Selector.select(expression, document);
3924
- };
3925
-
3926
- Prototype.Selector = (function() {
3927
-
3928
- function select() {
3929
- throw new Error('Method "Prototype.Selector.select" must be defined.');
3930
- }
3931
-
3932
- function match() {
3933
- throw new Error('Method "Prototype.Selector.match" must be defined.');
3934
- }
3935
-
3936
- function find(elements, expression, index) {
3937
- index = index || 0;
3938
- var match = Prototype.Selector.match, length = elements.length, matchIndex = 0, i;
3939
-
3940
- for (i = 0; i < length; i++) {
3941
- if (match(elements[i], expression) && index == matchIndex++) {
3942
- return Element.extend(elements[i]);
3943
- }
3944
- }
3945
- }
3946
-
3947
- function extendElements(elements) {
3948
- for (var i = 0, length = elements.length; i < length; i++) {
3949
- Element.extend(elements[i]);
3950
- }
3951
- return elements;
3952
- }
3953
-
3954
-
3955
- var K = Prototype.K;
3956
-
3957
- return {
3958
- select: select,
3959
- match: match,
3960
- find: find,
3961
- extendElements: (Element.extend === K) ? K : extendElements,
3962
- extendElement: Element.extend
3963
- };
3964
- })();
3965
- Prototype._original_property = window.Sizzle;
3966
- /*!
3967
- * Sizzle CSS Selector Engine - v1.0
3968
- * Copyright 2009, The Dojo Foundation
3969
- * Released under the MIT, BSD, and GPL Licenses.
3970
- * More information: http://sizzlejs.com/
3971
- */
3972
- (function(){
3973
-
3974
- var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
3975
- done = 0,
3976
- toString = Object.prototype.toString,
3977
- hasDuplicate = false,
3978
- baseHasDuplicate = true;
3979
-
3980
- [0, 0].sort(function(){
3981
- baseHasDuplicate = false;
3982
- return 0;
3983
- });
3984
-
3985
- var Sizzle = function(selector, context, results, seed) {
3986
- results = results || [];
3987
- var origContext = context = context || document;
3988
-
3989
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
3990
- return [];
3991
- }
3992
-
3993
- if ( !selector || typeof selector !== "string" ) {
3994
- return results;
3995
- }
3996
-
3997
- var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context),
3998
- soFar = selector;
3999
-
4000
- while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
4001
- soFar = m[3];
4002
-
4003
- parts.push( m[1] );
4004
-
4005
- if ( m[2] ) {
4006
- extra = m[3];
4007
- break;
4008
- }
4009
- }
4010
-
4011
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
4012
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
4013
- set = posProcess( parts[0] + parts[1], context );
4014
- } else {
4015
- set = Expr.relative[ parts[0] ] ?
4016
- [ context ] :
4017
- Sizzle( parts.shift(), context );
4018
-
4019
- while ( parts.length ) {
4020
- selector = parts.shift();
4021
-
4022
- if ( Expr.relative[ selector ] )
4023
- selector += parts.shift();
4024
-
4025
- set = posProcess( selector, set );
4026
- }
4027
- }
4028
- } else {
4029
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
4030
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
4031
- var ret = Sizzle.find( parts.shift(), context, contextXML );
4032
- context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
4033
- }
4034
-
4035
- if ( context ) {
4036
- var ret = seed ?
4037
- { expr: parts.pop(), set: makeArray(seed) } :
4038
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
4039
- set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
4040
-
4041
- if ( parts.length > 0 ) {
4042
- checkSet = makeArray(set);
4043
- } else {
4044
- prune = false;
4045
- }
4046
-
4047
- while ( parts.length ) {
4048
- var cur = parts.pop(), pop = cur;
4049
-
4050
- if ( !Expr.relative[ cur ] ) {
4051
- cur = "";
4052
- } else {
4053
- pop = parts.pop();
4054
- }
4055
-
4056
- if ( pop == null ) {
4057
- pop = context;
4058
- }
4059
-
4060
- Expr.relative[ cur ]( checkSet, pop, contextXML );
4061
- }
4062
- } else {
4063
- checkSet = parts = [];
4064
- }
4065
- }
4066
-
4067
- if ( !checkSet ) {
4068
- checkSet = set;
4069
- }
4070
-
4071
- if ( !checkSet ) {
4072
- throw "Syntax error, unrecognized expression: " + (cur || selector);
4073
- }
4074
-
4075
- if ( toString.call(checkSet) === "[object Array]" ) {
4076
- if ( !prune ) {
4077
- results.push.apply( results, checkSet );
4078
- } else if ( context && context.nodeType === 1 ) {
4079
- for ( var i = 0; checkSet[i] != null; i++ ) {
4080
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
4081
- results.push( set[i] );
4082
- }
4083
- }
4084
- } else {
4085
- for ( var i = 0; checkSet[i] != null; i++ ) {
4086
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
4087
- results.push( set[i] );
4088
- }
4089
- }
4090
- }
4091
- } else {
4092
- makeArray( checkSet, results );
4093
- }
4094
-
4095
- if ( extra ) {
4096
- Sizzle( extra, origContext, results, seed );
4097
- Sizzle.uniqueSort( results );
4098
- }
4099
-
4100
- return results;
4101
- };
4102
-
4103
- Sizzle.uniqueSort = function(results){
4104
- if ( sortOrder ) {
4105
- hasDuplicate = baseHasDuplicate;
4106
- results.sort(sortOrder);
4107
-
4108
- if ( hasDuplicate ) {
4109
- for ( var i = 1; i < results.length; i++ ) {
4110
- if ( results[i] === results[i-1] ) {
4111
- results.splice(i--, 1);
4112
- }
4113
- }
4114
- }
4115
- }
4116
-
4117
- return results;
4118
- };
4119
-
4120
- Sizzle.matches = function(expr, set){
4121
- return Sizzle(expr, null, null, set);
4122
- };
4123
-
4124
- Sizzle.find = function(expr, context, isXML){
4125
- var set, match;
4126
-
4127
- if ( !expr ) {
4128
- return [];
4129
- }
4130
-
4131
- for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
4132
- var type = Expr.order[i], match;
4133
-
4134
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
4135
- var left = match[1];
4136
- match.splice(1,1);
4137
-
4138
- if ( left.substr( left.length - 1 ) !== "\\" ) {
4139
- match[1] = (match[1] || "").replace(/\\/g, "");
4140
- set = Expr.find[ type ]( match, context, isXML );
4141
- if ( set != null ) {
4142
- expr = expr.replace( Expr.match[ type ], "" );
4143
- break;
4144
- }
4145
- }
4146
- }
4147
- }
4148
-
4149
- if ( !set ) {
4150
- set = context.getElementsByTagName("*");
4151
- }
4152
-
4153
- return {set: set, expr: expr};
4154
- };
4155
-
4156
- Sizzle.filter = function(expr, set, inplace, not){
4157
- var old = expr, result = [], curLoop = set, match, anyFound,
4158
- isXMLFilter = set && set[0] && isXML(set[0]);
4159
-
4160
- while ( expr && set.length ) {
4161
- for ( var type in Expr.filter ) {
4162
- if ( (match = Expr.match[ type ].exec( expr )) != null ) {
4163
- var filter = Expr.filter[ type ], found, item;
4164
- anyFound = false;
4165
-
4166
- if ( curLoop == result ) {
4167
- result = [];
4168
- }
4169
-
4170
- if ( Expr.preFilter[ type ] ) {
4171
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
4172
-
4173
- if ( !match ) {
4174
- anyFound = found = true;
4175
- } else if ( match === true ) {
4176
- continue;
4177
- }
4178
- }
4179
-
4180
- if ( match ) {
4181
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
4182
- if ( item ) {
4183
- found = filter( item, match, i, curLoop );
4184
- var pass = not ^ !!found;
4185
-
4186
- if ( inplace && found != null ) {
4187
- if ( pass ) {
4188
- anyFound = true;
4189
- } else {
4190
- curLoop[i] = false;
4191
- }
4192
- } else if ( pass ) {
4193
- result.push( item );
4194
- anyFound = true;
4195
- }
4196
- }
4197
- }
4198
- }
4199
-
4200
- if ( found !== undefined ) {
4201
- if ( !inplace ) {
4202
- curLoop = result;
4203
- }
4204
-
4205
- expr = expr.replace( Expr.match[ type ], "" );
4206
-
4207
- if ( !anyFound ) {
4208
- return [];
4209
- }
4210
-
4211
- break;
4212
- }
4213
- }
4214
- }
4215
-
4216
- if ( expr == old ) {
4217
- if ( anyFound == null ) {
4218
- throw "Syntax error, unrecognized expression: " + expr;
4219
- } else {
4220
- break;
4221
- }
4222
- }
4223
-
4224
- old = expr;
4225
- }
4226
-
4227
- return curLoop;
4228
- };
4229
-
4230
- var Expr = Sizzle.selectors = {
4231
- order: [ "ID", "NAME", "TAG" ],
4232
- match: {
4233
- ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
4234
- CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
4235
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
4236
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
4237
- TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
4238
- CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
4239
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
4240
- PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
4241
- },
4242
- leftMatch: {},
4243
- attrMap: {
4244
- "class": "className",
4245
- "for": "htmlFor"
4246
- },
4247
- attrHandle: {
4248
- href: function(elem){
4249
- return elem.getAttribute("href");
4250
- }
4251
- },
4252
- relative: {
4253
- "+": function(checkSet, part, isXML){
4254
- var isPartStr = typeof part === "string",
4255
- isTag = isPartStr && !/\W/.test(part),
4256
- isPartStrNotTag = isPartStr && !isTag;
4257
-
4258
- if ( isTag && !isXML ) {
4259
- part = part.toUpperCase();
4260
- }
4261
-
4262
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
4263
- if ( (elem = checkSet[i]) ) {
4264
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
4265
-
4266
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
4267
- elem || false :
4268
- elem === part;
4269
- }
4270
- }
4271
-
4272
- if ( isPartStrNotTag ) {
4273
- Sizzle.filter( part, checkSet, true );
4274
- }
4275
- },
4276
- ">": function(checkSet, part, isXML){
4277
- var isPartStr = typeof part === "string";
4278
-
4279
- if ( isPartStr && !/\W/.test(part) ) {
4280
- part = isXML ? part : part.toUpperCase();
4281
-
4282
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
4283
- var elem = checkSet[i];
4284
- if ( elem ) {
4285
- var parent = elem.parentNode;
4286
- checkSet[i] = parent.nodeName === part ? parent : false;
4287
- }
4288
- }
4289
- } else {
4290
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
4291
- var elem = checkSet[i];
4292
- if ( elem ) {
4293
- checkSet[i] = isPartStr ?
4294
- elem.parentNode :
4295
- elem.parentNode === part;
4296
- }
4297
- }
4298
-
4299
- if ( isPartStr ) {
4300
- Sizzle.filter( part, checkSet, true );
4301
- }
4302
- }
4303
- },
4304
- "": function(checkSet, part, isXML){
4305
- var doneName = done++, checkFn = dirCheck;
4306
-
4307
- if ( !/\W/.test(part) ) {
4308
- var nodeCheck = part = isXML ? part : part.toUpperCase();
4309
- checkFn = dirNodeCheck;
4310
- }
4311
-
4312
- checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
4313
- },
4314
- "~": function(checkSet, part, isXML){
4315
- var doneName = done++, checkFn = dirCheck;
4316
-
4317
- if ( typeof part === "string" && !/\W/.test(part) ) {
4318
- var nodeCheck = part = isXML ? part : part.toUpperCase();
4319
- checkFn = dirNodeCheck;
4320
- }
4321
-
4322
- checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
4323
- }
4324
- },
4325
- find: {
4326
- ID: function(match, context, isXML){
4327
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4328
- var m = context.getElementById(match[1]);
4329
- return m ? [m] : [];
4330
- }
4331
- },
4332
- NAME: function(match, context, isXML){
4333
- if ( typeof context.getElementsByName !== "undefined" ) {
4334
- var ret = [], results = context.getElementsByName(match[1]);
4335
-
4336
- for ( var i = 0, l = results.length; i < l; i++ ) {
4337
- if ( results[i].getAttribute("name") === match[1] ) {
4338
- ret.push( results[i] );
4339
- }
4340
- }
4341
-
4342
- return ret.length === 0 ? null : ret;
4343
- }
4344
- },
4345
- TAG: function(match, context){
4346
- return context.getElementsByTagName(match[1]);
4347
- }
4348
- },
4349
- preFilter: {
4350
- CLASS: function(match, curLoop, inplace, result, not, isXML){
4351
- match = " " + match[1].replace(/\\/g, "") + " ";
4352
-
4353
- if ( isXML ) {
4354
- return match;
4355
- }
4356
-
4357
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
4358
- if ( elem ) {
4359
- if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
4360
- if ( !inplace )
4361
- result.push( elem );
4362
- } else if ( inplace ) {
4363
- curLoop[i] = false;
4364
- }
4365
- }
4366
- }
4367
-
4368
- return false;
4369
- },
4370
- ID: function(match){
4371
- return match[1].replace(/\\/g, "");
4372
- },
4373
- TAG: function(match, curLoop){
4374
- for ( var i = 0; curLoop[i] === false; i++ ){}
4375
- return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
4376
- },
4377
- CHILD: function(match){
4378
- if ( match[1] == "nth" ) {
4379
- var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
4380
- match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
4381
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
4382
-
4383
- match[2] = (test[1] + (test[2] || 1)) - 0;
4384
- match[3] = test[3] - 0;
4385
- }
4386
-
4387
- match[0] = done++;
4388
-
4389
- return match;
4390
- },
4391
- ATTR: function(match, curLoop, inplace, result, not, isXML){
4392
- var name = match[1].replace(/\\/g, "");
4393
-
4394
- if ( !isXML && Expr.attrMap[name] ) {
4395
- match[1] = Expr.attrMap[name];
4396
- }
4397
-
4398
- if ( match[2] === "~=" ) {
4399
- match[4] = " " + match[4] + " ";
4400
- }
4401
-
4402
- return match;
4403
- },
4404
- PSEUDO: function(match, curLoop, inplace, result, not){
4405
- if ( match[1] === "not" ) {
4406
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
4407
- match[3] = Sizzle(match[3], null, null, curLoop);
4408
- } else {
4409
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
4410
- if ( !inplace ) {
4411
- result.push.apply( result, ret );
4412
- }
4413
- return false;
4414
- }
4415
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
4416
- return true;
4417
- }
4418
-
4419
- return match;
4420
- },
4421
- POS: function(match){
4422
- match.unshift( true );
4423
- return match;
4424
- }
4425
- },
4426
- filters: {
4427
- enabled: function(elem){
4428
- return elem.disabled === false && elem.type !== "hidden";
4429
- },
4430
- disabled: function(elem){
4431
- return elem.disabled === true;
4432
- },
4433
- checked: function(elem){
4434
- return elem.checked === true;
4435
- },
4436
- selected: function(elem){
4437
- elem.parentNode.selectedIndex;
4438
- return elem.selected === true;
4439
- },
4440
- parent: function(elem){
4441
- return !!elem.firstChild;
4442
- },
4443
- empty: function(elem){
4444
- return !elem.firstChild;
4445
- },
4446
- has: function(elem, i, match){
4447
- return !!Sizzle( match[3], elem ).length;
4448
- },
4449
- header: function(elem){
4450
- return /h\d/i.test( elem.nodeName );
4451
- },
4452
- text: function(elem){
4453
- return "text" === elem.type;
4454
- },
4455
- radio: function(elem){
4456
- return "radio" === elem.type;
4457
- },
4458
- checkbox: function(elem){
4459
- return "checkbox" === elem.type;
4460
- },
4461
- file: function(elem){
4462
- return "file" === elem.type;
4463
- },
4464
- password: function(elem){
4465
- return "password" === elem.type;
4466
- },
4467
- submit: function(elem){
4468
- return "submit" === elem.type;
4469
- },
4470
- image: function(elem){
4471
- return "image" === elem.type;
4472
- },
4473
- reset: function(elem){
4474
- return "reset" === elem.type;
4475
- },
4476
- button: function(elem){
4477
- return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
4478
- },
4479
- input: function(elem){
4480
- return /input|select|textarea|button/i.test(elem.nodeName);
4481
- }
4482
- },
4483
- setFilters: {
4484
- first: function(elem, i){
4485
- return i === 0;
4486
- },
4487
- last: function(elem, i, match, array){
4488
- return i === array.length - 1;
4489
- },
4490
- even: function(elem, i){
4491
- return i % 2 === 0;
4492
- },
4493
- odd: function(elem, i){
4494
- return i % 2 === 1;
4495
- },
4496
- lt: function(elem, i, match){
4497
- return i < match[3] - 0;
4498
- },
4499
- gt: function(elem, i, match){
4500
- return i > match[3] - 0;
4501
- },
4502
- nth: function(elem, i, match){
4503
- return match[3] - 0 == i;
4504
- },
4505
- eq: function(elem, i, match){
4506
- return match[3] - 0 == i;
4507
- }
4508
- },
4509
- filter: {
4510
- PSEUDO: function(elem, match, i, array){
4511
- var name = match[1], filter = Expr.filters[ name ];
4512
-
4513
- if ( filter ) {
4514
- return filter( elem, i, match, array );
4515
- } else if ( name === "contains" ) {
4516
- return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
4517
- } else if ( name === "not" ) {
4518
- var not = match[3];
4519
-
4520
- for ( var i = 0, l = not.length; i < l; i++ ) {
4521
- if ( not[i] === elem ) {
4522
- return false;
4523
- }
4524
- }
4525
-
4526
- return true;
4527
- }
4528
- },
4529
- CHILD: function(elem, match){
4530
- var type = match[1], node = elem;
4531
- switch (type) {
4532
- case 'only':
4533
- case 'first':
4534
- while ( (node = node.previousSibling) ) {
4535
- if ( node.nodeType === 1 ) return false;
4536
- }
4537
- if ( type == 'first') return true;
4538
- node = elem;
4539
- case 'last':
4540
- while ( (node = node.nextSibling) ) {
4541
- if ( node.nodeType === 1 ) return false;
4542
- }
4543
- return true;
4544
- case 'nth':
4545
- var first = match[2], last = match[3];
4546
-
4547
- if ( first == 1 && last == 0 ) {
4548
- return true;
4549
- }
4550
-
4551
- var doneName = match[0],
4552
- parent = elem.parentNode;
4553
-
4554
- if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
4555
- var count = 0;
4556
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
4557
- if ( node.nodeType === 1 ) {
4558
- node.nodeIndex = ++count;
4559
- }
4560
- }
4561
- parent.sizcache = doneName;
4562
- }
4563
-
4564
- var diff = elem.nodeIndex - last;
4565
- if ( first == 0 ) {
4566
- return diff == 0;
4567
- } else {
4568
- return ( diff % first == 0 && diff / first >= 0 );
4569
- }
4570
- }
4571
- },
4572
- ID: function(elem, match){
4573
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
4574
- },
4575
- TAG: function(elem, match){
4576
- return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
4577
- },
4578
- CLASS: function(elem, match){
4579
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
4580
- .indexOf( match ) > -1;
4581
- },
4582
- ATTR: function(elem, match){
4583
- var name = match[1],
4584
- result = Expr.attrHandle[ name ] ?
4585
- Expr.attrHandle[ name ]( elem ) :
4586
- elem[ name ] != null ?
4587
- elem[ name ] :
4588
- elem.getAttribute( name ),
4589
- value = result + "",
4590
- type = match[2],
4591
- check = match[4];
4592
-
4593
- return result == null ?
4594
- type === "!=" :
4595
- type === "=" ?
4596
- value === check :
4597
- type === "*=" ?
4598
- value.indexOf(check) >= 0 :
4599
- type === "~=" ?
4600
- (" " + value + " ").indexOf(check) >= 0 :
4601
- !check ?
4602
- value && result !== false :
4603
- type === "!=" ?
4604
- value != check :
4605
- type === "^=" ?
4606
- value.indexOf(check) === 0 :
4607
- type === "$=" ?
4608
- value.substr(value.length - check.length) === check :
4609
- type === "|=" ?
4610
- value === check || value.substr(0, check.length + 1) === check + "-" :
4611
- false;
4612
- },
4613
- POS: function(elem, match, i, array){
4614
- var name = match[2], filter = Expr.setFilters[ name ];
4615
-
4616
- if ( filter ) {
4617
- return filter( elem, i, match, array );
4618
- }
4619
- }
4620
- }
4621
- };
4622
-
4623
- var origPOS = Expr.match.POS;
4624
-
4625
- for ( var type in Expr.match ) {
4626
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
4627
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source );
4628
- }
4629
-
4630
- var makeArray = function(array, results) {
4631
- array = Array.prototype.slice.call( array, 0 );
4632
-
4633
- if ( results ) {
4634
- results.push.apply( results, array );
4635
- return results;
4636
- }
4637
-
4638
- return array;
4639
- };
4640
-
4641
- try {
4642
- Array.prototype.slice.call( document.documentElement.childNodes, 0 );
4643
-
4644
- } catch(e){
4645
- makeArray = function(array, results) {
4646
- var ret = results || [];
4647
-
4648
- if ( toString.call(array) === "[object Array]" ) {
4649
- Array.prototype.push.apply( ret, array );
4650
- } else {
4651
- if ( typeof array.length === "number" ) {
4652
- for ( var i = 0, l = array.length; i < l; i++ ) {
4653
- ret.push( array[i] );
4654
- }
4655
- } else {
4656
- for ( var i = 0; array[i]; i++ ) {
4657
- ret.push( array[i] );
4658
- }
4659
- }
4660
- }
4661
-
4662
- return ret;
4663
- };
4664
- }
4665
-
4666
- var sortOrder;
4667
-
4668
- if ( document.documentElement.compareDocumentPosition ) {
4669
- sortOrder = function( a, b ) {
4670
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
4671
- if ( a == b ) {
4672
- hasDuplicate = true;
4673
- }
4674
- return 0;
4675
- }
4676
-
4677
- var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
4678
- if ( ret === 0 ) {
4679
- hasDuplicate = true;
4680
- }
4681
- return ret;
4682
- };
4683
- } else if ( "sourceIndex" in document.documentElement ) {
4684
- sortOrder = function( a, b ) {
4685
- if ( !a.sourceIndex || !b.sourceIndex ) {
4686
- if ( a == b ) {
4687
- hasDuplicate = true;
4688
- }
4689
- return 0;
4690
- }
4691
-
4692
- var ret = a.sourceIndex - b.sourceIndex;
4693
- if ( ret === 0 ) {
4694
- hasDuplicate = true;
4695
- }
4696
- return ret;
4697
- };
4698
- } else if ( document.createRange ) {
4699
- sortOrder = function( a, b ) {
4700
- if ( !a.ownerDocument || !b.ownerDocument ) {
4701
- if ( a == b ) {
4702
- hasDuplicate = true;
4703
- }
4704
- return 0;
4705
- }
4706
-
4707
- var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
4708
- aRange.setStart(a, 0);
4709
- aRange.setEnd(a, 0);
4710
- bRange.setStart(b, 0);
4711
- bRange.setEnd(b, 0);
4712
- var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
4713
- if ( ret === 0 ) {
4714
- hasDuplicate = true;
4715
- }
4716
- return ret;
4717
- };
4718
- }
4719
-
4720
- (function(){
4721
- var form = document.createElement("div"),
4722
- id = "script" + (new Date).getTime();
4723
- form.innerHTML = "<a name='" + id + "'/>";
4724
-
4725
- var root = document.documentElement;
4726
- root.insertBefore( form, root.firstChild );
4727
-
4728
- if ( !!document.getElementById( id ) ) {
4729
- Expr.find.ID = function(match, context, isXML){
4730
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
4731
- var m = context.getElementById(match[1]);
4732
- return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
4733
- }
4734
- };
4735
-
4736
- Expr.filter.ID = function(elem, match){
4737
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
4738
- return elem.nodeType === 1 && node && node.nodeValue === match;
4739
- };
4740
- }
4741
-
4742
- root.removeChild( form );
4743
- root = form = null; // release memory in IE
4744
- })();
4745
-
4746
- (function(){
4747
-
4748
- var div = document.createElement("div");
4749
- div.appendChild( document.createComment("") );
4750
-
4751
- if ( div.getElementsByTagName("*").length > 0 ) {
4752
- Expr.find.TAG = function(match, context){
4753
- var results = context.getElementsByTagName(match[1]);
4754
-
4755
- if ( match[1] === "*" ) {
4756
- var tmp = [];
4757
-
4758
- for ( var i = 0; results[i]; i++ ) {
4759
- if ( results[i].nodeType === 1 ) {
4760
- tmp.push( results[i] );
4761
- }
4762
- }
4763
-
4764
- results = tmp;
4765
- }
4766
-
4767
- return results;
4768
- };
4769
- }
4770
-
4771
- div.innerHTML = "<a href='#'></a>";
4772
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
4773
- div.firstChild.getAttribute("href") !== "#" ) {
4774
- Expr.attrHandle.href = function(elem){
4775
- return elem.getAttribute("href", 2);
4776
- };
4777
- }
4778
-
4779
- div = null; // release memory in IE
4780
- })();
4781
-
4782
- if ( document.querySelectorAll ) (function(){
4783
- var oldSizzle = Sizzle, div = document.createElement("div");
4784
- div.innerHTML = "<p class='TEST'></p>";
4785
-
4786
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
4787
- return;
4788
- }
4789
-
4790
- Sizzle = function(query, context, extra, seed){
4791
- context = context || document;
4792
-
4793
- if ( !seed && context.nodeType === 9 && !isXML(context) ) {
4794
- try {
4795
- return makeArray( context.querySelectorAll(query), extra );
4796
- } catch(e){}
4797
- }
4798
-
4799
- return oldSizzle(query, context, extra, seed);
4800
- };
4801
-
4802
- for ( var prop in oldSizzle ) {
4803
- Sizzle[ prop ] = oldSizzle[ prop ];
4804
- }
4805
-
4806
- div = null; // release memory in IE
4807
- })();
4808
-
4809
- if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
4810
- var div = document.createElement("div");
4811
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
4812
-
4813
- if ( div.getElementsByClassName("e").length === 0 )
4814
- return;
4815
-
4816
- div.lastChild.className = "e";
4817
-
4818
- if ( div.getElementsByClassName("e").length === 1 )
4819
- return;
4820
-
4821
- Expr.order.splice(1, 0, "CLASS");
4822
- Expr.find.CLASS = function(match, context, isXML) {
4823
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
4824
- return context.getElementsByClassName(match[1]);
4825
- }
4826
- };
4827
-
4828
- div = null; // release memory in IE
4829
- })();
4830
-
4831
- function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
4832
- var sibDir = dir == "previousSibling" && !isXML;
4833
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
4834
- var elem = checkSet[i];
4835
- if ( elem ) {
4836
- if ( sibDir && elem.nodeType === 1 ){
4837
- elem.sizcache = doneName;
4838
- elem.sizset = i;
4839
- }
4840
- elem = elem[dir];
4841
- var match = false;
4842
-
4843
- while ( elem ) {
4844
- if ( elem.sizcache === doneName ) {
4845
- match = checkSet[elem.sizset];
4846
- break;
4847
- }
4848
-
4849
- if ( elem.nodeType === 1 && !isXML ){
4850
- elem.sizcache = doneName;
4851
- elem.sizset = i;
4852
- }
4853
-
4854
- if ( elem.nodeName === cur ) {
4855
- match = elem;
4856
- break;
4857
- }
4858
-
4859
- elem = elem[dir];
4860
- }
4861
-
4862
- checkSet[i] = match;
4863
- }
4864
- }
4865
- }
4866
-
4867
- function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
4868
- var sibDir = dir == "previousSibling" && !isXML;
4869
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
4870
- var elem = checkSet[i];
4871
- if ( elem ) {
4872
- if ( sibDir && elem.nodeType === 1 ) {
4873
- elem.sizcache = doneName;
4874
- elem.sizset = i;
4875
- }
4876
- elem = elem[dir];
4877
- var match = false;
4878
-
4879
- while ( elem ) {
4880
- if ( elem.sizcache === doneName ) {
4881
- match = checkSet[elem.sizset];
4882
- break;
4883
- }
4884
-
4885
- if ( elem.nodeType === 1 ) {
4886
- if ( !isXML ) {
4887
- elem.sizcache = doneName;
4888
- elem.sizset = i;
4889
- }
4890
- if ( typeof cur !== "string" ) {
4891
- if ( elem === cur ) {
4892
- match = true;
4893
- break;
4894
- }
4895
-
4896
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
4897
- match = elem;
4898
- break;
4899
- }
4900
- }
4901
-
4902
- elem = elem[dir];
4903
- }
4904
-
4905
- checkSet[i] = match;
4906
- }
4907
- }
4908
- }
4909
-
4910
- var contains = document.compareDocumentPosition ? function(a, b){
4911
- return a.compareDocumentPosition(b) & 16;
4912
- } : function(a, b){
4913
- return a !== b && (a.contains ? a.contains(b) : true);
4914
- };
4915
-
4916
- var isXML = function(elem){
4917
- return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
4918
- !!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
4919
- };
4920
-
4921
- var posProcess = function(selector, context){
4922
- var tmpSet = [], later = "", match,
4923
- root = context.nodeType ? [context] : context;
4924
-
4925
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
4926
- later += match[0];
4927
- selector = selector.replace( Expr.match.PSEUDO, "" );
4928
- }
4929
-
4930
- selector = Expr.relative[selector] ? selector + "*" : selector;
4931
-
4932
- for ( var i = 0, l = root.length; i < l; i++ ) {
4933
- Sizzle( selector, root[i], tmpSet );
4934
- }
4935
-
4936
- return Sizzle.filter( later, tmpSet );
4937
- };
4938
-
4939
-
4940
- window.Sizzle = Sizzle;
4941
-
4942
- })();
4943
-
4944
- ;(function(engine) {
4945
- var extendElements = Prototype.Selector.extendElements;
4946
-
4947
- function select(selector, scope) {
4948
- return extendElements(engine(selector, scope || document));
4949
- }
4950
-
4951
- function match(element, selector) {
4952
- return engine.matches(selector, [element]).length == 1;
4953
- }
4954
-
4955
- Prototype.Selector.engine = engine;
4956
- Prototype.Selector.select = select;
4957
- Prototype.Selector.match = match;
4958
- })(Sizzle);
4959
-
4960
- window.Sizzle = Prototype._original_property;
4961
- delete Prototype._original_property;
4962
-
4963
- var Form = {
4964
- reset: function(form) {
4965
- form = $(form);
4966
- form.reset();
4967
- return form;
4968
- },
4969
-
4970
- serializeElements: function(elements, options) {
4971
- if (typeof options != 'object') options = { hash: !!options };
4972
- else if (Object.isUndefined(options.hash)) options.hash = true;
4973
- var key, value, submitted = false, submit = options.submit, accumulator, initial;
4974
-
4975
- if (options.hash) {
4976
- initial = {};
4977
- accumulator = function(result, key, value) {
4978
- if (key in result) {
4979
- if (!Object.isArray(result[key])) result[key] = [result[key]];
4980
- result[key].push(value);
4981
- } else result[key] = value;
4982
- return result;
4983
- };
4984
- } else {
4985
- initial = '';
4986
- accumulator = function(result, key, value) {
4987
- return result + (result ? '&' : '') + encodeURIComponent(key) + '=' + encodeURIComponent(value);
4988
- }
4989
- }
4990
-
4991
- return elements.inject(initial, function(result, element) {
4992
- if (!element.disabled && element.name) {
4993
- key = element.name; value = $(element).getValue();
4994
- if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
4995
- submit !== false && (!submit || key == submit) && (submitted = true)))) {
4996
- result = accumulator(result, key, value);
4997
- }
4998
- }
4999
- return result;
5000
- });
5001
- }
5002
- };
5003
-
5004
- Form.Methods = {
5005
- serialize: function(form, options) {
5006
- return Form.serializeElements(Form.getElements(form), options);
5007
- },
5008
-
5009
- getElements: function(form) {
5010
- var elements = $(form).getElementsByTagName('*'),
5011
- element,
5012
- arr = [ ],
5013
- serializers = Form.Element.Serializers;
5014
- for (var i = 0; element = elements[i]; i++) {
5015
- arr.push(element);
5016
- }
5017
- return arr.inject([], function(elements, child) {
5018
- if (serializers[child.tagName.toLowerCase()])
5019
- elements.push(Element.extend(child));
5020
- return elements;
5021
- })
5022
- },
5023
-
5024
- getInputs: function(form, typeName, name) {
5025
- form = $(form);
5026
- var inputs = form.getElementsByTagName('input');
5027
-
5028
- if (!typeName && !name) return $A(inputs).map(Element.extend);
5029
-
5030
- for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
5031
- var input = inputs[i];
5032
- if ((typeName && input.type != typeName) || (name && input.name != name))
5033
- continue;
5034
- matchingInputs.push(Element.extend(input));
5035
- }
5036
-
5037
- return matchingInputs;
5038
- },
5039
-
5040
- disable: function(form) {
5041
- form = $(form);
5042
- Form.getElements(form).invoke('disable');
5043
- return form;
5044
- },
5045
-
5046
- enable: function(form) {
5047
- form = $(form);
5048
- Form.getElements(form).invoke('enable');
5049
- return form;
5050
- },
5051
-
5052
- findFirstElement: function(form) {
5053
- var elements = $(form).getElements().findAll(function(element) {
5054
- return 'hidden' != element.type && !element.disabled;
5055
- });
5056
- var firstByIndex = elements.findAll(function(element) {
5057
- return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
5058
- }).sortBy(function(element) { return element.tabIndex }).first();
5059
-
5060
- return firstByIndex ? firstByIndex : elements.find(function(element) {
5061
- return /^(?:input|select|textarea)$/i.test(element.tagName);
5062
- });
5063
- },
5064
-
5065
- focusFirstElement: function(form) {
5066
- form = $(form);
5067
- var element = form.findFirstElement();
5068
- if (element) element.activate();
5069
- return form;
5070
- },
5071
-
5072
- request: function(form, options) {
5073
- form = $(form), options = Object.clone(options || { });
5074
-
5075
- var params = options.parameters, action = form.readAttribute('action') || '';
5076
- if (action.blank()) action = window.location.href;
5077
- options.parameters = form.serialize(true);
5078
-
5079
- if (params) {
5080
- if (Object.isString(params)) params = params.toQueryParams();
5081
- Object.extend(options.parameters, params);
5082
- }
5083
-
5084
- if (form.hasAttribute('method') && !options.method)
5085
- options.method = form.method;
5086
-
5087
- return new Ajax.Request(action, options);
5088
- }
5089
- };
5090
-
5091
- /*--------------------------------------------------------------------------*/
5092
-
5093
-
5094
- Form.Element = {
5095
- focus: function(element) {
5096
- $(element).focus();
5097
- return element;
5098
- },
5099
-
5100
- select: function(element) {
5101
- $(element).select();
5102
- return element;
5103
- }
5104
- };
5105
-
5106
- Form.Element.Methods = {
5107
-
5108
- serialize: function(element) {
5109
- element = $(element);
5110
- if (!element.disabled && element.name) {
5111
- var value = element.getValue();
5112
- if (value != undefined) {
5113
- var pair = { };
5114
- pair[element.name] = value;
5115
- return Object.toQueryString(pair);
5116
- }
5117
- }
5118
- return '';
5119
- },
5120
-
5121
- getValue: function(element) {
5122
- element = $(element);
5123
- var method = element.tagName.toLowerCase();
5124
- return Form.Element.Serializers[method](element);
5125
- },
5126
-
5127
- setValue: function(element, value) {
5128
- element = $(element);
5129
- var method = element.tagName.toLowerCase();
5130
- Form.Element.Serializers[method](element, value);
5131
- return element;
5132
- },
5133
-
5134
- clear: function(element) {
5135
- $(element).value = '';
5136
- return element;
5137
- },
5138
-
5139
- present: function(element) {
5140
- return $(element).value != '';
5141
- },
5142
-
5143
- activate: function(element) {
5144
- element = $(element);
5145
- try {
5146
- element.focus();
5147
- if (element.select && (element.tagName.toLowerCase() != 'input' ||
5148
- !(/^(?:button|reset|submit)$/i.test(element.type))))
5149
- element.select();
5150
- } catch (e) { }
5151
- return element;
5152
- },
5153
-
5154
- disable: function(element) {
5155
- element = $(element);
5156
- element.disabled = true;
5157
- return element;
5158
- },
5159
-
5160
- enable: function(element) {
5161
- element = $(element);
5162
- element.disabled = false;
5163
- return element;
5164
- }
5165
- };
5166
-
5167
- /*--------------------------------------------------------------------------*/
5168
-
5169
- var Field = Form.Element;
5170
-
5171
- var $F = Form.Element.Methods.getValue;
5172
-
5173
- /*--------------------------------------------------------------------------*/
5174
-
5175
- Form.Element.Serializers = (function() {
5176
- function input(element, value) {
5177
- switch (element.type.toLowerCase()) {
5178
- case 'checkbox':
5179
- case 'radio':
5180
- return inputSelector(element, value);
5181
- default:
5182
- return valueSelector(element, value);
5183
- }
5184
- }
5185
-
5186
- function inputSelector(element, value) {
5187
- if (Object.isUndefined(value))
5188
- return element.checked ? element.value : null;
5189
- else element.checked = !!value;
5190
- }
5191
-
5192
- function valueSelector(element, value) {
5193
- if (Object.isUndefined(value)) return element.value;
5194
- else element.value = value;
5195
- }
5196
-
5197
- function select(element, value) {
5198
- if (Object.isUndefined(value))
5199
- return (element.type === 'select-one' ? selectOne : selectMany)(element);
5200
-
5201
- var opt, currentValue, single = !Object.isArray(value);
5202
- for (var i = 0, length = element.length; i < length; i++) {
5203
- opt = element.options[i];
5204
- currentValue = this.optionValue(opt);
5205
- if (single) {
5206
- if (currentValue == value) {
5207
- opt.selected = true;
5208
- return;
5209
- }
5210
- }
5211
- else opt.selected = value.include(currentValue);
5212
- }
5213
- }
5214
-
5215
- function selectOne(element) {
5216
- var index = element.selectedIndex;
5217
- return index >= 0 ? optionValue(element.options[index]) : null;
5218
- }
5219
-
5220
- function selectMany(element) {
5221
- var values, length = element.length;
5222
- if (!length) return null;
5223
-
5224
- for (var i = 0, values = []; i < length; i++) {
5225
- var opt = element.options[i];
5226
- if (opt.selected) values.push(optionValue(opt));
5227
- }
5228
- return values;
5229
- }
5230
-
5231
- function optionValue(opt) {
5232
- return Element.hasAttribute(opt, 'value') ? opt.value : opt.text;
5233
- }
5234
-
5235
- return {
5236
- input: input,
5237
- inputSelector: inputSelector,
5238
- textarea: valueSelector,
5239
- select: select,
5240
- selectOne: selectOne,
5241
- selectMany: selectMany,
5242
- optionValue: optionValue,
5243
- button: valueSelector
5244
- };
5245
- })();
5246
-
5247
- /*--------------------------------------------------------------------------*/
5248
-
5249
-
5250
- Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
5251
- initialize: function($super, element, frequency, callback) {
5252
- $super(callback, frequency);
5253
- this.element = $(element);
5254
- this.lastValue = this.getValue();
5255
- },
5256
-
5257
- execute: function() {
5258
- var value = this.getValue();
5259
- if (Object.isString(this.lastValue) && Object.isString(value) ?
5260
- this.lastValue != value : String(this.lastValue) != String(value)) {
5261
- this.callback(this.element, value);
5262
- this.lastValue = value;
5263
- }
5264
- }
5265
- });
5266
-
5267
- Form.Element.Observer = Class.create(Abstract.TimedObserver, {
5268
- getValue: function() {
5269
- return Form.Element.getValue(this.element);
5270
- }
5271
- });
5272
-
5273
- Form.Observer = Class.create(Abstract.TimedObserver, {
5274
- getValue: function() {
5275
- return Form.serialize(this.element);
5276
- }
5277
- });
5278
-
5279
- /*--------------------------------------------------------------------------*/
5280
-
5281
- Abstract.EventObserver = Class.create({
5282
- initialize: function(element, callback) {
5283
- this.element = $(element);
5284
- this.callback = callback;
5285
-
5286
- this.lastValue = this.getValue();
5287
- if (this.element.tagName.toLowerCase() == 'form')
5288
- this.registerFormCallbacks();
5289
- else
5290
- this.registerCallback(this.element);
5291
- },
5292
-
5293
- onElementEvent: function() {
5294
- var value = this.getValue();
5295
- if (this.lastValue != value) {
5296
- this.callback(this.element, value);
5297
- this.lastValue = value;
5298
- }
5299
- },
5300
-
5301
- registerFormCallbacks: function() {
5302
- Form.getElements(this.element).each(this.registerCallback, this);
5303
- },
5304
-
5305
- registerCallback: function(element) {
5306
- if (element.type) {
5307
- switch (element.type.toLowerCase()) {
5308
- case 'checkbox':
5309
- case 'radio':
5310
- Event.observe(element, 'click', this.onElementEvent.bind(this));
5311
- break;
5312
- default:
5313
- Event.observe(element, 'change', this.onElementEvent.bind(this));
5314
- break;
5315
- }
5316
- }
5317
- }
5318
- });
5319
-
5320
- Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
5321
- getValue: function() {
5322
- return Form.Element.getValue(this.element);
5323
- }
5324
- });
5325
-
5326
- Form.EventObserver = Class.create(Abstract.EventObserver, {
5327
- getValue: function() {
5328
- return Form.serialize(this.element);
5329
- }
5330
- });
5331
- (function() {
5332
-
5333
- var Event = {
5334
- KEY_BACKSPACE: 8,
5335
- KEY_TAB: 9,
5336
- KEY_RETURN: 13,
5337
- KEY_ESC: 27,
5338
- KEY_LEFT: 37,
5339
- KEY_UP: 38,
5340
- KEY_RIGHT: 39,
5341
- KEY_DOWN: 40,
5342
- KEY_DELETE: 46,
5343
- KEY_HOME: 36,
5344
- KEY_END: 35,
5345
- KEY_PAGEUP: 33,
5346
- KEY_PAGEDOWN: 34,
5347
- KEY_INSERT: 45,
5348
-
5349
- cache: {}
5350
- };
5351
-
5352
- var docEl = document.documentElement;
5353
- var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
5354
- && 'onmouseleave' in docEl;
5355
-
5356
-
5357
-
5358
- var isIELegacyEvent = function(event) { return false; };
5359
-
5360
- if (window.attachEvent) {
5361
- if (window.addEventListener) {
5362
- isIELegacyEvent = function(event) {
5363
- return !(event instanceof window.Event);
5364
- };
5365
- } else {
5366
- isIELegacyEvent = function(event) { return true; };
5367
- }
5368
- }
5369
-
5370
- var _isButton;
5371
-
5372
- function _isButtonForDOMEvents(event, code) {
5373
- return event.which ? (event.which === code + 1) : (event.button === code);
5374
- }
5375
-
5376
- var legacyButtonMap = { 0: 1, 1: 4, 2: 2 };
5377
- function _isButtonForLegacyEvents(event, code) {
5378
- return event.button === legacyButtonMap[code];
5379
- }
5380
-
5381
- function _isButtonForWebKit(event, code) {
5382
- switch (code) {
5383
- case 0: return event.which == 1 && !event.metaKey;
5384
- case 1: return event.which == 2 || (event.which == 1 && event.metaKey);
5385
- case 2: return event.which == 3;
5386
- default: return false;
5387
- }
5388
- }
5389
-
5390
- if (window.attachEvent) {
5391
- if (!window.addEventListener) {
5392
- _isButton = _isButtonForLegacyEvents;
5393
- } else {
5394
- _isButton = function(event, code) {
5395
- return isIELegacyEvent(event) ? _isButtonForLegacyEvents(event, code) :
5396
- _isButtonForDOMEvents(event, code);
5397
- }
5398
- }
5399
- } else if (Prototype.Browser.WebKit) {
5400
- _isButton = _isButtonForWebKit;
5401
- } else {
5402
- _isButton = _isButtonForDOMEvents;
5403
- }
5404
-
5405
- function isLeftClick(event) { return _isButton(event, 0) }
5406
-
5407
- function isMiddleClick(event) { return _isButton(event, 1) }
5408
-
5409
- function isRightClick(event) { return _isButton(event, 2) }
5410
-
5411
- function element(event) {
5412
- event = Event.extend(event);
5413
-
5414
- var node = event.target, type = event.type,
5415
- currentTarget = event.currentTarget;
5416
-
5417
- if (currentTarget && currentTarget.tagName) {
5418
- if (type === 'load' || type === 'error' ||
5419
- (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
5420
- && currentTarget.type === 'radio'))
5421
- node = currentTarget;
5422
- }
5423
-
5424
- if (node.nodeType == Node.TEXT_NODE)
5425
- node = node.parentNode;
5426
-
5427
- return Element.extend(node);
5428
- }
5429
-
5430
- function findElement(event, expression) {
5431
- var element = Event.element(event);
5432
-
5433
- if (!expression) return element;
5434
- while (element) {
5435
- if (Object.isElement(element) && Prototype.Selector.match(element, expression)) {
5436
- return Element.extend(element);
5437
- }
5438
- element = element.parentNode;
5439
- }
5440
- }
5441
-
5442
- function pointer(event) {
5443
- return { x: pointerX(event), y: pointerY(event) };
5444
- }
5445
-
5446
- function pointerX(event) {
5447
- var docElement = document.documentElement,
5448
- body = document.body || { scrollLeft: 0 };
5449
-
5450
- return event.pageX || (event.clientX +
5451
- (docElement.scrollLeft || body.scrollLeft) -
5452
- (docElement.clientLeft || 0));
5453
- }
5454
-
5455
- function pointerY(event) {
5456
- var docElement = document.documentElement,
5457
- body = document.body || { scrollTop: 0 };
5458
-
5459
- return event.pageY || (event.clientY +
5460
- (docElement.scrollTop || body.scrollTop) -
5461
- (docElement.clientTop || 0));
5462
- }
5463
-
5464
-
5465
- function stop(event) {
5466
- Event.extend(event);
5467
- event.preventDefault();
5468
- event.stopPropagation();
5469
-
5470
- event.stopped = true;
5471
- }
5472
-
5473
-
5474
- Event.Methods = {
5475
- isLeftClick: isLeftClick,
5476
- isMiddleClick: isMiddleClick,
5477
- isRightClick: isRightClick,
5478
-
5479
- element: element,
5480
- findElement: findElement,
5481
-
5482
- pointer: pointer,
5483
- pointerX: pointerX,
5484
- pointerY: pointerY,
5485
-
5486
- stop: stop
5487
- };
5488
-
5489
- var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
5490
- m[name] = Event.Methods[name].methodize();
5491
- return m;
5492
- });
5493
-
5494
- if (window.attachEvent) {
5495
- function _relatedTarget(event) {
5496
- var element;
5497
- switch (event.type) {
5498
- case 'mouseover':
5499
- case 'mouseenter':
5500
- element = event.fromElement;
5501
- break;
5502
- case 'mouseout':
5503
- case 'mouseleave':
5504
- element = event.toElement;
5505
- break;
5506
- default:
5507
- return null;
5508
- }
5509
- return Element.extend(element);
5510
- }
5511
-
5512
- var additionalMethods = {
5513
- stopPropagation: function() { this.cancelBubble = true },
5514
- preventDefault: function() { this.returnValue = false },
5515
- inspect: function() { return '[object Event]' }
5516
- };
5517
-
5518
- Event.extend = function(event, element) {
5519
- if (!event) return false;
5520
-
5521
- if (!isIELegacyEvent(event)) return event;
5522
-
5523
- if (event._extendedByPrototype) return event;
5524
- event._extendedByPrototype = Prototype.emptyFunction;
5525
-
5526
- var pointer = Event.pointer(event);
5527
-
5528
- Object.extend(event, {
5529
- target: event.srcElement || element,
5530
- relatedTarget: _relatedTarget(event),
5531
- pageX: pointer.x,
5532
- pageY: pointer.y
5533
- });
5534
-
5535
- Object.extend(event, methods);
5536
- Object.extend(event, additionalMethods);
5537
-
5538
- return event;
5539
- };
5540
- } else {
5541
- Event.extend = Prototype.K;
5542
- }
5543
-
5544
- if (window.addEventListener) {
5545
- Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
5546
- Object.extend(Event.prototype, methods);
5547
- }
5548
-
5549
- function _createResponder(element, eventName, handler) {
5550
- var registry = Element.retrieve(element, 'prototype_event_registry');
5551
-
5552
- if (Object.isUndefined(registry)) {
5553
- CACHE.push(element);
5554
- registry = Element.retrieve(element, 'prototype_event_registry', $H());
5555
- }
5556
-
5557
- var respondersForEvent = registry.get(eventName);
5558
- if (Object.isUndefined(respondersForEvent)) {
5559
- respondersForEvent = [];
5560
- registry.set(eventName, respondersForEvent);
5561
- }
5562
-
5563
- if (respondersForEvent.pluck('handler').include(handler)) return false;
5564
-
5565
- var responder;
5566
- if (eventName.include(":")) {
5567
- responder = function(event) {
5568
- if (Object.isUndefined(event.eventName))
5569
- return false;
5570
-
5571
- if (event.eventName !== eventName)
5572
- return false;
5573
-
5574
- Event.extend(event, element);
5575
- handler.call(element, event);
5576
- };
5577
- } else {
5578
- if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
5579
- (eventName === "mouseenter" || eventName === "mouseleave")) {
5580
- if (eventName === "mouseenter" || eventName === "mouseleave") {
5581
- responder = function(event) {
5582
- Event.extend(event, element);
5583
-
5584
- var parent = event.relatedTarget;
5585
- while (parent && parent !== element) {
5586
- try { parent = parent.parentNode; }
5587
- catch(e) { parent = element; }
5588
- }
5589
-
5590
- if (parent === element) return;
5591
-
5592
- handler.call(element, event);
5593
- };
5594
- }
5595
- } else {
5596
- responder = function(event) {
5597
- Event.extend(event, element);
5598
- handler.call(element, event);
5599
- };
5600
- }
5601
- }
5602
-
5603
- responder.handler = handler;
5604
- respondersForEvent.push(responder);
5605
- return responder;
5606
- }
5607
-
5608
- function _destroyCache() {
5609
- for (var i = 0, length = CACHE.length; i < length; i++) {
5610
- Event.stopObserving(CACHE[i]);
5611
- CACHE[i] = null;
5612
- }
5613
- }
5614
-
5615
- var CACHE = [];
5616
-
5617
- if (Prototype.Browser.IE)
5618
- window.attachEvent('onunload', _destroyCache);
5619
-
5620
- if (Prototype.Browser.WebKit)
5621
- window.addEventListener('unload', Prototype.emptyFunction, false);
5622
-
5623
-
5624
- var _getDOMEventName = Prototype.K,
5625
- translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
5626
-
5627
- if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
5628
- _getDOMEventName = function(eventName) {
5629
- return (translations[eventName] || eventName);
5630
- };
5631
- }
5632
-
5633
- function observe(element, eventName, handler) {
5634
- element = $(element);
5635
-
5636
- var responder = _createResponder(element, eventName, handler);
5637
-
5638
- if (!responder) return element;
5639
-
5640
- if (eventName.include(':')) {
5641
- if (element.addEventListener)
5642
- element.addEventListener("dataavailable", responder, false);
5643
- else {
5644
- element.attachEvent("ondataavailable", responder);
5645
- element.attachEvent("onlosecapture", responder);
5646
- }
5647
- } else {
5648
- var actualEventName = _getDOMEventName(eventName);
5649
-
5650
- if (element.addEventListener)
5651
- element.addEventListener(actualEventName, responder, false);
5652
- else
5653
- element.attachEvent("on" + actualEventName, responder);
5654
- }
5655
-
5656
- return element;
5657
- }
5658
-
5659
- function stopObserving(element, eventName, handler) {
5660
- element = $(element);
5661
-
5662
- var registry = Element.retrieve(element, 'prototype_event_registry');
5663
- if (!registry) return element;
5664
-
5665
- if (!eventName) {
5666
- registry.each( function(pair) {
5667
- var eventName = pair.key;
5668
- stopObserving(element, eventName);
5669
- });
5670
- return element;
5671
- }
5672
-
5673
- var responders = registry.get(eventName);
5674
- if (!responders) return element;
5675
-
5676
- if (!handler) {
5677
- responders.each(function(r) {
5678
- stopObserving(element, eventName, r.handler);
5679
- });
5680
- return element;
5681
- }
5682
-
5683
- var i = responders.length, responder;
5684
- while (i--) {
5685
- if (responders[i].handler === handler) {
5686
- responder = responders[i];
5687
- break;
5688
- }
5689
- }
5690
- if (!responder) return element;
5691
-
5692
- if (eventName.include(':')) {
5693
- if (element.removeEventListener)
5694
- element.removeEventListener("dataavailable", responder, false);
5695
- else {
5696
- element.detachEvent("ondataavailable", responder);
5697
- element.detachEvent("onlosecapture", responder);
5698
- }
5699
- } else {
5700
- var actualEventName = _getDOMEventName(eventName);
5701
- if (element.removeEventListener)
5702
- element.removeEventListener(actualEventName, responder, false);
5703
- else
5704
- element.detachEvent('on' + actualEventName, responder);
5705
- }
5706
-
5707
- registry.set(eventName, responders.without(responder));
5708
-
5709
- return element;
5710
- }
5711
-
5712
- function fire(element, eventName, memo, bubble) {
5713
- element = $(element);
5714
-
5715
- if (Object.isUndefined(bubble))
5716
- bubble = true;
5717
-
5718
- if (element == document && document.createEvent && !element.dispatchEvent)
5719
- element = document.documentElement;
5720
-
5721
- var event;
5722
- if (document.createEvent) {
5723
- event = document.createEvent('HTMLEvents');
5724
- event.initEvent('dataavailable', bubble, true);
5725
- } else {
5726
- event = document.createEventObject();
5727
- event.eventType = bubble ? 'ondataavailable' : 'onlosecapture';
5728
- }
5729
-
5730
- event.eventName = eventName;
5731
- event.memo = memo || { };
5732
-
5733
- if (document.createEvent)
5734
- element.dispatchEvent(event);
5735
- else
5736
- element.fireEvent(event.eventType, event);
5737
-
5738
- return Event.extend(event);
5739
- }
5740
-
5741
- Event.Handler = Class.create({
5742
- initialize: function(element, eventName, selector, callback) {
5743
- this.element = $(element);
5744
- this.eventName = eventName;
5745
- this.selector = selector;
5746
- this.callback = callback;
5747
- this.handler = this.handleEvent.bind(this);
5748
- },
5749
-
5750
- start: function() {
5751
- Event.observe(this.element, this.eventName, this.handler);
5752
- return this;
5753
- },
5754
-
5755
- stop: function() {
5756
- Event.stopObserving(this.element, this.eventName, this.handler);
5757
- return this;
5758
- },
5759
-
5760
- handleEvent: function(event) {
5761
- var element = Event.findElement(event, this.selector);
5762
- if (element) this.callback.call(this.element, event, element);
5763
- }
5764
- });
5765
-
5766
- function on(element, eventName, selector, callback) {
5767
- element = $(element);
5768
- if (Object.isFunction(selector) && Object.isUndefined(callback)) {
5769
- callback = selector, selector = null;
5770
- }
5771
-
5772
- return new Event.Handler(element, eventName, selector, callback).start();
5773
- }
5774
-
5775
- Object.extend(Event, Event.Methods);
5776
-
5777
- Object.extend(Event, {
5778
- fire: fire,
5779
- observe: observe,
5780
- stopObserving: stopObserving,
5781
- on: on
5782
- });
5783
-
5784
- Element.addMethods({
5785
- fire: fire,
5786
-
5787
- observe: observe,
5788
-
5789
- stopObserving: stopObserving,
5790
-
5791
- on: on
5792
- });
5793
-
5794
- Object.extend(document, {
5795
- fire: fire.methodize(),
5796
-
5797
- observe: observe.methodize(),
5798
-
5799
- stopObserving: stopObserving.methodize(),
5800
-
5801
- on: on.methodize(),
5802
-
5803
- loaded: false
5804
- });
5805
-
5806
- if (window.Event) Object.extend(window.Event, Event);
5807
- else window.Event = Event;
5808
- })();
5809
-
5810
- (function() {
5811
- /* Support for the DOMContentLoaded event is based on work by Dan Webb,
5812
- Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
5813
-
5814
- var timer;
5815
-
5816
- function fireContentLoadedEvent() {
5817
- if (document.loaded) return;
5818
- if (timer) window.clearTimeout(timer);
5819
- document.loaded = true;
5820
- document.fire('dom:loaded');
5821
- }
5822
-
5823
- function checkReadyState() {
5824
- if (document.readyState === 'complete') {
5825
- document.stopObserving('readystatechange', checkReadyState);
5826
- fireContentLoadedEvent();
5827
- }
5828
- }
5829
-
5830
- function pollDoScroll() {
5831
- try { document.documentElement.doScroll('left'); }
5832
- catch(e) {
5833
- timer = pollDoScroll.defer();
5834
- return;
5835
- }
5836
- fireContentLoadedEvent();
5837
- }
5838
-
5839
- if (document.addEventListener) {
5840
- document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
5841
- } else {
5842
- document.observe('readystatechange', checkReadyState);
5843
- if (window == top)
5844
- timer = pollDoScroll.defer();
5845
- }
5846
-
5847
- Event.observe(window, 'load', fireContentLoadedEvent);
5848
- })();
5849
-
5850
- Element.addMethods();
5851
-
5852
- /*------------------------------- DEPRECATED -------------------------------*/
5853
-
5854
- Hash.toQueryString = Object.toQueryString;
5855
-
5856
- var Toggle = { display: Element.toggle };
5857
-
5858
- Element.Methods.childOf = Element.Methods.descendantOf;
5859
-
5860
- var Insertion = {
5861
- Before: function(element, content) {
5862
- return Element.insert(element, {before:content});
5863
- },
5864
-
5865
- Top: function(element, content) {
5866
- return Element.insert(element, {top:content});
5867
- },
5868
-
5869
- Bottom: function(element, content) {
5870
- return Element.insert(element, {bottom:content});
5871
- },
5872
-
5873
- After: function(element, content) {
5874
- return Element.insert(element, {after:content});
5875
- }
5876
- };
5877
-
5878
- var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
5879
-
5880
- var Position = {
5881
- includeScrollOffsets: false,
5882
-
5883
- prepare: function() {
5884
- this.deltaX = window.pageXOffset
5885
- || document.documentElement.scrollLeft
5886
- || document.body.scrollLeft
5887
- || 0;
5888
- this.deltaY = window.pageYOffset
5889
- || document.documentElement.scrollTop
5890
- || document.body.scrollTop
5891
- || 0;
5892
- },
5893
-
5894
- within: function(element, x, y) {
5895
- if (this.includeScrollOffsets)
5896
- return this.withinIncludingScrolloffsets(element, x, y);
5897
- this.xcomp = x;
5898
- this.ycomp = y;
5899
- this.offset = Element.cumulativeOffset(element);
5900
-
5901
- return (y >= this.offset[1] &&
5902
- y < this.offset[1] + element.offsetHeight &&
5903
- x >= this.offset[0] &&
5904
- x < this.offset[0] + element.offsetWidth);
5905
- },
5906
-
5907
- withinIncludingScrolloffsets: function(element, x, y) {
5908
- var offsetcache = Element.cumulativeScrollOffset(element);
5909
-
5910
- this.xcomp = x + offsetcache[0] - this.deltaX;
5911
- this.ycomp = y + offsetcache[1] - this.deltaY;
5912
- this.offset = Element.cumulativeOffset(element);
5913
-
5914
- return (this.ycomp >= this.offset[1] &&
5915
- this.ycomp < this.offset[1] + element.offsetHeight &&
5916
- this.xcomp >= this.offset[0] &&
5917
- this.xcomp < this.offset[0] + element.offsetWidth);
5918
- },
5919
-
5920
- overlap: function(mode, element) {
5921
- if (!mode) return 0;
5922
- if (mode == 'vertical')
5923
- return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
5924
- element.offsetHeight;
5925
- if (mode == 'horizontal')
5926
- return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
5927
- element.offsetWidth;
5928
- },
5929
-
5930
-
5931
- cumulativeOffset: Element.Methods.cumulativeOffset,
5932
-
5933
- positionedOffset: Element.Methods.positionedOffset,
5934
-
5935
- absolutize: function(element) {
5936
- Position.prepare();
5937
- return Element.absolutize(element);
5938
- },
5939
-
5940
- relativize: function(element) {
5941
- Position.prepare();
5942
- return Element.relativize(element);
5943
- },
5944
-
5945
- realOffset: Element.Methods.cumulativeScrollOffset,
5946
-
5947
- offsetParent: Element.Methods.getOffsetParent,
5948
-
5949
- page: Element.Methods.viewportOffset,
5950
-
5951
- clone: function(source, target, options) {
5952
- options = options || { };
5953
- return Element.clonePosition(target, source, options);
5954
- }
5955
- };
5956
-
5957
- /*--------------------------------------------------------------------------*/
5958
-
5959
- if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
5960
- function iter(name) {
5961
- return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
5962
- }
5963
-
5964
- instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
5965
- function(element, className) {
5966
- className = className.toString().strip();
5967
- var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
5968
- return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
5969
- } : function(element, className) {
5970
- className = className.toString().strip();
5971
- var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
5972
- if (!classNames && !className) return elements;
5973
-
5974
- var nodes = $(element).getElementsByTagName('*');
5975
- className = ' ' + className + ' ';
5976
-
5977
- for (var i = 0, child, cn; child = nodes[i]; i++) {
5978
- if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
5979
- (classNames && classNames.all(function(name) {
5980
- return !name.toString().blank() && cn.include(' ' + name + ' ');
5981
- }))))
5982
- elements.push(Element.extend(child));
5983
- }
5984
- return elements;
5985
- };
5986
-
5987
- return function(className, parentElement) {
5988
- return $(parentElement || document.body).getElementsByClassName(className);
5989
- };
5990
- }(Element.Methods);
5991
-
5992
- /*--------------------------------------------------------------------------*/
5993
-
5994
- Element.ClassNames = Class.create();
5995
- Element.ClassNames.prototype = {
5996
- initialize: function(element) {
5997
- this.element = $(element);
5998
- },
5999
-
6000
- _each: function(iterator) {
6001
- this.element.className.split(/\s+/).select(function(name) {
6002
- return name.length > 0;
6003
- })._each(iterator);
6004
- },
6005
-
6006
- set: function(className) {
6007
- this.element.className = className;
6008
- },
6009
-
6010
- add: function(classNameToAdd) {
6011
- if (this.include(classNameToAdd)) return;
6012
- this.set($A(this).concat(classNameToAdd).join(' '));
6013
- },
6014
-
6015
- remove: function(classNameToRemove) {
6016
- if (!this.include(classNameToRemove)) return;
6017
- this.set($A(this).without(classNameToRemove).join(' '));
6018
- },
6019
-
6020
- toString: function() {
6021
- return $A(this).join(' ');
6022
- }
6023
- };
6024
-
6025
- Object.extend(Element.ClassNames.prototype, Enumerable);
6026
-
6027
- /*--------------------------------------------------------------------------*/
6028
-
6029
- (function() {
6030
- window.Selector = Class.create({
6031
- initialize: function(expression) {
6032
- this.expression = expression.strip();
6033
- },
6034
-
6035
- findElements: function(rootElement) {
6036
- return Prototype.Selector.select(this.expression, rootElement);
6037
- },
6038
-
6039
- match: function(element) {
6040
- return Prototype.Selector.match(element, this.expression);
6041
- },
6042
-
6043
- toString: function() {
6044
- return this.expression;
6045
- },
6046
-
6047
- inspect: function() {
6048
- return "#<Selector: " + this.expression + ">";
6049
- }
6050
- });
6051
-
6052
- Object.extend(Selector, {
6053
- matchElements: function(elements, expression) {
6054
- var match = Prototype.Selector.match,
6055
- results = [];
6056
-
6057
- for (var i = 0, length = elements.length; i < length; i++) {
6058
- var element = elements[i];
6059
- if (match(element, expression)) {
6060
- results.push(Element.extend(element));
6061
- }
6062
- }
6063
- return results;
6064
- },
6065
-
6066
- findElement: function(elements, expression, index) {
6067
- index = index || 0;
6068
- var matchIndex = 0, element;
6069
- for (var i = 0, length = elements.length; i < length; i++) {
6070
- element = elements[i];
6071
- if (Prototype.Selector.match(element, expression) && index === matchIndex++) {
6072
- return Element.extend(element);
6073
- }
6074
- }
6075
- },
6076
-
6077
- findChildElements: function(element, expressions) {
6078
- var selector = expressions.toArray().join(', ');
6079
- return Prototype.Selector.select(selector, element || document);
6080
- }
6081
- });
6082
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/docsupport/style.css DELETED
@@ -1,219 +0,0 @@
1
- /* Reset */
2
- html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }
3
-
4
- article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
5
-
6
- blockquote, q { quotes: none; }
7
- blockquote:before, blockquote:after, q:before, q:after { content: ""; content: none; }
8
- ins { background-color: #ff9; color: #000; text-decoration: none; }
9
- mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
10
- del { text-decoration: line-through; }
11
- abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
12
- table { border-collapse: collapse; border-spacing: 0; }
13
- hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
14
- input, select { vertical-align: middle; }
15
-
16
- body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
17
- select, input, textarea, button { font:99% sans-serif; }
18
- pre, code, kbd, samp { font-family: monospace, sans-serif; }
19
-
20
-
21
- body { background: #EEE; color: #444; line-height: 1.4em; }
22
-
23
- header h1 { color: black; font-size: 2em; line-height: 1.1em; display: inline-block; height: 27px; margin: 20px 0 25px; }
24
- header h1 small { font-size: 0.6em; }
25
-
26
- div#content { background: white; border: 1px solid #ccc; border-width: 0 1px 1px; margin: 0 auto; padding: 40px 50px 40px; width: 738px; }
27
-
28
- footer { color: #999; padding-top: 40px; font-size: 0.8em; text-align: center; }
29
-
30
- body { font-family: sans-serif; font-size: 1em; }
31
-
32
- p { margin: 0 0 .7em; max-width: 700px; }
33
- table+p { margin-top: 1em; }
34
-
35
- h2 { border-bottom: 1px solid #ccc; font-size: 1.2em; margin: 3em 0 1em 0; font-weight: bold;}
36
- h3 { font-weight: bold; }
37
-
38
- h2.intro { border-bottom: none; font-size: 1em; font-weight: normal; margin-top:0; }
39
-
40
- ul li { list-style: disc; margin-left: 1em; margin-bottom: 1.25em; }
41
- ol li { margin-left: 1.25em; }
42
- ol ul, ul ul { margin: .25em 0 0; }
43
- ol ul li, ul ul li { list-style-type: circle; margin: 0 0 .25em 1em; }
44
-
45
- li > p { margin-top: .25em; }
46
-
47
- div.side-by-side { width: 100%; margin-bottom: 1em; }
48
- div.side-by-side > div { float: left; width: 49%; }
49
- div.side-by-side > div > em { margin-bottom: 10px; display: block; }
50
-
51
- .faqs em { display: block; }
52
-
53
- .clearfix:after {
54
- content: "\0020";
55
- display: block;
56
- height: 0;
57
- clear: both;
58
- overflow: hidden;
59
- visibility: hidden;
60
- }
61
-
62
- a { color: #F36C00; outline: none; text-decoration: none; }
63
- a:hover { text-decoration: underline; }
64
-
65
- ul.credits li { margin-bottom: .25em; }
66
-
67
- strong { font-weight: bold; }
68
- i { font-style: italic; }
69
-
70
- .button {
71
- background: #fafafa;
72
- background: -webkit-linear-gradient(top, #ffffff, #eeeeee);
73
- background: -moz-linear-gradient(top, #ffffff, #eeeeee);
74
- background: -o-linear-gradient(top, #ffffff, #eeeeee);
75
- background: linear-gradient(to bottom, #ffffff, #eeeeee);
76
- border: 1px solid #bbbbbb;
77
- border-radius: 4px;
78
- box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
79
- color: #555555;
80
- cursor: pointer;
81
- display: inline-block;
82
- font-family: "Helvetica Neue", Arial, Verdana, "Nimbus Sans L", sans-serif;
83
- font-size: 13px;
84
- font-weight: 500;
85
- height: 31px;
86
- line-height: 28px;
87
- outline: none;
88
- padding: 0 13px;
89
- text-shadow: 0 1px 0 white;
90
- text-decoration: none;
91
- vertical-align: middle;
92
- white-space: nowrap;
93
- -webkit-font-smoothing: antialiased;
94
- -webkit-box-sizing: border-box;
95
- -moz-box-sizing: border-box;
96
- box-sizing: border-box;
97
- }
98
-
99
- .button-blue {
100
- background: #1385e5;
101
- background: -webkit-linear-gradient(top, #53b2fc, #1385e5);
102
- background: -moz-linear-gradient(top, #53b2fc, #1385e5);
103
- background: -o-linear-gradient(top, #53b2fc, #1385e5);
104
- background: linear-gradient(to bottom, #53b2fc, #1385e5);
105
- border-color: #075fa9;
106
- color: white;
107
- font-weight: bold;
108
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
109
- }
110
-
111
-
112
- /* Tweak navbar brand link to be super sleek
113
- -------------------------------------------------- */
114
- .oss-bar {
115
- top: 0;
116
- right: 20px;
117
- position: fixed;
118
- z-index: 1030;
119
- }
120
- .oss-bar ul {
121
- float: right;
122
- margin: 0;
123
- list-style: none;
124
- }
125
- .oss-bar ul li {
126
- list-style: none;
127
- float: left;
128
- line-height: 0;
129
- margin: 0;
130
- }
131
- .oss-bar ul li a {
132
- -moz-box-sizing: border-box;
133
- -webkit-box-sizing: border-box;
134
- -ms-box-sizing: border-box;
135
- box-sizing: border-box;
136
- border: 0;
137
- margin-top: -10px;
138
- display: block;
139
- height: 58px;
140
- background: #F36C00 url(oss-credit.png) no-repeat 20px 22px;
141
- padding: 22px 20px 12px 20px;
142
- text-indent: 120%; /* stupid padding */
143
- white-space: nowrap;
144
- overflow: hidden;
145
- -webkit-transition: all 0.10s ease-in-out;
146
- -moz-transition: all 0.10s ease-in-out;
147
- transition: all 0.15s ease-in-out;
148
- }
149
- .oss-bar ul li a:hover {
150
- margin-top: 0px;
151
- }
152
- .oss-bar a.harvest {
153
- width: 196px;
154
- background-color: #F36C00;
155
- background-position: -142px 22px;
156
- padding-right: 22px; /* optical illusion */
157
- }
158
- .oss-bar a.fork {
159
- width: 162px;
160
- background-color: #333333;
161
- }
162
-
163
- .docs-table th, .docs-table td {
164
- border: 1px solid #000;
165
- padding: 4px 6px;
166
- white-space: nowrap;
167
- }
168
-
169
- .docs-table td:last-child {
170
- white-space: normal;
171
- }
172
-
173
- .docs-table th {
174
- font-weight: bold;
175
- text-align: left;
176
- }
177
-
178
- #content pre[class*=language-] {
179
- font-size: 14px;
180
- margin-bottom: 20px;
181
- }
182
-
183
- #content pre[class*=language-] code {
184
- font-size: 14px;
185
- padding: 0;
186
- }
187
-
188
- #content code[class*=language-] {
189
- font-size: 12px;
190
- padding: 2px 4px;
191
- }
192
-
193
- .anchor {
194
- color: inherit;
195
- position: relative;
196
- }
197
-
198
- .anchor:hover {
199
- background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSI3Ij48ZyBmaWxsPSIjNDE0MDQyIj48cGF0aCBkPSJNOS44IDdoLS45bC0uOS0uMWMtLjctLjMtMS40LS43LTEuOC0xLjMtLjItLjEtLjMtLjMtLjMtLjVsLS4zLS40Yy0uMS0uNC0uMi0uOC0uMi0xLjIgMC0uNC4xLS44LjItMS4yaDEuN2MtLjMuNC0uNC44LS40IDEuMiAwIC40LjEuOC4zIDEuMS4xLjIuMi4zLjQuNC4xLjEuMi4yLjQuMy4zLjIuNy4zIDEgLjNoMy40YzEuMiAwIDIuMi0uOSAyLjItMi4xcy0xLTIuMS0yLjItMi4xaC0xLjRjLS4zLS42LS43LTEtMS4yLTEuNGgyLjZjMiAwIDMuNiAxLjYgMy42IDMuNXMtMS42IDMuNS0zLjYgMy41aC0yLjZ6TTguNCAyYy0uMS0uMS0uMi0uMy0uNC0uMy0uMy0uMi0uNy0uMy0xLS4zaC0zLjRjLTEuMiAwLTIuMi45LTIuMiAyLjEgMCAxLjIgMSAyLjEgMi4yIDIuMWgxLjRjLjMuNS43IDEgMS4yIDEuNGgtMi42Yy0yIDAtMy42LTEuNi0zLjYtMy41czEuNi0zLjUgMy42LTMuNWgzLjUwMDAwMDAwMDAwMDAwMDRsLjkuMWMuNy4yIDEuNC43IDEuOCAxLjMuMS4xLjIuMy4zLjUuMS4xLjIuMy4yLjUuMS40LjIuOC4yIDEuMiAwIC40LS4xLjgtLjIgMS4yaC0xLjZjLjMtLjUuNC0uOS40LTEuM3MtLjEtLjgtLjMtMS4xYy0uMS0uMi0uMi0uMy0uNC0uNHoiLz48L2c+PC9zdmc+) 0 50% no-repeat;
200
- background-size: 21px 9px;
201
- margin-left: -27px;
202
- padding-left: 27px;
203
- text-decoration: none;
204
- }
205
-
206
- .select,
207
- .chosen-select,
208
- .chosen-select-no-single,
209
- .chosen-select-no-results,
210
- .chosen-select-deselect,
211
- .chosen-select-rtl,
212
- .chosen-select-width {
213
- width: 350px;
214
- }
215
-
216
- .jquery-version-refer {
217
- margin-top: 40px;
218
- font-style: italic;
219
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/index.html CHANGED
@@ -1,1473 +1,7 @@
1
  <!doctype html>
2
  <html lang="en">
3
  <head>
4
- <meta charset="utf-8">
5
- <title>Chosen: A jQuery Plugin by Harvest to Tame Unwieldy Select Boxes</title>
6
- <link rel="stylesheet" href="docsupport/style.css">
7
- <link rel="stylesheet" href="docsupport/prism.css">
8
- <link rel="stylesheet" href="chosen.css">
9
-
10
- <meta http-equiv="Content-Security-Policy" content="default-src &apos;self&apos;; script-src &apos;self&apos; https://ajax.googleapis.com; style-src &apos;self&apos;; img-src &apos;self&apos; data:">
11
-
12
  </head>
13
  <body>
14
- <form>
15
- <div id="container">
16
- <div id="content">
17
- <header>
18
- <h1>Chosen <small>(<span id="latest-version">v1.8.3</span>)</small></h1>
19
- </header>
20
- <p>Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly.</p>
21
-
22
- <p>
23
- <a class="button button-blue" href="https://github.com/harvesthq/chosen/releases">Downloads</a>
24
- <a class="button" href="https://github.com/harvesthq/chosen">Project Source</a>
25
- <a class="button" href="https://github.com/harvesthq/chosen/blob/master/contributing.md">Contribute</a>
26
- </p>
27
-
28
- <h2><a name="standard-select" class="anchor" href="#standard-select">Standard Select</a></h2>
29
- <div class="side-by-side clearfix">
30
- <div>
31
- <em>Turns This</em>
32
- <select data-placeholder="Choose a Country..." class="select" tabindex="1">
33
- <option value=""></option>
34
- <option value="United States">United States</option>
35
- <option value="United Kingdom">United Kingdom</option>
36
- <option value="Afghanistan">Afghanistan</option>
37
- <option value="Aland Islands">Aland Islands</option>
38
- <option value="Albania">Albania</option>
39
- <option value="Algeria">Algeria</option>
40
- <option value="American Samoa">American Samoa</option>
41
- <option value="Andorra">Andorra</option>
42
- <option value="Angola">Angola</option>
43
- <option value="Anguilla">Anguilla</option>
44
- <option value="Antarctica">Antarctica</option>
45
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
46
- <option value="Argentina">Argentina</option>
47
- <option value="Armenia">Armenia</option>
48
- <option value="Aruba">Aruba</option>
49
- <option value="Australia">Australia</option>
50
- <option value="Austria">Austria</option>
51
- <option value="Azerbaijan">Azerbaijan</option>
52
- <option value="Bahamas">Bahamas</option>
53
- <option value="Bahrain">Bahrain</option>
54
- <option value="Bangladesh">Bangladesh</option>
55
- <option value="Barbados">Barbados</option>
56
- <option value="Belarus">Belarus</option>
57
- <option value="Belgium">Belgium</option>
58
- <option value="Belize">Belize</option>
59
- <option value="Benin">Benin</option>
60
- <option value="Bermuda">Bermuda</option>
61
- <option value="Bhutan">Bhutan</option>
62
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
63
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
64
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
65
- <option value="Botswana">Botswana</option>
66
- <option value="Bouvet Island">Bouvet Island</option>
67
- <option value="Brazil">Brazil</option>
68
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
69
- <option value="Brunei Darussalam">Brunei Darussalam</option>
70
- <option value="Bulgaria">Bulgaria</option>
71
- <option value="Burkina Faso">Burkina Faso</option>
72
- <option value="Burundi">Burundi</option>
73
- <option value="Cambodia">Cambodia</option>
74
- <option value="Cameroon">Cameroon</option>
75
- <option value="Canada">Canada</option>
76
- <option value="Cape Verde">Cape Verde</option>
77
- <option value="Cayman Islands">Cayman Islands</option>
78
- <option value="Central African Republic">Central African Republic</option>
79
- <option value="Chad">Chad</option>
80
- <option value="Chile">Chile</option>
81
- <option value="China">China</option>
82
- <option value="Christmas Island">Christmas Island</option>
83
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
84
- <option value="Colombia">Colombia</option>
85
- <option value="Comoros">Comoros</option>
86
- <option value="Congo">Congo</option>
87
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
88
- <option value="Cook Islands">Cook Islands</option>
89
- <option value="Costa Rica">Costa Rica</option>
90
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
91
- <option value="Croatia">Croatia</option>
92
- <option value="Cuba">Cuba</option>
93
- <option value="Curacao">Curacao</option>
94
- <option value="Cyprus">Cyprus</option>
95
- <option value="Czech Republic">Czech Republic</option>
96
- <option value="Denmark">Denmark</option>
97
- <option value="Djibouti">Djibouti</option>
98
- <option value="Dominica">Dominica</option>
99
- <option value="Dominican Republic">Dominican Republic</option>
100
- <option value="Ecuador">Ecuador</option>
101
- <option value="Egypt">Egypt</option>
102
- <option value="El Salvador">El Salvador</option>
103
- <option value="Equatorial Guinea">Equatorial Guinea</option>
104
- <option value="Eritrea">Eritrea</option>
105
- <option value="Estonia">Estonia</option>
106
- <option value="Ethiopia">Ethiopia</option>
107
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
108
- <option value="Faroe Islands">Faroe Islands</option>
109
- <option value="Fiji">Fiji</option>
110
- <option value="Finland">Finland</option>
111
- <option value="France">France</option>
112
- <option value="French Guiana">French Guiana</option>
113
- <option value="French Polynesia">French Polynesia</option>
114
- <option value="French Southern Territories">French Southern Territories</option>
115
- <option value="Gabon">Gabon</option>
116
- <option value="Gambia">Gambia</option>
117
- <option value="Georgia">Georgia</option>
118
- <option value="Germany">Germany</option>
119
- <option value="Ghana">Ghana</option>
120
- <option value="Gibraltar">Gibraltar</option>
121
- <option value="Greece">Greece</option>
122
- <option value="Greenland">Greenland</option>
123
- <option value="Grenada">Grenada</option>
124
- <option value="Guadeloupe">Guadeloupe</option>
125
- <option value="Guam">Guam</option>
126
- <option value="Guatemala">Guatemala</option>
127
- <option value="Guernsey">Guernsey</option>
128
- <option value="Guinea">Guinea</option>
129
- <option value="Guinea-bissau">Guinea-bissau</option>
130
- <option value="Guyana">Guyana</option>
131
- <option value="Haiti">Haiti</option>
132
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
133
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
134
- <option value="Honduras">Honduras</option>
135
- <option value="Hong Kong">Hong Kong</option>
136
- <option value="Hungary">Hungary</option>
137
- <option value="Iceland">Iceland</option>
138
- <option value="India">India</option>
139
- <option value="Indonesia">Indonesia</option>
140
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
141
- <option value="Iraq">Iraq</option>
142
- <option value="Ireland">Ireland</option>
143
- <option value="Isle of Man">Isle of Man</option>
144
- <option value="Israel">Israel</option>
145
- <option value="Italy">Italy</option>
146
- <option value="Jamaica">Jamaica</option>
147
- <option value="Japan">Japan</option>
148
- <option value="Jersey">Jersey</option>
149
- <option value="Jordan">Jordan</option>
150
- <option value="Kazakhstan">Kazakhstan</option>
151
- <option value="Kenya">Kenya</option>
152
- <option value="Kiribati">Kiribati</option>
153
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
154
- <option value="Korea, Republic of">Korea, Republic of</option>
155
- <option value="Kuwait">Kuwait</option>
156
- <option value="Kyrgyzstan">Kyrgyzstan</option>
157
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
158
- <option value="Latvia">Latvia</option>
159
- <option value="Lebanon">Lebanon</option>
160
- <option value="Lesotho">Lesotho</option>
161
- <option value="Liberia">Liberia</option>
162
- <option value="Libya">Libya</option>
163
- <option value="Liechtenstein">Liechtenstein</option>
164
- <option value="Lithuania">Lithuania</option>
165
- <option value="Luxembourg">Luxembourg</option>
166
- <option value="Macao">Macao</option>
167
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
168
- <option value="Madagascar">Madagascar</option>
169
- <option value="Malawi">Malawi</option>
170
- <option value="Malaysia">Malaysia</option>
171
- <option value="Maldives">Maldives</option>
172
- <option value="Mali">Mali</option>
173
- <option value="Malta">Malta</option>
174
- <option value="Marshall Islands">Marshall Islands</option>
175
- <option value="Martinique">Martinique</option>
176
- <option value="Mauritania">Mauritania</option>
177
- <option value="Mauritius">Mauritius</option>
178
- <option value="Mayotte">Mayotte</option>
179
- <option value="Mexico">Mexico</option>
180
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
181
- <option value="Moldova, Republic of">Moldova, Republic of</option>
182
- <option value="Monaco">Monaco</option>
183
- <option value="Mongolia">Mongolia</option>
184
- <option value="Montenegro">Montenegro</option>
185
- <option value="Montserrat">Montserrat</option>
186
- <option value="Morocco">Morocco</option>
187
- <option value="Mozambique">Mozambique</option>
188
- <option value="Myanmar">Myanmar</option>
189
- <option value="Namibia">Namibia</option>
190
- <option value="Nauru">Nauru</option>
191
- <option value="Nepal">Nepal</option>
192
- <option value="Netherlands">Netherlands</option>
193
- <option value="New Caledonia">New Caledonia</option>
194
- <option value="New Zealand">New Zealand</option>
195
- <option value="Nicaragua">Nicaragua</option>
196
- <option value="Niger">Niger</option>
197
- <option value="Nigeria">Nigeria</option>
198
- <option value="Niue">Niue</option>
199
- <option value="Norfolk Island">Norfolk Island</option>
200
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
201
- <option value="Norway">Norway</option>
202
- <option value="Oman">Oman</option>
203
- <option value="Pakistan">Pakistan</option>
204
- <option value="Palau">Palau</option>
205
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
206
- <option value="Panama">Panama</option>
207
- <option value="Papua New Guinea">Papua New Guinea</option>
208
- <option value="Paraguay">Paraguay</option>
209
- <option value="Peru">Peru</option>
210
- <option value="Philippines">Philippines</option>
211
- <option value="Pitcairn">Pitcairn</option>
212
- <option value="Poland">Poland</option>
213
- <option value="Portugal">Portugal</option>
214
- <option value="Puerto Rico">Puerto Rico</option>
215
- <option value="Qatar">Qatar</option>
216
- <option value="Reunion">Reunion</option>
217
- <option value="Romania">Romania</option>
218
- <option value="Russian Federation">Russian Federation</option>
219
- <option value="Rwanda">Rwanda</option>
220
- <option value="Saint Barthelemy">Saint Barthelemy</option>
221
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
222
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
223
- <option value="Saint Lucia">Saint Lucia</option>
224
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
225
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
226
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
227
- <option value="Samoa">Samoa</option>
228
- <option value="San Marino">San Marino</option>
229
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
230
- <option value="Saudi Arabia">Saudi Arabia</option>
231
- <option value="Senegal">Senegal</option>
232
- <option value="Serbia">Serbia</option>
233
- <option value="Seychelles">Seychelles</option>
234
- <option value="Sierra Leone">Sierra Leone</option>
235
- <option value="Singapore">Singapore</option>
236
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
237
- <option value="Slovakia">Slovakia</option>
238
- <option value="Slovenia">Slovenia</option>
239
- <option value="Solomon Islands">Solomon Islands</option>
240
- <option value="Somalia">Somalia</option>
241
- <option value="South Africa">South Africa</option>
242
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
243
- <option value="South Sudan">South Sudan</option>
244
- <option value="Spain">Spain</option>
245
- <option value="Sri Lanka">Sri Lanka</option>
246
- <option value="Sudan">Sudan</option>
247
- <option value="Suriname">Suriname</option>
248
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
249
- <option value="Swaziland">Swaziland</option>
250
- <option value="Sweden">Sweden</option>
251
- <option value="Switzerland">Switzerland</option>
252
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
253
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
254
- <option value="Tajikistan">Tajikistan</option>
255
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
256
- <option value="Thailand">Thailand</option>
257
- <option value="Timor-leste">Timor-leste</option>
258
- <option value="Togo">Togo</option>
259
- <option value="Tokelau">Tokelau</option>
260
- <option value="Tonga">Tonga</option>
261
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
262
- <option value="Tunisia">Tunisia</option>
263
- <option value="Turkey">Turkey</option>
264
- <option value="Turkmenistan">Turkmenistan</option>
265
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
266
- <option value="Tuvalu">Tuvalu</option>
267
- <option value="Uganda">Uganda</option>
268
- <option value="Ukraine">Ukraine</option>
269
- <option value="United Arab Emirates">United Arab Emirates</option>
270
- <option value="United Kingdom">United Kingdom</option>
271
- <option value="United States">United States</option>
272
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
273
- <option value="Uruguay">Uruguay</option>
274
- <option value="Uzbekistan">Uzbekistan</option>
275
- <option value="Vanuatu">Vanuatu</option>
276
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
277
- <option value="Viet Nam">Viet Nam</option>
278
- <option value="Virgin Islands, British">Virgin Islands, British</option>
279
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
280
- <option value="Wallis and Futuna">Wallis and Futuna</option>
281
- <option value="Western Sahara">Western Sahara</option>
282
- <option value="Yemen">Yemen</option>
283
- <option value="Zambia">Zambia</option>
284
- <option value="Zimbabwe">Zimbabwe</option>
285
- </select>
286
- </div>
287
- <div>
288
- <em>Into This</em>
289
- <select data-placeholder="Choose a Country..." class="chosen-select" tabindex="2">
290
- <option value=""></option>
291
- <option value="United States">United States</option>
292
- <option value="United Kingdom">United Kingdom</option>
293
- <option value="Afghanistan">Afghanistan</option>
294
- <option value="Aland Islands">Aland Islands</option>
295
- <option value="Albania">Albania</option>
296
- <option value="Algeria">Algeria</option>
297
- <option value="American Samoa">American Samoa</option>
298
- <option value="Andorra">Andorra</option>
299
- <option value="Angola">Angola</option>
300
- <option value="Anguilla">Anguilla</option>
301
- <option value="Antarctica">Antarctica</option>
302
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
303
- <option value="Argentina">Argentina</option>
304
- <option value="Armenia">Armenia</option>
305
- <option value="Aruba">Aruba</option>
306
- <option value="Australia">Australia</option>
307
- <option value="Austria">Austria</option>
308
- <option value="Azerbaijan">Azerbaijan</option>
309
- <option value="Bahamas">Bahamas</option>
310
- <option value="Bahrain">Bahrain</option>
311
- <option value="Bangladesh">Bangladesh</option>
312
- <option value="Barbados">Barbados</option>
313
- <option value="Belarus">Belarus</option>
314
- <option value="Belgium">Belgium</option>
315
- <option value="Belize">Belize</option>
316
- <option value="Benin">Benin</option>
317
- <option value="Bermuda">Bermuda</option>
318
- <option value="Bhutan">Bhutan</option>
319
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
320
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
321
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
322
- <option value="Botswana">Botswana</option>
323
- <option value="Bouvet Island">Bouvet Island</option>
324
- <option value="Brazil">Brazil</option>
325
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
326
- <option value="Brunei Darussalam">Brunei Darussalam</option>
327
- <option value="Bulgaria">Bulgaria</option>
328
- <option value="Burkina Faso">Burkina Faso</option>
329
- <option value="Burundi">Burundi</option>
330
- <option value="Cambodia">Cambodia</option>
331
- <option value="Cameroon">Cameroon</option>
332
- <option value="Canada">Canada</option>
333
- <option value="Cape Verde">Cape Verde</option>
334
- <option value="Cayman Islands">Cayman Islands</option>
335
- <option value="Central African Republic">Central African Republic</option>
336
- <option value="Chad">Chad</option>
337
- <option value="Chile">Chile</option>
338
- <option value="China">China</option>
339
- <option value="Christmas Island">Christmas Island</option>
340
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
341
- <option value="Colombia">Colombia</option>
342
- <option value="Comoros">Comoros</option>
343
- <option value="Congo">Congo</option>
344
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
345
- <option value="Cook Islands">Cook Islands</option>
346
- <option value="Costa Rica">Costa Rica</option>
347
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
348
- <option value="Croatia">Croatia</option>
349
- <option value="Cuba">Cuba</option>
350
- <option value="Curacao">Curacao</option>
351
- <option value="Cyprus">Cyprus</option>
352
- <option value="Czech Republic">Czech Republic</option>
353
- <option value="Denmark">Denmark</option>
354
- <option value="Djibouti">Djibouti</option>
355
- <option value="Dominica">Dominica</option>
356
- <option value="Dominican Republic">Dominican Republic</option>
357
- <option value="Ecuador">Ecuador</option>
358
- <option value="Egypt">Egypt</option>
359
- <option value="El Salvador">El Salvador</option>
360
- <option value="Equatorial Guinea">Equatorial Guinea</option>
361
- <option value="Eritrea">Eritrea</option>
362
- <option value="Estonia">Estonia</option>
363
- <option value="Ethiopia">Ethiopia</option>
364
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
365
- <option value="Faroe Islands">Faroe Islands</option>
366
- <option value="Fiji">Fiji</option>
367
- <option value="Finland">Finland</option>
368
- <option value="France">France</option>
369
- <option value="French Guiana">French Guiana</option>
370
- <option value="French Polynesia">French Polynesia</option>
371
- <option value="French Southern Territories">French Southern Territories</option>
372
- <option value="Gabon">Gabon</option>
373
- <option value="Gambia">Gambia</option>
374
- <option value="Georgia">Georgia</option>
375
- <option value="Germany">Germany</option>
376
- <option value="Ghana">Ghana</option>
377
- <option value="Gibraltar">Gibraltar</option>
378
- <option value="Greece">Greece</option>
379
- <option value="Greenland">Greenland</option>
380
- <option value="Grenada">Grenada</option>
381
- <option value="Guadeloupe">Guadeloupe</option>
382
- <option value="Guam">Guam</option>
383
- <option value="Guatemala">Guatemala</option>
384
- <option value="Guernsey">Guernsey</option>
385
- <option value="Guinea">Guinea</option>
386
- <option value="Guinea-bissau">Guinea-bissau</option>
387
- <option value="Guyana">Guyana</option>
388
- <option value="Haiti">Haiti</option>
389
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
390
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
391
- <option value="Honduras">Honduras</option>
392
- <option value="Hong Kong">Hong Kong</option>
393
- <option value="Hungary">Hungary</option>
394
- <option value="Iceland">Iceland</option>
395
- <option value="India">India</option>
396
- <option value="Indonesia">Indonesia</option>
397
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
398
- <option value="Iraq">Iraq</option>
399
- <option value="Ireland">Ireland</option>
400
- <option value="Isle of Man">Isle of Man</option>
401
- <option value="Israel">Israel</option>
402
- <option value="Italy">Italy</option>
403
- <option value="Jamaica">Jamaica</option>
404
- <option value="Japan">Japan</option>
405
- <option value="Jersey">Jersey</option>
406
- <option value="Jordan">Jordan</option>
407
- <option value="Kazakhstan">Kazakhstan</option>
408
- <option value="Kenya">Kenya</option>
409
- <option value="Kiribati">Kiribati</option>
410
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
411
- <option value="Korea, Republic of">Korea, Republic of</option>
412
- <option value="Kuwait">Kuwait</option>
413
- <option value="Kyrgyzstan">Kyrgyzstan</option>
414
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
415
- <option value="Latvia">Latvia</option>
416
- <option value="Lebanon">Lebanon</option>
417
- <option value="Lesotho">Lesotho</option>
418
- <option value="Liberia">Liberia</option>
419
- <option value="Libya">Libya</option>
420
- <option value="Liechtenstein">Liechtenstein</option>
421
- <option value="Lithuania">Lithuania</option>
422
- <option value="Luxembourg">Luxembourg</option>
423
- <option value="Macao">Macao</option>
424
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
425
- <option value="Madagascar">Madagascar</option>
426
- <option value="Malawi">Malawi</option>
427
- <option value="Malaysia">Malaysia</option>
428
- <option value="Maldives">Maldives</option>
429
- <option value="Mali">Mali</option>
430
- <option value="Malta">Malta</option>
431
- <option value="Marshall Islands">Marshall Islands</option>
432
- <option value="Martinique">Martinique</option>
433
- <option value="Mauritania">Mauritania</option>
434
- <option value="Mauritius">Mauritius</option>
435
- <option value="Mayotte">Mayotte</option>
436
- <option value="Mexico">Mexico</option>
437
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
438
- <option value="Moldova, Republic of">Moldova, Republic of</option>
439
- <option value="Monaco">Monaco</option>
440
- <option value="Mongolia">Mongolia</option>
441
- <option value="Montenegro">Montenegro</option>
442
- <option value="Montserrat">Montserrat</option>
443
- <option value="Morocco">Morocco</option>
444
- <option value="Mozambique">Mozambique</option>
445
- <option value="Myanmar">Myanmar</option>
446
- <option value="Namibia">Namibia</option>
447
- <option value="Nauru">Nauru</option>
448
- <option value="Nepal">Nepal</option>
449
- <option value="Netherlands">Netherlands</option>
450
- <option value="New Caledonia">New Caledonia</option>
451
- <option value="New Zealand">New Zealand</option>
452
- <option value="Nicaragua">Nicaragua</option>
453
- <option value="Niger">Niger</option>
454
- <option value="Nigeria">Nigeria</option>
455
- <option value="Niue">Niue</option>
456
- <option value="Norfolk Island">Norfolk Island</option>
457
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
458
- <option value="Norway">Norway</option>
459
- <option value="Oman">Oman</option>
460
- <option value="Pakistan">Pakistan</option>
461
- <option value="Palau">Palau</option>
462
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
463
- <option value="Panama">Panama</option>
464
- <option value="Papua New Guinea">Papua New Guinea</option>
465
- <option value="Paraguay">Paraguay</option>
466
- <option value="Peru">Peru</option>
467
- <option value="Philippines">Philippines</option>
468
- <option value="Pitcairn">Pitcairn</option>
469
- <option value="Poland">Poland</option>
470
- <option value="Portugal">Portugal</option>
471
- <option value="Puerto Rico">Puerto Rico</option>
472
- <option value="Qatar">Qatar</option>
473
- <option value="Reunion">Reunion</option>
474
- <option value="Romania">Romania</option>
475
- <option value="Russian Federation">Russian Federation</option>
476
- <option value="Rwanda">Rwanda</option>
477
- <option value="Saint Barthelemy">Saint Barthelemy</option>
478
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
479
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
480
- <option value="Saint Lucia">Saint Lucia</option>
481
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
482
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
483
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
484
- <option value="Samoa">Samoa</option>
485
- <option value="San Marino">San Marino</option>
486
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
487
- <option value="Saudi Arabia">Saudi Arabia</option>
488
- <option value="Senegal">Senegal</option>
489
- <option value="Serbia">Serbia</option>
490
- <option value="Seychelles">Seychelles</option>
491
- <option value="Sierra Leone">Sierra Leone</option>
492
- <option value="Singapore">Singapore</option>
493
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
494
- <option value="Slovakia">Slovakia</option>
495
- <option value="Slovenia">Slovenia</option>
496
- <option value="Solomon Islands">Solomon Islands</option>
497
- <option value="Somalia">Somalia</option>
498
- <option value="South Africa">South Africa</option>
499
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
500
- <option value="South Sudan">South Sudan</option>
501
- <option value="Spain">Spain</option>
502
- <option value="Sri Lanka">Sri Lanka</option>
503
- <option value="Sudan">Sudan</option>
504
- <option value="Suriname">Suriname</option>
505
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
506
- <option value="Swaziland">Swaziland</option>
507
- <option value="Sweden">Sweden</option>
508
- <option value="Switzerland">Switzerland</option>
509
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
510
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
511
- <option value="Tajikistan">Tajikistan</option>
512
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
513
- <option value="Thailand">Thailand</option>
514
- <option value="Timor-leste">Timor-leste</option>
515
- <option value="Togo">Togo</option>
516
- <option value="Tokelau">Tokelau</option>
517
- <option value="Tonga">Tonga</option>
518
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
519
- <option value="Tunisia">Tunisia</option>
520
- <option value="Turkey">Turkey</option>
521
- <option value="Turkmenistan">Turkmenistan</option>
522
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
523
- <option value="Tuvalu">Tuvalu</option>
524
- <option value="Uganda">Uganda</option>
525
- <option value="Ukraine">Ukraine</option>
526
- <option value="United Arab Emirates">United Arab Emirates</option>
527
- <option value="United Kingdom">United Kingdom</option>
528
- <option value="United States">United States</option>
529
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
530
- <option value="Uruguay">Uruguay</option>
531
- <option value="Uzbekistan">Uzbekistan</option>
532
- <option value="Vanuatu">Vanuatu</option>
533
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
534
- <option value="Viet Nam">Viet Nam</option>
535
- <option value="Virgin Islands, British">Virgin Islands, British</option>
536
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
537
- <option value="Wallis and Futuna">Wallis and Futuna</option>
538
- <option value="Western Sahara">Western Sahara</option>
539
- <option value="Yemen">Yemen</option>
540
- <option value="Zambia">Zambia</option>
541
- <option value="Zimbabwe">Zimbabwe</option>
542
- </select>
543
- </div>
544
- </div>
545
-
546
- <h2><a name="multiple-select" class="anchor" href="#multiple-select">Multiple Select</a></h2>
547
- <div class="side-by-side clearfix">
548
- <div>
549
- <em>Turns This</em>
550
- <select data-placeholder="Choose a Country..." class="select" multiple tabindex="3">
551
- <option value=""></option>
552
- <option value="United States">United States</option>
553
- <option value="United Kingdom">United Kingdom</option>
554
- <option value="Afghanistan">Afghanistan</option>
555
- <option value="Aland Islands">Aland Islands</option>
556
- <option value="Albania">Albania</option>
557
- <option value="Algeria">Algeria</option>
558
- <option value="American Samoa">American Samoa</option>
559
- <option value="Andorra">Andorra</option>
560
- <option value="Angola">Angola</option>
561
- <option value="Anguilla">Anguilla</option>
562
- <option value="Antarctica">Antarctica</option>
563
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
564
- <option value="Argentina">Argentina</option>
565
- <option value="Armenia">Armenia</option>
566
- <option value="Aruba">Aruba</option>
567
- <option value="Australia">Australia</option>
568
- <option value="Austria">Austria</option>
569
- <option value="Azerbaijan">Azerbaijan</option>
570
- <option value="Bahamas">Bahamas</option>
571
- <option value="Bahrain">Bahrain</option>
572
- <option value="Bangladesh">Bangladesh</option>
573
- <option value="Barbados">Barbados</option>
574
- <option value="Belarus">Belarus</option>
575
- <option value="Belgium">Belgium</option>
576
- <option value="Belize">Belize</option>
577
- <option value="Benin">Benin</option>
578
- <option value="Bermuda">Bermuda</option>
579
- <option value="Bhutan">Bhutan</option>
580
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
581
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
582
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
583
- <option value="Botswana">Botswana</option>
584
- <option value="Bouvet Island">Bouvet Island</option>
585
- <option value="Brazil">Brazil</option>
586
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
587
- <option value="Brunei Darussalam">Brunei Darussalam</option>
588
- <option value="Bulgaria">Bulgaria</option>
589
- <option value="Burkina Faso">Burkina Faso</option>
590
- <option value="Burundi">Burundi</option>
591
- <option value="Cambodia">Cambodia</option>
592
- <option value="Cameroon">Cameroon</option>
593
- <option value="Canada">Canada</option>
594
- <option value="Cape Verde">Cape Verde</option>
595
- <option value="Cayman Islands">Cayman Islands</option>
596
- <option value="Central African Republic">Central African Republic</option>
597
- <option value="Chad">Chad</option>
598
- <option value="Chile">Chile</option>
599
- <option value="China">China</option>
600
- <option value="Christmas Island">Christmas Island</option>
601
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
602
- <option value="Colombia">Colombia</option>
603
- <option value="Comoros">Comoros</option>
604
- <option value="Congo">Congo</option>
605
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
606
- <option value="Cook Islands">Cook Islands</option>
607
- <option value="Costa Rica">Costa Rica</option>
608
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
609
- <option value="Croatia">Croatia</option>
610
- <option value="Cuba">Cuba</option>
611
- <option value="Curacao">Curacao</option>
612
- <option value="Cyprus">Cyprus</option>
613
- <option value="Czech Republic">Czech Republic</option>
614
- <option value="Denmark">Denmark</option>
615
- <option value="Djibouti">Djibouti</option>
616
- <option value="Dominica">Dominica</option>
617
- <option value="Dominican Republic">Dominican Republic</option>
618
- <option value="Ecuador">Ecuador</option>
619
- <option value="Egypt">Egypt</option>
620
- <option value="El Salvador">El Salvador</option>
621
- <option value="Equatorial Guinea">Equatorial Guinea</option>
622
- <option value="Eritrea">Eritrea</option>
623
- <option value="Estonia">Estonia</option>
624
- <option value="Ethiopia">Ethiopia</option>
625
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
626
- <option value="Faroe Islands">Faroe Islands</option>
627
- <option value="Fiji">Fiji</option>
628
- <option value="Finland">Finland</option>
629
- <option value="France">France</option>
630
- <option value="French Guiana">French Guiana</option>
631
- <option value="French Polynesia">French Polynesia</option>
632
- <option value="French Southern Territories">French Southern Territories</option>
633
- <option value="Gabon">Gabon</option>
634
- <option value="Gambia">Gambia</option>
635
- <option value="Georgia">Georgia</option>
636
- <option value="Germany">Germany</option>
637
- <option value="Ghana">Ghana</option>
638
- <option value="Gibraltar">Gibraltar</option>
639
- <option value="Greece">Greece</option>
640
- <option value="Greenland">Greenland</option>
641
- <option value="Grenada">Grenada</option>
642
- <option value="Guadeloupe">Guadeloupe</option>
643
- <option value="Guam">Guam</option>
644
- <option value="Guatemala">Guatemala</option>
645
- <option value="Guernsey">Guernsey</option>
646
- <option value="Guinea">Guinea</option>
647
- <option value="Guinea-bissau">Guinea-bissau</option>
648
- <option value="Guyana">Guyana</option>
649
- <option value="Haiti">Haiti</option>
650
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
651
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
652
- <option value="Honduras">Honduras</option>
653
- <option value="Hong Kong">Hong Kong</option>
654
- <option value="Hungary">Hungary</option>
655
- <option value="Iceland">Iceland</option>
656
- <option value="India">India</option>
657
- <option value="Indonesia">Indonesia</option>
658
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
659
- <option value="Iraq">Iraq</option>
660
- <option value="Ireland">Ireland</option>
661
- <option value="Isle of Man">Isle of Man</option>
662
- <option value="Israel">Israel</option>
663
- <option value="Italy">Italy</option>
664
- <option value="Jamaica">Jamaica</option>
665
- <option value="Japan">Japan</option>
666
- <option value="Jersey">Jersey</option>
667
- <option value="Jordan">Jordan</option>
668
- <option value="Kazakhstan">Kazakhstan</option>
669
- <option value="Kenya">Kenya</option>
670
- <option value="Kiribati">Kiribati</option>
671
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
672
- <option value="Korea, Republic of">Korea, Republic of</option>
673
- <option value="Kuwait">Kuwait</option>
674
- <option value="Kyrgyzstan">Kyrgyzstan</option>
675
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
676
- <option value="Latvia">Latvia</option>
677
- <option value="Lebanon">Lebanon</option>
678
- <option value="Lesotho">Lesotho</option>
679
- <option value="Liberia">Liberia</option>
680
- <option value="Libya">Libya</option>
681
- <option value="Liechtenstein">Liechtenstein</option>
682
- <option value="Lithuania">Lithuania</option>
683
- <option value="Luxembourg">Luxembourg</option>
684
- <option value="Macao">Macao</option>
685
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
686
- <option value="Madagascar">Madagascar</option>
687
- <option value="Malawi">Malawi</option>
688
- <option value="Malaysia">Malaysia</option>
689
- <option value="Maldives">Maldives</option>
690
- <option value="Mali">Mali</option>
691
- <option value="Malta">Malta</option>
692
- <option value="Marshall Islands">Marshall Islands</option>
693
- <option value="Martinique">Martinique</option>
694
- <option value="Mauritania">Mauritania</option>
695
- <option value="Mauritius">Mauritius</option>
696
- <option value="Mayotte">Mayotte</option>
697
- <option value="Mexico">Mexico</option>
698
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
699
- <option value="Moldova, Republic of">Moldova, Republic of</option>
700
- <option value="Monaco">Monaco</option>
701
- <option value="Mongolia">Mongolia</option>
702
- <option value="Montenegro">Montenegro</option>
703
- <option value="Montserrat">Montserrat</option>
704
- <option value="Morocco">Morocco</option>
705
- <option value="Mozambique">Mozambique</option>
706
- <option value="Myanmar">Myanmar</option>
707
- <option value="Namibia">Namibia</option>
708
- <option value="Nauru">Nauru</option>
709
- <option value="Nepal">Nepal</option>
710
- <option value="Netherlands">Netherlands</option>
711
- <option value="New Caledonia">New Caledonia</option>
712
- <option value="New Zealand">New Zealand</option>
713
- <option value="Nicaragua">Nicaragua</option>
714
- <option value="Niger">Niger</option>
715
- <option value="Nigeria">Nigeria</option>
716
- <option value="Niue">Niue</option>
717
- <option value="Norfolk Island">Norfolk Island</option>
718
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
719
- <option value="Norway">Norway</option>
720
- <option value="Oman">Oman</option>
721
- <option value="Pakistan">Pakistan</option>
722
- <option value="Palau">Palau</option>
723
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
724
- <option value="Panama">Panama</option>
725
- <option value="Papua New Guinea">Papua New Guinea</option>
726
- <option value="Paraguay">Paraguay</option>
727
- <option value="Peru">Peru</option>
728
- <option value="Philippines">Philippines</option>
729
- <option value="Pitcairn">Pitcairn</option>
730
- <option value="Poland">Poland</option>
731
- <option value="Portugal">Portugal</option>
732
- <option value="Puerto Rico">Puerto Rico</option>
733
- <option value="Qatar">Qatar</option>
734
- <option value="Reunion">Reunion</option>
735
- <option value="Romania">Romania</option>
736
- <option value="Russian Federation">Russian Federation</option>
737
- <option value="Rwanda">Rwanda</option>
738
- <option value="Saint Barthelemy">Saint Barthelemy</option>
739
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
740
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
741
- <option value="Saint Lucia">Saint Lucia</option>
742
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
743
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
744
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
745
- <option value="Samoa">Samoa</option>
746
- <option value="San Marino">San Marino</option>
747
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
748
- <option value="Saudi Arabia">Saudi Arabia</option>
749
- <option value="Senegal">Senegal</option>
750
- <option value="Serbia">Serbia</option>
751
- <option value="Seychelles">Seychelles</option>
752
- <option value="Sierra Leone">Sierra Leone</option>
753
- <option value="Singapore">Singapore</option>
754
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
755
- <option value="Slovakia">Slovakia</option>
756
- <option value="Slovenia">Slovenia</option>
757
- <option value="Solomon Islands">Solomon Islands</option>
758
- <option value="Somalia">Somalia</option>
759
- <option value="South Africa">South Africa</option>
760
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
761
- <option value="South Sudan">South Sudan</option>
762
- <option value="Spain">Spain</option>
763
- <option value="Sri Lanka">Sri Lanka</option>
764
- <option value="Sudan">Sudan</option>
765
- <option value="Suriname">Suriname</option>
766
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
767
- <option value="Swaziland">Swaziland</option>
768
- <option value="Sweden">Sweden</option>
769
- <option value="Switzerland">Switzerland</option>
770
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
771
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
772
- <option value="Tajikistan">Tajikistan</option>
773
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
774
- <option value="Thailand">Thailand</option>
775
- <option value="Timor-leste">Timor-leste</option>
776
- <option value="Togo">Togo</option>
777
- <option value="Tokelau">Tokelau</option>
778
- <option value="Tonga">Tonga</option>
779
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
780
- <option value="Tunisia">Tunisia</option>
781
- <option value="Turkey">Turkey</option>
782
- <option value="Turkmenistan">Turkmenistan</option>
783
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
784
- <option value="Tuvalu">Tuvalu</option>
785
- <option value="Uganda">Uganda</option>
786
- <option value="Ukraine">Ukraine</option>
787
- <option value="United Arab Emirates">United Arab Emirates</option>
788
- <option value="United Kingdom">United Kingdom</option>
789
- <option value="United States">United States</option>
790
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
791
- <option value="Uruguay">Uruguay</option>
792
- <option value="Uzbekistan">Uzbekistan</option>
793
- <option value="Vanuatu">Vanuatu</option>
794
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
795
- <option value="Viet Nam">Viet Nam</option>
796
- <option value="Virgin Islands, British">Virgin Islands, British</option>
797
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
798
- <option value="Wallis and Futuna">Wallis and Futuna</option>
799
- <option value="Western Sahara">Western Sahara</option>
800
- <option value="Yemen">Yemen</option>
801
- <option value="Zambia">Zambia</option>
802
- <option value="Zimbabwe">Zimbabwe</option>
803
- </select>
804
- </div>
805
- <div>
806
- <em>Into This</em>
807
- <select data-placeholder="Choose a Country..." class="chosen-select" multiple tabindex="4">
808
- <option value=""></option>
809
- <option value="United States">United States</option>
810
- <option value="United Kingdom">United Kingdom</option>
811
- <option value="Afghanistan">Afghanistan</option>
812
- <option value="Aland Islands">Aland Islands</option>
813
- <option value="Albania">Albania</option>
814
- <option value="Algeria">Algeria</option>
815
- <option value="American Samoa">American Samoa</option>
816
- <option value="Andorra">Andorra</option>
817
- <option value="Angola">Angola</option>
818
- <option value="Anguilla">Anguilla</option>
819
- <option value="Antarctica">Antarctica</option>
820
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
821
- <option value="Argentina">Argentina</option>
822
- <option value="Armenia">Armenia</option>
823
- <option value="Aruba">Aruba</option>
824
- <option value="Australia">Australia</option>
825
- <option value="Austria">Austria</option>
826
- <option value="Azerbaijan">Azerbaijan</option>
827
- <option value="Bahamas">Bahamas</option>
828
- <option value="Bahrain">Bahrain</option>
829
- <option value="Bangladesh">Bangladesh</option>
830
- <option value="Barbados">Barbados</option>
831
- <option value="Belarus">Belarus</option>
832
- <option value="Belgium">Belgium</option>
833
- <option value="Belize">Belize</option>
834
- <option value="Benin">Benin</option>
835
- <option value="Bermuda">Bermuda</option>
836
- <option value="Bhutan">Bhutan</option>
837
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
838
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
839
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
840
- <option value="Botswana">Botswana</option>
841
- <option value="Bouvet Island">Bouvet Island</option>
842
- <option value="Brazil">Brazil</option>
843
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
844
- <option value="Brunei Darussalam">Brunei Darussalam</option>
845
- <option value="Bulgaria">Bulgaria</option>
846
- <option value="Burkina Faso">Burkina Faso</option>
847
- <option value="Burundi">Burundi</option>
848
- <option value="Cambodia">Cambodia</option>
849
- <option value="Cameroon">Cameroon</option>
850
- <option value="Canada">Canada</option>
851
- <option value="Cape Verde">Cape Verde</option>
852
- <option value="Cayman Islands">Cayman Islands</option>
853
- <option value="Central African Republic">Central African Republic</option>
854
- <option value="Chad">Chad</option>
855
- <option value="Chile">Chile</option>
856
- <option value="China">China</option>
857
- <option value="Christmas Island">Christmas Island</option>
858
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
859
- <option value="Colombia">Colombia</option>
860
- <option value="Comoros">Comoros</option>
861
- <option value="Congo">Congo</option>
862
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
863
- <option value="Cook Islands">Cook Islands</option>
864
- <option value="Costa Rica">Costa Rica</option>
865
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
866
- <option value="Croatia">Croatia</option>
867
- <option value="Cuba">Cuba</option>
868
- <option value="Curacao">Curacao</option>
869
- <option value="Cyprus">Cyprus</option>
870
- <option value="Czech Republic">Czech Republic</option>
871
- <option value="Denmark">Denmark</option>
872
- <option value="Djibouti">Djibouti</option>
873
- <option value="Dominica">Dominica</option>
874
- <option value="Dominican Republic">Dominican Republic</option>
875
- <option value="Ecuador">Ecuador</option>
876
- <option value="Egypt">Egypt</option>
877
- <option value="El Salvador">El Salvador</option>
878
- <option value="Equatorial Guinea">Equatorial Guinea</option>
879
- <option value="Eritrea">Eritrea</option>
880
- <option value="Estonia">Estonia</option>
881
- <option value="Ethiopia">Ethiopia</option>
882
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
883
- <option value="Faroe Islands">Faroe Islands</option>
884
- <option value="Fiji">Fiji</option>
885
- <option value="Finland">Finland</option>
886
- <option value="France">France</option>
887
- <option value="French Guiana">French Guiana</option>
888
- <option value="French Polynesia">French Polynesia</option>
889
- <option value="French Southern Territories">French Southern Territories</option>
890
- <option value="Gabon">Gabon</option>
891
- <option value="Gambia">Gambia</option>
892
- <option value="Georgia">Georgia</option>
893
- <option value="Germany">Germany</option>
894
- <option value="Ghana">Ghana</option>
895
- <option value="Gibraltar">Gibraltar</option>
896
- <option value="Greece">Greece</option>
897
- <option value="Greenland">Greenland</option>
898
- <option value="Grenada">Grenada</option>
899
- <option value="Guadeloupe">Guadeloupe</option>
900
- <option value="Guam">Guam</option>
901
- <option value="Guatemala">Guatemala</option>
902
- <option value="Guernsey">Guernsey</option>
903
- <option value="Guinea">Guinea</option>
904
- <option value="Guinea-bissau">Guinea-bissau</option>
905
- <option value="Guyana">Guyana</option>
906
- <option value="Haiti">Haiti</option>
907
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
908
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
909
- <option value="Honduras">Honduras</option>
910
- <option value="Hong Kong">Hong Kong</option>
911
- <option value="Hungary">Hungary</option>
912
- <option value="Iceland">Iceland</option>
913
- <option value="India">India</option>
914
- <option value="Indonesia">Indonesia</option>
915
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
916
- <option value="Iraq">Iraq</option>
917
- <option value="Ireland">Ireland</option>
918
- <option value="Isle of Man">Isle of Man</option>
919
- <option value="Israel">Israel</option>
920
- <option value="Italy">Italy</option>
921
- <option value="Jamaica">Jamaica</option>
922
- <option value="Japan">Japan</option>
923
- <option value="Jersey">Jersey</option>
924
- <option value="Jordan">Jordan</option>
925
- <option value="Kazakhstan">Kazakhstan</option>
926
- <option value="Kenya">Kenya</option>
927
- <option value="Kiribati">Kiribati</option>
928
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
929
- <option value="Korea, Republic of">Korea, Republic of</option>
930
- <option value="Kuwait">Kuwait</option>
931
- <option value="Kyrgyzstan">Kyrgyzstan</option>
932
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
933
- <option value="Latvia">Latvia</option>
934
- <option value="Lebanon">Lebanon</option>
935
- <option value="Lesotho">Lesotho</option>
936
- <option value="Liberia">Liberia</option>
937
- <option value="Libya">Libya</option>
938
- <option value="Liechtenstein">Liechtenstein</option>
939
- <option value="Lithuania">Lithuania</option>
940
- <option value="Luxembourg">Luxembourg</option>
941
- <option value="Macao">Macao</option>
942
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
943
- <option value="Madagascar">Madagascar</option>
944
- <option value="Malawi">Malawi</option>
945
- <option value="Malaysia">Malaysia</option>
946
- <option value="Maldives">Maldives</option>
947
- <option value="Mali">Mali</option>
948
- <option value="Malta">Malta</option>
949
- <option value="Marshall Islands">Marshall Islands</option>
950
- <option value="Martinique">Martinique</option>
951
- <option value="Mauritania">Mauritania</option>
952
- <option value="Mauritius">Mauritius</option>
953
- <option value="Mayotte">Mayotte</option>
954
- <option value="Mexico">Mexico</option>
955
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
956
- <option value="Moldova, Republic of">Moldova, Republic of</option>
957
- <option value="Monaco">Monaco</option>
958
- <option value="Mongolia">Mongolia</option>
959
- <option value="Montenegro">Montenegro</option>
960
- <option value="Montserrat">Montserrat</option>
961
- <option value="Morocco">Morocco</option>
962
- <option value="Mozambique">Mozambique</option>
963
- <option value="Myanmar">Myanmar</option>
964
- <option value="Namibia">Namibia</option>
965
- <option value="Nauru">Nauru</option>
966
- <option value="Nepal">Nepal</option>
967
- <option value="Netherlands">Netherlands</option>
968
- <option value="New Caledonia">New Caledonia</option>
969
- <option value="New Zealand">New Zealand</option>
970
- <option value="Nicaragua">Nicaragua</option>
971
- <option value="Niger">Niger</option>
972
- <option value="Nigeria">Nigeria</option>
973
- <option value="Niue">Niue</option>
974
- <option value="Norfolk Island">Norfolk Island</option>
975
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
976
- <option value="Norway">Norway</option>
977
- <option value="Oman">Oman</option>
978
- <option value="Pakistan">Pakistan</option>
979
- <option value="Palau">Palau</option>
980
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
981
- <option value="Panama">Panama</option>
982
- <option value="Papua New Guinea">Papua New Guinea</option>
983
- <option value="Paraguay">Paraguay</option>
984
- <option value="Peru">Peru</option>
985
- <option value="Philippines">Philippines</option>
986
- <option value="Pitcairn">Pitcairn</option>
987
- <option value="Poland">Poland</option>
988
- <option value="Portugal">Portugal</option>
989
- <option value="Puerto Rico">Puerto Rico</option>
990
- <option value="Qatar">Qatar</option>
991
- <option value="Reunion">Reunion</option>
992
- <option value="Romania">Romania</option>
993
- <option value="Russian Federation">Russian Federation</option>
994
- <option value="Rwanda">Rwanda</option>
995
- <option value="Saint Barthelemy">Saint Barthelemy</option>
996
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
997
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
998
- <option value="Saint Lucia">Saint Lucia</option>
999
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
1000
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
1001
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
1002
- <option value="Samoa">Samoa</option>
1003
- <option value="San Marino">San Marino</option>
1004
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
1005
- <option value="Saudi Arabia">Saudi Arabia</option>
1006
- <option value="Senegal">Senegal</option>
1007
- <option value="Serbia">Serbia</option>
1008
- <option value="Seychelles">Seychelles</option>
1009
- <option value="Sierra Leone">Sierra Leone</option>
1010
- <option value="Singapore">Singapore</option>
1011
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
1012
- <option value="Slovakia">Slovakia</option>
1013
- <option value="Slovenia">Slovenia</option>
1014
- <option value="Solomon Islands">Solomon Islands</option>
1015
- <option value="Somalia">Somalia</option>
1016
- <option value="South Africa">South Africa</option>
1017
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
1018
- <option value="South Sudan">South Sudan</option>
1019
- <option value="Spain">Spain</option>
1020
- <option value="Sri Lanka">Sri Lanka</option>
1021
- <option value="Sudan">Sudan</option>
1022
- <option value="Suriname">Suriname</option>
1023
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
1024
- <option value="Swaziland">Swaziland</option>
1025
- <option value="Sweden">Sweden</option>
1026
- <option value="Switzerland">Switzerland</option>
1027
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
1028
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
1029
- <option value="Tajikistan">Tajikistan</option>
1030
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
1031
- <option value="Thailand">Thailand</option>
1032
- <option value="Timor-leste">Timor-leste</option>
1033
- <option value="Togo">Togo</option>
1034
- <option value="Tokelau">Tokelau</option>
1035
- <option value="Tonga">Tonga</option>
1036
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
1037
- <option value="Tunisia">Tunisia</option>
1038
- <option value="Turkey">Turkey</option>
1039
- <option value="Turkmenistan">Turkmenistan</option>
1040
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
1041
- <option value="Tuvalu">Tuvalu</option>
1042
- <option value="Uganda">Uganda</option>
1043
- <option value="Ukraine">Ukraine</option>
1044
- <option value="United Arab Emirates">United Arab Emirates</option>
1045
- <option value="United Kingdom">United Kingdom</option>
1046
- <option value="United States">United States</option>
1047
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
1048
- <option value="Uruguay">Uruguay</option>
1049
- <option value="Uzbekistan">Uzbekistan</option>
1050
- <option value="Vanuatu">Vanuatu</option>
1051
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
1052
- <option value="Viet Nam">Viet Nam</option>
1053
- <option value="Virgin Islands, British">Virgin Islands, British</option>
1054
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
1055
- <option value="Wallis and Futuna">Wallis and Futuna</option>
1056
- <option value="Western Sahara">Western Sahara</option>
1057
- <option value="Yemen">Yemen</option>
1058
- <option value="Zambia">Zambia</option>
1059
- <option value="Zimbabwe">Zimbabwe</option>
1060
- </select>
1061
- </div>
1062
- </div>
1063
-
1064
- <h2><a name="optgroup-support" class="anchor" href="#optgroup-support">&lt;optgroup&gt; Support</a></h2>
1065
- <div class="side-by-side clearfix">
1066
- <div>
1067
- <em>Single Select with Groups</em>
1068
- <select data-placeholder="Your Favorite Football Team" class="chosen-select" tabindex="5">
1069
- <option value=""></option>
1070
- <optgroup label="NFC EAST">
1071
- <option>Dallas Cowboys</option>
1072
- <option>New York Giants</option>
1073
- <option>Philadelphia Eagles</option>
1074
- <option>Washington Redskins</option>
1075
- </optgroup>
1076
- <optgroup label="NFC NORTH">
1077
- <option>Chicago Bears</option>
1078
- <option>Detroit Lions</option>
1079
- <option>Green Bay Packers</option>
1080
- <option>Minnesota Vikings</option>
1081
- </optgroup>
1082
- <optgroup label="NFC SOUTH">
1083
- <option>Atlanta Falcons</option>
1084
- <option>Carolina Panthers</option>
1085
- <option>New Orleans Saints</option>
1086
- <option>Tampa Bay Buccaneers</option>
1087
- </optgroup>
1088
- <optgroup label="NFC WEST">
1089
- <option>Arizona Cardinals</option>
1090
- <option>St. Louis Rams</option>
1091
- <option>San Francisco 49ers</option>
1092
- <option>Seattle Seahawks</option>
1093
- </optgroup>
1094
- <optgroup label="AFC EAST">
1095
- <option>Buffalo Bills</option>
1096
- <option>Miami Dolphins</option>
1097
- <option>New England Patriots</option>
1098
- <option>New York Jets</option>
1099
- </optgroup>
1100
- <optgroup label="AFC NORTH">
1101
- <option>Baltimore Ravens</option>
1102
- <option>Cincinnati Bengals</option>
1103
- <option>Cleveland Browns</option>
1104
- <option>Pittsburgh Steelers</option>
1105
- </optgroup>
1106
- <optgroup label="AFC SOUTH">
1107
- <option>Houston Texans</option>
1108
- <option>Indianapolis Colts</option>
1109
- <option>Jacksonville Jaguars</option>
1110
- <option>Tennessee Titans</option>
1111
- </optgroup>
1112
- <optgroup label="AFC WEST">
1113
- <option>Denver Broncos</option>
1114
- <option>Kansas City Chiefs</option>
1115
- <option>Oakland Raiders</option>
1116
- <option>San Diego Chargers</option>
1117
- </optgroup>
1118
- </select>
1119
- </div>
1120
- <div>
1121
- <em>Multiple Select with Groups</em>
1122
- <select data-placeholder="Your Favorite Football Team" class="chosen-select" multiple tabindex="6">
1123
- <option value=""></option>
1124
- <optgroup label="NFC EAST">
1125
- <option>Dallas Cowboys</option>
1126
- <option>New York Giants</option>
1127
- <option>Philadelphia Eagles</option>
1128
- <option>Washington Redskins</option>
1129
- </optgroup>
1130
- <optgroup label="NFC NORTH">
1131
- <option>Chicago Bears</option>
1132
- <option>Detroit Lions</option>
1133
- <option>Green Bay Packers</option>
1134
- <option>Minnesota Vikings</option>
1135
- </optgroup>
1136
- <optgroup label="NFC SOUTH">
1137
- <option>Atlanta Falcons</option>
1138
- <option>Carolina Panthers</option>
1139
- <option>New Orleans Saints</option>
1140
- <option>Tampa Bay Buccaneers</option>
1141
- </optgroup>
1142
- <optgroup label="NFC WEST">
1143
- <option>Arizona Cardinals</option>
1144
- <option>St. Louis Rams</option>
1145
- <option>San Francisco 49ers</option>
1146
- <option>Seattle Seahawks</option>
1147
- </optgroup>
1148
- <optgroup label="AFC EAST">
1149
- <option>Buffalo Bills</option>
1150
- <option>Miami Dolphins</option>
1151
- <option>New England Patriots</option>
1152
- <option>New York Jets</option>
1153
- </optgroup>
1154
- <optgroup label="AFC NORTH">
1155
- <option>Baltimore Ravens</option>
1156
- <option>Cincinnati Bengals</option>
1157
- <option>Cleveland Browns</option>
1158
- <option>Pittsburgh Steelers</option>
1159
- </optgroup>
1160
- <optgroup label="AFC SOUTH">
1161
- <option>Houston Texans</option>
1162
- <option>Indianapolis Colts</option>
1163
- <option>Jacksonville Jaguars</option>
1164
- <option>Tennessee Titans</option>
1165
- </optgroup>
1166
- <optgroup label="AFC WEST">
1167
- <option>Denver Broncos</option>
1168
- <option>Kansas City Chiefs</option>
1169
- <option>Oakland Raiders</option>
1170
- <option>San Diego Chargers</option>
1171
- </optgroup>
1172
- </select>
1173
- </div>
1174
- </div>
1175
-
1176
- <h2><a name="selected-and-disabled-support" class="anchor" href="#selected-and-disabled-support">Selected and Disabled Support</a></h2>
1177
- <div class="side-by-side clearfix">
1178
- <p>Chosen automatically highlights selected options and removes disabled options.</p>
1179
- <div>
1180
- <em>Single Select</em>
1181
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select" tabindex="7">
1182
- <option value=""></option>
1183
- <option>American Black Bear</option>
1184
- <option>Asiatic Black Bear</option>
1185
- <option>Brown Bear</option>
1186
- <option>Giant Panda</option>
1187
- <option selected>Sloth Bear</option>
1188
- <option disabled>Sun Bear</option>
1189
- <option>Polar Bear</option>
1190
- <option disabled>Spectacled Bear</option>
1191
- </select>
1192
- </div>
1193
- <div>
1194
- <em>Multiple Select</em>
1195
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select" tabindex="8">
1196
- <option value=""></option>
1197
- <option>American Black Bear</option>
1198
- <option>Asiatic Black Bear</option>
1199
- <option>Brown Bear</option>
1200
- <option>Giant Panda</option>
1201
- <option selected>Sloth Bear</option>
1202
- <option disabled>Sun Bear</option>
1203
- <option selected>Polar Bear</option>
1204
- <option disabled>Spectacled Bear</option>
1205
- </select>
1206
- </div>
1207
- </div>
1208
-
1209
- <h2><a name="hide-search-on-single-select" class="anchor" href="#hide-search-on-single-select">Hide Search on Single Select</a></h2>
1210
- <div class="side-by-side clearfix">
1211
- <p>The <code>disable_search_threshold</code> option can be specified to hide the search input on single selects if there are <i>n</i> or fewer options.</p>
1212
- <pre><code class="language-javascript">$(".chosen-select").chosen({disable_search_threshold: 10});</code></pre>
1213
- <p></p>
1214
- <div>
1215
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-no-single" tabindex="9">
1216
- <option value=""></option>
1217
- <option>American Black Bear</option>
1218
- <option>Asiatic Black Bear</option>
1219
- <option>Brown Bear</option>
1220
- <option>Giant Panda</option>
1221
- <option selected disabled>Sloth Bear</option>
1222
- <option disabled>Sun Bear</option>
1223
- <option selected disabled>Paddington Bear</option>
1224
- <option selected>Polar Bear</option>
1225
- <option disabled>Spectacled Bear</option>
1226
- </select>
1227
- </div>
1228
- </div>
1229
-
1230
- <h2><a name="default-text-support" class="anchor" href="#default-text-support">Default Text Support</a></h2>
1231
- <div class="side-by-side clearfix">
1232
- <p>Chosen automatically sets the default field text ("Choose a country...") by reading the select element's data-placeholder value. If no data-placeholder value is present, it will default to "Select an Option" or "Select Some Options" depending on whether the select is single or multiple. You can change these elements in the plugin js file as you see fit.</p>
1233
- <pre><code class="language-markup">&lt;select <strong>data-placeholder="Choose a country..."</strong> multiple class="chosen-select"&gt;</code></pre>
1234
- <p><strong>Note:</strong> on single selects, the first element is assumed to be selected by the browser. To take advantage of the default text support, you will need to include a blank option as the first element of your select list.</p>
1235
- </div>
1236
-
1237
- <h2><a name="no-results-text-support" class="anchor" href="#no-results-text-support">No Results Text Support</a></h2>
1238
- <div class="side-by-side clearfix">
1239
- <p>Setting the "No results" search text is as easy as passing an option when you create Chosen:</p>
1240
- <pre><code class="language-javascript"> $(".chosen-select").chosen({no_results_text: "Oops, nothing found!"}); </code></pre>
1241
- <p></p>
1242
- <div>
1243
- <em>Single Select</em>
1244
- <select data-placeholder="Type &apos;C&apos; to view" class="chosen-select-no-results" tabindex="10">
1245
- <option value=""></option>
1246
- <option>American Black Bear</option>
1247
- <option>Asiatic Black Bear</option>
1248
- <option>Brown Bear</option>
1249
- <option>Giant Panda</option>
1250
- <option>Sloth Bear</option>
1251
- <option>Sun Bear</option>
1252
- <option>Polar Bear</option>
1253
- <option>Spectacled Bear</option>
1254
- </select>
1255
- </div>
1256
- <div>
1257
- <em>Multiple Select</em>
1258
- <select data-placeholder="Type &apos;C&apos; to view" multiple class="chosen-select-no-results" tabindex="11">
1259
- <option value=""></option>
1260
- <option>American Black Bear</option>
1261
- <option>Asiatic Black Bear</option>
1262
- <option>Brown Bear</option>
1263
- <option>Giant Panda</option>
1264
- <option>Sloth Bear</option>
1265
- <option>Sun Bear</option>
1266
- <option>Polar Bear</option>
1267
- <option>Spectacled Bear</option>
1268
- </select>
1269
- </div>
1270
- </div>
1271
-
1272
- <h2><a name="limit-selected-options-in-multiselect" class="anchor" href="#limit-selected-options-in-multiselect">Limit Selected Options in Multiselect</a></h2>
1273
- <div class="side-by-side clearfix">
1274
- <p>You can easily limit how many options the user can select:</p>
1275
- <pre><code class="language-javascript">$(".chosen-select").chosen({max_selected_options: 5});</code></pre>
1276
- <p>If you try to select another option with limit reached <code class="language-javascript">chosen:maxselected</code> event is triggered:</p>
1277
- <pre><code class="language-javascript"> $(".chosen-select").bind("chosen:maxselected", function () { ... }); </code></pre>
1278
- </div>
1279
-
1280
- <h2><a name="allow-deselect-on-single-selects" class="anchor" href="#allow-deselect-on-single-selects">Allow Deselect on Single Selects</a></h2>
1281
- <div class="side-by-side clearfix">
1282
- <p>When a single select box isn't a required field, you can set <code class="language-javascript">allow_single_deselect: true</code> and Chosen will add a UI element for option deselection. This will only work if the first option has blank text.</p>
1283
- <div class="side-by-side clearfix">
1284
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-deselect" tabindex="12">
1285
- <option value=""></option>
1286
- <option>American Black Bear</option>
1287
- <option>Asiatic Black Bear</option>
1288
- <option>Brown Bear</option>
1289
- <option>Giant Panda</option>
1290
- <option selected>Sloth Bear</option>
1291
- <option>Sun Bear</option>
1292
- <option>Polar Bear</option>
1293
- <option>Spectacled Bear</option>
1294
- </select>
1295
- </div>
1296
- </div>
1297
-
1298
- <h2><a name="right-to-left-support" class="anchor" href="#right-to-left-support">Right-to-Left Support</a></h2>
1299
- <div class="side-by-side clearfix">
1300
- <p>You can set right-to-left text by setting <code class="language-javascript">rtl: true</code></p>
1301
- <pre><code class="language-javascript"> $(".chosen-select").chosen({rtl: true}); </code></pre>
1302
-
1303
- <div>
1304
- <em>Single Right-to-Left Select</em>
1305
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-rtl" tabindex="13">
1306
- <option value=""></option>
1307
- <option>American Black Bear</option>
1308
- <option>Asiatic Black Bear</option>
1309
- <option>Brown Bear</option>
1310
- <option>Giant Panda</option>
1311
- <option selected>Sloth Bear</option>
1312
- <option>Polar Bear</option>
1313
- </select>
1314
- </div>
1315
- <div>
1316
- <em>Multiple Right-to-Left Select</em>
1317
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select-rtl" tabindex="14">
1318
- <option value=""></option>
1319
- <option>American Black Bear</option>
1320
- <option>Asiatic Black Bear</option>
1321
- <option>Brown Bear</option>
1322
- <option>Giant Panda</option>
1323
- <option selected>Sloth Bear</option>
1324
- <option selected>Polar Bear</option>
1325
- </select>
1326
- </div>
1327
- </div>
1328
-
1329
- <h2><a name="change-update-events" class="anchor" href="#change-update-events">Observing, Updating, and Destroying Chosen</a></h2>
1330
- <div class="side-by-side clearfix">
1331
- <ul>
1332
- <li>
1333
- <h3>Observing Form Field Changes</h3>
1334
- <p>When working with form fields, you often want to perform some behavior after a value has been selected or deselected. Whenever a user selects a field in Chosen, it triggers a "change" event on the original form field. That lets you do something like this:</p>
1335
- <pre><code class="language-javascript">$("#form_field").chosen().change( &hellip; );</code></pre>
1336
- </li>
1337
- <li>
1338
- <h3>Updating Chosen Dynamically</h3>
1339
- <p>If you need to update the options in your select field and want Chosen to pick up the changes, you'll need to trigger the "chosen:updated" event on the field. Chosen will re-build itself based on the updated content.</p>
1340
- <pre><code class="language-javascript">$("#form_field").trigger("chosen:updated");</code></pre>
1341
- </li>
1342
- <li>
1343
- <h3>Destroying Chosen</h3>
1344
- <p>To destroy Chosen and revert back to the native select:</p>
1345
- <pre><code class="language-javascript">$("#form_field").chosen("destroy");</code></pre>
1346
- </li>
1347
- </ul>
1348
- </div>
1349
-
1350
- <h2><a name="custom-width-support" class="anchor" href="#custom-width-support">Custom Width Support</a></h2>
1351
- <div class="side-by-side clearfix">
1352
- <p>Using a custom width with Chosen is as easy as passing an option when you create Chosen:</p>
1353
- <pre><code class="language-javascript"> $(".chosen-select").chosen({width: "95%"}); </code></pre>
1354
- <div>
1355
- <em>Single Select</em>
1356
- <select data-placeholder="Your Favorite Types of Bear" class="chosen-select-width" tabindex="15">
1357
- <option value=""></option>
1358
- <option selected>American Black Bear</option>
1359
- <option>Asiatic Black Bear</option>
1360
- <option>Brown Bear</option>
1361
- <option>Giant Panda</option>
1362
- <option>Sloth Bear</option>
1363
- <option>Sun Bear</option>
1364
- <option>Polar Bear</option>
1365
- <option>Spectacled Bear</option>
1366
- </select>
1367
- </div>
1368
- <div>
1369
- <em>Multiple Select</em>
1370
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select-width" tabindex="16">
1371
- <option value=""></option>
1372
- <option>American Black Bear</option>
1373
- <option>Asiatic Black Bear</option>
1374
- <option>Brown Bear</option>
1375
- <option selected>Giant Panda</option>
1376
- <option>Sloth Bear</option>
1377
- <option>Sun Bear</option>
1378
- <option>Polar Bear</option>
1379
- <option>Spectacled Bear</option>
1380
- </select>
1381
- </div>
1382
- </div>
1383
-
1384
- <h2><a name="labels-work-too" class="anchor" href="#labels-work-too">Labels work, too</a></h2>
1385
- <div class="side-by-side clearfix">
1386
- <p>Use labels just like you would a standard select</p>
1387
- <p></p>
1388
- <div>
1389
- <em><label for="single-label-example">Click to Highlight Single Select</label></em>
1390
- <select data-placeholder="Your Favorite Types of Bear" class="chosen-select" tabindex="17" id="single-label-example">
1391
- <option value=""></option>
1392
- <option selected>American Black Bear</option>
1393
- <option>Asiatic Black Bear</option>
1394
- <option>Brown Bear</option>
1395
- <option>Giant Panda</option>
1396
- <option>Sloth Bear</option>
1397
- <option>Sun Bear</option>
1398
- <option>Polar Bear</option>
1399
- <option>Spectacled Bear</option>
1400
- </select>
1401
- </div>
1402
- <div>
1403
- <em><label for="multiple-label-example">Click to Highlight Multiple Select</label></em>
1404
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select" tabindex="18" id="multiple-label-example">
1405
- <option value=""></option>
1406
- <option>American Black Bear</option>
1407
- <option>Asiatic Black Bear</option>
1408
- <option>Brown Bear</option>
1409
- <option selected>Giant Panda</option>
1410
- <option>Sloth Bear</option>
1411
- <option>Sun Bear</option>
1412
- <option>Polar Bear</option>
1413
- <option>Spectacled Bear</option>
1414
- </select>
1415
- </div>
1416
- </div>
1417
-
1418
- <h2><a name="setup" class="anchor" href="#setup">Setup</a></h2>
1419
- <p>Using Chosen is easy as can be.</p>
1420
- <ol>
1421
- <li><a href="https://github.com/harvesthq/chosen/releases">Download</a> the plugin and copy the chosen files to your app.</li>
1422
- <li>Activate the plugin on the select boxes of your choice: <code class="language-javascript">$(".chosen-select").chosen()</code></li>
1423
- <li><a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=UkSPUDpe0U8#t=11s">Disco</a>.</li>
1424
- </ol>
1425
-
1426
- <h2><a name="faqs" class="anchor" href="#faqs">FAQs</a></h2>
1427
- <ul class="faqs">
1428
- <li>
1429
- <h3>Do you have all the available options documented somewhere?</h3>
1430
- <p>Yes! You can find them on <a href="options.html">the options page</a>.</p>
1431
- </li>
1432
- <li>
1433
- <h3>Something doesn't work. Can you fix it?</h3>
1434
- <p>Yes! Please report all issues using the <a href="http://github.com/harvesthq/chosen/issues">GitHub issue tracking tool</a>. Please include the plugin version (jQuery or Prototype), browser and OS. The more information provided, the easier it is to fix a problem.</p>
1435
- </li>
1436
- <li>
1437
- <h3>What browsers are supported?</h3>
1438
- <p>All modern desktop browsers are supported (Firefox, Chrome, Safari and IE9). Legacy support for IE8 is also enabled. Chosen is disabled on iPhone, iPod Touch, and Android mobile devices (<a href="https://github.com/harvesthq/chosen/pull/1388">more information</a>).</p>
1439
- </li>
1440
- <li>
1441
- <h3>Didn't there used to be a Prototype version of Chosen?</h3>
1442
- <p><a href="index.proto.html">There still is!</a></p>
1443
- </li>
1444
- </ul>
1445
-
1446
- <h2><a name="credits" class="anchor" href="#credits">Credits</a></h2>
1447
-
1448
- <ul class="credits">
1449
- <li>Concept and development by <a href="http://patrickfiller.com">Patrick Filler</a> for <a href="https://getharvest.com">Harvest</a>.</li>
1450
- <li>Design and CSS by <a href="http://matthewlettini.com">Matthew Lettini</a>.</li>
1451
- <li>Repository maintained by <a href="https://github.com/pfiller">@pfiller</a>, <a href="https://github.com/kenearley">@kenearley</a>, <a href="https://github.com/stof">@stof</a>, <a href="https://github.com/koenpunt">@koenpunt</a>, and <a href="https://github.com/tjschuck">@tjschuck</a>.</li>
1452
- <li>Chosen includes <a href="https://github.com/harvesthq/chosen/contributors">contributions by many fine folks</a>.</li>
1453
- </ul>
1454
-
1455
- <footer>
1456
- &copy; 2011&ndash;2016 <a href="http://www.getharvest.com/">Harvest</a>. Chosen is licensed under the <a href="https://github.com/harvesthq/chosen/blob/master/LICENSE.md">MIT license</a>.
1457
- </footer>
1458
-
1459
- </div>
1460
- </div>
1461
- <script src="docsupport/jquery-3.2.1.min.js" type="text/javascript"></script>
1462
- <script src="chosen.jquery.js" type="text/javascript"></script>
1463
- <script src="docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
1464
- <script src="docsupport/init.js" type="text/javascript" charset="utf-8"></script>
1465
- </form>
1466
- <div class="oss-bar">
1467
- <ul>
1468
- <li><a class="fork" href="https://github.com/harvesthq/chosen">Fork on Github</a></li>
1469
- <li><a class="harvest" href="http://www.getharvest.com/">Built by Harvest</a></li>
1470
- </ul>
1471
- </div>
1472
  </body>
1473
  </html>
1
  <!doctype html>
2
  <html lang="en">
3
  <head>
 
 
 
 
 
 
 
 
4
  </head>
5
  <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  </body>
7
  </html>
assets/lib/chosen/index.proto.html DELETED
@@ -1,1472 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Chosen: A Prototype Plugin by Harvest to Tame Unwieldy Select Boxes</title>
6
- <link rel="stylesheet" href="docsupport/style.css">
7
- <link rel="stylesheet" href="docsupport/prism.css">
8
- <link rel="stylesheet" href="chosen.css">
9
-
10
- <meta http-equiv="Content-Security-Policy" content="default-src &apos;self&apos;; script-src &apos;self&apos; https://ajax.googleapis.com; style-src &apos;self&apos;; img-src &apos;self&apos; data:">
11
-
12
- </head>
13
- <body>
14
- <div id="container">
15
- <div id="content">
16
- <header>
17
- <h1>Chosen - Prototype Version <small>(<span id="latest-version">v1.8.3</span>)</small></h1>
18
- </header>
19
- <p>Chosen is a Prototype plugin that makes long, unwieldy select boxes much more user-friendly.</p>
20
-
21
- <p>
22
- <a class="button button-blue" href="https://github.com/harvesthq/chosen/releases">Downloads</a>
23
- <a class="button" href="https://github.com/harvesthq/chosen">Project Source</a>
24
- <a class="button" href="https://github.com/harvesthq/chosen/blob/master/contributing.md">Contribute</a>
25
- </p>
26
-
27
- <p class="jquery-version-refer">Looking for the <a href="index.html">jQuery version?</a></p>
28
-
29
- <h2><a name="standard-select" class="anchor" href="#standard-select">Standard Select</a></h2>
30
- <div class="side-by-side clearfix">
31
- <div>
32
- <em>Turns This</em>
33
- <select data-placeholder="Choose a Country..." class="select" tabindex="1">
34
- <option value=""></option>
35
- <option value="United States">United States</option>
36
- <option value="United Kingdom">United Kingdom</option>
37
- <option value="Afghanistan">Afghanistan</option>
38
- <option value="Aland Islands">Aland Islands</option>
39
- <option value="Albania">Albania</option>
40
- <option value="Algeria">Algeria</option>
41
- <option value="American Samoa">American Samoa</option>
42
- <option value="Andorra">Andorra</option>
43
- <option value="Angola">Angola</option>
44
- <option value="Anguilla">Anguilla</option>
45
- <option value="Antarctica">Antarctica</option>
46
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
47
- <option value="Argentina">Argentina</option>
48
- <option value="Armenia">Armenia</option>
49
- <option value="Aruba">Aruba</option>
50
- <option value="Australia">Australia</option>
51
- <option value="Austria">Austria</option>
52
- <option value="Azerbaijan">Azerbaijan</option>
53
- <option value="Bahamas">Bahamas</option>
54
- <option value="Bahrain">Bahrain</option>
55
- <option value="Bangladesh">Bangladesh</option>
56
- <option value="Barbados">Barbados</option>
57
- <option value="Belarus">Belarus</option>
58
- <option value="Belgium">Belgium</option>
59
- <option value="Belize">Belize</option>
60
- <option value="Benin">Benin</option>
61
- <option value="Bermuda">Bermuda</option>
62
- <option value="Bhutan">Bhutan</option>
63
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
64
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
65
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
66
- <option value="Botswana">Botswana</option>
67
- <option value="Bouvet Island">Bouvet Island</option>
68
- <option value="Brazil">Brazil</option>
69
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
70
- <option value="Brunei Darussalam">Brunei Darussalam</option>
71
- <option value="Bulgaria">Bulgaria</option>
72
- <option value="Burkina Faso">Burkina Faso</option>
73
- <option value="Burundi">Burundi</option>
74
- <option value="Cambodia">Cambodia</option>
75
- <option value="Cameroon">Cameroon</option>
76
- <option value="Canada">Canada</option>
77
- <option value="Cape Verde">Cape Verde</option>
78
- <option value="Cayman Islands">Cayman Islands</option>
79
- <option value="Central African Republic">Central African Republic</option>
80
- <option value="Chad">Chad</option>
81
- <option value="Chile">Chile</option>
82
- <option value="China">China</option>
83
- <option value="Christmas Island">Christmas Island</option>
84
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
85
- <option value="Colombia">Colombia</option>
86
- <option value="Comoros">Comoros</option>
87
- <option value="Congo">Congo</option>
88
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
89
- <option value="Cook Islands">Cook Islands</option>
90
- <option value="Costa Rica">Costa Rica</option>
91
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
92
- <option value="Croatia">Croatia</option>
93
- <option value="Cuba">Cuba</option>
94
- <option value="Curacao">Curacao</option>
95
- <option value="Cyprus">Cyprus</option>
96
- <option value="Czech Republic">Czech Republic</option>
97
- <option value="Denmark">Denmark</option>
98
- <option value="Djibouti">Djibouti</option>
99
- <option value="Dominica">Dominica</option>
100
- <option value="Dominican Republic">Dominican Republic</option>
101
- <option value="Ecuador">Ecuador</option>
102
- <option value="Egypt">Egypt</option>
103
- <option value="El Salvador">El Salvador</option>
104
- <option value="Equatorial Guinea">Equatorial Guinea</option>
105
- <option value="Eritrea">Eritrea</option>
106
- <option value="Estonia">Estonia</option>
107
- <option value="Ethiopia">Ethiopia</option>
108
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
109
- <option value="Faroe Islands">Faroe Islands</option>
110
- <option value="Fiji">Fiji</option>
111
- <option value="Finland">Finland</option>
112
- <option value="France">France</option>
113
- <option value="French Guiana">French Guiana</option>
114
- <option value="French Polynesia">French Polynesia</option>
115
- <option value="French Southern Territories">French Southern Territories</option>
116
- <option value="Gabon">Gabon</option>
117
- <option value="Gambia">Gambia</option>
118
- <option value="Georgia">Georgia</option>
119
- <option value="Germany">Germany</option>
120
- <option value="Ghana">Ghana</option>
121
- <option value="Gibraltar">Gibraltar</option>
122
- <option value="Greece">Greece</option>
123
- <option value="Greenland">Greenland</option>
124
- <option value="Grenada">Grenada</option>
125
- <option value="Guadeloupe">Guadeloupe</option>
126
- <option value="Guam">Guam</option>
127
- <option value="Guatemala">Guatemala</option>
128
- <option value="Guernsey">Guernsey</option>
129
- <option value="Guinea">Guinea</option>
130
- <option value="Guinea-bissau">Guinea-bissau</option>
131
- <option value="Guyana">Guyana</option>
132
- <option value="Haiti">Haiti</option>
133
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
134
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
135
- <option value="Honduras">Honduras</option>
136
- <option value="Hong Kong">Hong Kong</option>
137
- <option value="Hungary">Hungary</option>
138
- <option value="Iceland">Iceland</option>
139
- <option value="India">India</option>
140
- <option value="Indonesia">Indonesia</option>
141
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
142
- <option value="Iraq">Iraq</option>
143
- <option value="Ireland">Ireland</option>
144
- <option value="Isle of Man">Isle of Man</option>
145
- <option value="Israel">Israel</option>
146
- <option value="Italy">Italy</option>
147
- <option value="Jamaica">Jamaica</option>
148
- <option value="Japan">Japan</option>
149
- <option value="Jersey">Jersey</option>
150
- <option value="Jordan">Jordan</option>
151
- <option value="Kazakhstan">Kazakhstan</option>
152
- <option value="Kenya">Kenya</option>
153
- <option value="Kiribati">Kiribati</option>
154
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
155
- <option value="Korea, Republic of">Korea, Republic of</option>
156
- <option value="Kuwait">Kuwait</option>
157
- <option value="Kyrgyzstan">Kyrgyzstan</option>
158
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
159
- <option value="Latvia">Latvia</option>
160
- <option value="Lebanon">Lebanon</option>
161
- <option value="Lesotho">Lesotho</option>
162
- <option value="Liberia">Liberia</option>
163
- <option value="Libya">Libya</option>
164
- <option value="Liechtenstein">Liechtenstein</option>
165
- <option value="Lithuania">Lithuania</option>
166
- <option value="Luxembourg">Luxembourg</option>
167
- <option value="Macao">Macao</option>
168
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
169
- <option value="Madagascar">Madagascar</option>
170
- <option value="Malawi">Malawi</option>
171
- <option value="Malaysia">Malaysia</option>
172
- <option value="Maldives">Maldives</option>
173
- <option value="Mali">Mali</option>
174
- <option value="Malta">Malta</option>
175
- <option value="Marshall Islands">Marshall Islands</option>
176
- <option value="Martinique">Martinique</option>
177
- <option value="Mauritania">Mauritania</option>
178
- <option value="Mauritius">Mauritius</option>
179
- <option value="Mayotte">Mayotte</option>
180
- <option value="Mexico">Mexico</option>
181
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
182
- <option value="Moldova, Republic of">Moldova, Republic of</option>
183
- <option value="Monaco">Monaco</option>
184
- <option value="Mongolia">Mongolia</option>
185
- <option value="Montenegro">Montenegro</option>
186
- <option value="Montserrat">Montserrat</option>
187
- <option value="Morocco">Morocco</option>
188
- <option value="Mozambique">Mozambique</option>
189
- <option value="Myanmar">Myanmar</option>
190
- <option value="Namibia">Namibia</option>
191
- <option value="Nauru">Nauru</option>
192
- <option value="Nepal">Nepal</option>
193
- <option value="Netherlands">Netherlands</option>
194
- <option value="New Caledonia">New Caledonia</option>
195
- <option value="New Zealand">New Zealand</option>
196
- <option value="Nicaragua">Nicaragua</option>
197
- <option value="Niger">Niger</option>
198
- <option value="Nigeria">Nigeria</option>
199
- <option value="Niue">Niue</option>
200
- <option value="Norfolk Island">Norfolk Island</option>
201
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
202
- <option value="Norway">Norway</option>
203
- <option value="Oman">Oman</option>
204
- <option value="Pakistan">Pakistan</option>
205
- <option value="Palau">Palau</option>
206
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
207
- <option value="Panama">Panama</option>
208
- <option value="Papua New Guinea">Papua New Guinea</option>
209
- <option value="Paraguay">Paraguay</option>
210
- <option value="Peru">Peru</option>
211
- <option value="Philippines">Philippines</option>
212
- <option value="Pitcairn">Pitcairn</option>
213
- <option value="Poland">Poland</option>
214
- <option value="Portugal">Portugal</option>
215
- <option value="Puerto Rico">Puerto Rico</option>
216
- <option value="Qatar">Qatar</option>
217
- <option value="Reunion">Reunion</option>
218
- <option value="Romania">Romania</option>
219
- <option value="Russian Federation">Russian Federation</option>
220
- <option value="Rwanda">Rwanda</option>
221
- <option value="Saint Barthelemy">Saint Barthelemy</option>
222
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
223
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
224
- <option value="Saint Lucia">Saint Lucia</option>
225
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
226
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
227
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
228
- <option value="Samoa">Samoa</option>
229
- <option value="San Marino">San Marino</option>
230
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
231
- <option value="Saudi Arabia">Saudi Arabia</option>
232
- <option value="Senegal">Senegal</option>
233
- <option value="Serbia">Serbia</option>
234
- <option value="Seychelles">Seychelles</option>
235
- <option value="Sierra Leone">Sierra Leone</option>
236
- <option value="Singapore">Singapore</option>
237
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
238
- <option value="Slovakia">Slovakia</option>
239
- <option value="Slovenia">Slovenia</option>
240
- <option value="Solomon Islands">Solomon Islands</option>
241
- <option value="Somalia">Somalia</option>
242
- <option value="South Africa">South Africa</option>
243
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
244
- <option value="South Sudan">South Sudan</option>
245
- <option value="Spain">Spain</option>
246
- <option value="Sri Lanka">Sri Lanka</option>
247
- <option value="Sudan">Sudan</option>
248
- <option value="Suriname">Suriname</option>
249
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
250
- <option value="Swaziland">Swaziland</option>
251
- <option value="Sweden">Sweden</option>
252
- <option value="Switzerland">Switzerland</option>
253
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
254
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
255
- <option value="Tajikistan">Tajikistan</option>
256
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
257
- <option value="Thailand">Thailand</option>
258
- <option value="Timor-leste">Timor-leste</option>
259
- <option value="Togo">Togo</option>
260
- <option value="Tokelau">Tokelau</option>
261
- <option value="Tonga">Tonga</option>
262
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
263
- <option value="Tunisia">Tunisia</option>
264
- <option value="Turkey">Turkey</option>
265
- <option value="Turkmenistan">Turkmenistan</option>
266
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
267
- <option value="Tuvalu">Tuvalu</option>
268
- <option value="Uganda">Uganda</option>
269
- <option value="Ukraine">Ukraine</option>
270
- <option value="United Arab Emirates">United Arab Emirates</option>
271
- <option value="United Kingdom">United Kingdom</option>
272
- <option value="United States">United States</option>
273
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
274
- <option value="Uruguay">Uruguay</option>
275
- <option value="Uzbekistan">Uzbekistan</option>
276
- <option value="Vanuatu">Vanuatu</option>
277
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
278
- <option value="Viet Nam">Viet Nam</option>
279
- <option value="Virgin Islands, British">Virgin Islands, British</option>
280
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
281
- <option value="Wallis and Futuna">Wallis and Futuna</option>
282
- <option value="Western Sahara">Western Sahara</option>
283
- <option value="Yemen">Yemen</option>
284
- <option value="Zambia">Zambia</option>
285
- <option value="Zimbabwe">Zimbabwe</option>
286
- </select>
287
- </div>
288
- <div>
289
- <em>Into This</em>
290
- <select data-placeholder="Choose a Country..." class="chosen-select" tabindex="2">
291
- <option value=""></option>
292
- <option value="United States">United States</option>
293
- <option value="United Kingdom">United Kingdom</option>
294
- <option value="Afghanistan">Afghanistan</option>
295
- <option value="Aland Islands">Aland Islands</option>
296
- <option value="Albania">Albania</option>
297
- <option value="Algeria">Algeria</option>
298
- <option value="American Samoa">American Samoa</option>
299
- <option value="Andorra">Andorra</option>
300
- <option value="Angola">Angola</option>
301
- <option value="Anguilla">Anguilla</option>
302
- <option value="Antarctica">Antarctica</option>
303
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
304
- <option value="Argentina">Argentina</option>
305
- <option value="Armenia">Armenia</option>
306
- <option value="Aruba">Aruba</option>
307
- <option value="Australia">Australia</option>
308
- <option value="Austria">Austria</option>
309
- <option value="Azerbaijan">Azerbaijan</option>
310
- <option value="Bahamas">Bahamas</option>
311
- <option value="Bahrain">Bahrain</option>
312
- <option value="Bangladesh">Bangladesh</option>
313
- <option value="Barbados">Barbados</option>
314
- <option value="Belarus">Belarus</option>
315
- <option value="Belgium">Belgium</option>
316
- <option value="Belize">Belize</option>
317
- <option value="Benin">Benin</option>
318
- <option value="Bermuda">Bermuda</option>
319
- <option value="Bhutan">Bhutan</option>
320
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
321
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
322
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
323
- <option value="Botswana">Botswana</option>
324
- <option value="Bouvet Island">Bouvet Island</option>
325
- <option value="Brazil">Brazil</option>
326
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
327
- <option value="Brunei Darussalam">Brunei Darussalam</option>
328
- <option value="Bulgaria">Bulgaria</option>
329
- <option value="Burkina Faso">Burkina Faso</option>
330
- <option value="Burundi">Burundi</option>
331
- <option value="Cambodia">Cambodia</option>
332
- <option value="Cameroon">Cameroon</option>
333
- <option value="Canada">Canada</option>
334
- <option value="Cape Verde">Cape Verde</option>
335
- <option value="Cayman Islands">Cayman Islands</option>
336
- <option value="Central African Republic">Central African Republic</option>
337
- <option value="Chad">Chad</option>
338
- <option value="Chile">Chile</option>
339
- <option value="China">China</option>
340
- <option value="Christmas Island">Christmas Island</option>
341
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
342
- <option value="Colombia">Colombia</option>
343
- <option value="Comoros">Comoros</option>
344
- <option value="Congo">Congo</option>
345
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
346
- <option value="Cook Islands">Cook Islands</option>
347
- <option value="Costa Rica">Costa Rica</option>
348
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
349
- <option value="Croatia">Croatia</option>
350
- <option value="Cuba">Cuba</option>
351
- <option value="Curacao">Curacao</option>
352
- <option value="Cyprus">Cyprus</option>
353
- <option value="Czech Republic">Czech Republic</option>
354
- <option value="Denmark">Denmark</option>
355
- <option value="Djibouti">Djibouti</option>
356
- <option value="Dominica">Dominica</option>
357
- <option value="Dominican Republic">Dominican Republic</option>
358
- <option value="Ecuador">Ecuador</option>
359
- <option value="Egypt">Egypt</option>
360
- <option value="El Salvador">El Salvador</option>
361
- <option value="Equatorial Guinea">Equatorial Guinea</option>
362
- <option value="Eritrea">Eritrea</option>
363
- <option value="Estonia">Estonia</option>
364
- <option value="Ethiopia">Ethiopia</option>
365
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
366
- <option value="Faroe Islands">Faroe Islands</option>
367
- <option value="Fiji">Fiji</option>
368
- <option value="Finland">Finland</option>
369
- <option value="France">France</option>
370
- <option value="French Guiana">French Guiana</option>
371
- <option value="French Polynesia">French Polynesia</option>
372
- <option value="French Southern Territories">French Southern Territories</option>
373
- <option value="Gabon">Gabon</option>
374
- <option value="Gambia">Gambia</option>
375
- <option value="Georgia">Georgia</option>
376
- <option value="Germany">Germany</option>
377
- <option value="Ghana">Ghana</option>
378
- <option value="Gibraltar">Gibraltar</option>
379
- <option value="Greece">Greece</option>
380
- <option value="Greenland">Greenland</option>
381
- <option value="Grenada">Grenada</option>
382
- <option value="Guadeloupe">Guadeloupe</option>
383
- <option value="Guam">Guam</option>
384
- <option value="Guatemala">Guatemala</option>
385
- <option value="Guernsey">Guernsey</option>
386
- <option value="Guinea">Guinea</option>
387
- <option value="Guinea-bissau">Guinea-bissau</option>
388
- <option value="Guyana">Guyana</option>
389
- <option value="Haiti">Haiti</option>
390
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
391
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
392
- <option value="Honduras">Honduras</option>
393
- <option value="Hong Kong">Hong Kong</option>
394
- <option value="Hungary">Hungary</option>
395
- <option value="Iceland">Iceland</option>
396
- <option value="India">India</option>
397
- <option value="Indonesia">Indonesia</option>
398
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
399
- <option value="Iraq">Iraq</option>
400
- <option value="Ireland">Ireland</option>
401
- <option value="Isle of Man">Isle of Man</option>
402
- <option value="Israel">Israel</option>
403
- <option value="Italy">Italy</option>
404
- <option value="Jamaica">Jamaica</option>
405
- <option value="Japan">Japan</option>
406
- <option value="Jersey">Jersey</option>
407
- <option value="Jordan">Jordan</option>
408
- <option value="Kazakhstan">Kazakhstan</option>
409
- <option value="Kenya">Kenya</option>
410
- <option value="Kiribati">Kiribati</option>
411
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
412
- <option value="Korea, Republic of">Korea, Republic of</option>
413
- <option value="Kuwait">Kuwait</option>
414
- <option value="Kyrgyzstan">Kyrgyzstan</option>
415
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
416
- <option value="Latvia">Latvia</option>
417
- <option value="Lebanon">Lebanon</option>
418
- <option value="Lesotho">Lesotho</option>
419
- <option value="Liberia">Liberia</option>
420
- <option value="Libya">Libya</option>
421
- <option value="Liechtenstein">Liechtenstein</option>
422
- <option value="Lithuania">Lithuania</option>
423
- <option value="Luxembourg">Luxembourg</option>
424
- <option value="Macao">Macao</option>
425
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
426
- <option value="Madagascar">Madagascar</option>
427
- <option value="Malawi">Malawi</option>
428
- <option value="Malaysia">Malaysia</option>
429
- <option value="Maldives">Maldives</option>
430
- <option value="Mali">Mali</option>
431
- <option value="Malta">Malta</option>
432
- <option value="Marshall Islands">Marshall Islands</option>
433
- <option value="Martinique">Martinique</option>
434
- <option value="Mauritania">Mauritania</option>
435
- <option value="Mauritius">Mauritius</option>
436
- <option value="Mayotte">Mayotte</option>
437
- <option value="Mexico">Mexico</option>
438
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
439
- <option value="Moldova, Republic of">Moldova, Republic of</option>
440
- <option value="Monaco">Monaco</option>
441
- <option value="Mongolia">Mongolia</option>
442
- <option value="Montenegro">Montenegro</option>
443
- <option value="Montserrat">Montserrat</option>
444
- <option value="Morocco">Morocco</option>
445
- <option value="Mozambique">Mozambique</option>
446
- <option value="Myanmar">Myanmar</option>
447
- <option value="Namibia">Namibia</option>
448
- <option value="Nauru">Nauru</option>
449
- <option value="Nepal">Nepal</option>
450
- <option value="Netherlands">Netherlands</option>
451
- <option value="New Caledonia">New Caledonia</option>
452
- <option value="New Zealand">New Zealand</option>
453
- <option value="Nicaragua">Nicaragua</option>
454
- <option value="Niger">Niger</option>
455
- <option value="Nigeria">Nigeria</option>
456
- <option value="Niue">Niue</option>
457
- <option value="Norfolk Island">Norfolk Island</option>
458
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
459
- <option value="Norway">Norway</option>
460
- <option value="Oman">Oman</option>
461
- <option value="Pakistan">Pakistan</option>
462
- <option value="Palau">Palau</option>
463
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
464
- <option value="Panama">Panama</option>
465
- <option value="Papua New Guinea">Papua New Guinea</option>
466
- <option value="Paraguay">Paraguay</option>
467
- <option value="Peru">Peru</option>
468
- <option value="Philippines">Philippines</option>
469
- <option value="Pitcairn">Pitcairn</option>
470
- <option value="Poland">Poland</option>
471
- <option value="Portugal">Portugal</option>
472
- <option value="Puerto Rico">Puerto Rico</option>
473
- <option value="Qatar">Qatar</option>
474
- <option value="Reunion">Reunion</option>
475
- <option value="Romania">Romania</option>
476
- <option value="Russian Federation">Russian Federation</option>
477
- <option value="Rwanda">Rwanda</option>
478
- <option value="Saint Barthelemy">Saint Barthelemy</option>
479
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
480
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
481
- <option value="Saint Lucia">Saint Lucia</option>
482
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
483
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
484
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
485
- <option value="Samoa">Samoa</option>
486
- <option value="San Marino">San Marino</option>
487
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
488
- <option value="Saudi Arabia">Saudi Arabia</option>
489
- <option value="Senegal">Senegal</option>
490
- <option value="Serbia">Serbia</option>
491
- <option value="Seychelles">Seychelles</option>
492
- <option value="Sierra Leone">Sierra Leone</option>
493
- <option value="Singapore">Singapore</option>
494
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
495
- <option value="Slovakia">Slovakia</option>
496
- <option value="Slovenia">Slovenia</option>
497
- <option value="Solomon Islands">Solomon Islands</option>
498
- <option value="Somalia">Somalia</option>
499
- <option value="South Africa">South Africa</option>
500
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
501
- <option value="South Sudan">South Sudan</option>
502
- <option value="Spain">Spain</option>
503
- <option value="Sri Lanka">Sri Lanka</option>
504
- <option value="Sudan">Sudan</option>
505
- <option value="Suriname">Suriname</option>
506
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
507
- <option value="Swaziland">Swaziland</option>
508
- <option value="Sweden">Sweden</option>
509
- <option value="Switzerland">Switzerland</option>
510
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
511
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
512
- <option value="Tajikistan">Tajikistan</option>
513
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
514
- <option value="Thailand">Thailand</option>
515
- <option value="Timor-leste">Timor-leste</option>
516
- <option value="Togo">Togo</option>
517
- <option value="Tokelau">Tokelau</option>
518
- <option value="Tonga">Tonga</option>
519
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
520
- <option value="Tunisia">Tunisia</option>
521
- <option value="Turkey">Turkey</option>
522
- <option value="Turkmenistan">Turkmenistan</option>
523
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
524
- <option value="Tuvalu">Tuvalu</option>
525
- <option value="Uganda">Uganda</option>
526
- <option value="Ukraine">Ukraine</option>
527
- <option value="United Arab Emirates">United Arab Emirates</option>
528
- <option value="United Kingdom">United Kingdom</option>
529
- <option value="United States">United States</option>
530
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
531
- <option value="Uruguay">Uruguay</option>
532
- <option value="Uzbekistan">Uzbekistan</option>
533
- <option value="Vanuatu">Vanuatu</option>
534
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
535
- <option value="Viet Nam">Viet Nam</option>
536
- <option value="Virgin Islands, British">Virgin Islands, British</option>
537
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
538
- <option value="Wallis and Futuna">Wallis and Futuna</option>
539
- <option value="Western Sahara">Western Sahara</option>
540
- <option value="Yemen">Yemen</option>
541
- <option value="Zambia">Zambia</option>
542
- <option value="Zimbabwe">Zimbabwe</option>
543
- </select>
544
- </div>
545
- </div>
546
-
547
- <h2><a name="multiple-select" class="anchor" href="#multiple-select">Multiple Select</a></h2>
548
- <div class="side-by-side clearfix">
549
- <div>
550
- <em>Turns This</em>
551
- <select data-placeholder="Choose a Country..." class="select" multiple tabindex="3">
552
- <option value=""></option>
553
- <option value="United States">United States</option>
554
- <option value="United Kingdom">United Kingdom</option>
555
- <option value="Afghanistan">Afghanistan</option>
556
- <option value="Aland Islands">Aland Islands</option>
557
- <option value="Albania">Albania</option>
558
- <option value="Algeria">Algeria</option>
559
- <option value="American Samoa">American Samoa</option>
560
- <option value="Andorra">Andorra</option>
561
- <option value="Angola">Angola</option>
562
- <option value="Anguilla">Anguilla</option>
563
- <option value="Antarctica">Antarctica</option>
564
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
565
- <option value="Argentina">Argentina</option>
566
- <option value="Armenia">Armenia</option>
567
- <option value="Aruba">Aruba</option>
568
- <option value="Australia">Australia</option>
569
- <option value="Austria">Austria</option>
570
- <option value="Azerbaijan">Azerbaijan</option>
571
- <option value="Bahamas">Bahamas</option>
572
- <option value="Bahrain">Bahrain</option>
573
- <option value="Bangladesh">Bangladesh</option>
574
- <option value="Barbados">Barbados</option>
575
- <option value="Belarus">Belarus</option>
576
- <option value="Belgium">Belgium</option>
577
- <option value="Belize">Belize</option>
578
- <option value="Benin">Benin</option>
579
- <option value="Bermuda">Bermuda</option>
580
- <option value="Bhutan">Bhutan</option>
581
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
582
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
583
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
584
- <option value="Botswana">Botswana</option>
585
- <option value="Bouvet Island">Bouvet Island</option>
586
- <option value="Brazil">Brazil</option>
587
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
588
- <option value="Brunei Darussalam">Brunei Darussalam</option>
589
- <option value="Bulgaria">Bulgaria</option>
590
- <option value="Burkina Faso">Burkina Faso</option>
591
- <option value="Burundi">Burundi</option>
592
- <option value="Cambodia">Cambodia</option>
593
- <option value="Cameroon">Cameroon</option>
594
- <option value="Canada">Canada</option>
595
- <option value="Cape Verde">Cape Verde</option>
596
- <option value="Cayman Islands">Cayman Islands</option>
597
- <option value="Central African Republic">Central African Republic</option>
598
- <option value="Chad">Chad</option>
599
- <option value="Chile">Chile</option>
600
- <option value="China">China</option>
601
- <option value="Christmas Island">Christmas Island</option>
602
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
603
- <option value="Colombia">Colombia</option>
604
- <option value="Comoros">Comoros</option>
605
- <option value="Congo">Congo</option>
606
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
607
- <option value="Cook Islands">Cook Islands</option>
608
- <option value="Costa Rica">Costa Rica</option>
609
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
610
- <option value="Croatia">Croatia</option>
611
- <option value="Cuba">Cuba</option>
612
- <option value="Curacao">Curacao</option>
613
- <option value="Cyprus">Cyprus</option>
614
- <option value="Czech Republic">Czech Republic</option>
615
- <option value="Denmark">Denmark</option>
616
- <option value="Djibouti">Djibouti</option>
617
- <option value="Dominica">Dominica</option>
618
- <option value="Dominican Republic">Dominican Republic</option>
619
- <option value="Ecuador">Ecuador</option>
620
- <option value="Egypt">Egypt</option>
621
- <option value="El Salvador">El Salvador</option>
622
- <option value="Equatorial Guinea">Equatorial Guinea</option>
623
- <option value="Eritrea">Eritrea</option>
624
- <option value="Estonia">Estonia</option>
625
- <option value="Ethiopia">Ethiopia</option>
626
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
627
- <option value="Faroe Islands">Faroe Islands</option>
628
- <option value="Fiji">Fiji</option>
629
- <option value="Finland">Finland</option>
630
- <option value="France">France</option>
631
- <option value="French Guiana">French Guiana</option>
632
- <option value="French Polynesia">French Polynesia</option>
633
- <option value="French Southern Territories">French Southern Territories</option>
634
- <option value="Gabon">Gabon</option>
635
- <option value="Gambia">Gambia</option>
636
- <option value="Georgia">Georgia</option>
637
- <option value="Germany">Germany</option>
638
- <option value="Ghana">Ghana</option>
639
- <option value="Gibraltar">Gibraltar</option>
640
- <option value="Greece">Greece</option>
641
- <option value="Greenland">Greenland</option>
642
- <option value="Grenada">Grenada</option>
643
- <option value="Guadeloupe">Guadeloupe</option>
644
- <option value="Guam">Guam</option>
645
- <option value="Guatemala">Guatemala</option>
646
- <option value="Guernsey">Guernsey</option>
647
- <option value="Guinea">Guinea</option>
648
- <option value="Guinea-bissau">Guinea-bissau</option>
649
- <option value="Guyana">Guyana</option>
650
- <option value="Haiti">Haiti</option>
651
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
652
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
653
- <option value="Honduras">Honduras</option>
654
- <option value="Hong Kong">Hong Kong</option>
655
- <option value="Hungary">Hungary</option>
656
- <option value="Iceland">Iceland</option>
657
- <option value="India">India</option>
658
- <option value="Indonesia">Indonesia</option>
659
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
660
- <option value="Iraq">Iraq</option>
661
- <option value="Ireland">Ireland</option>
662
- <option value="Isle of Man">Isle of Man</option>
663
- <option value="Israel">Israel</option>
664
- <option value="Italy">Italy</option>
665
- <option value="Jamaica">Jamaica</option>
666
- <option value="Japan">Japan</option>
667
- <option value="Jersey">Jersey</option>
668
- <option value="Jordan">Jordan</option>
669
- <option value="Kazakhstan">Kazakhstan</option>
670
- <option value="Kenya">Kenya</option>
671
- <option value="Kiribati">Kiribati</option>
672
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
673
- <option value="Korea, Republic of">Korea, Republic of</option>
674
- <option value="Kuwait">Kuwait</option>
675
- <option value="Kyrgyzstan">Kyrgyzstan</option>
676
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
677
- <option value="Latvia">Latvia</option>
678
- <option value="Lebanon">Lebanon</option>
679
- <option value="Lesotho">Lesotho</option>
680
- <option value="Liberia">Liberia</option>
681
- <option value="Libya">Libya</option>
682
- <option value="Liechtenstein">Liechtenstein</option>
683
- <option value="Lithuania">Lithuania</option>
684
- <option value="Luxembourg">Luxembourg</option>
685
- <option value="Macao">Macao</option>
686
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
687
- <option value="Madagascar">Madagascar</option>
688
- <option value="Malawi">Malawi</option>
689
- <option value="Malaysia">Malaysia</option>
690
- <option value="Maldives">Maldives</option>
691
- <option value="Mali">Mali</option>
692
- <option value="Malta">Malta</option>
693
- <option value="Marshall Islands">Marshall Islands</option>
694
- <option value="Martinique">Martinique</option>
695
- <option value="Mauritania">Mauritania</option>
696
- <option value="Mauritius">Mauritius</option>
697
- <option value="Mayotte">Mayotte</option>
698
- <option value="Mexico">Mexico</option>
699
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
700
- <option value="Moldova, Republic of">Moldova, Republic of</option>
701
- <option value="Monaco">Monaco</option>
702
- <option value="Mongolia">Mongolia</option>
703
- <option value="Montenegro">Montenegro</option>
704
- <option value="Montserrat">Montserrat</option>
705
- <option value="Morocco">Morocco</option>
706
- <option value="Mozambique">Mozambique</option>
707
- <option value="Myanmar">Myanmar</option>
708
- <option value="Namibia">Namibia</option>
709
- <option value="Nauru">Nauru</option>
710
- <option value="Nepal">Nepal</option>
711
- <option value="Netherlands">Netherlands</option>
712
- <option value="New Caledonia">New Caledonia</option>
713
- <option value="New Zealand">New Zealand</option>
714
- <option value="Nicaragua">Nicaragua</option>
715
- <option value="Niger">Niger</option>
716
- <option value="Nigeria">Nigeria</option>
717
- <option value="Niue">Niue</option>
718
- <option value="Norfolk Island">Norfolk Island</option>
719
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
720
- <option value="Norway">Norway</option>
721
- <option value="Oman">Oman</option>
722
- <option value="Pakistan">Pakistan</option>
723
- <option value="Palau">Palau</option>
724
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
725
- <option value="Panama">Panama</option>
726
- <option value="Papua New Guinea">Papua New Guinea</option>
727
- <option value="Paraguay">Paraguay</option>
728
- <option value="Peru">Peru</option>
729
- <option value="Philippines">Philippines</option>
730
- <option value="Pitcairn">Pitcairn</option>
731
- <option value="Poland">Poland</option>
732
- <option value="Portugal">Portugal</option>
733
- <option value="Puerto Rico">Puerto Rico</option>
734
- <option value="Qatar">Qatar</option>
735
- <option value="Reunion">Reunion</option>
736
- <option value="Romania">Romania</option>
737
- <option value="Russian Federation">Russian Federation</option>
738
- <option value="Rwanda">Rwanda</option>
739
- <option value="Saint Barthelemy">Saint Barthelemy</option>
740
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
741
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
742
- <option value="Saint Lucia">Saint Lucia</option>
743
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
744
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
745
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
746
- <option value="Samoa">Samoa</option>
747
- <option value="San Marino">San Marino</option>
748
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
749
- <option value="Saudi Arabia">Saudi Arabia</option>
750
- <option value="Senegal">Senegal</option>
751
- <option value="Serbia">Serbia</option>
752
- <option value="Seychelles">Seychelles</option>
753
- <option value="Sierra Leone">Sierra Leone</option>
754
- <option value="Singapore">Singapore</option>
755
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
756
- <option value="Slovakia">Slovakia</option>
757
- <option value="Slovenia">Slovenia</option>
758
- <option value="Solomon Islands">Solomon Islands</option>
759
- <option value="Somalia">Somalia</option>
760
- <option value="South Africa">South Africa</option>
761
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
762
- <option value="South Sudan">South Sudan</option>
763
- <option value="Spain">Spain</option>
764
- <option value="Sri Lanka">Sri Lanka</option>
765
- <option value="Sudan">Sudan</option>
766
- <option value="Suriname">Suriname</option>
767
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
768
- <option value="Swaziland">Swaziland</option>
769
- <option value="Sweden">Sweden</option>
770
- <option value="Switzerland">Switzerland</option>
771
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
772
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
773
- <option value="Tajikistan">Tajikistan</option>
774
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
775
- <option value="Thailand">Thailand</option>
776
- <option value="Timor-leste">Timor-leste</option>
777
- <option value="Togo">Togo</option>
778
- <option value="Tokelau">Tokelau</option>
779
- <option value="Tonga">Tonga</option>
780
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
781
- <option value="Tunisia">Tunisia</option>
782
- <option value="Turkey">Turkey</option>
783
- <option value="Turkmenistan">Turkmenistan</option>
784
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
785
- <option value="Tuvalu">Tuvalu</option>
786
- <option value="Uganda">Uganda</option>
787
- <option value="Ukraine">Ukraine</option>
788
- <option value="United Arab Emirates">United Arab Emirates</option>
789
- <option value="United Kingdom">United Kingdom</option>
790
- <option value="United States">United States</option>
791
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
792
- <option value="Uruguay">Uruguay</option>
793
- <option value="Uzbekistan">Uzbekistan</option>
794
- <option value="Vanuatu">Vanuatu</option>
795
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
796
- <option value="Viet Nam">Viet Nam</option>
797
- <option value="Virgin Islands, British">Virgin Islands, British</option>
798
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
799
- <option value="Wallis and Futuna">Wallis and Futuna</option>
800
- <option value="Western Sahara">Western Sahara</option>
801
- <option value="Yemen">Yemen</option>
802
- <option value="Zambia">Zambia</option>
803
- <option value="Zimbabwe">Zimbabwe</option>
804
- </select>
805
- </div>
806
- <div>
807
- <em>Into This</em>
808
- <select data-placeholder="Choose a Country..." class="chosen-select" multiple tabindex="4">
809
- <option value=""></option>
810
- <option value="United States">United States</option>
811
- <option value="United Kingdom">United Kingdom</option>
812
- <option value="Afghanistan">Afghanistan</option>
813
- <option value="Aland Islands">Aland Islands</option>
814
- <option value="Albania">Albania</option>
815
- <option value="Algeria">Algeria</option>
816
- <option value="American Samoa">American Samoa</option>
817
- <option value="Andorra">Andorra</option>
818
- <option value="Angola">Angola</option>
819
- <option value="Anguilla">Anguilla</option>
820
- <option value="Antarctica">Antarctica</option>
821
- <option value="Antigua and Barbuda">Antigua and Barbuda</option>
822
- <option value="Argentina">Argentina</option>
823
- <option value="Armenia">Armenia</option>
824
- <option value="Aruba">Aruba</option>
825
- <option value="Australia">Australia</option>
826
- <option value="Austria">Austria</option>
827
- <option value="Azerbaijan">Azerbaijan</option>
828
- <option value="Bahamas">Bahamas</option>
829
- <option value="Bahrain">Bahrain</option>
830
- <option value="Bangladesh">Bangladesh</option>
831
- <option value="Barbados">Barbados</option>
832
- <option value="Belarus">Belarus</option>
833
- <option value="Belgium">Belgium</option>
834
- <option value="Belize">Belize</option>
835
- <option value="Benin">Benin</option>
836
- <option value="Bermuda">Bermuda</option>
837
- <option value="Bhutan">Bhutan</option>
838
- <option value="Bolivia, Plurinational State of">Bolivia, Plurinational State of</option>
839
- <option value="Bonaire, Sint Eustatius and Saba">Bonaire, Sint Eustatius and Saba</option>
840
- <option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
841
- <option value="Botswana">Botswana</option>
842
- <option value="Bouvet Island">Bouvet Island</option>
843
- <option value="Brazil">Brazil</option>
844
- <option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
845
- <option value="Brunei Darussalam">Brunei Darussalam</option>
846
- <option value="Bulgaria">Bulgaria</option>
847
- <option value="Burkina Faso">Burkina Faso</option>
848
- <option value="Burundi">Burundi</option>
849
- <option value="Cambodia">Cambodia</option>
850
- <option value="Cameroon">Cameroon</option>
851
- <option value="Canada">Canada</option>
852
- <option value="Cape Verde">Cape Verde</option>
853
- <option value="Cayman Islands">Cayman Islands</option>
854
- <option value="Central African Republic">Central African Republic</option>
855
- <option value="Chad">Chad</option>
856
- <option value="Chile">Chile</option>
857
- <option value="China">China</option>
858
- <option value="Christmas Island">Christmas Island</option>
859
- <option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
860
- <option value="Colombia">Colombia</option>
861
- <option value="Comoros">Comoros</option>
862
- <option value="Congo">Congo</option>
863
- <option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
864
- <option value="Cook Islands">Cook Islands</option>
865
- <option value="Costa Rica">Costa Rica</option>
866
- <option value="Cote D&apos;ivoire">Cote D'ivoire</option>
867
- <option value="Croatia">Croatia</option>
868
- <option value="Cuba">Cuba</option>
869
- <option value="Curacao">Curacao</option>
870
- <option value="Cyprus">Cyprus</option>
871
- <option value="Czech Republic">Czech Republic</option>
872
- <option value="Denmark">Denmark</option>
873
- <option value="Djibouti">Djibouti</option>
874
- <option value="Dominica">Dominica</option>
875
- <option value="Dominican Republic">Dominican Republic</option>
876
- <option value="Ecuador">Ecuador</option>
877
- <option value="Egypt">Egypt</option>
878
- <option value="El Salvador">El Salvador</option>
879
- <option value="Equatorial Guinea">Equatorial Guinea</option>
880
- <option value="Eritrea">Eritrea</option>
881
- <option value="Estonia">Estonia</option>
882
- <option value="Ethiopia">Ethiopia</option>
883
- <option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
884
- <option value="Faroe Islands">Faroe Islands</option>
885
- <option value="Fiji">Fiji</option>
886
- <option value="Finland">Finland</option>
887
- <option value="France">France</option>
888
- <option value="French Guiana">French Guiana</option>
889
- <option value="French Polynesia">French Polynesia</option>
890
- <option value="French Southern Territories">French Southern Territories</option>
891
- <option value="Gabon">Gabon</option>
892
- <option value="Gambia">Gambia</option>
893
- <option value="Georgia">Georgia</option>
894
- <option value="Germany">Germany</option>
895
- <option value="Ghana">Ghana</option>
896
- <option value="Gibraltar">Gibraltar</option>
897
- <option value="Greece">Greece</option>
898
- <option value="Greenland">Greenland</option>
899
- <option value="Grenada">Grenada</option>
900
- <option value="Guadeloupe">Guadeloupe</option>
901
- <option value="Guam">Guam</option>
902
- <option value="Guatemala">Guatemala</option>
903
- <option value="Guernsey">Guernsey</option>
904
- <option value="Guinea">Guinea</option>
905
- <option value="Guinea-bissau">Guinea-bissau</option>
906
- <option value="Guyana">Guyana</option>
907
- <option value="Haiti">Haiti</option>
908
- <option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
909
- <option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
910
- <option value="Honduras">Honduras</option>
911
- <option value="Hong Kong">Hong Kong</option>
912
- <option value="Hungary">Hungary</option>
913
- <option value="Iceland">Iceland</option>
914
- <option value="India">India</option>
915
- <option value="Indonesia">Indonesia</option>
916
- <option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
917
- <option value="Iraq">Iraq</option>
918
- <option value="Ireland">Ireland</option>
919
- <option value="Isle of Man">Isle of Man</option>
920
- <option value="Israel">Israel</option>
921
- <option value="Italy">Italy</option>
922
- <option value="Jamaica">Jamaica</option>
923
- <option value="Japan">Japan</option>
924
- <option value="Jersey">Jersey</option>
925
- <option value="Jordan">Jordan</option>
926
- <option value="Kazakhstan">Kazakhstan</option>
927
- <option value="Kenya">Kenya</option>
928
- <option value="Kiribati">Kiribati</option>
929
- <option value="Korea, Democratic People&apos;s Republic of">Korea, Democratic People's Republic of</option>
930
- <option value="Korea, Republic of">Korea, Republic of</option>
931
- <option value="Kuwait">Kuwait</option>
932
- <option value="Kyrgyzstan">Kyrgyzstan</option>
933
- <option value="Lao People&apos;s Democratic Republic">Lao People's Democratic Republic</option>
934
- <option value="Latvia">Latvia</option>
935
- <option value="Lebanon">Lebanon</option>
936
- <option value="Lesotho">Lesotho</option>
937
- <option value="Liberia">Liberia</option>
938
- <option value="Libya">Libya</option>
939
- <option value="Liechtenstein">Liechtenstein</option>
940
- <option value="Lithuania">Lithuania</option>
941
- <option value="Luxembourg">Luxembourg</option>
942
- <option value="Macao">Macao</option>
943
- <option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
944
- <option value="Madagascar">Madagascar</option>
945
- <option value="Malawi">Malawi</option>
946
- <option value="Malaysia">Malaysia</option>
947
- <option value="Maldives">Maldives</option>
948
- <option value="Mali">Mali</option>
949
- <option value="Malta">Malta</option>
950
- <option value="Marshall Islands">Marshall Islands</option>
951
- <option value="Martinique">Martinique</option>
952
- <option value="Mauritania">Mauritania</option>
953
- <option value="Mauritius">Mauritius</option>
954
- <option value="Mayotte">Mayotte</option>
955
- <option value="Mexico">Mexico</option>
956
- <option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
957
- <option value="Moldova, Republic of">Moldova, Republic of</option>
958
- <option value="Monaco">Monaco</option>
959
- <option value="Mongolia">Mongolia</option>
960
- <option value="Montenegro">Montenegro</option>
961
- <option value="Montserrat">Montserrat</option>
962
- <option value="Morocco">Morocco</option>
963
- <option value="Mozambique">Mozambique</option>
964
- <option value="Myanmar">Myanmar</option>
965
- <option value="Namibia">Namibia</option>
966
- <option value="Nauru">Nauru</option>
967
- <option value="Nepal">Nepal</option>
968
- <option value="Netherlands">Netherlands</option>
969
- <option value="New Caledonia">New Caledonia</option>
970
- <option value="New Zealand">New Zealand</option>
971
- <option value="Nicaragua">Nicaragua</option>
972
- <option value="Niger">Niger</option>
973
- <option value="Nigeria">Nigeria</option>
974
- <option value="Niue">Niue</option>
975
- <option value="Norfolk Island">Norfolk Island</option>
976
- <option value="Northern Mariana Islands">Northern Mariana Islands</option>
977
- <option value="Norway">Norway</option>
978
- <option value="Oman">Oman</option>
979
- <option value="Pakistan">Pakistan</option>
980
- <option value="Palau">Palau</option>
981
- <option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
982
- <option value="Panama">Panama</option>
983
- <option value="Papua New Guinea">Papua New Guinea</option>
984
- <option value="Paraguay">Paraguay</option>
985
- <option value="Peru">Peru</option>
986
- <option value="Philippines">Philippines</option>
987
- <option value="Pitcairn">Pitcairn</option>
988
- <option value="Poland">Poland</option>
989
- <option value="Portugal">Portugal</option>
990
- <option value="Puerto Rico">Puerto Rico</option>
991
- <option value="Qatar">Qatar</option>
992
- <option value="Reunion">Reunion</option>
993
- <option value="Romania">Romania</option>
994
- <option value="Russian Federation">Russian Federation</option>
995
- <option value="Rwanda">Rwanda</option>
996
- <option value="Saint Barthelemy">Saint Barthelemy</option>
997
- <option value="Saint Helena, Ascension and Tristan da Cunha">Saint Helena, Ascension and Tristan da Cunha</option>
998
- <option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
999
- <option value="Saint Lucia">Saint Lucia</option>
1000
- <option value="Saint Martin (French part)">Saint Martin (French part)</option>
1001
- <option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
1002
- <option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
1003
- <option value="Samoa">Samoa</option>
1004
- <option value="San Marino">San Marino</option>
1005
- <option value="Sao Tome and Principe">Sao Tome and Principe</option>
1006
- <option value="Saudi Arabia">Saudi Arabia</option>
1007
- <option value="Senegal">Senegal</option>
1008
- <option value="Serbia">Serbia</option>
1009
- <option value="Seychelles">Seychelles</option>
1010
- <option value="Sierra Leone">Sierra Leone</option>
1011
- <option value="Singapore">Singapore</option>
1012
- <option value="Sint Maarten (Dutch part)">Sint Maarten (Dutch part)</option>
1013
- <option value="Slovakia">Slovakia</option>
1014
- <option value="Slovenia">Slovenia</option>
1015
- <option value="Solomon Islands">Solomon Islands</option>
1016
- <option value="Somalia">Somalia</option>
1017
- <option value="South Africa">South Africa</option>
1018
- <option value="South Georgia and The South Sandwich Islands">South Georgia and The South Sandwich Islands</option>
1019
- <option value="South Sudan">South Sudan</option>
1020
- <option value="Spain">Spain</option>
1021
- <option value="Sri Lanka">Sri Lanka</option>
1022
- <option value="Sudan">Sudan</option>
1023
- <option value="Suriname">Suriname</option>
1024
- <option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
1025
- <option value="Swaziland">Swaziland</option>
1026
- <option value="Sweden">Sweden</option>
1027
- <option value="Switzerland">Switzerland</option>
1028
- <option value="Syrian Arab Republic">Syrian Arab Republic</option>
1029
- <option value="Taiwan, Province of China">Taiwan, Province of China</option>
1030
- <option value="Tajikistan">Tajikistan</option>
1031
- <option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
1032
- <option value="Thailand">Thailand</option>
1033
- <option value="Timor-leste">Timor-leste</option>
1034
- <option value="Togo">Togo</option>
1035
- <option value="Tokelau">Tokelau</option>
1036
- <option value="Tonga">Tonga</option>
1037
- <option value="Trinidad and Tobago">Trinidad and Tobago</option>
1038
- <option value="Tunisia">Tunisia</option>
1039
- <option value="Turkey">Turkey</option>
1040
- <option value="Turkmenistan">Turkmenistan</option>
1041
- <option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
1042
- <option value="Tuvalu">Tuvalu</option>
1043
- <option value="Uganda">Uganda</option>
1044
- <option value="Ukraine">Ukraine</option>
1045
- <option value="United Arab Emirates">United Arab Emirates</option>
1046
- <option value="United Kingdom">United Kingdom</option>
1047
- <option value="United States">United States</option>
1048
- <option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
1049
- <option value="Uruguay">Uruguay</option>
1050
- <option value="Uzbekistan">Uzbekistan</option>
1051
- <option value="Vanuatu">Vanuatu</option>
1052
- <option value="Venezuela, Bolivarian Republic of">Venezuela, Bolivarian Republic of</option>
1053
- <option value="Viet Nam">Viet Nam</option>
1054
- <option value="Virgin Islands, British">Virgin Islands, British</option>
1055
- <option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
1056
- <option value="Wallis and Futuna">Wallis and Futuna</option>
1057
- <option value="Western Sahara">Western Sahara</option>
1058
- <option value="Yemen">Yemen</option>
1059
- <option value="Zambia">Zambia</option>
1060
- <option value="Zimbabwe">Zimbabwe</option>
1061
- </select>
1062
- </div>
1063
- </div>
1064
-
1065
- <h2><a name="optgroup-support" class="anchor" href="#optgroup-support">&lt;optgroup&gt; Support</a></h2>
1066
- <div class="side-by-side clearfix">
1067
- <div>
1068
- <em>Single Select with Groups</em>
1069
- <select data-placeholder="Your Favorite Football Team" class="chosen-select" tabindex="5">
1070
- <option value=""></option>
1071
- <optgroup label="NFC EAST">
1072
- <option>Dallas Cowboys</option>
1073
- <option>New York Giants</option>
1074
- <option>Philadelphia Eagles</option>
1075
- <option>Washington Redskins</option>
1076
- </optgroup>
1077
- <optgroup label="NFC NORTH">
1078
- <option>Chicago Bears</option>
1079
- <option>Detroit Lions</option>
1080
- <option>Green Bay Packers</option>
1081
- <option>Minnesota Vikings</option>
1082
- </optgroup>
1083
- <optgroup label="NFC SOUTH">
1084
- <option>Atlanta Falcons</option>
1085
- <option>Carolina Panthers</option>
1086
- <option>New Orleans Saints</option>
1087
- <option>Tampa Bay Buccaneers</option>
1088
- </optgroup>
1089
- <optgroup label="NFC WEST">
1090
- <option>Arizona Cardinals</option>
1091
- <option>St. Louis Rams</option>
1092
- <option>San Francisco 49ers</option>
1093
- <option>Seattle Seahawks</option>
1094
- </optgroup>
1095
- <optgroup label="AFC EAST">
1096
- <option>Buffalo Bills</option>
1097
- <option>Miami Dolphins</option>
1098
- <option>New England Patriots</option>
1099
- <option>New York Jets</option>
1100
- </optgroup>
1101
- <optgroup label="AFC NORTH">
1102
- <option>Baltimore Ravens</option>
1103
- <option>Cincinnati Bengals</option>
1104
- <option>Cleveland Browns</option>
1105
- <option>Pittsburgh Steelers</option>
1106
- </optgroup>
1107
- <optgroup label="AFC SOUTH">
1108
- <option>Houston Texans</option>
1109
- <option>Indianapolis Colts</option>
1110
- <option>Jacksonville Jaguars</option>
1111
- <option>Tennessee Titans</option>
1112
- </optgroup>
1113
- <optgroup label="AFC WEST">
1114
- <option>Denver Broncos</option>
1115
- <option>Kansas City Chiefs</option>
1116
- <option>Oakland Raiders</option>
1117
- <option>San Diego Chargers</option>
1118
- </optgroup>
1119
- </select>
1120
- </div>
1121
- <div>
1122
- <em>Multiple Select with Groups</em>
1123
- <select data-placeholder="Your Favorite Football Team" class="chosen-select" multiple tabindex="6">
1124
- <option value=""></option>
1125
- <optgroup label="NFC EAST">
1126
- <option>Dallas Cowboys</option>
1127
- <option>New York Giants</option>
1128
- <option>Philadelphia Eagles</option>
1129
- <option>Washington Redskins</option>
1130
- </optgroup>
1131
- <optgroup label="NFC NORTH">
1132
- <option>Chicago Bears</option>
1133
- <option>Detroit Lions</option>
1134
- <option>Green Bay Packers</option>
1135
- <option>Minnesota Vikings</option>
1136
- </optgroup>
1137
- <optgroup label="NFC SOUTH">
1138
- <option>Atlanta Falcons</option>
1139
- <option>Carolina Panthers</option>
1140
- <option>New Orleans Saints</option>
1141
- <option>Tampa Bay Buccaneers</option>
1142
- </optgroup>
1143
- <optgroup label="NFC WEST">
1144
- <option>Arizona Cardinals</option>
1145
- <option>St. Louis Rams</option>
1146
- <option>San Francisco 49ers</option>
1147
- <option>Seattle Seahawks</option>
1148
- </optgroup>
1149
- <optgroup label="AFC EAST">
1150
- <option>Buffalo Bills</option>
1151
- <option>Miami Dolphins</option>
1152
- <option>New England Patriots</option>
1153
- <option>New York Jets</option>
1154
- </optgroup>
1155
- <optgroup label="AFC NORTH">
1156
- <option>Baltimore Ravens</option>
1157
- <option>Cincinnati Bengals</option>
1158
- <option>Cleveland Browns</option>
1159
- <option>Pittsburgh Steelers</option>
1160
- </optgroup>
1161
- <optgroup label="AFC SOUTH">
1162
- <option>Houston Texans</option>
1163
- <option>Indianapolis Colts</option>
1164
- <option>Jacksonville Jaguars</option>
1165
- <option>Tennessee Titans</option>
1166
- </optgroup>
1167
- <optgroup label="AFC WEST">
1168
- <option>Denver Broncos</option>
1169
- <option>Kansas City Chiefs</option>
1170
- <option>Oakland Raiders</option>
1171
- <option>San Diego Chargers</option>
1172
- </optgroup>
1173
- </select>
1174
- </div>
1175
- </div>
1176
-
1177
- <h2><a name="selected-and-disabled-support" class="anchor" href="#selected-and-disabled-support">Selected and Disabled Support</a></h2>
1178
- <div class="side-by-side clearfix">
1179
- <p>Chosen automatically highlights selected options and removes disabled options.</p>
1180
- <div>
1181
- <em>Single Select</em>
1182
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select" tabindex="7">
1183
- <option value=""></option>
1184
- <option>American Black Bear</option>
1185
- <option>Asiatic Black Bear</option>
1186
- <option>Brown Bear</option>
1187
- <option>Giant Panda</option>
1188
- <option selected>Sloth Bear</option>
1189
- <option disabled>Sun Bear</option>
1190
- <option>Polar Bear</option>
1191
- <option disabled>Spectacled Bear</option>
1192
- </select>
1193
- </div>
1194
- <div>
1195
- <em>Multiple Select</em>
1196
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select" tabindex="8">
1197
- <option value=""></option>
1198
- <option>American Black Bear</option>
1199
- <option>Asiatic Black Bear</option>
1200
- <option>Brown Bear</option>
1201
- <option>Giant Panda</option>
1202
- <option selected>Sloth Bear</option>
1203
- <option disabled>Sun Bear</option>
1204
- <option selected>Polar Bear</option>
1205
- <option disabled>Spectacled Bear</option>
1206
- </select>
1207
- </div>
1208
- </div>
1209
-
1210
- <h2><a name="hide-search-on-single-select" class="anchor" href="#hide-search-on-single-select">Hide Search on Single Select</a></h2>
1211
- <div class="side-by-side clearfix">
1212
- <p>The <code>disable_search_threshold</code> option can be specified to hide the search input on single selects if there are <i>n</i> or fewer options.</p>
1213
- <pre><code class="language-javascript"> new Chosen($("chosen_select_field"),{disable_search_threshold: 10}); </code></pre>
1214
- <p></p>
1215
- <div>
1216
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-no-single" tabindex="9">
1217
- <option value=""></option>
1218
- <option>American Black Bear</option>
1219
- <option>Asiatic Black Bear</option>
1220
- <option>Brown Bear</option>
1221
- <option>Giant Panda</option>
1222
- <option selected disabled>Sloth Bear</option>
1223
- <option disabled>Sun Bear</option>
1224
- <option selected>Paddington Bear</option>
1225
- <option selected>Polar Bear</option>
1226
- <option disabled>Spectacled Bear</option>
1227
- </select>
1228
- </div>
1229
- </div>
1230
-
1231
- <h2><a name="default-text-support" class="anchor" href="#default-text-support">Default Text Support</a></h2>
1232
- <div class="side-by-side clearfix">
1233
- <p>Chosen automatically sets the default field text ("Choose a country...") by reading the select element's data-placeholder value. If no data-placeholder value is present, it will default to "Select an Option" or "Select Some Options" depending on whether the select is single or multiple. You can change these elements in the plugin js file as you see fit.</p>
1234
- <pre><code class="language-markup">&lt;select <strong>data-placeholder="Choose a country..."</strong> multiple class="chosen-select"&gt;</code></pre>
1235
- <p><strong>Note:</strong> on single selects, the first element is assumed to be selected by the browser. To take advantage of the default text support, you will need to include a blank option as the first element of your select list.</p>
1236
- </div>
1237
-
1238
- <h2><a name="no-results-text-support" class="anchor" href="#no-results-text-support">No Results Text Support</a></h2>
1239
- <div class="side-by-side clearfix">
1240
- <p>Setting the "No results" search text is as easy as passing an option when you create Chosen:</p>
1241
- <pre><code class="language-javascript">new Chosen($("chosen_select_field"),{no_results_text: "Oops, nothing found!"}); </code></pre>
1242
-
1243
- <div>
1244
- <em>Single Select</em>
1245
- <select data-placeholder="Type &apos;C&apos; to view" class="chosen-select-no-results" tabindex="10">
1246
- <option value=""></option>
1247
- <option>American Black Bear</option>
1248
- <option>Asiatic Black Bear</option>
1249
- <option>Brown Bear</option>
1250
- <option>Giant Panda</option>
1251
- <option>Sloth Bear</option>
1252
- <option>Sun Bear</option>
1253
- <option>Polar Bear</option>
1254
- <option>Spectacled Bear</option>
1255
- </select>
1256
- </div>
1257
- <div>
1258
- <em>Multiple Select</em>
1259
- <select data-placeholder="Type &apos;C&apos; to view" multiple class="chosen-select-no-results" tabindex="11">
1260
- <option value=""></option>
1261
- <option>American Black Bear</option>
1262
- <option>Asiatic Black Bear</option>
1263
- <option>Brown Bear</option>
1264
- <option>Giant Panda</option>
1265
- <option>Sloth Bear</option>
1266
- <option>Sun Bear</option>
1267
- <option>Polar Bear</option>
1268
- <option>Spectacled Bear</option>
1269
- </select>
1270
- </div>
1271
- </div>
1272
-
1273
- <h2><a name="limit-selected-options-in-multiselect" class="anchor" href="#limit-selected-options-in-multiselect">Limit Selected Options in Multiselect</a></h2>
1274
- <div class="side-by-side clearfix">
1275
- <p>You can easily limit how many options the user can select:</p>
1276
- <pre><code class="language-javascript">new Chosen($("chosen_select_field"),{max_selected_options: 5}); </code></pre>
1277
- <p>If you try to select another option with limit reached <code>chosen:maxselected</code> event is triggered:</p>
1278
- <pre><code class="language-javascript">$("chosen_select_field").observe("chosen:maxselected", function(evt) { ... }); </code></pre>
1279
- </div>
1280
-
1281
- <h2><a name="allow-deselect-on-single-selects" class="anchor" href="#allow-deselect-on-single-selects">Allow Deselect on Single Selects</a></h2>
1282
- <div class="side-by-side clearfix">
1283
- <p>When a single select box isn't a required field, you can set <code class="language-javascript">allow_single_deselect: true</code> and Chosen will add a UI element for option deselection. This will only work if the first option has blank text.</p>
1284
- <div class="side-by-side clearfix">
1285
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-deselect" tabindex="12">
1286
- <option value=""></option>
1287
- <option>American Black Bear</option>
1288
- <option>Asiatic Black Bear</option>
1289
- <option>Brown Bear</option>
1290
- <option>Giant Panda</option>
1291
- <option selected>Sloth Bear</option>
1292
- <option>Sun Bear</option>
1293
- <option>Polar Bear</option>
1294
- <option>Spectacled Bear</option>
1295
- </select>
1296
- </div>
1297
- </div>
1298
-
1299
- <h2><a name="right-to-left-support" class="anchor" href="#right-to-left-support">Right-to-Left Support</a></h2>
1300
- <div class="side-by-side clearfix">
1301
- <p>You can set right-to-left text by setting <code class="language-javascript">rtl: true</code></p>
1302
- <pre><code class="language-javascript"> $(".chosen-select").chosen({rtl: true}); </code></pre>
1303
- <div>
1304
- <em>Single Right-to-Left Select</em>
1305
- <select data-placeholder="Your Favorite Type of Bear" class="chosen-select-rtl" tabindex="13">
1306
- <option value=""></option>
1307
- <option>American Black Bear</option>
1308
- <option>Asiatic Black Bear</option>
1309
- <option>Brown Bear</option>
1310
- <option>Giant Panda</option>
1311
- <option selected>Sloth Bear</option>
1312
- <option>Polar Bear</option>
1313
- </select>
1314
- </div>
1315
- <div>
1316
- <em>Multiple Right-to-Left Select</em>
1317
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select-rtl" tabindex="14">
1318
- <option value=""></option>
1319
- <option>American Black Bear</option>
1320
- <option>Asiatic Black Bear</option>
1321
- <option>Brown Bear</option>
1322
- <option>Giant Panda</option>
1323
- <option selected>Sloth Bear</option>
1324
- <option selected>Polar Bear</option>
1325
- </select>
1326
- </div>
1327
- </div>
1328
-
1329
- <h2><a name="change-update-events" class="anchor" href="#change-update-events">Observing, Updating, and Destroying Chosen</a></h2>
1330
- <div class="side-by-side clearfix">
1331
- <ul>
1332
- <li>
1333
- <h3>Observing Form Field Changes</h3>
1334
- <p>When working with form fields, you often want to perform some behavior after a value has been selected or deselected. Whenever a user selects a field in Chosen, it triggers a "change" event on the original form field. That lets you do something like this:</p>
1335
- <pre><code class="language-javascript">$("#form_field").chosen().change( &hellip; );</code></pre>
1336
- <p><strong>Note:</strong> Prototype doesn't offer support for triggering standard browser events. <a href="https://github.com/kangax/protolicious/blob/5b56fdafcd7d7662c9d648534225039b2e78e371/event.simulate.js">Event.simulate</a> is required to trigger the change event when using the Prototype version.</p>
1337
- </li>
1338
- <li>
1339
- <h3>Updating Chosen Dynamically</h3>
1340
- <p>If you need to update the options in your select field and want Chosen to pick up the changes, you'll need to trigger the "chosen:updated" event on the field. Chosen will re-build itself based on the updated content.</p>
1341
- <pre><code class="language-javascript">Event.fire($("form_field"), "chosen:updated");</code></pre>
1342
- </li>
1343
- <li>
1344
- <h3>Destroying Chosen</h3>
1345
- <p>To destroy Chosen and revert back to the native select, call <code class="language-javascript">destroy</code> on the Chosen instance:</p>
1346
- <pre><code class="language-javascript">chosen = new Chosen($("form_field"));
1347
-
1348
- // ...later
1349
- chosen.destroy();</code></pre>
1350
- </li>
1351
- </ul>
1352
- </div>
1353
-
1354
- <h2><a name="custom-width-support" class="anchor" href="#custom-width-support">Custom Width Support</a></h2>
1355
- <div class="side-by-side clearfix">
1356
- <p>Using a custom width with Chosen is as easy as passing an option when you create Chosen:</p>
1357
- <pre><code class="language-javascript">new Chosen($("chosen_select_field"),{width: "95%"}); </code></pre>
1358
- <div>
1359
- <em>Single Select</em>
1360
- <select data-placeholder="Your Favorite Types of Bear" class="chosen-select-width" tabindex="15">
1361
- <option value=""></option>
1362
- <option selected>American Black Bear</option>
1363
- <option>Asiatic Black Bear</option>
1364
- <option>Brown Bear</option>
1365
- <option>Giant Panda</option>
1366
- <option>Sloth Bear</option>
1367
- <option>Sun Bear</option>
1368
- <option>Polar Bear</option>
1369
- <option>Spectacled Bear</option>
1370
- </select>
1371
- </div>
1372
- <div>
1373
- <em>Multiple Select</em>
1374
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select-width" tabindex="16">
1375
- <option value=""></option>
1376
- <option>American Black Bear</option>
1377
- <option>Asiatic Black Bear</option>
1378
- <option>Brown Bear</option>
1379
- <option selected>Giant Panda</option>
1380
- <option>Sloth Bear</option>
1381
- <option>Sun Bear</option>
1382
- <option>Polar Bear</option>
1383
- <option>Spectacled Bear</option>
1384
- </select>
1385
- </div>
1386
- </div>
1387
-
1388
- <h2><a name="labels-work-too" class="anchor" href="#labels-work-too">Labels work, too</a></h2>
1389
- <div class="side-by-side clearfix">
1390
- <p>Use labels just like you would a standard select</p>
1391
- <p></p>
1392
- <div>
1393
- <em><label for="single-label-example">Click to Highlight Single Select</label></em>
1394
- <select data-placeholder="Your Favorite Types of Bear" class="chosen-select" tabindex="17" id="single-label-example">
1395
- <option value=""></option>
1396
- <option selected>American Black Bear</option>
1397
- <option>Asiatic Black Bear</option>
1398
- <option>Brown Bear</option>
1399
- <option>Giant Panda</option>
1400
- <option>Sloth Bear</option>
1401
- <option>Sun Bear</option>
1402
- <option>Polar Bear</option>
1403
- <option>Spectacled Bear</option>
1404
- </select>
1405
- </div>
1406
- <div>
1407
- <em><label for="multiple-label-example">Click to Highlight Multiple Select</label></em>
1408
- <select data-placeholder="Your Favorite Types of Bear" multiple class="chosen-select" tabindex="18" id="multiple-label-example">
1409
- <option value=""></option>
1410
- <option>American Black Bear</option>
1411
- <option>Asiatic Black Bear</option>
1412
- <option>Brown Bear</option>
1413
- <option selected>Giant Panda</option>
1414
- <option>Sloth Bear</option>
1415
- <option>Sun Bear</option>
1416
- <option>Polar Bear</option>
1417
- <option>Spectacled Bear</option>
1418
- </select>
1419
- </div>
1420
- </div>
1421
-
1422
- <h2><a name="setup" class="anchor" href="#setup">Setup</a></h2>
1423
- <p>Using Chosen is easy as can be.</p>
1424
- <ol>
1425
- <li><a href="https://github.com/harvesthq/chosen/releases">Download</a> the plugin and copy the chosen files to your app.</li>
1426
- <li>Activate the plugin by creating a new instance of Chosen: New Chosen(<em>some_form_field</em>,<em>some_options</em>);</li>
1427
- <li><a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=UkSPUDpe0U8#t=11s">Disco</a>.</li>
1428
- </ol>
1429
-
1430
- <h2><a name="faqs" class="anchor" href="#faqs">FAQs</a></h2>
1431
- <ul class="faqs">
1432
- <li>
1433
- <h3>Do you have all the available options documented somewhere?</h3>
1434
- <p>Yes! You can find them on <a href="options.html">the options page</a>.</p>
1435
- </li>
1436
- <li>
1437
- <h3>Something doesn't work. Can you fix it?</h3>
1438
- <p>Yes! Please report all issues using the <a href="http://github.com/harvesthq/chosen/issues">GitHub issue tracking tool</a>. Please include the plugin version (jQuery or Prototype), browser and OS. The more information provided, the easier it is to fix a problem.</p>
1439
- </li>
1440
- <li>
1441
- <h3>What browsers are supported?</h3>
1442
- <p>All modern desktop browsers are supported (Firefox, Chrome, Safari and IE9). Legacy support for IE8 is also enabled. Chosen is disabled on iPhone, iPod Touch, and Android mobile devices (<a href="https://github.com/harvesthq/chosen/pull/1388">more information</a>).</p>
1443
- </li>
1444
- </ul>
1445
-
1446
- <h2><a name="credits" class="anchor" href="#credits">Credits</a></h2>
1447
-
1448
- <ul class="credits">
1449
- <li>Concept and development by <a href="http://patrickfiller.com">Patrick Filler</a> for <a href="https://getharvest.com">Harvest</a>.</li>
1450
- <li>Design and CSS by <a href="http://matthewlettini.com">Matthew Lettini</a>.</li>
1451
- <li>Repository maintained by <a href="https://github.com/pfiller">@pfiller</a>, <a href="https://github.com/kenearley">@kenearley</a>, <a href="https://github.com/stof">@stof</a>, <a href="https://github.com/koenpunt">@koenpunt</a>, and <a href="https://github.com/tjschuck">@tjschuck</a>.</li>
1452
- <li>Chosen includes <a href="https://github.com/harvesthq/chosen/contributors">contributions by many fine folks</a>.</li>
1453
- </ul>
1454
-
1455
- <footer>
1456
- &copy; 2011&ndash;2016 <a href="http://www.getharvest.com/">Harvest</a>. Chosen is licensed under the <a href="https://github.com/harvesthq/chosen/blob/master/LICENSE.md">MIT license</a>.
1457
- </footer>
1458
-
1459
- </div>
1460
- </div>
1461
- <script src="docsupport/prototype-1.7.0.0.js" type="text/javascript"></script>
1462
- <script src="chosen.proto.js" type="text/javascript"></script>
1463
- <script src="docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
1464
- <script src="docsupport/init.proto.js" type="text/javascript" charset="utf-8"></script>
1465
- <div class="oss-bar">
1466
- <ul>
1467
- <li><a class="fork" href="https://github.com/harvesthq/chosen">Fork on Github</a></li>
1468
- <li><a class="harvest" href="http://www.getharvest.com/">Built by Harvest</a></li>
1469
- </ul>
1470
- </div>
1471
- </body>
1472
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/options.html DELETED
@@ -1,311 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Chosen: A jQuery Plugin by Harvest to Tame Unwieldy Select Boxes</title>
6
- <link rel="stylesheet" href="docsupport/style.css">
7
- <link rel="stylesheet" href="docsupport/prism.css">
8
- <link rel="stylesheet" href="chosen.css">
9
- <style type="text/css" media="all">
10
- /* fix rtl for demo */
11
- .chosen-rtl .chosen-drop { left: -9000px; }
12
- </style>
13
- </head>
14
- <body>
15
- <div id="container">
16
- <div id="content">
17
- <header>
18
- <h1>Chosen <small>(<span id="latest-version">v1.8.3</span>)</small></h1>
19
- </header>
20
- <p>Chosen has a number of options and attributes that allow you to have full control of your select boxes.</p>
21
-
22
- <h2><a name="options" class="anchor" href="#options">Options</a></h2>
23
- <p>The following options are available to pass into Chosen on instantiation.</p>
24
-
25
- <h3>Example:</h3>
26
- <pre>
27
- <code class="language-javascript">$(".my_select_box").chosen({
28
- disable_search_threshold: 10,
29
- no_results_text: "Oops, nothing found!",
30
- width: "95%"
31
- });</code>
32
- </pre>
33
-
34
- <table class="docs-table">
35
- <tr>
36
- <th>Option</th><th>Default</th><th>Description</th>
37
- </tr>
38
- <tr>
39
- <td>allow_single_deselect</td>
40
- <td>false</td>
41
- <td>When set to <code class="language-javascript">true</code> on a single select, Chosen adds a UI element which selects the first element (if it is blank).</td>
42
- </tr>
43
- <tr>
44
- <td>disable_search</td>
45
- <td>false</td>
46
- <td>When set to <code class="language-javascript">true</code>, Chosen will not display the search field (single selects only).</td>
47
- </tr>
48
- <tr>
49
- <td>disable_search_threshold</td>
50
- <td>0</td>
51
- <td>Hide the search input on single selects if there are <i>n</i> or fewer options.</td>
52
- </tr>
53
- <tr>
54
- <td>enable_split_word_search</td>
55
- <td>true</td>
56
- <td>By default, searching will match on any word within an option tag. Set this option to <code class="language-javascript">false</code> if you want to only match on the entire text of an option tag.</td>
57
- </tr>
58
- <tr>
59
- <td>inherit_select_classes</td>
60
- <td>false</td>
61
- <td>When set to <code class="language-javascript">true</code>, Chosen will grab any classes on the original select field and add them to Chosen’s container div.</td>
62
- </tr>
63
- <tr>
64
- <td>max_selected_options</td>
65
- <td>Infinity</td>
66
- <td>Limits how many options the user can select. When the limit is reached, the <code class="language-javascript">chosen:maxselected</code> event is triggered.</td>
67
- </tr>
68
- <tr>
69
- <td>no_results_text</td>
70
- <td>"No results match"</td>
71
- <td>The text to be displayed when no matching results are found. The current search is shown at the end of the text (<i>e.g.</i>,
72
- No results match "Bad Search").</td>
73
- </tr>
74
- <tr>
75
- <td>placeholder_text_multiple</td>
76
- <td>"Select Some Options"</td>
77
- <td>The text to be displayed as a placeholder when no options are selected for a multiple select.</td>
78
- </tr>
79
- <tr>
80
- <td>placeholder_text_single</td>
81
- <td>"Select an Option"</td>
82
- <td>The text to be displayed as a placeholder when no options are selected for a single select.</td>
83
- </tr>
84
- <tr>
85
- <td>search_contains</td>
86
- <td>false</td>
87
- <td>By default, Chosen’s search matches starting at the beginning of a word. Setting this option to <code class="language-javascript">true</code> allows matches starting from anywhere within a word. This is especially useful for options that include a lot of special characters or phrases in ()s and []s.</td>
88
- </tr>
89
- <tr>
90
- <td>group_search</td>
91
- <td>true</td>
92
- <td>By default, Chosen will search group labels as well as options, and filter to show all options below matching groups. Set this to <code class="language-javascript">false</code> to search only in the options.</td>
93
- </tr>
94
- <tr>
95
- <td>single_backstroke_delete</td>
96
- <td>true</td>
97
- <td>By default, pressing delete/backspace on multiple selects will remove a selected choice. When <code class="language-javascript">false</code>, pressing delete/backspace will highlight the last choice, and a second press deselects it.</td>
98
- </tr>
99
- <tr>
100
- <td>width</td>
101
- <td>Original select width.</td>
102
- <td>The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0.</td>
103
- </tr>
104
- <tr>
105
- <td>display_disabled_options</td>
106
- <td>true</td>
107
- <td>By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches.</td>
108
- </tr>
109
- <tr>
110
- <td>display_selected_options</td>
111
- <td>true</td>
112
- <td>
113
- <p>By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches.</p>
114
- <p><strong>Note:</strong> this is for multiple selects only. In single selects, the selected result will always be displayed.</p>
115
- </td>
116
- </tr>
117
- <tr>
118
- <td>include_group_label_in_selected</td>
119
- <td>false</td>
120
- <td>
121
- <p>By default, Chosen only shows the text of a selected option. Setting this option to <code class="language-javascript">true</code> will show the text and group (if any) of the selected option.</p>
122
- </td>
123
- </tr>
124
- <tr>
125
- <td>max_shown_results</td>
126
- <td>Infinity</td>
127
- <td>
128
- <p>Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options.</p>
129
- </td>
130
- </tr>
131
- <tr>
132
- <td>case_sensitive_search</td>
133
- <td>false</td>
134
- <td>
135
- <p>By default, Chosen's search is case-insensitive. Setting this option to <code class="language-javascript">true</code> makes the search case-sensitive.</p>
136
- </td>
137
- </tr>
138
- <tr>
139
- <td>hide_results_on_select</td>
140
- <td>true</td>
141
- <td>
142
- <p>By default, Chosen's results are hidden after a option is selected. Setting this option to <code class="language-javascript">false</code> will keep the results open after selection. This only applies to multiple selects.</p>
143
- </td>
144
- </tr>
145
- <tr>
146
- <td>rtl</td>
147
- <td>false</td>
148
- <td>
149
- <p>Chosen supports right-to-left text in select boxes. Set this option to <code class="language-javascript">true</code> to support right-to-left text options.</p>
150
- <p><strong>Note:</strong> <a href="#classes">the <code class="language-javascript">chosen-rtl</code> class</a> on the select has precedence over this option. However, the classname approach is deprecated and will be removed in future versions of Chosen.</p>
151
- </td>
152
- </tr>
153
- </table>
154
-
155
- <h2><a name="attributes" class="anchor" href="#attributes">Attributes</a></h2>
156
- <p>Certain attributes placed on the select tag or its options can be used to configure Chosen.</p>
157
-
158
- <h3>Example:</h3>
159
-
160
- <pre>
161
- <code class="language-markup">&lt;select class="my_select_box" data-placeholder="Select Your Options"&gt;
162
- &lt;option value="1"&gt;Option 1&lt;/option&gt;
163
- &lt;option value="2" selected&gt;Option 2&lt;/option&gt;
164
- &lt;option value="3" disabled&gt;Option 3&lt;/option&gt;
165
- &lt;/select&gt;</code>
166
- </pre>
167
-
168
- <table class="docs-table">
169
- <tr>
170
- <th>Attribute</th><th>Description</th>
171
- </tr>
172
- <tr>
173
- <td>data-placeholder</td>
174
- <td>
175
- <p>The text to be displayed as a placeholder when no options are selected for a select. Defaults to "Select an Option" for single selects or "Select Some Options" for multiple selects.</p>
176
- <p><strong>Note:</strong>This attribute overrides anything set in the <code class="language-javascript">placeholder_text_multiple</code> or <code class="language-javascript">placeholder_text_single</code> options.</p>
177
- </td>
178
- </tr>
179
- <tr>
180
- <td>multiple</td>
181
- <td>The attribute <code class="language-html">multiple</code> on your select box dictates whether Chosen will render a multiple or single select.</td>
182
- </tr>
183
- <tr>
184
- <td>selected, disabled</td>
185
- <td>Chosen automatically highlights selected options and disables disabled options.</td>
186
- </tr>
187
- </table>
188
-
189
- <h2><a name="classes" class="anchor" href="#classes">Classes</a></h2>
190
- <p>Classes placed on the select tag can be used to configure Chosen.</p>
191
-
192
- <h3>Example:</h3>
193
-
194
- <pre>
195
- <code class="language-markup">&lt;select class="my_select_box chosen-rtl"&gt;
196
- &lt;option value="1"&gt;Option 1&lt;/option&gt;
197
- &lt;option value="2"&gt;Option 2&lt;/option&gt;
198
- &lt;option value="3"&gt;Option 3&lt;/option&gt;
199
- &lt;/select&gt;</code>
200
- </pre>
201
-
202
- <table class="docs-table">
203
- <tr>
204
- <th>Classname</th>
205
- <th>Description</th>
206
- </tr>
207
- <tr>
208
- <td>chosen-rtl</td>
209
- <td>
210
- <p>Chosen supports right-to-left text in select boxes. Add the class <code class="language-html">chosen-rtl</code> to your select tag to support right-to-left text options.</p>
211
- <p><strong>Note:</strong> The <code class="language-html">chosen-rtl</code> class will pass through to the Chosen select even when the <code class="language-javascript">inherit_select_classes</code> option is set to <code class="language-javascript">false</code>.</p>
212
- <p><strong>Note:</strong> This is deprecated in favor of using the <code class="language-javascript">rtl: true</code> option (see the <a href="#options">Options section</a>).</p>
213
- </td>
214
- </tr>
215
- </table>
216
-
217
- <h2><a name="triggered-events" class="anchor" href="#triggered-events">Triggered Events</a></h2>
218
- <p>Chosen triggers a number of standard and custom events on the original select field.</p>
219
-
220
- <h3>Example:</h3>
221
-
222
- <pre>
223
- <code class="language-javascript">$('.my_select_box').on('change', function(evt, params) {
224
- do_something(evt, params);
225
- });</code>
226
- </pre>
227
-
228
- <table class="docs-table">
229
- <tr>
230
- <th>Event</th><th>Description</th>
231
- </tr>
232
- <tr>
233
- <td>change</td>
234
- <td>
235
- <p>Chosen triggers the standard DOM event whenever a selection is made (it also sends a <code class="language-javascript">selected</code> or <code class="language-javascript">deselected</code> parameter that tells you which option was changed).</p>
236
- <p><strong>Note:</strong> The selected and deselected parameters are not available for Prototype.</p>
237
- </td>
238
- </tr>
239
- <tr>
240
- <td>chosen:ready</td>
241
- <td>Triggered after Chosen has been fully instantiated.</td>
242
- </tr>
243
- <tr>
244
- <td>chosen:maxselected</td>
245
- <td>Triggered if <code class="language-javascript">max_selected_options</code> is set and that total is broken.</td>
246
- </tr>
247
- <tr>
248
- <td>chosen:showing_dropdown</td>
249
- <td>Triggered when Chosen’s dropdown is opened.</td>
250
- </tr>
251
- <tr>
252
- <td>chosen:hiding_dropdown</td>
253
- <td>Triggered when Chosen’s dropdown is closed.</td>
254
- </tr>
255
- <tr>
256
- <td>chosen:no_results</td>
257
- <td>Triggered when a search returns no matching results.</td>
258
- </tr>
259
- </table>
260
-
261
- <p>
262
- <strong>Note:</strong> all custom Chosen events (those that begin with <code class="language-javascript">chosen:</code>) also include the <code class="language-javascript">chosen</code> object as a parameter.
263
- </p>
264
-
265
- <h2><a name="triggerable-events" class="anchor" href="#triggerable-events">Triggerable Events</a></h2>
266
- <p>You can trigger several events on the original select field to invoke a behavior in Chosen.</p>
267
-
268
- <h3>Example:</h3>
269
-
270
- <pre>
271
- <code class="language-javascript">// tell Chosen that a select has changed
272
- $('.my_select_box').trigger('chosen:updated');</code>
273
- </pre>
274
-
275
- <table class="docs-table">
276
- <tr>
277
- <th>Event</th><th>Description</th>
278
- </tr>
279
- <tr>
280
- <td>chosen:updated</td>
281
- <td>This event should be triggered whenever Chosen’s underlying select element changes (such as a change in selected options).</td>
282
- </tr>
283
- <tr>
284
- <td>chosen:activate</td>
285
- <td>This is the equivalant of focusing a standard HTML select field. When activated, Chosen will capure keypress events as if you had clicked the field directly.</td>
286
- </tr>
287
- <tr>
288
- <td>chosen:open</td>
289
- <td>This event activates Chosen and also displays the search results.</td>
290
- </tr>
291
- <tr>
292
- <td>chosen:close</td>
293
- <td>This event deactivates Chosen and hides the search results.</td>
294
- </tr>
295
- </table>
296
-
297
- <footer>
298
- &copy; 2011&ndash;2016 <a href="http://www.getharvest.com/">Harvest</a>. Chosen is licensed under the <a href="https://github.com/harvesthq/chosen/blob/master/LICENSE.md">MIT license</a>.
299
- </footer>
300
-
301
- </div>
302
- </div>
303
- <div class="oss-bar">
304
- <ul>
305
- <li><a class="fork" href="https://github.com/harvesthq/chosen">Fork on Github</a></li>
306
- <li><a class="harvest" href="http://www.getharvest.com/">Built by Harvest</a></li>
307
- </ul>
308
- </div>
309
- <script src="docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
310
- </body>
311
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/lib/chosen/package.json DELETED
@@ -1,50 +0,0 @@
1
- {
2
- "name": "chosen-js",
3
- "version": "1.8.2",
4
- "description": "Chosen is a JavaScript plugin that makes select boxes user-friendly. It is currently available in both jQuery and Prototype flavors.",
5
- "keywords": [
6
- "select",
7
- "multiselect",
8
- "dropdown",
9
- "form",
10
- "input",
11
- "ui"
12
- ],
13
- "homepage": "https://harvesthq.github.io/chosen/",
14
- "bugs": "https://github.com/harvesthq/chosen/issues",
15
- "license": "MIT",
16
- "contributors": [
17
- {
18
- "name": "Patrick Filler",
19
- "url": "https://github.com/pfiller"
20
- },
21
- {
22
- "name": "Christophe Coevoet",
23
- "url": "https://github.com/stof"
24
- },
25
- {
26
- "name": "Ken Earley",
27
- "url": "https://github.com/kenearley"
28
- },
29
- {
30
- "name": "Koen Punt",
31
- "url": "https://github.com/koenpunt"
32
- }
33
- ],
34
- "dependencies": {},
35
- "files": [
36
- "chosen.jquery.js",
37
- "chosen.jquery.min.js",
38
- "chosen.proto.js",
39
- "chosen.proto.min.js",
40
- "chosen.css",
41
- "chosen.min.css",
42
- "chosen-sprite@2x.png",
43
- "chosen-sprite.png"
44
- ],
45
- "main": "chosen.jquery.js",
46
- "repository": {
47
- "type": "git",
48
- "url": "https://github.com/harvesthq/chosen.git"
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
async-javascript.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Async JavaScript
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Async JavaScript gives you full control of which scripts to add a 'async' or 'defer' attribute to or to exclude to help increase the performance of your WordPress website
6
- * Version: 2.18.06.13
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: asyncjs
3
  * Plugin Name: Async JavaScript
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Async JavaScript gives you full control of which scripts to add a 'async' or 'defer' attribute to or to exclude to help increase the performance of your WordPress website
6
+ * Version: 2.18.12.10
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: asyncjs
asyncjsAllAjax.php CHANGED
@@ -382,6 +382,8 @@ if ( !isset( $_POST['sub_action'] ) ) {
382
  break;
383
  case 'aj_save_settings':
384
  $aj_enabled = sanitize_text_field( $_POST['aj_enabled'] );
 
 
385
  $aj_method = sanitize_text_field( $_POST['aj_method'] );
386
  $aj_jquery = sanitize_text_field( $_POST['aj_jquery'] );
387
  $aj_async = sanitize_text_field( $_POST['aj_async'] );
@@ -392,6 +394,8 @@ if ( !isset( $_POST['sub_action'] ) ) {
392
  $aj_autoptimize_enabled = sanitize_text_field( $_POST['aj_autoptimize_enabled'] );
393
  $aj_autoptimize_method = sanitize_text_field( $_POST['aj_autoptimize_method'] );
394
  update_option( 'aj_enabled', $aj_enabled );
 
 
395
  update_option( 'aj_method', $aj_method );
396
  update_option( 'aj_jquery', $aj_jquery );
397
  update_option( 'aj_async', $aj_async );
382
  break;
383
  case 'aj_save_settings':
384
  $aj_enabled = sanitize_text_field( $_POST['aj_enabled'] );
385
+ $aj_enabled_logged = sanitize_text_field( $_POST['aj_enabled_logged'] );
386
+ $aj_enabled_shop = sanitize_text_field( $_POST['aj_enabled_shop'] );
387
  $aj_method = sanitize_text_field( $_POST['aj_method'] );
388
  $aj_jquery = sanitize_text_field( $_POST['aj_jquery'] );
389
  $aj_async = sanitize_text_field( $_POST['aj_async'] );
394
  $aj_autoptimize_enabled = sanitize_text_field( $_POST['aj_autoptimize_enabled'] );
395
  $aj_autoptimize_method = sanitize_text_field( $_POST['aj_autoptimize_method'] );
396
  update_option( 'aj_enabled', $aj_enabled );
397
+ update_option( 'aj_enabled_logged', $aj_enabled_logged );
398
+ update_option( 'aj_enabled_shop', $aj_enabled_shop );
399
  update_option( 'aj_method', $aj_method );
400
  update_option( 'aj_jquery', $aj_jquery );
401
  update_option( 'aj_async', $aj_async );
asyncjsBackendClass.php CHANGED
@@ -17,8 +17,9 @@ class AsyncJavaScriptBackend {
17
  define( 'AJ_ADMIN_URL', trailingslashit( admin_url() ) );
18
  define( 'AJ_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
19
  define( 'AJ_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
20
- define( 'AJ_VERSION', '3.18.04.23' );
21
  define( 'AJ_UA', 'Async JavaScript/' . AJ_VERSION . ' (+https://autoptimize.com/)' );
 
22
  add_action( 'plugins_loaded', array( $this, 'aj_admin_init' ) );
23
  add_action( 'admin_init', array( $this, 'aj_disable_pro' ) );
24
  }
@@ -64,7 +65,7 @@ class AsyncJavaScriptBackend {
64
  *
65
  */
66
  public static function aj_uninstall() {
67
- $optionsToRemove = array('aj_async','aj_autoptimize_enabled','aj_autoptimize_method','aj_defer','aj_enabled','aj_exclusions','aj_gtmetrix_api_key','aj_gtmetrix_results','aj_gtmetrix_server','aj_gtmetrix_username','aj_jquery','aj_method','aj_plugin_exclusions','aj_theme_exclusions','aj_version');
68
  if ( !is_multisite() ) {
69
  foreach ($delete_options as $del_opt) { delete_option( $del_opt ); }
70
  } else {
@@ -133,27 +134,24 @@ class AsyncJavaScriptBackend {
133
 
134
  // check if upgrading from early release so settings can be transferred
135
  $aj_version = get_option( 'aj_version', '' );
136
- if ( $aj_version == '' || $aj_version < '2017.04.25' ) {
137
- $aj_enabled = get_option( 'aj_enabled', 0 );
138
- $aj_method = get_option( 'aj_method', 'async' );
139
- $aj_jquery = ( get_option( 'aj_jquery', 'async' ) == 'same' ) ? $aj_method : get_option( 'aj_jquery', 'async' );
140
- $aj_async = get_option( 'aj_async', '' );
141
- $aj_defer = get_option( 'aj_defer', '' );
142
- $aj_exclusions = get_option( 'aj_exclusions', '' );
143
- $aj_plugin_exclusions = ( is_array( get_option( 'aj_plugin_exclusions', array() ) ) && !is_null( get_option( 'aj_plugin_exclusions', array() ) ) ? get_option( 'aj_plugin_exclusions', array() ) : explode( ',', get_option( 'aj_plugin_exclusions', '' ) ) );
144
- $aj_theme_exclusions = ( is_array( get_option( 'aj_theme_exclusions', array() ) ) && !is_null( get_option( 'aj_theme_exclusions', array() ) ) ? get_option( 'aj_theme_exclusions', array() ) : explode( ',', get_option( 'aj_theme_exclusions', '' ) ) );
145
- $aj_autoptimize_enabled = get_option( 'aj_autoptimize_enabled', 0 );
146
- $aj_autoptimize_method = get_option( 'aj_autoptimize_method', 'async' );
147
- update_option( 'aj_enabled', $aj_enabled );
148
- update_option( 'aj_method', $aj_method );
149
- update_option( 'aj_jquery', $aj_jquery );
150
- update_option( 'aj_async', $aj_async );
151
- update_option( 'aj_defer', $aj_defer );
152
- update_option( 'aj_exclusions', $aj_exclusions );
153
- update_option( 'aj_plugin_exclusions', $aj_plugin_exclusions );
154
- update_option( 'aj_theme_exclusions', $aj_theme_exclusions );
155
- update_option( 'aj_autoptimize_enabled', $aj_autoptimize_enabled );
156
- update_option( 'aj_autoptimize_method', $aj_autoptimize_method );
157
  }
158
 
159
  if ( $aj_version != AJ_VERSION ) {
@@ -347,4 +345,25 @@ class AsyncJavaScriptBackend {
347
  public function aj_steps() {
348
  require_once('asyncjsAllAjax.php');
349
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  }
17
  define( 'AJ_ADMIN_URL', trailingslashit( admin_url() ) );
18
  define( 'AJ_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
19
  define( 'AJ_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
20
+ define( 'AJ_VERSION', '2.18.12.10' );
21
  define( 'AJ_UA', 'Async JavaScript/' . AJ_VERSION . ' (+https://autoptimize.com/)' );
22
+ add_filter( 'plugin_action_links_'.plugin_basename( 'async-javascript/async-javascript.php' ), array( $this, 'setmeta' ), 10, 2 );
23
  add_action( 'plugins_loaded', array( $this, 'aj_admin_init' ) );
24
  add_action( 'admin_init', array( $this, 'aj_disable_pro' ) );
25
  }
65
  *
66
  */
67
  public static function aj_uninstall() {
68
+ $optionsToRemove = array('aj_async','aj_autoptimize_enabled','aj_autoptimize_method','aj_defer','aj_enabled','aj_enabled_logged','aj_enabled_shop','aj_exclusions','aj_gtmetrix_api_key','aj_gtmetrix_results','aj_gtmetrix_server','aj_gtmetrix_username','aj_jquery','aj_method','aj_plugin_exclusions','aj_theme_exclusions','aj_version');
69
  if ( !is_multisite() ) {
70
  foreach ($delete_options as $del_opt) { delete_option( $del_opt ); }
71
  } else {
134
 
135
  // check if upgrading from early release so settings can be transferred
136
  $aj_version = get_option( 'aj_version', '' );
137
+ if ( $aj_version == '' ) {
138
+ // set default values
139
+ update_option( 'aj_enabled', 0 );
140
+ update_option( 'aj_method', 'async' );
141
+ update_option( 'aj_enabled_logged', 0 );
142
+ update_option( 'aj_enabled_shop', 0 );
143
+ update_option( 'aj_jquery', 'exclude' );
144
+ update_option( 'aj_async', '' );
145
+ update_option( 'aj_defer', '' );
146
+ update_option( 'aj_exclusions', '' );
147
+ update_option( 'aj_plugin_exclusions', '' );
148
+ update_option( 'aj_theme_exclusions', '' );
149
+ update_option( 'aj_autoptimize_enabled', 0 );
150
+ update_option( 'aj_autoptimize_method', 'async' );
151
+ } else if ( $aj_version < '2.18.12.10' || $aj_version == '3.18.04.23' ) {
152
+ // upgrade from 2.18.06.13, enable aj for logged users & checkout/ cart to ensure non-regression
153
+ update_option( 'aj_enabled_logged', 1 );
154
+ update_option( 'aj_enabled_shop', 1 );
 
 
 
155
  }
156
 
157
  if ( $aj_version != AJ_VERSION ) {
345
  public function aj_steps() {
346
  require_once('asyncjsAllAjax.php');
347
  }
348
+
349
+ /*
350
+ * setmeta function as in Autoptimize to add settings link on plugin overview page
351
+ */
352
+ public function setmeta($links, $file = null)
353
+ {
354
+ // Inspired on http://wpengineer.com/meta-links-for-wordpress-plugins/.
355
+ // Do it only once - saves time.
356
+ static $plugin;
357
+ if ( empty( $plugin ) ) {
358
+ $plugin = plugin_basename( AJ_PLUGIN_DIR . 'async-javascript.php' );
359
+ }
360
+
361
+ // If it's us, add the link.
362
+ if ( $file === $plugin ) {
363
+ $newlink = array( sprintf( '<a href="options-general.php?page=async-javascript">%s</a>', __( 'Settings' ) ) );
364
+ $links = array_merge( $newlink, $links );
365
+ }
366
+
367
+ return $links;
368
+ }
369
  }
asyncjsFrontendClass.php CHANGED
@@ -65,7 +65,7 @@ class AsyncJavaScriptFrontend {
65
  $aj_plugin_exclusions = get_option( 'aj_plugin_exclusions', array() );
66
  $aj_theme_exclusions = get_option( 'aj_theme_exclusions', array() );
67
  }
68
- if ( false !== $aj_enabled && false === is_admin() && false === $this->aj_is_amp() && false === $this->aj_noptimize() ) {
69
  if ( is_array( $aj_plugin_exclusions ) && !empty( $aj_plugin_exclusions ) ) {
70
  foreach ( $aj_plugin_exclusions as $aj_plugin_exclusion ) {
71
  $aj_plugin_exclusion = trim( $aj_plugin_exclusion );
@@ -178,4 +178,56 @@ class AsyncJavaScriptFrontend {
178
  return false;
179
  }
180
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
65
  $aj_plugin_exclusions = get_option( 'aj_plugin_exclusions', array() );
66
  $aj_theme_exclusions = get_option( 'aj_theme_exclusions', array() );
67
  }
68
+ if ( false !== $aj_enabled && false !== $this->aj_shop() && false !== $this->aj_logged() && false === is_admin() && false === $this->aj_is_amp() && false === $this->aj_noptimize() ) {
69
  if ( is_array( $aj_plugin_exclusions ) && !empty( $aj_plugin_exclusions ) ) {
70
  foreach ( $aj_plugin_exclusions as $aj_plugin_exclusion ) {
71
  $aj_plugin_exclusion = trim( $aj_plugin_exclusion );
178
  return false;
179
  }
180
  }
181
+
182
+ /**
183
+ * Returns false if user is logged on and option was set to
184
+ * not async for logged on users, return true otherwise.
185
+ *
186
+ * @return bool
187
+ */
188
+ public static function aj_logged()
189
+ {
190
+ static $_do_logged = null;
191
+
192
+ if ( is_null( $_do_logged ) ) {
193
+ $aj_enabled_logged = get_option( 'aj_enabled_logged', 0 );
194
+ if ( $aj_enabled_logged == 1 ) {
195
+ $_do_logged = true;
196
+ } else if ( is_user_logged_in() && current_user_can( 'edit_posts' ) ) {
197
+ $_do_logged = false;
198
+ } else {
199
+ $_do_logged = true;
200
+ }
201
+ }
202
+
203
+ return $_do_logged;
204
+ }
205
+
206
+ /**
207
+ * Returns false if user is on shop checkout/ cart page
208
+ * and option to async shop was not set, return true otherwise.
209
+ *
210
+ * @return bool
211
+ */
212
+
213
+ public static function aj_shop()
214
+ {
215
+ static $_do_shop = null;
216
+
217
+ if ( is_null( $_do_shop ) ) {
218
+ $aj_enabled_shop = get_option( 'aj_enabled_shop', 0 );
219
+ $_do_shop = true;
220
+ if ( $aj_enabled_shop != 1 ) {
221
+ // Checking for woocommerce, easy digital downloads and wp ecommerce...
222
+ foreach ( array( 'is_checkout', 'is_cart', 'edd_is_checkout', 'wpsc_is_cart', 'wpsc_is_checkout' ) as $func ) {
223
+ if ( function_exists( $func ) && $func() ) {
224
+ $_do_shop = false;
225
+ break;
226
+ }
227
+ }
228
+ }
229
+ }
230
+
231
+ return $_do_shop;
232
+ }
233
  }
asyncjsSettingsScreens.php CHANGED
@@ -9,6 +9,10 @@ $aj_gtmetrix_api_key = get_option('aj_gtmetrix_api_key', '');
9
  $aj_gtmetrix_server = get_option('aj_gtmetrix_server', '');
10
  $aj_enabled = get_option('aj_enabled', 0);
11
  $aj_enabled_checked = ($aj_enabled == 1) ? ' checked="checked"' : '';
 
 
 
 
12
  $aj_method = get_option('aj_method', 'async');
13
  $aj_method_async = ($aj_method == 'async') ? ' checked="checked"' : '';
14
  $aj_method_defer = ($aj_method == 'defer') ? ' checked="checked"' : '';
@@ -33,7 +37,15 @@ $aj_autoptimize_defer = ($aj_autoptimize_method == 'defer') ? ' checked="checked
33
  <h3><?php _e('Enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?></h3>
34
  <p>
35
  <label><?php _e('Enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?>? </label>
36
- <input type="checkbox" id="aj_enabled" id="aj_enabled" value="1" <?php echo $aj_enabled_checked; ?> />
 
 
 
 
 
 
 
 
37
  </p>
38
  </div>
39
 
@@ -59,7 +71,7 @@ $aj_autoptimize_defer = ($aj_autoptimize_method == 'defer') ? ' checked="checked
59
  <p><?php _e('Often if jQuery is loaded with <strong>async</strong> or <strong>defer</strong> it can break some jQuery functions, specifically inline scripts which require jQuery to be loaded before the scripts are run. <strong><em>Sometimes</em></strong> choosing a different method (<strong>async</strong> or <strong>defer</strong>) will work, otherwise it may be necessary to exclude jQuery from having <strong>async</strong> or <strong>defer</strong> applied.', 'asyncjs'); ?></p>
60
  <p>
61
  <label><?php _e('jQuery Method: ', 'asyncjs'); ?></label>
62
- <input type="radio" name="aj_jquery" value="async" <?php echo $aj_jquery_async; ?> /> Async <input type="radio" name="aj_jquery" value="defer" <?php echo $aj_jquery_defer; ?> /> Defer <input type="radio" name="aj_jquery" value="exclude" <?php echo $aj_jquery_exclude; ?> /> <?php _e('Exclude', 'asyncjs'); ?>
63
  </p>
64
  </div>
65
  <div class="asItemDetail">
@@ -142,9 +154,9 @@ echo $output;
142
  <div class="asItemDetail">
143
  <h3><?php echo AJ_TITLE; ?> <?php _e('For Plugins', 'asyncjs'); ?></h3>
144
  <p><?php _e('Although not recommended, some themes / plugins can load JavaScript files without using the <strong><a href="https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts" target="_blank">wp_enqueue_script</a></strong> function. In some cases this is necessary for the functionality of the theme / plugin.', 'asyncjs'); ?></p>
145
- <p><?php _e('If these themes / plugins provide a hook that can be used to manipulate how the JavaScript file is loaded then <?php echo AJ_TITLE; ?> may be able to provide support for these themes / plugins.', 'asyncjs'); ?></p>
146
- <p><?php _e('If you have any active themes / plugins that <?php echo AJ_TITLE; ?> supports then these will be listed below.', 'asyncjs'); ?></p>
147
- <p><?php _e('If you think you have found a plugin that <?php echo AJ_TITLE; ?> may be able to provide support for please lodge a ticket at <a href="https://wordpress.org/support/plugin/async-javascript" target="_blank">https://wordpress.org/support/plugin/async-javascript</a>', 'asyncjs'); ?></p>
148
  <?php
149
  if (is_plugin_active('autoptimize/autoptimize.php') || is_plugin_active('autoptimize-beta/autoptimize.php')) {
150
  ?>
9
  $aj_gtmetrix_server = get_option('aj_gtmetrix_server', '');
10
  $aj_enabled = get_option('aj_enabled', 0);
11
  $aj_enabled_checked = ($aj_enabled == 1) ? ' checked="checked"' : '';
12
+ $aj_enabled_logged = get_option('aj_enabled_logged', 0);
13
+ $aj_enabled_logged_checked = ($aj_enabled_logged == 1) ? ' checked="checked"' : '';
14
+ $aj_enabled_shop = get_option('aj_enabled_shop', 0);
15
+ $aj_enabled_shop_checked = ($aj_enabled_shop == 1) ? ' checked="checked"' : '';
16
  $aj_method = get_option('aj_method', 'async');
17
  $aj_method_async = ($aj_method == 'async') ? ' checked="checked"' : '';
18
  $aj_method_defer = ($aj_method == 'defer') ? ' checked="checked"' : '';
37
  <h3><?php _e('Enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?></h3>
38
  <p>
39
  <label><?php _e('Enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?>? </label>
40
+ <input type="checkbox" name="aj_enabled" id="aj_enabled" value="1" <?php echo $aj_enabled_checked; ?> />
41
+ </p>
42
+ <p class='aj_enabled_sub <?php if ( ! $aj_enabled_checked ) { echo " hidden"; } ?>'>
43
+ <label><?php _e('Also enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?> <?php _e('for logged in users','asyncjs'); ?>? </label>
44
+ <input type="checkbox" name="aj_enabled_logged" id="aj_enabled_logged" value="1" <?php echo $aj_enabled_logged_checked; ?> />
45
+ </p>
46
+ <p class='aj_enabled_sub <?php if ( ! $aj_enabled_checked ) { echo " hidden"; } ?>'>
47
+ <label><?php _e('Also enable ', 'asyncjs'); ?><?php echo AJ_TITLE; ?> <?php _e('on cart/ checkout pages','asyncjs'); ?>? </label>
48
+ <input type="checkbox" name="aj_enabled_shop" id="aj_enabled_shop" value="1" <?php echo $aj_enabled_shop_checked; ?> />
49
  </p>
50
  </div>
51
 
71
  <p><?php _e('Often if jQuery is loaded with <strong>async</strong> or <strong>defer</strong> it can break some jQuery functions, specifically inline scripts which require jQuery to be loaded before the scripts are run. <strong><em>Sometimes</em></strong> choosing a different method (<strong>async</strong> or <strong>defer</strong>) will work, otherwise it may be necessary to exclude jQuery from having <strong>async</strong> or <strong>defer</strong> applied.', 'asyncjs'); ?></p>
72
  <p>
73
  <label><?php _e('jQuery Method: ', 'asyncjs'); ?></label>
74
+ <input type="radio" id="aj_jquery" name="aj_jquery" value="async" <?php echo $aj_jquery_async; ?> /> Async <input type="radio" name="aj_jquery" value="defer" <?php echo $aj_jquery_defer; ?> /> Defer <input type="radio" name="aj_jquery" value="exclude" <?php echo $aj_jquery_exclude; ?> /> <?php _e('Exclude', 'asyncjs'); ?>
75
  </p>
76
  </div>
77
  <div class="asItemDetail">
154
  <div class="asItemDetail">
155
  <h3><?php echo AJ_TITLE; ?> <?php _e('For Plugins', 'asyncjs'); ?></h3>
156
  <p><?php _e('Although not recommended, some themes / plugins can load JavaScript files without using the <strong><a href="https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts" target="_blank">wp_enqueue_script</a></strong> function. In some cases this is necessary for the functionality of the theme / plugin.', 'asyncjs'); ?></p>
157
+ <p><?php _e('If these themes / plugins provide a hook that can be used to manipulate how the JavaScript file is loaded then Async Javascript may be able to provide support for these themes / plugins.', 'asyncjs'); ?></p>
158
+ <p><?php _e('If you have any active themes / plugins that Async Javascript supports then these will be listed below.', 'asyncjs'); ?></p>
159
+ <p><?php _e('If you think you have found a plugin that Async Javascript may be able to provide support for please lodge a ticket at <a href="https://wordpress.org/support/plugin/async-javascript" target="_blank">https://wordpress.org/support/plugin/async-javascript</a>', 'asyncjs'); ?></p>
160
  <?php
161
  if (is_plugin_active('autoptimize/autoptimize.php') || is_plugin_active('autoptimize-beta/autoptimize.php')) {
162
  ?>
asyncjsWizardScreens.php CHANGED
@@ -265,7 +265,7 @@ if ($aj_gtmetrix_username != '' && $aj_gtmetrix_api_key != '') {
265
  <div class="asItemDetail aj_steps_hidden" id="aj_step_results">
266
  <h3><?php _e('Step 3: Results &amp; Recommendations', 'asyncjs');?></h3>
267
  <p><?php echo AJ_TITLE; ?> <?php _e('has finished testing your site with the most common configuration options.', 'asyncjs');?></p>
268
- <p><?php _e('Based on the tests Async JavaScript has determined that <span class="aj_gtmetrix_config"></span> has resuled in <span id="aj_gtmetrix_inde_pagespeed"></span> in PageSpeed from <span id="aj_gtmetrix_baseline_pagespeed"></span> to <span id="aj_gtmetrix_best_pagespeed"></span> and <span id="aj_gtmetrix_inde_yslow"></span> in YSlow from <span id="aj_gtmetrix_baseline_yslow"></span> to <span id="aj_gtmetrix_best_yslow"></span>, with a Fully Loaded time of', 'asyncjs');?> <span id="aj_gtmetrix_best_fullyloaded"></span>.</p>
269
  <p><?php _e('Before applying these settings it is important to check your site is still functioning correctly. Click the link below to open your site in a new tab / window to simulate the <?php echo AJ_TITLE; ?> settings and check that everything is working, and also be sure to check the console for any JavaScript errors (see <a href="https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors" target="_blank">Using Your Browser to Diagnose JavaScript Errors</a>)', 'asyncjs');?></p>
270
  <ul>
271
  <li><?php _e('Simulate', 'asyncjs');?> <span class="aj_gtmetrix_config"></span>: <a href="" id="aj_gtmetrix_best_url" target="_blank"></a></li>
265
  <div class="asItemDetail aj_steps_hidden" id="aj_step_results">
266
  <h3><?php _e('Step 3: Results &amp; Recommendations', 'asyncjs');?></h3>
267
  <p><?php echo AJ_TITLE; ?> <?php _e('has finished testing your site with the most common configuration options.', 'asyncjs');?></p>
268
+ <p><?php _e('Based on the tests Async JavaScript has determined that <span class="aj_gtmetrix_config"></span> has resulted in <span id="aj_gtmetrix_inde_pagespeed"></span> in PageSpeed from <span id="aj_gtmetrix_baseline_pagespeed"></span> to <span id="aj_gtmetrix_best_pagespeed"></span> and <span id="aj_gtmetrix_inde_yslow"></span> in YSlow from <span id="aj_gtmetrix_baseline_yslow"></span> to <span id="aj_gtmetrix_best_yslow"></span>, with a Fully Loaded time of', 'asyncjs');?> <span id="aj_gtmetrix_best_fullyloaded"></span>.</p>
269
  <p><?php _e('Before applying these settings it is important to check your site is still functioning correctly. Click the link below to open your site in a new tab / window to simulate the <?php echo AJ_TITLE; ?> settings and check that everything is working, and also be sure to check the console for any JavaScript errors (see <a href="https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors" target="_blank">Using Your Browser to Diagnose JavaScript Errors</a>)', 'asyncjs');?></p>
270
  <ul>
271
  <li><?php _e('Simulate', 'asyncjs');?> <span class="aj_gtmetrix_config"></span>: <a href="" id="aj_gtmetrix_best_url" target="_blank"></a></li>
js/admin.js CHANGED
@@ -1,9 +1,7 @@
1
  /* globals aj_localize_admin,jQuery */
2
  /* eslint no-console: 1 */
3
  // updated:
4
- // 2018-04-18 15:42:09
5
- // add notify settings in its own global function
6
- // so that it can easily be Modified and changed.
7
  function notifySettingsSaved() {
8
  jQuery("#aj_notification").
9
  fadeIn("slow").
@@ -207,22 +205,13 @@ jQuery(document).ready(function() {
207
  jQuery(".aj_chosen").chosen();
208
  }
209
 
210
- // jQuery(document).on(
211
- // "click",
212
- // ".aj-upgrade-notice .notice-dismiss",
213
- // function() {
214
- // var aj_nonce = jQuery("#aj_nonce").val();
215
- // var notice_id = jQuery(".aj-upgrade-notice").attr("data-id");
216
- // jQuery.ajax({
217
- // url: aj.ajaxurl,
218
- // data: {
219
- // action: "async_javascript_dismiss_upgrade",
220
- // notice_id: notice_id,
221
- // security: aj_nonce
222
- // }
223
- // });
224
- // }
225
- // );
226
 
227
  jQuery(document).on("click", ".aj_steps_button", function(e) {
228
  e.preventDefault();
@@ -288,6 +277,16 @@ jQuery(document).ready(function() {
288
  } else {
289
  aj_enabled = 0;
290
  }
 
 
 
 
 
 
 
 
 
 
291
  var aj_method = jQuery("input[type=radio][name=aj_method]:checked").val();
292
  var aj_jquery = jQuery("input[type=radio][name=aj_jquery]:checked").val();
293
  var aj_async = jQuery("#aj_async").val();
@@ -330,6 +329,8 @@ jQuery(document).ready(function() {
330
  action: "aj_steps",
331
  sub_action: "aj_save_settings",
332
  aj_enabled: aj_enabled,
 
 
333
  aj_method: aj_method,
334
  aj_jquery: aj_jquery,
335
  aj_async: aj_async,
1
  /* globals aj_localize_admin,jQuery */
2
  /* eslint no-console: 1 */
3
  // updated:
4
+ // 2018-12-10 15:42:09
 
 
5
  function notifySettingsSaved() {
6
  jQuery("#aj_notification").
7
  fadeIn("slow").
205
  jQuery(".aj_chosen").chosen();
206
  }
207
 
208
+ jQuery( "#aj_enabled" ).change(function() {
209
+ if (this.checked) {
210
+ jQuery(".aj_enabled_sub").show("slow");
211
+ } else {
212
+ jQuery(".aj_enabled_sub:visible").hide("slow");;
213
+ }
214
+ });
 
 
 
 
 
 
 
 
 
215
 
216
  jQuery(document).on("click", ".aj_steps_button", function(e) {
217
  e.preventDefault();
277
  } else {
278
  aj_enabled = 0;
279
  }
280
+ if (jQuery("#aj_enabled_logged").is(":checked")) {
281
+ aj_enabled_logged = 1;
282
+ } else {
283
+ aj_enabled_logged = 0;
284
+ }
285
+ if (jQuery("#aj_enabled_shop").is(":checked")) {
286
+ aj_enabled_shop = 1;
287
+ } else {
288
+ aj_enabled_shop = 0;
289
+ }
290
  var aj_method = jQuery("input[type=radio][name=aj_method]:checked").val();
291
  var aj_jquery = jQuery("input[type=radio][name=aj_jquery]:checked").val();
292
  var aj_async = jQuery("#aj_async").val();
329
  action: "aj_steps",
330
  sub_action: "aj_save_settings",
331
  aj_enabled: aj_enabled,
332
+ aj_enabled_logged: aj_enabled_logged,
333
+ aj_enabled_shop: aj_enabled_shop,
334
  aj_method: aj_method,
335
  aj_jquery: aj_jquery,
336
  aj_async: aj_async,
js/admin.min.js CHANGED
@@ -1 +1 @@
1
- function notifySettingsSaved(){jQuery("#aj_notification").fadeIn("slow").html('Settings Saved <span class="aj_dismiss"><a title="dismiss this notification">x</a></span>').delay(500).fadeOut("slow")}function aj_step(e){var t=jQuery("#aj_nonce").val(),a=jQuery("#aj_gtmetrix_username").val(),s=jQuery("#aj_gtmetrix_api_key").val(),r=jQuery("#aj_gtmetrix_server").val(),_={action:"aj_steps",sub_action:e,site_url:aj_localize_admin.siteurl,aj_gtmetrix_username:a,aj_gtmetrix_api_key:s,aj_gtmetrix_server:r,security:t};"aj_step_results"==e?jQuery.post(aj_localize_admin.ajaxurl,_,function(e){try{if(e=jQuery.parseJSON(e),e.status!==!1){var t=e.baseline_pagespeed,a=e.baseline_yslow,s=e.results.pagespeed_score,r=e.results.yslow_score,_=e.name,j=parseFloat(e.results.fully_loaded_time/1e3).toFixed(2),l=e.url;jQuery(".aj_gtmetrix_config").html(_),s>t?jQuery("#aj_gtmetrix_inde_pagespeed").html("an increase"):s<t?jQuery("#aj_gtmetrix_inde_pagespeed").html("a decrease"):jQuery("#aj_gtmetrix_inde_pagespeed").html("no change"),r>a?jQuery("#aj_gtmetrix_inde_yslow").html("an increase"):r<a?jQuery("#aj_gtmetrix_inde_yslow").html("a decrease"):jQuery("#aj_gtmetrix_inde_yslow").html("no change"),jQuery("#aj_gtmetrix_baseline_pagespeed").html(t+"%"),jQuery("#aj_gtmetrix_best_pagespeed").html(s+"%"),jQuery("#aj_gtmetrix_baseline_yslow").html(a+"%"),jQuery("#aj_gtmetrix_best_yslow").html(r+"%"),jQuery("#aj_gtmetrix_best_fullyloaded").html(j+"s"),jQuery("#aj_gtmetrix_best_url").attr("href",l).html(l),"aj_step2b"==e.id||"aj_step2c"==e.id?(jQuery("#aj_step4_jquery_excluded").hide(),jQuery("#aj_step4_jquery_not_excluded").show()):"aj_step2d"!=e.id&&"aj_step2e"!=e.id||(jQuery("#aj_step4_jquery_excluded").show(),jQuery("#aj_step4_jquery_not_excluded").hide()),jQuery(".aj_gtmetrix_credits").html(e.credits),jQuery("#aj_step_results").show()}else console.log(e)}catch(e){console.log(e)}}):jQuery.post(aj_localize_admin.ajaxurl,_,function(t){try{if(t=jQuery.parseJSON(t),t.status!==!1){var r=t.results.report_url+"/screenshot.jpg",_=t.results.pagespeed_score,j=t.results.yslow_score,l=parseFloat(t.results.fully_loaded_time/1e3).toFixed(2),i=Math.floor(t.results.page_bytes/1024);i>1024?i=i/1024+"MB":i+="KB";var o=t.results.page_elements,u='<a href="'+t.results.report_url+'" target="_blank">'+t.results.report_url+"</a>",n=u.replace("https://","https://"+a+":"+s+"@"),y=t.name,p=t.url,c=255*(1-_/100),d=255*(1-j/100),m=255*(_/100),Q=255*(j/100),h="rgb("+Math.floor(c)+","+Math.floor(m)+",0 )",g="rgb("+Math.floor(d)+","+Math.floor(Q)+",0 )";"aj_gtmetrix_test"==e&&(e="aj_latest"),jQuery("#"+e+"_please_wait").hide(),jQuery("."+e+"_screenshot").attr("src",r),jQuery("."+e+"_pagespeed").html(_+"%").css({color:h}),jQuery("."+e+"_yslow").html(j+"%").css({color:g}),jQuery("."+e+"_flt").html(l+"s"),jQuery("."+e+"_tps").html(i),jQuery("."+e+"_requests").html(o),jQuery("."+e+"_report").html(n),jQuery("#"+e+"_gtmetrix_results").show(),jQuery("."+e+"_gtmetrix").html(y),jQuery("."+e+"_url").attr("href",p).html(p),jQuery(".aj_gtmetrix_credits").html(t.credits),"aj_step2"==e?(notifySettingsSaved(),jQuery("#aj_step2b").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2b").offset().top},1e3),aj_step("aj_step2b")):"aj_step2b"==e?(jQuery("#aj_step2c").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2c").offset().top},1e3),aj_step("aj_step2c")):"aj_step2c"==e?(jQuery("#aj_step2d").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2d").offset().top},1e3),aj_step("aj_step2d")):"aj_step2d"==e?(jQuery("#aj_step2e").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2e").offset().top},1e3),aj_step("aj_step2e")):"aj_step2e"==e?(jQuery("#aj_step_results").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step_results").offset().top},1e3),aj_step("aj_step_results")):"aj_latest"==e&&(notifySettingsSaved(),jQuery("#aj_latest_gtmetrix_results").show(),jQuery("#aj_latest_please_wait").hide(),jQuery("html, body").animate({scrollTop:jQuery("#aj_latest_please_wait").offset().top},1e3))}else console.log(t)}catch(e){console.log(e)}})}jQuery(document).ready(function(){"function"==typeof jQuery(".aj_chosen").chosen&&jQuery(".aj_chosen").chosen(),jQuery(document).on("click",".aj_steps_button",function(e){e.preventDefault();var t=jQuery("#aj_nonce").val(),a=jQuery(this).attr("data-id"),s=a.replace("_apply",""),r=1;if("aj_goto_settings"==a){var _=aj_localize_admin.ajadminurl+"&tab=settings";window.location.href=_}else if("aj_apply_settings"==a||"aj_step2b_apply"==a||"aj_step2c_apply"==a||"aj_step2d_apply"==a||"aj_step2e_apply"==a){"aj_apply_settings"!=a?s=a.replace("_apply",""):(s="",notifySettingsSaved());var j={action:"aj_steps",sub_action:"aj_apply_settings",settings:s,site_url:aj_localize_admin.siteurl,security:t};jQuery.post(aj_localize_admin.ajaxurl,j,function(e){try{if(e=jQuery.parseJSON(e),e.status!==!1){if(jQuery("#aj_step4").length)jQuery("#aj_step5").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step5").offset().top},1e3),""!=s&&notifySettingsSaved();else if(""!=s){notifySettingsSaved();var t=aj_localize_admin.ajadminurl+"&tab=settings";window.location.href=t}}else console.log(e)}catch(e){console.log(e)}})}else if("aj_save_settings"==a){r=jQuery("#aj_enabled").is(":checked")?1:0;var l=jQuery("input[type=radio][name=aj_method]:checked").val(),i=jQuery("input[type=radio][name=aj_jquery]:checked").val(),o=jQuery("#aj_async").val(),u=jQuery("#aj_defer").val(),n=jQuery("#aj_exclusions").val(),y=jQuery("#aj_plugin_exclusions").chosen().val(),p=jQuery("#aj_theme_exclusions").chosen().val(),c=1,d=jQuery("input[type=radio][name=aj_autoptimize_method]:checked").val();"function"==typeof jQuery(".aj_chosen").chosen?(y=jQuery("#aj_plugin_exclusions").chosen().val(),p=jQuery("#aj_theme_exclusions").chosen().val()):(y=jQuery("#aj_plugin_exclusions").val(),p=jQuery("#aj_theme_exclusions").val()),jQuery("#aj_autoptimize_enabled").is(":visible")?jQuery("#aj_autoptimize_enabled").is(":checked")?(c=1,d=jQuery("input[type=radio][name=aj_autoptimize_method]:checked").val()):(c=0,d=jQuery("input[type=radio][name=aj_autoptimize_method]:checked").val()):(c=0,d="async");var m={action:"aj_steps",sub_action:"aj_save_settings",aj_enabled:r,aj_method:l,aj_jquery:i,aj_async:o,aj_defer:u,aj_exclusions:n,aj_plugin_exclusions:y,aj_theme_exclusions:p,aj_autoptimize_enabled:c,aj_autoptimize_method:d,security:t};jQuery.post(aj_localize_admin.ajaxurl,m,function(e){try{e=jQuery.parseJSON(e),e.status!==!1?notifySettingsSaved():console.log(e)}catch(e){console.log(e)}})}else{var Q=jQuery("#aj_gtmetrix_username").val(),h=jQuery("#aj_gtmetrix_api_key").val(),g=(jQuery("#aj_gtmetrix_server").val(),!1);if(""==Q&&(jQuery("#aj_gtmetrix_username").addClass("aj_field_error"),g=!0),""==h&&(jQuery("#aj_gtmetrix_api_key").addClass("aj_field_error"),g=!0),g!==!1)return!1;"aj_gtmetrix_test"!=a?(jQuery(this).hide(),jQuery("#"+a).show()):jQuery("#aj_latest_please_wait").show(),aj_step(a)}}),jQuery(document).on("change","input[type=radio][name=aj_step4_check]",function(){var e=(jQuery("#aj_nonce").val(),jQuery(this).val());"y"==e?(jQuery("#aj_step4_y").show(),jQuery("#aj_step4_n").hide()):(jQuery("#aj_step4_n").show(),jQuery("#aj_step4_y").hide())}),jQuery(document).on("click",".aj_dismiss",function(){jQuery("#aj_nonce").val();jQuery("#aj_notification").fadeOut("slow")})});
1
+ function notifySettingsSaved(){jQuery("#aj_notification").fadeIn("slow").html('Settings Saved <span class="aj_dismiss"><a title="dismiss this notification">x</a></span>').delay(500).fadeOut("slow")}function aj_step(h){var e=jQuery("#aj_nonce").val(),m=jQuery("#aj_gtmetrix_username").val(),Q=jQuery("#aj_gtmetrix_api_key").val(),a=jQuery("#aj_gtmetrix_server").val(),t={action:"aj_steps",sub_action:h,site_url:aj_localize_admin.siteurl,aj_gtmetrix_username:m,aj_gtmetrix_api_key:Q,aj_gtmetrix_server:a,security:e};"aj_step_results"==h?jQuery.post(aj_localize_admin.ajaxurl,t,function(e){try{if(!1!==(e=jQuery.parseJSON(e)).status){var a=e.baseline_pagespeed,t=e.baseline_yslow,s=e.results.pagespeed_score,_=e.results.yslow_score,r=e.name,j=parseFloat(e.results.fully_loaded_time/1e3).toFixed(2),l=e.url;jQuery(".aj_gtmetrix_config").html(r),a<s?jQuery("#aj_gtmetrix_inde_pagespeed").html("an increase"):s<a?jQuery("#aj_gtmetrix_inde_pagespeed").html("a decrease"):jQuery("#aj_gtmetrix_inde_pagespeed").html("no change"),t<_?jQuery("#aj_gtmetrix_inde_yslow").html("an increase"):_<t?jQuery("#aj_gtmetrix_inde_yslow").html("a decrease"):jQuery("#aj_gtmetrix_inde_yslow").html("no change"),jQuery("#aj_gtmetrix_baseline_pagespeed").html(a+"%"),jQuery("#aj_gtmetrix_best_pagespeed").html(s+"%"),jQuery("#aj_gtmetrix_baseline_yslow").html(t+"%"),jQuery("#aj_gtmetrix_best_yslow").html(_+"%"),jQuery("#aj_gtmetrix_best_fullyloaded").html(j+"s"),jQuery("#aj_gtmetrix_best_url").attr("href",l).html(l),"aj_step2b"==e.id||"aj_step2c"==e.id?(jQuery("#aj_step4_jquery_excluded").hide(),jQuery("#aj_step4_jquery_not_excluded").show()):"aj_step2d"!=e.id&&"aj_step2e"!=e.id||(jQuery("#aj_step4_jquery_excluded").show(),jQuery("#aj_step4_jquery_not_excluded").hide()),jQuery(".aj_gtmetrix_credits").html(e.credits),jQuery("#aj_step_results").show()}else console.log(e)}catch(e){console.log(e)}}):jQuery.post(aj_localize_admin.ajaxurl,t,function(e){try{if(!1!==(e=jQuery.parseJSON(e)).status){var a=e.results.report_url+"/screenshot.jpg",t=e.results.pagespeed_score,s=e.results.yslow_score,_=parseFloat(e.results.fully_loaded_time/1e3).toFixed(2),r=Math.floor(e.results.page_bytes/1024);1024<r?r=r/1024+"MB":r+="KB";var j=e.results.page_elements,l=('<a href="'+e.results.report_url+'" target="_blank">'+e.results.report_url+"</a>").replace("https://","https://"+m+":"+Q+"@"),o=e.name,i=e.url,u=255*(1-t/100),n=255*(1-s/100),y=t/100*255,p=s/100*255,c="rgb("+Math.floor(u)+","+Math.floor(y)+",0 )",d="rgb("+Math.floor(n)+","+Math.floor(p)+",0 )";"aj_gtmetrix_test"==h&&(h="aj_latest"),jQuery("#"+h+"_please_wait").hide(),jQuery("."+h+"_screenshot").attr("src",a),jQuery("."+h+"_pagespeed").html(t+"%").css({color:c}),jQuery("."+h+"_yslow").html(s+"%").css({color:d}),jQuery("."+h+"_flt").html(_+"s"),jQuery("."+h+"_tps").html(r),jQuery("."+h+"_requests").html(j),jQuery("."+h+"_report").html(l),jQuery("#"+h+"_gtmetrix_results").show(),jQuery("."+h+"_gtmetrix").html(o),jQuery("."+h+"_url").attr("href",i).html(i),jQuery(".aj_gtmetrix_credits").html(e.credits),"aj_step2"==h?(notifySettingsSaved(),jQuery("#aj_step2b").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2b").offset().top},1e3),aj_step("aj_step2b")):"aj_step2b"==h?(jQuery("#aj_step2c").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2c").offset().top},1e3),aj_step("aj_step2c")):"aj_step2c"==h?(jQuery("#aj_step2d").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2d").offset().top},1e3),aj_step("aj_step2d")):"aj_step2d"==h?(jQuery("#aj_step2e").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step2e").offset().top},1e3),aj_step("aj_step2e")):"aj_step2e"==h?(jQuery("#aj_step_results").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step_results").offset().top},1e3),aj_step("aj_step_results")):"aj_latest"==h&&(notifySettingsSaved(),jQuery("#aj_latest_gtmetrix_results").show(),jQuery("#aj_latest_please_wait").hide(),jQuery("html, body").animate({scrollTop:jQuery("#aj_latest_please_wait").offset().top},1e3))}else console.log(e)}catch(e){console.log(e)}})}jQuery(document).ready(function(){"function"==typeof jQuery(".aj_chosen").chosen&&jQuery(".aj_chosen").chosen(),jQuery("#aj_enabled").change(function(){this.checked?jQuery(".aj_enabled_sub").show("slow"):jQuery(".aj_enabled_sub:visible").hide("slow")}),jQuery(document).on("click",".aj_steps_button",function(e){e.preventDefault();var a=jQuery("#aj_nonce").val(),t=jQuery(this).attr("data-id"),s=t.replace("_apply",""),_=1;if("aj_goto_settings"==t){var r=aj_localize_admin.ajadminurl+"&tab=settings";window.location.href=r}else if("aj_apply_settings"==t||"aj_step2b_apply"==t||"aj_step2c_apply"==t||"aj_step2d_apply"==t||"aj_step2e_apply"==t){"aj_apply_settings"!=t?s=t.replace("_apply",""):(s="",notifySettingsSaved());var j={action:"aj_steps",sub_action:"aj_apply_settings",settings:s,site_url:aj_localize_admin.siteurl,security:a};jQuery.post(aj_localize_admin.ajaxurl,j,function(e){try{if(!1!==(e=jQuery.parseJSON(e)).status){if(jQuery("#aj_step4").length)jQuery("#aj_step5").show(),jQuery("html, body").animate({scrollTop:jQuery("#aj_step5").offset().top},1e3),""!=s&&notifySettingsSaved();else if(""!=s){notifySettingsSaved();var a=aj_localize_admin.ajadminurl+"&tab=settings";window.location.href=a}}else console.log(e)}catch(e){console.log(e)}})}else if("aj_save_settings"==t){_=jQuery("#aj_enabled").is(":checked")?1:0,jQuery("#aj_enabled_logged").is(":checked")?aj_enabled_logged=1:aj_enabled_logged=0,jQuery("#aj_enabled_shop").is(":checked")?aj_enabled_shop=1:aj_enabled_shop=0;var l=jQuery("input[type=radio][name=aj_method]:checked").val(),o=jQuery("input[type=radio][name=aj_jquery]:checked").val(),i=jQuery("#aj_async").val(),u=jQuery("#aj_defer").val(),n=jQuery("#aj_exclusions").val(),y=jQuery("#aj_plugin_exclusions").chosen().val(),p=jQuery("#aj_theme_exclusions").chosen().val(),c=1,d=jQuery("input[type=radio][name=aj_autoptimize_method]:checked").val();"function"==typeof jQuery(".aj_chosen").chosen?(y=jQuery("#aj_plugin_exclusions").chosen().val(),p=jQuery("#aj_theme_exclusions").chosen().val()):(y=jQuery("#aj_plugin_exclusions").val(),p=jQuery("#aj_theme_exclusions").val()),jQuery("#aj_autoptimize_enabled").is(":visible")?(c=jQuery("#aj_autoptimize_enabled").is(":checked")?1:0,d=jQuery("input[type=radio][name=aj_autoptimize_method]:checked").val()):(c=0,d="async");var h={action:"aj_steps",sub_action:"aj_save_settings",aj_enabled:_,aj_enabled_logged:aj_enabled_logged,aj_enabled_shop:aj_enabled_shop,aj_method:l,aj_jquery:o,aj_async:i,aj_defer:u,aj_exclusions:n,aj_plugin_exclusions:y,aj_theme_exclusions:p,aj_autoptimize_enabled:c,aj_autoptimize_method:d,security:a};jQuery.post(aj_localize_admin.ajaxurl,h,function(e){try{!1!==(e=jQuery.parseJSON(e)).status?notifySettingsSaved():console.log(e)}catch(e){console.log(e)}})}else{var m=jQuery("#aj_gtmetrix_username").val(),Q=jQuery("#aj_gtmetrix_api_key").val(),g=(jQuery("#aj_gtmetrix_server").val(),!1);if(""==m&&(jQuery("#aj_gtmetrix_username").addClass("aj_field_error"),g=!0),""==Q&&(jQuery("#aj_gtmetrix_api_key").addClass("aj_field_error"),g=!0),!1!==g)return!1;"aj_gtmetrix_test"!=t?(jQuery(this).hide(),jQuery("#"+t).show()):jQuery("#aj_latest_please_wait").show(),aj_step(t)}}),jQuery(document).on("change","input[type=radio][name=aj_step4_check]",function(){jQuery("#aj_nonce").val();"y"==jQuery(this).val()?(jQuery("#aj_step4_y").show(),jQuery("#aj_step4_n").hide()):(jQuery("#aj_step4_n").show(),jQuery("#aj_step4_y").hide())}),jQuery(document).on("click",".aj_dismiss",function(){jQuery("#aj_nonce").val();jQuery("#aj_notification").fadeOut("slow")})});
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: (cloughit), optimizingmatters, futtta, wormeyman
3
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
4
  Tags: async, javascript, pagespeed, performance, render blocking
5
  Requires at least: 4.6
6
- Tested up to: 4.9
7
- Stable tag: 2.18.06.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -55,11 +55,16 @@ We recommend using the awesome <a href="https://wordpress.org/plugins/autoptimiz
55
  * Disable the plugin
56
  * Delete the plugin
57
 
58
- == Screenshots ==
59
 
60
- Coming soon!
61
 
62
- == Changelog ==
 
 
 
 
 
63
 
64
  = 2.18.06.13 =
65
 
3
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
4
  Tags: async, javascript, pagespeed, performance, render blocking
5
  Requires at least: 4.6
6
+ Tested up to: 5.0
7
+ Stable tag: 2.18.12.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
55
  * Disable the plugin
56
  * Delete the plugin
57
 
58
+ == Changelog ==
59
 
60
+ = 2.18.12.10 =
61
 
62
+ * the "happy birthday to me" edition ;-)
63
+ * new: added option to disable Async JS for logged in users
64
+ * new: added option to disable Async JS on shop cart/ checkout pages (woocommerce, edd & wp ecommerce)
65
+ * added 'settings'-link to plugin overview screen (hi Mike!)
66
+ * updated the [chosen JS library](https://harvesthq.github.io/chosen/) to 1.8.7
67
+ * confirmed working with WordPress 5.0
68
 
69
  = 2.18.06.13 =
70